<!-- #include virtual="/admin/sysconfig.asp" -->
<!-- #include virtual="/admin/checkadmin.asp" -->
<!-- #include virtual="/inc/showdiv.asp" -->
<%

'判断字符串是否全由数字和字母组成，并检查字符串长度是否合法
Function check_str(byval s_str,byval len_min,byval len_max)
	if isnull(s_str) or s_str="" then
		check_str=false
	else
		dim char_i,str_len,n_asc,b_result
		b_result=true
		str_len=len(s_str)
		if str_len<len_min or str_len>len_max then
			b_result=false
		else
			for char_i=1 to str_len
				n_asc=asc(mid(s_str,char_i,1))
				if (n_asc>=0 and n_asc<=47) or n_asc=58 or n_asc=60 or n_asc=62 or n_asc=63 or n_asc=64 or n_asc=92 or n_asc=124 then
					b_result=false
					exit for
				end if
			next
		end if
		check_str=b_result
	end if
end Function
'屏蔽掉ASP的系统字符，去除多余空格
function str_Precess(byval str,byval ptype)
	if ptype=1 then
		str=trim(str)
	end if
	str=replace(trim(str),chr(34),chr(34) & chr(34))
	str=replace(str,"<" & "%","<" & chr(34) & " & " & chr(34) & "%")
	str_Precess=replace(str,"%" & ">","%" & chr(34) & " & " & chr(34) & ">")
end function
'规范化表单输入字符，对字符进行HTMLencode
function Str_Encode(byval Str_string)
	if isnull(Str_string) then
		Str_Encode=""
	else
		s_string=replace(Str_string,"&","&amp;")
		s_string=replace(Str_string,chr(34),"&quot;")
		s_string=replace(Str_string,"<","&lt;")
		Str_Encode=replace(Str_string,">","&gt;")
	end if
end function


if Request.Form("act")<>"SaveInfo" then

response.write"<Html>"
response.write"<Head>"
response.write"<title>"&webname&"</title>"
response.write"<meta http-equiv=""Content-Type"" content=""text/html;charset=gb2312"">"
response.write"<style type=""text/css"">"
response.write"<!--"
response.write"td {font-size:9pt; font-face:宋体,隶书; background:#ffffff}"
response.write"input {font-size:9pt; font-face:宋体,隶书; border:1px #cccccc solid; width:200px;}"
response.write".inputradio {border:1px #cccccc solid; width:18px; background:#efefef;}"
response.write"-->"
response.write"</style>"
response.write"</head>"
response.write"<body topmargin=0 leftmargin=0>"
response.write"<table cellpadding=0 cellspacing=1 border=0 width=96% align=center class=tablebg>"
response.write"<form name=form1 method=post action=""#"">"
response.write"<tr>"
response.write"<td align=center width=100% colspan=2 height=40>"
response.write"<font size=3><b>"& SYS_WEBNAME &"－－－系统参数配置面板</font></b>"
response.write"</td>"
response.write"</tr>"

'－－－－－－－－－－－－－系统状态参数设置－－－－－－－－－－－
response.write"<tr>"
response.write"<td align=right width=47% >"
response.write"系统状态设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left width=50% >"
response.write Print_space(2)&"<input type=radio name=sysstatus value=""开"""
if SYS_STATUS="开" then response.write "checked"
response.write" class=inputradio>开"
response.write Print_space(6)&"<input type=radio name=sysstatus value=""关"""
if SYS_STATUS="关" then response.write "checked"
response.write" class=inputradio>关"
response.write"</tr>"


response.write"<tr>"
response.write"<td align=right width=47% >"
response.write"是否启用生成静态页："&Print_space(2)
response.write"</td>"
response.write"<td align=left width=50% >"
response.write Print_space(2)&"<input type=radio name=syshtml value=1 "
if SYS_HTML=1 then response.write "checked"
response.write" class=inputradio>开"
response.write Print_space(6)&"<input type=radio name=syshtml value=0 "
if SYS_HTML=0 then response.write "checked"
response.write" class=inputradio>关"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统状态提示信息设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=sysstatusinfo value="&SYS_STATUSINFO&">"
response.write"</td>"
response.write"</tr>"

'－－－－－－－－－－－－－－系统配置信息设置－－－－－－－－－－－－
response.write"<tr>"
response.write"<td align=right >"
response.write"系统名称设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebname value="& SYS_WEBNAME &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统出售方式设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=sysmodel value="& SYS_MODEL &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统搜索关键字设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebkey value="& SYS_WEBKEY&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统域名地址设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=sysweburl value="& SYS_WEBURL&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统论坛地址设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebbbs value="& SYS_WEBBBS &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统管理员邮箱设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebemail value="& SYS_WEBEMAIL &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统联系电话设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebtel value="& SYS_WEBTEL &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统联系QQ设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=sysweboicq value="& SYS_WEBOICQ &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"数据库存放地址："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=datasetup value="& db &" readonly>"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否使用外部数据库："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=out_info_conn value=""是"""
if out_info_conn="是" then response.write "checked"
response.write" class=inputradio onclick=""showsubmenu(0)"">是"
response.write Print_space(6)&"<input type=radio name=out_info_conn value=""否"""
if out_info_conn="否" then response.write "checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr "
if out_info_conn="否" then response.write "style=""display:none;""" 
response.write "id='submenu0'>"
response.write"<td align=center colspan=2>"
response.write"<table cellpadding=0 cellspacing=0 width=90% align=left border=0>"
response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部数据库地址（相对路径）："&Print_space(2)
response.write"</td>"
response.write"<td align=left>"
response.write Print_space(2)&"<input type=text name=out_data value="&out_data&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部数据库表名："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=out_table value="&out_table&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部数据库用户名字段名称："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=out_user value="&out_user&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部数据库用户密码字段名称："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=out_pass value="&out_pass&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部注册用户链接地址：（相对路径）"&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=out_regurl value="&out_regurl&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"定义外部找回密码链接地址：（相对路径）"&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=out_getpassurl value="&out_getpassurl&">"
response.write"</td>"
response.write"</tr>"
response.write"</table>"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否允许新用户注册："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=SYSREGUSER value=""是"""
if SYS_REGUSER="是" then response.write "checked"
response.write" class=inputradio>是"
response.write Print_space(6)&"<input type=radio name=SYSREGUSER value=""否"""
if SYS_REGUSER="否" then response.write "checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"前台用户加密参数设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=super_user value="&super_user&">"
response.write"</td>"
response.write"</tr>"


response.write"<tr>"
response.write"<td align=right >"
response.write"商品出售最大天数限制："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=maxdays value="&maxdays&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"后台用户加密信息设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=super_admin value="&super_admin&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否需要对用户注册资料进行审核："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=idstatus value=""true"""
if lCase(idstatus)="true" then response.write "checked"
response.write" class=inputradio>是"
response.write Print_space(6)&"<input type=radio name=idstatus value=""false"""
if lCase(idstatus)="false" then response.write "checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否需要对店铺注册进行人工审核："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=shopautocheck value=0 "
if lCase(shopautocheck)=0 then response.write " checked"
response.write" class=inputradio>是"
response.write Print_space(6)&"<input type=radio name=shopautocheck value=1 "
if lCase(shopautocheck)=1 then response.write " checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统使用的虚拟货币名称："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=syswebmoney value="& SYS_WEBmoney &">"
response.write"</td>"
response.write"</tr>"

'－－－－－－－－－其它配置信息－－－－－－－－－－

response.write"<tr>"
response.write"<td align=right >"
response.write"商品登陆付费值（免费登陆商品请设为0）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=payforsell value="&pay_for_sell&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"用户出售商品的最低保留预存款值："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=reservemoney value="&reserve_money&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"商品交易成交付费（与成交价格的%百分比值，免费交易请设为0）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=costforauc value="&cost_for_auc&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"求购信息登陆付费值（免费登陆请设为0）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=payforqiugou value="&pay_for_qiugou&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"交易评价的信用积分增值："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=creditadd value="&creditadd&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"每页显示商品信息的条数："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=jsperpage value="&jsperpage&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统自动清理过期商品周期（天）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=autodel value="&autodel&">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"文件上传目录设置（相对路径）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=upfilefolder value="& UPFILE_FOLDER &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"每件商品的文件上传数量限制："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=upfiletotalnum value="& UPFILE_TOTALNUM &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"文件上传大小最大值设置（单位：字节）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=upfilemaxsize value="& UPFILE_MAXSIZE &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"文件上传类型设置（以/分隔）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=upfiletype value="& UPFILE_TYPE &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否发送新用户注册确认邮件："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=syssendregemail value=""true"""
if SYS_SENDREGEMAIL then response.write "checked"
response.write" class=inputradio>是"
response.write Print_space(6)&"<input type=radio name=syssendregemail value=""false"""
if not SYS_SENDREGEMAIL then response.write "checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"是否发送商品交易成功确认邮件："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=radio name=sendaucemail value=""true"""
if sendaucemail then response.write "checked"
response.write" class=inputradio>是"
response.write Print_space(6)&"<input type=radio name=sendaucemail value=""false"""
if not sendaucemail then response.write "checked"
response.write" class=inputradio>否"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统邮件服务器地址："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=smtpserver value="& EmailServer &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统邮件发送人地址："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=emailsender value="& emailsender &">"
response.write"</td>"
response.write"</tr>"


response.write"<tr>"
response.write"<td align=right >"
response.write"系统商品热门搜索关键字设置（以|分隔）："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=searchhotkey value="& search_hotkey &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=right >"
response.write"系统公告信息设置："&Print_space(2)
response.write"</td>"
response.write"<td align=left >"
response.write Print_space(2)&"<input type=text name=sysannounce value="& sys_announce &">"
response.write"</td>"
response.write"</tr>"

response.write"<tr>"
response.write"<td align=center width=100% colspan=2 style=""height: 40px;"">"
response.write"<input type=submit name=submit value=""修改系统配置"">"&Print_space(2)
response.write Print_space(2)&"<input type=reset name=reset value=""清除设置"">"
response.write"</td>"
response.write"</tr>"
if comp_check("Scripting.FileSystemObject") then
	Response.Write "<input type='hidden' name='wType' value='fso'>"
elseif comp_check("Adodb.Stream") then
	Response.Write "<input type='hidden' name='wType' value='stm'>"
else
	Response.Write "<tr><td align=center width=100% colspan=2>因该服务器不支持FSO及ADODB.STREAM，更改设置请用其它工具修改forumConfig.asp文件</td></tr>"
end if
response.write"<input type='hidden' name='act' value='SaveInfo'>"
response.write"</form>"
response.write"</table>"
response.write"</body>"
response.write"</html>"

else
  sql="select * from sysconfig"
  set rs=server.createobject("ADODB.recordset")
  rs.open sql,conn,1,3
  if rs.eof then
     response.write"出错了，不存在系统配置数据库"
     response.end
  end if
  rs("sys_webname")=request.form("syswebname")
  rs("sys_status")=request.form("sysstatus")
  rs("sys_statusinfo")=request.form("sysstatusinfo")
  rs("sys_model")=request.form("sysmodel")
  rs("sys_webkey")=request.form("syswebkey")
  rs("sys_weburl")=request.form("sysweburl")
  rs("sys_webbbs")=request.form("syswebbbs")
  rs("sys_webemail")=request.form("syswebemail")
  rs("sys_webtel")=request.form("syswebtel")
  rs("sys_weboicq")=request.form("sysweboicq")
  rs("SYS_WEBmoney")=request.form("syswebmoney")
response.write request.form("syshtml")
  rs("sys_html")=request.form("syshtml")
  rs("sys_reguser")=request.form("sysreguser")
  rs("super_user")=request.form("super_user")
  rs("maxdays")=request.form("maxdays")
  rs("super_admin")=request.form("super_admin")
  rs("idstatus")=request.form("idstatus")
  rs("shopautocheck")=request.form("shopautocheck")
  rs("payforsell")=request.form("payforsell")
  rs("reservemoney")=request.form("reservemoney")
  rs("costforauc")=request.form("costforauc")
  rs("payforqiugou")=request.form("payforqiugou")
  rs("creditadd")=request.form("creditadd")
  rs("jsperpage")=request.form("jsperpage")
  rs("autodel")=request.form("autodel")
  rs("upfile_folder")=request.form("upfilefolder")
  rs("upfile_totalnum")=request.form("upfiletotalnum")
  rs("upfile_maxsize")=request.form("upfilemaxsize")
  rs("upfile_type")=request.form("upfiletype")
  rs("sendaucemail")=request.form("sendaucemail")
  rs("sys_sendregemail")=request.form("syssendregemail")
  rs("emailserver")=request.form("smtpserver")
  rs("emailsender")=request.form("emailsender")
  rs("search_hotkey")=request.form("searchhotkey")
  rs("sys_announce")=request.form("sysannounce")
  rs("outinfoconn")=request.form("out_info_conn")
  rs("outdata")=request.form("out_data")
  rs("outtable")=request.form("out_table")
  rs("outuser")=request.form("out_user")
  rs("outpass")=request.form("out_pass")
  rs("outregurl")=request.form("out_regurl")
  rs("outgetpassurl")=request.form("out_getpassurl")
  rs.update
  response.write"<script language='javascript'>alert('恭喜你，系统配置修改成功！');this.location.href='Admin_dlxfConfig.asp';</script>"
  response.end
End if
%>
