<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');location.href='index.asp' ;</script>"
response.End
else
if request.cookies("sundxshop")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');location.href='index.asp' ;</script>"
response.End
end if
end if
if session("rank")>1 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权管理网站设置！');history.go(-1);</script>"
response.End
end if

dim action
action=trim(request.form("action"))
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select bgclr1,bgclr2,bgclr3,bgclr4,bgclr5,webbj1,webbj2,webbj10,webbj11,webbj12 from config ",conn,1,3
rs("bgclr1")=trim(request.form("bgclr1"))
rs("bgclr2")=trim(request.form("bgclr2"))
rs("bgclr3")=trim(request.form("bgclr3"))
rs("bgclr4")=trim(request.form("bgclr4"))
rs("bgclr5")=trim(request.form("bgclr5"))
rs("webbj1")=trim(request.form("webbj1"))
rs("webbj2")=trim(request.form("webbj2"))
rs("webbj10")=trim(request.form("webbj10"))
rs("webbj11")=trim(request.form("webbj11"))
rs("webbj12")=trim(request.form("webbj12"))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('网站资料修改成功！');history.go(-1);</script>"
end if%>
 <SCRIPT LANGUAGE="javascript">
                function foreColor(n)
{
  var arr = showModalDialog("selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
  if(arr==null)return;
  if(n==null)return;
  if(n==1){form1.table_title_color.value=arr;}
  if(n==2){form1.table_topic_light_color.value=arr;}
  if(n==3){form1.table_topic_dark_color.value=arr;}
  if(n==4){form1.table_border_color.value=arr;}
  if(n==5){form1.forum_bgcolor.value=arr;}
  if(n==6){form1.text_color.value=arr;}
  if(n==7){form1.textt_color.value=arr;}
  if(n==8){form1.textb_color.value=arr;}
  changecolor();
}</SCRIPT>
        <SCRIPT LANGUAGE="vbscript">
                public function changecolor()
                color1.bgcolor=form1.table_title_color.value
                color2.bgcolor=form1.table_topic_light_color.value
                color3.bgcolor=form1.table_topic_dark_color.value
                color4.bgcolor=form1.table_border_color.value
                color5.bgcolor=form1.forum_bgcolor.value
		color6.bgcolor=form1.text_color.value
		color7.bgcolor=form1.textt_color.value
		color8.bgcolor=form1.textb_color.value
                end function
                </SCRIPT>
<title>网站设置</title>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" BGCOLOR="#39867B">
  <tr> 
    <td height="16"> <div align="center"><font color="#FFFFFF">
      
        网站信息设置</font></div></td>
  </tr>
  <tr> 
    <td height="107" valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
        <form name="form1" method="post" action="moban.asp?action=save">
          <%set rs=server.CreateObject("adodb.recordset")
            rs.Open "select bgclr1,bgclr2,bgclr3,bgclr4,bgclr5,webbj1,webbj2,webbj12,webbj10,webbj11 from config",conn,1,1%>
         
          <tr> 
            <td height="0" COLSPAN="4"><DIV ALIGN="CENTER"><strong><font size="2">颜色配置</font></strong></DIV></td>
          </tr>
          <tr> 
            <TD>网页背景</TD>
            <td colspan="3"><INPUT NAME="bgclr1" TYPE="text" ID="bgclr1" SIZE="28" VALUE="<%=trim(rs("bgclr1"))%>"> 
              <A HREF="#" ONCLICK=foreColor(1)><IMG SRC=../images/cgcolor.gif ALT="调色板" BORDER="0" WIDTH="9" HEIGHT="10"></A></td>
          </tr>
          <tr> 
            <TD>表格背景</TD>
            <td colspan="3"><INPUT NAME="bgclr2" TYPE="text" ID="bgclr2" SIZE="28" VALUE="<%=trim(rs("bgclr2"))%>"> 
              <A HREF="#" ONCLICK=foreColor(1)><IMG SRC=../images/cgcolor.gif ALT="调色板" BORDER="0" WIDTH="9" HEIGHT="10"></A></td>
          </tr>
          <tr> 
            <TD>深色表格 </TD>
            <td colspan="3"><INPUT NAME="bgclr3" TYPE="text" ID="bgclr3" SIZE="28" VALUE="<%=trim(rs("bgclr3"))%>"> 
              <A HREF="#" ONCLICK=foreColor(1)><IMG SRC=../images/cgcolor.gif ALT="调色板" BORDER="0" WIDTH="9" HEIGHT="10"></A></td>
          </tr>
          <tr> 
            <TD>浅色表格 </TD>
            <td colspan="3"><INPUT NAME="bgclr4" TYPE="text" ID="bgclr4" SIZE="28" VALUE="<%=trim(rs("bgclr4"))%>"> 
              <A HREF="#" ONCLICK=foreColor(1)><IMG SRC=../images/cgcolor.gif ALT="调色板" BORDER="0" WIDTH="9" HEIGHT="10"></A></td>
          </tr>
          <tr> 
            <TD>主体颜色 </TD>
            <td colspan="3"><INPUT NAME="bgclr5" TYPE="text" ID="bgclr5" SIZE="28" VALUE="<%=trim(rs("bgclr5"))%>"> 
              <A HREF="#" ONCLICK=foreColor(1)><IMG SRC=../images/cgcolor.gif ALT="调色板" BORDER="0" WIDTH="9" HEIGHT="10"></A></td>
          </tr>
          <tr> 
            <td height="11" COLSPAN="4"><DIV ALIGN="CENTER"><font size="2"><strong>图片设置</strong></font></DIV></td>
          </tr>
         
         <tr> 
            <td height="0" COLSPAN="4"><DIV ALIGN="left"><font size="2"><strong>背景图片设置</strong></font></DIV></td>
          </tr>
           <tr> 
            <td height="20" COLSPAN="4">网站背景图片：</td>
            
          </tr>
            <tr> 
            <td height="40" COLSPAN="4" vALIGN="top">当前网站背景图片：&nbsp;&nbsp;<img border="0" src="../skin/skin<%=skin%>/bg/mnu<% = rs("webbj2")%>_bg.gif " width="22" height="40"> </td>
            
          
          </tr>
          <tr> 
                <td COLSPAN="4" height="20">
 <%dim bgcount:for bgcount=1 to 150%>
        <input type="radio" name="webbj2" value="<%=bgcount%>" <%if rs("webbj2")=cstr(bgcount) then response.write" checked"%>><img src="../skin/skin<%=skin%>/bg/mnu<%=bgcount%>_bg.gif" border="0" width="22" height="40">                                                      
        <%next%>
               
   
	 
           </td></tr>
          
        <tr> 
            <td height="20" COLSPAN="4">导航背景图片背景：</td>
          
          </tr>
         <tr> 
            <td height="40" COLSPAN="4" vALIGN="top">当前导航背景图片背景：&nbsp;&nbsp;<img border="0" src="../skin/skin<%=skin%>/daohang/mnu<% = rs("webbj1") %>_bg.gif" width="22" height="40"> </td>
            
          
          </tr>
           
         <tr> 
                <td COLSPAN="4" height="20">
              <%dim daohangcount:for daohangcount=1 to 156%>
        <input type="radio" name="webbj1" value="<%=daohangcount%>" <%if rs("webbj1")=cstr(daohangcount) then response.write" checked"%>><img src="../skin/skin<%=skin%>/daohang/mnu<%=daohangcount%>_bg.gif" border="0" width="22" height="40">                                                      
        <%next%>
                
   
	 
           </td></tr>
             <tr> 
            <td height="20" COLSPAN="4">左边导航菜单标题图片背景：</td>
          
          </tr>
          
         <tr> 
            <td height="40" COLSPAN="4" vALIGN="top">当前左边导航菜单标题图片背景：&nbsp;&nbsp;<img border="0" src="../skin/skin<%=skin%>/classmenu/mnu<%=rs("webbj12")%>_bg.gif" width="22" height="40"> </td>
            
          
          </tr>
           <tr> 
            <td height="20" COLSPAN="4"></td>
          
          </tr>
           <tr> 
                <td COLSPAN="4" height="20">
              <%dim classmenucount:for classmenucount=1 to 100%>
        <input type="radio" name="webbj12" value="<%=classmenucount%>" <%if rs("webbj12")=cstr(classmenucount) then response.write" checked"%>><img src="../skin/skin<%=skin%>/classmenu/mnu<%=classmenucount%>_bg.gif" border="0" width="22" height="40">                                                      
        <%next%>
                
   
	 
           </td></tr>
       

           
          <tr> 
            <td height="22" colspan="4"> <div align="center"> 
                <input type="submit" name="Submit" value="提 交">
                <input name="action" type="hidden" value="save">
                
              </div></td>
          </tr>
        </form>
      </table>
      <%rs.Close
          set rs=nothing
		  conn.close
		  set conn = Nothing %>
    </td>
  </tr>
</table>
<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>
<%rs.close
set rs=nothing%>
<!--#include file="footer.asp"--> 
</body>
</html>

