<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');history.go(-1);</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
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 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("musicurl")=trim(request("musicurl"))
rs("musicd")=request("musicd")
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">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>

<body bgcolor="#799AE1">
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr> 
                            <td height="16" bgcolor="#FFFFFF"> 
                              <div align="center"><font color="#000000">网站信息设置</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td height="107" bgcolor="#E8F1FF"> 
                              <table width="360" border="0" align="center" cellpadding="3" cellspacing="0">
                                <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 from shop_config",conn,1,1%>
                                  <tr> 
                                    <td>网站网址：</td>
                                    <td>HTTP:// 
                                      <input name="weburl" type="text" id="weburl" size="21" value="<%=trim(rs("weburl"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="70">网站名称：</td>
                                    <td width="278"> 
                                      <input name="webname" type="text" id="webname" size="28" value="<%=trim(rs("webname"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="70">网站Email：</td>
                                    <td width="278"> 
                                      <input name="webemail" type="text" id="webemail" size="28" value="<%=trim(rs("webemail"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="70">公司地址：</td>
                                    <td width="278"> 
                                      <input name="dizhi" type="text" id="dizhi" size="28" value="<%=trim(rs("dizhi"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="70">公司邮编：</td>
                                    <td width="278"> 
                                      <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 width="70">公司电话：</td>
                                    <td width="278"> 
                                      <input name="dianhua" type="text" id="dianhua" size="28" value="<%=trim(rs("dianhua"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="70">网站版权：</td>
                                    <td width="278"> 
                                      <input name="copyright" type="text" size="28" value="<%=trim(rs("copyright"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="22">网站Logo：</td>
                                    <td height="22"> 
                                      <input name="weblogo" type="text" id="weblogo" size="28" value="<%=trim(rs("weblogo"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="22">Banner：<br>
                                      Flash地址</td>
                                    <td height="22"> 
                                      <input name="webbanner" type="text" id="webbanner" size="28" value="<%=trim(rs("webbanner"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="22">首页音乐：</td>
                                    <td height="22"> 
                                      <%select case rs("musicd")
			case 1%>
                                      <input name="musicd" type="radio" value="1" checked>
                                      打开 
                                      <input type="radio" name="musicd" value="0">
                                      关闭 
                                      <%case 0%>
                                      <input name="musicd" type="radio" value="1" >
                                      打开 
                                      <input type="radio" name="musicd" value="0" checked>
                                      关闭 
                                      <%end select%>
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="22">音乐地址：</td>
                                    <td height="22"> 
                                      <input name="musicurl" type="text" id="musicurl" size="36" value="<%=trim(rs("musicurl"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="22" colspan="2"> 
                                      <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%>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr> 
                            <td bgcolor="#FFFFFF"> 
                              <div align="center"><font color="#000000">操作注意事项及说明</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td bgcolor="#E8F1FF"> 
                              <table width="80%" border="0" align="center" cellpadding="5" cellspacing="0">
                                <tr> 
                                  <td height="16"><font color="#FF0000">·请注意分类名称不要含有非法字符。<br>
                                    ·Logo的长和宽为170(左右)*60，Flash Banner的长和宽是468*60。<br>
                                    </font></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#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>

