<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<%dim action
action=request.QueryString("action")
'//保存信息

if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from config ",conn,1,3
rs("webname")=trim(request("webname"))
rs("webemail")=trim(request("webemail"))
rs("dizhi")=trim(request("dizhi"))
rs("youbian")=trim(request("youbian"))

rs("dianhua")=trim(request("dianhua"))
rs("copyright")=trim(request("copyright"))
rs("weblogo")=trim(request("weblogo"))
rs("weburl")=trim(request("weburl"))
rs("kefuqqs")=trim(request("kefuqqs"))
rs("icp")=trim(request("icp"))

rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('网站资料修改成功！');history.go(-1);</script>"
end if%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
<table width="95%" border="1" cellpadding="3" cellspacing="1" bordercolor="#C0C0C0" style="border-collapse: collapse">
        <form name="form1" method="post" action="webconfig.asp?action=save">
            <%set rs=server.CreateObject("adodb.recordset")
            	rs.Open "select webname,webemail,dizhi,youbian,dianhua,copyright,weblogo,weburl,kefuqqs,sxtime,webbanner,icp  from config",conn,1,1
			%>
			<tr> 
            <td height="22" colspan="3" bgcolor="#E8F1FF"> 
       <p align="center"><b>网站信息设置</b></td>
  			</td>
            </tr>
			<tr> 
            <td height="22" colspan="3" bgcolor="#F7F7F7"><strong>基本信息</strong></td>
            </tr>
            <tr> 
              <td bgcolor="#F7F7F7" width="18%">
				　</td>
              <td bgcolor="#F7F7F7" width="11%">
				<p align="left">网站网址</td>
              <td bgcolor="#F7F7F7">
				<input name="weburl" type="text" id="weburl" size="28" value="<%=trim(rs("weburl"))%>"></td>
            </tr>
             <tr> 
               <td  bgcolor="#F7F7F7" width="18%">　</td>
               <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">网站名称</td>
               <td width="69%" bgcolor="#F7F7F7"><input name="webname" type="text" id="webname" size="28" value="<%=trim(rs("webname"))%>"></td>
             </tr>
             <tr> 
               <td  bgcolor="#F7F7F7" width="18%">　</td>
               <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">联系邮箱</td>
               <td width="69%" bgcolor="#F7F7F7"><input name="webemail" type="text" id="webemail" size="28" value="<%=trim(rs("webemail"))%>"></td>
             </tr>
             <tr> 
               <td  bgcolor="#F7F7F7" width="18%">　</td>
               <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">联系地址</td>
               <td width="69%" bgcolor="#F7F7F7"><input name="dizhi" type="text" id="dizhi" size="28" value="<%=trim(rs("dizhi"))%>"></td>
             </tr>
             <tr> 
               <td  bgcolor="#F7F7F7" width="18%">　</td>
               <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">联系邮编</td>
               <td width="69%" bgcolor="#F7F7F7"><input name="youbian" type="text" id="youbian" size="28" value="<%=trim(rs("youbian"))%>"	onKeyPress	= "return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))" onpaste= "return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))" ondrop= "return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))"></td>
             </tr>
             <tr> 
               <td  bgcolor="#F7F7F7" width="18%">
				　</td>
               <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">联系电话</td>
               <td width="69%" bgcolor="#F7F7F7"><input name="dianhua" type="text" id="dianhua" size="28" value="<%=trim(rs("dianhua"))%>"></td>
            </tr>
            <tr> 
             <td  bgcolor="#F7F7F7" width="18%">　</td>
             <td  bgcolor="#F7F7F7" width="11%">
				<p align="left">网站版权</td>
             <td width="69%" bgcolor="#F7F7F7"><input name="copyright" type="text" size="28" value="<%=trim(rs("copyright"))%>"></td>
           </tr>
           <tr> 
             <td height="22" bgcolor="#F7F7F7" width="18%">
				　</td>
             <td height="22" bgcolor="#F7F7F7" width="11%">
								ICP证</td>
             <td height="22" bgcolor="#F7F7F7">
				<input name="icp" type="text" id="weblogo3" size="28" value="<%=trim(rs("icp"))%>"></td>
           </tr>
           <tr> 
             <td height="22" bgcolor="#F7F7F7" width="18%">
				　</td>
             <td height="22" bgcolor="#F7F7F7" width="11%">
								LOGO</td>
             <td height="22" bgcolor="#F7F7F7"><input name="weblogo" type="text" id="weblogo" size="28" value="<%=trim(rs("weblogo"))%>"> 
				180*60</td>
           </tr>
           <tr> 
             <td height="11" colspan="3" bgcolor="#F7F7F7"><b>客服<span lang="en-us">QQ</span></b></td>
            </tr>
           <tr> 
             <td height="11" bgcolor="#F7F7F7" width="18%">
				　</td>
             <td height="11" bgcolor="#F7F7F7" width="11%">
				<p align="left"><span lang="en-us">Q Q </span>号码</td>
             <td height="11" bgcolor="#F7F7F7">
				<input name="kefuQQs" type="text" id="weblogo2" size="28" value="<%=trim(rs("kefuQQs"))%>">(限数字,多个之间用,格开)</td>
            </tr>
            <tr> 
              <td height="22" colspan="3" bgcolor="#F7F7F7">
			   <div align="center"> 
                  <input  type="submit" name="Submit" value="提 交">&nbsp;&nbsp; 
                  <input type="reset" name="Submit2" value="取 消">
               </div>
              </td>
             </tr>
          </form>
        </table>
             <%rs.Close
            set rs=nothing%>
</div>
<br>
</body>
</html>

<SCRIPT LANGUAGE="JavaScript">


	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
</script> 
  