<!--#include file="pysjzx_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("email")=trim(request("email"))
rs("address")=trim(request("address"))
rs("zip")=trim(request("zip"))
rs("tel")=trim(request("tel"))
rs("copyright")=trim(request("copyright"))
rs("weblogo")=trim(request("weblogo"))
rs("weburl")=trim(request("weburl"))
rs("qq")=trim(request("qq"))
rs("keyword")=trim(request("keyword"))
rs("description")=trim(request("description"))
rs("icp")=trim(request("icp"))
rs.update
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('网站设置成功！');"
   response.write"this.location.href='webconfig.asp';</SCRIPT>" 
   response.end 

end if%>
<html>
<head>
<title>网站设置</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 *  from config",conn,1,1
			%>
			<tr> 
            <td height="22" colspan="3" bgcolor="#E8F1FF"> 
       <p align="center">网站信息设置</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"))%>">
				<font color="#FF0000">*</font></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"))%>">
				<font color="#FF0000">*</font></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="email" type="text" id="email" size="28" value="<%=trim(rs("email"))%>"></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="address" type="text" id="address" size="28" value="<%=trim(rs("address"))%>"></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="zip" type="text" id="zip" size="28" value="<%=trim(rs("zip"))%>" 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="tel" type="text" id="tel" size="28" value="<%=trim(rs("tel"))%>"></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"))%>">
				<font color="#FF0000">*</font></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"))%>"> 
				宽250*高80</td>
           </tr>
           <tr> 
             <td height="11" bgcolor="#F7F7F7" width="18%">
				　</td>
             <td height="11" bgcolor="#F7F7F7" width="11%">
				网站关键字</td>
             <td height="11" bgcolor="#F7F7F7">
									
					<textarea   name="keyword" rows="10" cols="50"  ><%=rs("keyword")%></textarea> 
					限225个字</td>
            </tr>
           <tr> 
             <td height="11" bgcolor="#F7F7F7" width="18%">
				　</td>
             <td height="11" bgcolor="#F7F7F7" width="11%">
				网站描述</td>
             <td height="11" bgcolor="#F7F7F7"><textarea   name="description" rows="10" cols="50"  ><%=rs("description")%></textarea>
				限225个字</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="QQ" type="text" id="weblogo2" size="28" value="<%=trim(rs("QQ"))%>"></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> 
  