<!--#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 "<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
ly=trim(request("ly"))
login=trim(request("login"))
vote=trim(request("vote"))
links=trim(request("links"))
fl=trim(request("fl"))
flsl=trim(request("flsl"))
fll=trim(request("fll"))
shop_config=ly&","&login&","&vote&","&links&","&fl&","&flsl&","&fll
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * 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("class")=trim(request("class"))
rs("shop_config")=shop_config
rs("webbanner")=trim(request("webbanner"))
rs("bannerlx")=trim(request("bannerlx"))
rs("weburl")=trim(request("weburl"))
rs("musicurl")=trim(request("musicurl"))
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%>
<%
Set rs_midi = Server.CreateObject("ADODB.Recordset")
rs_midi.open "select * from shop_midi",conn,1,1
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td height="22" bgcolor="#f1f1f1"> 
      <div align="center"><font color="#000000">网站信息设置</font></div>
    </td>
  </tr>
  <tr> 
    <td height="107" bgcolor="#FFFFFF"> 
      <table width="90%" 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 * from shop_config",conn,1,1
			shop_config_2=rs("shop_config")
			shop_config_2=split(shop_config_2,",")
ly=shop_config_2(0)
login=shop_config_2(1)
vote=shop_config_2(2)
links=shop_config_2(3)
fl=shop_config_2(4)
flsl=shop_config_2(5)
fll=shop_config_2(6)
			%>
          <tr> 
            <td>网站网址：</td>
            <td width="460"> <input name="weburl" class="wenbenkuang" type="text" id="weburl" size="21" value="<%=trim(rs("weburl"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="128">网站名称：</td>
            <td> <input name="webname" class="wenbenkuang" type="text" id="webname" size="28" value="<%=trim(rs("webname"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="128">网站Email：</td>
            <td> <input name="webemail" class="wenbenkuang" type="text" id="webemail" size="28" value="<%=trim(rs("webemail"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="128">公司地址：</td>
            <td> <input name="dizhi" class="wenbenkuang" type="text" id="dizhi" size="28" value="<%=trim(rs("dizhi"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="128">公司邮编：</td>
            <td> <input name="youbian" class="wenbenkuang" 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="128">公司电话：</td>
            <td> <input name="dianhua" class="wenbenkuang" type="text" id="dianhua" size="28" value="<%=trim(rs("dianhua"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="128">网站版权：</td>
            <td> <input name="copyright" class="wenbenkuang" type="text" size="28" value="<%=trim(rs("copyright"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22">网站Logo：</td>
            <td height="22"> <input name="weblogo" class="wenbenkuang" type="text" id="weblogo" size="28" value="<%=trim(rs("weblogo"))%>"> 
              <a href=# onclick="window.open('upload_c.asp?a=uploadfile&b=1&c=form1&d=weblogo','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">上传图片</a> 
            </td>
          </tr>
          <tr> 
            <td height="0">Banner：</td>
            <td height="0"> <input name="webbanner" class="wenbenkuang" type="text" id="webbanner" size="28" value="<%=trim(rs("webbanner"))%>">
              属性： 
              <select name="bannerlx" id="bannerlx">
                <option value="0" <%if rs("bannerlx")="0" then%>selected<%else%><%end if%>>图片</option>
                <option value="1" <%if rs("bannerlx")="1" then%>selected<%else%><%end if%>>FLASH</option>
              </select> <a href=# onclick="window.open('upload_c.asp?a=uploadfile&b=2&c=form1&d=webbanner','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
              上传图片或FLASH</a> </td>
          </tr>
          <tr> 
            <td height="3">留言是否对外公开：</td>
            <td height="0"> 
              <%select case ly
			case 1%>
              <input name="ly" class="wenbenkuang" type="radio" value="1" checked>
              公开 
              <input type="radio" name="ly" value="0">
              不公开 
              <%case 0%>
              <input name="ly" type="radio" value="1" >
              公开 
              <input type="radio" name="ly" value="0" checked>
              不公开 
              <%end select%>
            </td>
          </tr>
          <tr> 
            <td height="6">会员登录是否调用：</td>
            <td height="0"> 
              <%select case login
			case 1%>
              <input name="login" class="wenbenkuang" type="radio" value="1" checked>
              调用 
              <input type="radio" name="login" value="0">
              不调用 
              <%case 0%>
              <input name="login" type="radio" value="1" >
              调用 
              <input type="radio" name="login" value="0" checked>
              不调用 
              <%end select%>
            </td>
          </tr>
          <tr> 
            <td>是否调用投票：</td>
            <td height="1"> 
              <%select case vote
			case 1%>
              <input name="vote" class="wenbenkuang" type="radio" value="1" checked>
              调用 
              <input type="radio" name="vote" value="0">
              不调用 
              <%case 0%>
              <input name="vote" type="radio" value="1" >
              调用 
              <input type="radio" name="vote" value="0" checked>
              不调用 
              <%end select%>
            </td>
          </tr>
          <tr> 
            <td>是否调用友情连接：</td>
            <td height="1"> 
              <%select case links
			case 1%>
              <input name="links" class="wenbenkuang" type="radio" value="1" checked>
              调用 
              <input type="radio" name="links" value="0">
              不调用 
              <%case 0%>
              <input name="links" type="radio" value="1" >
              调用 
              <input type="radio" name="links" value="0" checked>
              不调用 
              <%end select%>
            </td>
          </tr>
          <tr> 
            <td>商品分类是否调用：</td>
            <td height="5"> 
              <%select case fl
			case 1%>
              <input name="fl" class="wenbenkuang" type="radio" value="1" checked>
              调用 
              <input type="radio" name="fl" value="0">
              不调用 
              <%case 0%>
              <input name="fl" type="radio" value="1" >
              调用 
              <input type="radio" name="fl" value="0" checked>
              不调用 
              <%end select%>
            </td>
          </tr>
          <tr> 
            <td height="3">分类页面商品调用数量：</td>
            <td height="3"><select name="flsl" class="wenbenkuang" id="select4" onChange="(document.myform.pingpai.value=this.options[this.selectedIndex].value)">
                <option value="" <%if flsl="0" then%>selected<%end if%>>请选择</option>
                <option value="5" <%if flsl="5" then%>selected<%end if%>>五行</option>
                <option value="6" <%if flsl="6" then%>selected<%end if%>>六行</option>
                <option value="7" <%if flsl="7" then%>selected<%end if%>>七行</option>
                <option value="8" <%if flsl="8" then%>selected<%end if%>>八行</option>
                <option value="9" <%if flsl="9" then%>selected<%end if%>>九行</option>
                <option value="10" <%if flsl="10" then%>selected<%end if%>>十行</option>
                <option value="11" <%if flsl="11" then%>selected<%end if%>>十一</option>
                <option value="13" <%if flsl="12" then%>selected<%end if%>>十二</option>
                <option value="13" <%if flsl="13" then%>selected<%end if%>>十三</option>
                <option value="14" <%if flsl="14" then%>selected<%end if%>>十四</option>
                <option value="15" <%if flsl="15" then%>selected<%end if%>>十五</option>
                <option value="16" <%if flsl="16" then%>selected<%end if%>>十六</option>
                <option value="17" <%if flsl="17" then%>selected<%end if%>>十七</option>
                <option value="18" <%if flsl="18" then%>selected<%end if%>>十八</option>
                <option value="19" <%if flsl="19" then%>selected<%end if%>>十九</option>
                <option value="20" <%if flsl="20" then%>selected<%end if%>>二十</option>
              </select> <select name="fll" class="wenbenkuang" id="select5" onChange="(document.myform.pingpai.value=this.options[this.selectedIndex].value)">
                <option value="" <%if fll="0" then%>selected<%end if%>>请选择</option>
                <option value="1" selected <%if fll="1" then%>selected<%end if%>>一列</option>
                <option value="2" <%if fll="2" then%>selected<%end if%>>二列</option>
                <option value="3" <%if fll="3" then%>selected<%end if%>>三列</option>
              </select> </td>
          </tr>
          <tr> 
            <td height="11">首页音乐：</td>
            <td height="11"> <select size="1" name="musicurl" style="font-family: 宋体; font-size: 9pt">
                <option value="0" <%if rs("musicurl")="" then%>selected<%end if%>>请选择</option>
                <%while not rs_midi.eof%>
                <option value="<%=rs_midi("filename")%>" <%if rs("musicurl")=rs_midi("ID") then%>selected<%end if%>><%=rs_midi("midiname")%></option>
                <%rs_midi.movenext
wend
rs_midi.close
set rs_midi=nothing%>
              </select>
              选择请选择时即为不调用 </td>
          </tr>
          <tr> 
            <td height="11">首页分类调用：</td>
            <td height="11"><input name="class" class="wenbenkuang" type="text" id="class" size="26" value="<%=trim(rs("class"))%>">
              填写分类ID号(共四个,分类与分类之间用,号隔开,如：动感,购物)</td>
          </tr>
          <tr> 
            <td height="22" colspan="2"><strong>发送邮件的配置 </strong></td>
          </tr>
          <tr> 
            <td height="22">邮件服务器地址：</td>
            <td height="22"> <input name="mailaddress" class="wenbenkuang" type="text" id="mailaddress" size="36" value="<%=trim(rs("mailaddress"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22">发送邮箱：</td>
            <td height="22"> <input name="mailsend" class="wenbenkuang" type="text" id="mailsend" size="36" value="<%=trim(rs("mailsend"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22">登录名：</td>
            <td height="22"> <input name="mailusername" class="wenbenkuang" type="text" id="mailusername" size="36" value="<%=trim(rs("mailusername"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22">登录密码：</td>
            <td height="22"> <input name="mailuserpass" class="wenbenkuang" type="password" id="mailuserpass" size="36" value="<%=trim(rs("mailuserpass"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22">发送时显示的姓名：</td>
            <td height="22"> <input name="mailname" class="wenbenkuang" type="text" id="mailname" size="36" value="<%=trim(rs("mailname"))%>"> 
            </td>
          </tr>
          <tr> 
            <td height="22" colspan="2"> <div align="center"> 
                <input type="submit" class="go-wenbenkuang" name="Submit" value="提 交">
                &nbsp;&nbsp; 
                <input type="reset" class="go-wenbenkuang" name="Submit2" value="恢 复">
              </div></td>
          </tr>
        </form>
      </table>
      <%rs.Close
          set rs=nothing%>
    </td>
  </tr>
</table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" 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="0">
                          <tr> 
                            <td> 
                              <div align="center"><font color="#000000">操作注意事项及说明</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td> 
                              <table width="80%" border="0" align="center" cellpadding="5" cellspacing="0">
                                <tr> 
                                  <td height="16"><font color="#FF0000">·请注意分类名称不要含有非法字符。<br>
                                    ·Logo的长和宽为126(左右)*60，Flash Banner的长和宽是777*100左右。<br>
                                    ·请选择正确属性，否则前台banner不能正常显示，不上传和填写前台即看不见!<br>
                                    ·上传文件都在adminn文件夹里，如修改adminn文件夹请修改路径。<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>

