<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<%dim action
action=request.QueryString("action")
'//保存信息
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select webname,musicd,musicurl,webemail,dizhi,youbian,dianhua,copyright,weblogo,weburl,webbanner,mailaddress,mailusername,mailuserpass,mailname,mailsend from shop_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("webbanner")=trim(request("webbanner"))
rs("weburl")=trim(request("weburl"))
rs("mailaddress")=request("mailaddress")
rs("mailusername")=request("mailusername")
rs("mailuserpass")=request("mailuserpass")
rs("mailname")=request("mailname")
rs("mailsend")=request("mailsend")
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="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<form name="form1" method="post" action="webconfig.asp?action=save">
<%set rs=server.CreateObject("adodb.recordset")
rs.Open "select webname,musicurl,musicd,webemail,dizhi,youbian,dianhua,copyright,weblogo,weburl,webbanner,mailaddress,mailusername,mailuserpass,mailname,mailsend from shop_config",conn,1,1%>
<tr> 
<td colspan="2" align="center" background="../img/green.gif"><b><font color="#ffffff">网站信息设置</font></b></td>
</tr>
<tr bgcolor="#ffffff"> 
<td width="30%" align="right">网站网址：</td>
<td width="70%" style="PADDING-LEFT: 10px">HTTP:// <input name="weburl" type="text" id="weburl" size="21" value="<%=trim(rs("weburl"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">网站名称：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="webname" type="text" id="webname" size="28" value="<%=trim(rs("webname"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">公司 e-mail：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="webemail" type="text" id="webemail" size="28" value="<%=trim(rs("webemail"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">公司地址：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="dizhi" type="text" id="dizhi" size="28" value="<%=trim(rs("dizhi"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">公司邮编：</td>
<td style="PADDING-LEFT: 10px">
<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'))">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">公司电话：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="dianhua" type="text" id="dianhua" size="28" value="<%=trim(rs("dianhua"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">网站版权：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="copyright" type="text" size="28" value="<%=trim(rs("copyright"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">网站Logo：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="weblogo" type="text" id="weblogo" size="28" value="<%=trim(rs("weblogo"))%>">
<font color=#ff0000>**</font>
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">BANNER地址：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="webbanner" type="text" id="webbanner" size="28" value="<%=trim(rs("webbanner"))%>">
<font color=#ff0000>**</font>
760×100
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="center" colspan="2">发送邮件的配置 </td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">邮件服务器地址：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="mailaddress" type="text" id="mailaddress" size="36" value="<%=trim(rs("mailaddress"))%>">
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">发送邮箱：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="mailsend" type="text" id="mailsend" size="36" value="<%=trim(rs("mailsend"))%>">
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">登 录 名：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="mailusername" type="text" id="mailusername" size="36" value="<%=trim(rs("mailusername"))%>">
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">登录密码：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="mailuserpass" type="password" id="mailuserpass" size="36" value="<%=trim(rs("mailuserpass"))%>">
</td>
</tr>
<tr bgcolor="#ffffff"> 
<td align="right">显示的姓名：</td>
<td style="PADDING-LEFT: 10px"> 
<input name="mailname" type="text" id="mailname" size="36" value="<%=trim(rs("mailname"))%>">
</td>
</tr>
<tr bgcolor="#ffffff">
<td></td>
<td style="PADDING-LEFT: 10px"> 
<input type="submit" name="Submit" value=" 修改保存 ">&nbsp;
<input type="reset" name="Submit2" value=" 重新添写 ">
</td>
</tr>
</form>
</table>
<%rs.Close
  set rs=nothing
  %>
<!--#include file="copyright.asp"-->
</body>
</html>
<script>
	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>