<!--#include file = "../LieHuo_inc/dbconn.asp"-->
<!--#include file = "../LieHuo_inc/cache.asp"-->
<!--#include file = "../LieHuo_inc/function.asp"-->
<% call dbconn %>
<% response.buffer = true %>
<%
'=======================================================================
'LieHuo Wms 2.5.0  允许转载和复制 请保留版权 否则后果自负 www.liehuo.net 
'=======================================================================
select case gqv("do")
	case "addsetup":addsetup
	case "editsetup":editsetup
	case "saveadd":saveadd
	case "saveedit":saveedit
	case else call alertbox("没有指定任何操作!",2)
end select
' *** ***  www.liehuo.net  *** ***
sub addsetup
	dim rscheck
	set rscheck = conn.execute("select top 1 * from DH_liehuo_setup")
	if not rscheck.eof then
		rscheck.close:set rscheck = nothing
		response.write("<script>window.location.href=""?do=editsetup"";</script>")
		response.end()
	end if
end sub
sub editsetup
	dim rs,sql,databox
	set rs = server.createobject(G_liehuo_RS)
	sql = "select top 1 * from DH_liehuo_setup order by id desc"
	rs.open sql,conn,1,1
	if not rs.eof then
	databox = rs.getrows()
	rs.close:set rs = nothing
	dim tempstr01,tempstr02,tempstr03,tempstr04,tempstr05
	if databox(10,0) = ".htm" then tempstr01 = "selected"
	if databox(10,0) = ".html" then tempstr02 = "selected"
	if databox(10,0) = ".shtm" then tempstr03 = "selected"
	if databox(10,0) = ".shtml" then tempstr04 = "selected"
	if databox(10,0) = ".asp" then tempstr05 = "selected"
	LINE "<title>Liehuo! Wms 程序安装 - Powered By LieHuo.org</title>"
	LINE "<link rel=""stylesheet"" href=""style.css"" type=""text/css"" media=""all"" />"
	LINE "<meta content=""Liehuo Team."" name=""Copyright"" />"
	LINE "</head>"
	LINE "<div class=""container"">"
	LINE "	<div class=""header"">"
	LINE "		<h1>Liehuo! Wms 程序安装</h1>"
	LINE "	<span>V2.5.0_Final 简体中文版 20090718</span>	<div class=""setup step2"">"
	LINE "		<h2>设置系统参数</h2>"
	LINE "		<p>请设置你的站点信息或丢弃该设置，直接进入下一步。</p>"
	LINE "	</div>"
	LINE "	<div class=""stepstat"">"
	LINE "		<ul>"
	LINE "			<li class="""">1</li>"
	LINE "			<li class=""current"">2</li>"
	LINE "			<li class=""unactivated"">3</li>"
	LINE "			<li class=""unactivated last"">4</li>"
	LINE "		</ul>"
	LINE "		<div class=""stepstatbg stepstat1""></div>"
	LINE "	</div>"
	LINE "</div>"
	LINE "<div class=""main"">"
	LINE "<div class=""desc"">"
	LINE "<form name=""form"" action=""?do=saveedit"" method=""post"">"
	LINE "<table align=""center"" width=""100%"" cellpadding=""2"" cellspacing=""1"" border=""0"">"
	LINE "<tr>"
	LINE "<td align=""center"" valign=""middle"">"
	LINE "<table align=""center"" width=""100%"" cellpadding=""2"" cellspacing=""1"" class=""maintable"" id=tbl>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">网站名称:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><input name=""site_name"" type=""text"" value="""" maxlength=""50"" size=""30"">&nbsp;例:<font color=""red"">烈火上网导航</font></td>"
	LINE "</tr>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">站长名称:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><input name=""site_user"" type=""text"" value="""" maxlength=""50"" size=""30"">&nbsp;例:<font color=""red"">Liehuo.Net</font></td>"
	LINE "</tr>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">关 键 字:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><input name=""site_keywords"" type=""text"" value="""" size=""30"">&nbsp;多个关键字请用<font color=""red"">,</font>隔开</td>"
	LINE "</tr>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">描述语句:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><input name=""site_description"" type=""text"" value="""" size=""30"">&nbsp;例:<font color=""red"">烈火上网导航致力于为中文上网导航服务!</font></td>"
	LINE "</tr>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">版权信息:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><textarea name=""site_copyright"" style=""width:350;height:80;""></textarea>&nbsp;支持<font color=""red"">HTML</font>语法</td>"
	LINE "</tr>"
	LINE "<tr>"
	LINE "<td bgcolor=""#F6FBFE"" width=""20%"" align=""right"">系统网址:</td>"
	LINE "<td bgcolor=""#F6FBFE"" width=""80%""><input name=""site_url"" type=""text"" value=""http://"" maxlength=""50"" size=""30"">&nbsp;<font color=""red"">结尾不加[/],例:http://www.liehuo.net</font></td>"
	LINE "</tr>"

	LINE "</td>"
	LINE "</tr>"
	LINE "</table>"
	LINE "</td>"
	LINE "</tr>"
	LINE "</table>"
	
	LINE "</td>"
	LINE "</tr>"
	LINE "</table>"
	
	LINE "</div>"
	LINE "<br />"
	LINE "<div class=""btnbox marginbot"">"
	LINE "<a href=""install.asp""><img src=""images/back.gif"" border=""0""></a>&nbsp;&nbsp;&nbsp;&nbsp;"
	LINE "<a href=""install_3.asp?do=adduser""><img src=""images/skip.gif"" border=""0""></a>&nbsp;&nbsp;&nbsp;&nbsp;"
	LINE "<input name=""id"" type=""hidden"" value=""" & databox(0,0) & """>"
	LINE "<input name=""submit1"" type=""image"" src=""images/next.gif"" style=""padding: 2px"" onclick=""this.disabled=true;document.form.submit();"">"
	LINE "</div>"
	LINE "<div class=""footer"">我们只对<a href=""http://bbs.liehuo.net/viewthread.php?tid=2367"" title=""查看商业付费用户价格及服务体系"" target=""_blank"">商业用户</a>提供QQ在线支持,免费版用户请到论坛寻求帮助:<a title=""进入烈火论坛"" href=""http://bbs.liehuo.net/?setup"" target=""_blank"">http://bbs.liehuo.net/</a></div>"
	LINE "</div>"
	LINE "</div>"
	LINE "</form>"
	
	response.end()
	end if
end sub
' *** ***  www.liehuo.net  *** ***
sub saveedit
	if gfv("site_name") = "" then
		call alertbox("[网站名称]不能为空!",2)
	elseif gfv("site_user") = "" then
		call alertbox("[站长名称]不能为空!",2)
	elseif gfv("site_keywords") = "" then
		call alertbox("[网站关键字]不能为空!",2)
	elseif gfv("site_description") = "" then
		call alertbox("[网站描述语句]不能为空!",2)
	elseif gfv("site_copyright") = "" then
		call alertbox("[网站版权信息]不能为空!",2)
	elseif gfv("site_url") = "" then
		call alertbox("[网站地址(域名)]不能为空!",2)
	end if
	dim rs,sql
	set rs = server.createobject(G_liehuo_RS)
	sql = "select top 1 * from DH_liehuo_setup where id=" & gfv("id")
	rs.open sql,conn,1,3
	rs("site_name") = gfv("site_name")
	rs("site_user") = gfv("site_user")
	rs("site_keywords") = gfv("site_keywords")
	rs("site_description") = gfv("site_description")
	rs("site_copyright") = gfv("site_copyright")
	rs("site_url") = trim(gfv("site_url"))   
	
	rs.update
	rs.close:set rs = nothing
	response.write "<script>alert('站点设置成功，自动跳转下一页！');window.location='install_3.asp?do=adduser';</script>"
end sub
%>
<% LOADING_ADMIN_FOOT %>
