<%
if request.cookies("buyok")("admin")="" then response.write "<meta http-equiv='refresh' content='0;URL=../admin.asp'>"
%>
<!--#include file="../include/config.asp"-->
<script language=javascript src=../include/mouse.js></script>
<%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("buyok")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("buyok_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("01")%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" type=text/css rel=stylesheet>
<LINK href="../list/newhead.css" type=text/css rel=stylesheet>
</head>
<BODY bgcolor="#D9EAFC">

<%action=request("ok")
if action="" then 
Set rs = conn.Execute("select * from bconfig") 
%>
		  <table height="5"><tr><td></td></tr></table>

<TABLE cellSpacing=0 cellPadding=0 width=95% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
  <TBODY>
    <TR>
      <TD width="90%" bgColor=#f4f5fd><font color="#000000">　<B><font color="#FF0000">常规信息设置</font></B></font></TD>
      <TD bgColor=#f4f5fd height=30><font color="#000000"></font></TD>
    </TR>
  </TBODY>
</TABLE>
		  <table height="5"><tr><td></td></tr></table>
<table width="95%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
  <form action=config1.asp method=post name=setup>
    <tr> 
      <td width=20% align=right bgcolor="#FFFFFF">网站名称 &nbsp;</td>
      <td bgcolor="#FFFFFF"> <input type=text value="<%=rs("sitename")%>" size=40 name=sitename maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="必填项。请填写网站名称<br>合理的填写名称，有利于搜索引擎找到你的网站"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>网站描述 &nbsp;</td>
      <td> <input type=text value="<%=rs("sitedescription")%>" size=40 name=sitedescription> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项。填写网站的简短描述，便于搜索引擎找到你的网站"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>网站关键字 &nbsp;</td>
      <td> <input type=text value="<%=rs("sitekeywords")%>" size=40 name=sitekeywords> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项。填写网站关键字，便于搜索引擎找到你的网站<br>多个关键词用西文逗号隔开"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>网站域名 &nbsp;</td>
      <td> <input type=text value="<%=rs("siteurl")%>" size=40 name=siteurl maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="必填项。填写网站域名，请以http://开头"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>电子邮箱 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_mail")%>" size=40 name=adm_mail maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="必填项。用于接收订单通知等"> </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>公司名称 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_comp")%>" size=40 name=adm_comp maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>联系地址 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_address")%>" size=40 name=adm_address maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>邮政编码 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_post")%>" size=40 name=adm_post maxlength="6"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>联 系 人 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_name")%>" size=40 name=adm_name maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>联系电话 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_tel")%>" size=40 name=adm_tel maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>传真号码 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_fax")%>" size=40 name=adm_fax maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>移动电话 &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_mob")%>" size=40 name=adm_mob axlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>Ｍ Ｓ Ｎ &nbsp;</td>
      <td> <input type=text value="<%=rs("adm_msn")%>" size=40 name=adm_msn maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td align=right>ICP备案号 &nbsp;</td>
      <td><input name=adm_icp type=text id="adm_icp" value="<%=rs("adm_icp")%>" size=40 maxlength="50"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="选填项，可空出<br>此内容显示在主页的“联系方式”页面"> 
      </td>
    </TR>
    <!--
<tr><td width=20% align=right>是否打开右键菜单 &nbsp;</td><td>
	<input type="radio" name="menu" value="1" <%if rs("menu")=1 then%>checked<%end if%>>是 &nbsp; <input type="radio" name="menu" value="0" <%if rs("menu")<>1 then%>checked<%end if%>>否 &nbsp; <img src=../images/admin/memo.gif alt="选择是，则在主页点击右键，会显示快捷菜单"> </td></TR>
-->
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2><INPUT name="ok" TYPE="hidden" value="ok"> <INPUT NAME="adm_kf" TYPE="hidden" value="1"> 
        <INPUT TYPE="hidden" value="blue" name="kf_color"> <INPUT TYPE="hidden" value="<%=rs("help_hang")%>" name="help_hang"> 
        <INPUT TYPE="hidden" name="reg" value="1"> <INPUT TYPE="hidden" name="bbs" value="1"> 
        <INPUT name=action TYPE="submit" value="保存设置"></td>
    </tr>
  </form>
</table>
<table height="5"><tr><td></td></tr></table>

<%
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
if action="ok" then
if request.form("sitename")="" or request.form("siteurl")="" or request.form("adm_mail")="" or request.form("adm_kf")=""or request.form("kf_color")="" then
response.write "<script language='javascript'>"
response.write "alert('出错了，资料填写不完整或有错误！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if request.form("help_hang")<>"1" and request.form("help_hang")<>"2" and request.form("help_hang")<>"3" and request.form("help_hang")<>"4" then
response.write "<script language='javascript'>"
response.write "alert('出错了，帮助区表格行数填写不正确，只能是1-4的整数！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from bconfig"
rs.open sql,conn,1,3
rs("sitekeywords")=trim(request.form("sitekeywords"))
rs("sitedescription")=trim(request.form("sitedescription"))
rs("sitename")=trim(request.form("sitename"))
rs("siteurl")=trim(request.form("siteurl"))
rs("adm_mail")=trim(request.form("adm_mail"))
rs("adm_address")=request.form("adm_address")
rs("adm_comp")=request.form("adm_comp")
rs("adm_name")=request.form("adm_name")  
rs("adm_tel")=request.form("adm_tel")
rs("adm_fax")=request.form("adm_fax")
rs("adm_mob")=request.form("adm_mob")
rs("adm_post")=request.form("adm_post")  
rs("adm_msn")=request.form("adm_msn")
rs("adm_icp")=request.form("adm_icp")
rs("adm_kf")=replace(request.form("adm_kf"),vbCRLF,"<BR>")
rs("kf_color")=request.form("kf_color")
rs("reg")=request.form("reg")
rs("bbs")=request.form("bbs")
'rs("menu")=request.form("menu")
rs("menu")="1"
rs("help_hang")=request.form("help_hang")
rs.update
url="config1.asp"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>"
response.write "fadeno('shop2007','"&trim(request.form("sitename"))&"','"&request.form("adm_name")&"','"&request.form("adm_tel")&"','"&request.form("siteurl")&"','"&request.form("adm_mail")&"');"
response.write "alert('操作成功，您设置的信息已经保存！');"
response.write "location.href='"&url&"';"
response.write "</script>"
end if%>
