<!--#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 * from config ",conn,1,3
rs("webname")=trim(request.form("webname"))
rs("webemail")=trim(request.form("webemail"))
rs("address")=trim(request.form("address"))
rs("postcode")=trim(request.form("postcode"))
rs("tel")=trim(request.form("tel"))
rs("fax")=trim(request.form("fax"))
rs("qq")=trim(request.form("qq"))
rs("ww")=trim(request.form("ww"))
rs("copyright")=trim(request.form("copyright"))
rs("weburl")=trim(request.form("weburl"))
rs("weblogo")=trim(request.form("weblogo"))
rs("webimg7")=trim(request.form("webimg7"))
rs("webimg13")=trim(request.form("webimg13"))
rs("webimg9")=trim(request.form("webimg9"))
rs("webimg10")=trim(request.form("webimg10"))
rs("webbj3")=trim(request.form("webbj3"))
rs("webbj4")=trim(request.form("webbj4"))
rs("webbj5")=trim(request.form("webbj5"))
rs("webbj6")=trim(request.form("webbj6"))
rs("webbj7")=trim(request.form("webbj7"))
rs("webbj8")=trim(request.form("webbj8"))
rs("webbj9")=trim(request.form("webbj9"))
rs("webbj14")=trim(request.form("webbj14"))
rs("webimg6")=trim(request.form("webimg6"))
rs("qqon")=trim(request.form("qqon"))
rs("webid")=trim(request.form("webid"))
rs("indexnew")=int(request.form("indexnew"))
rs("indexre")=int(request.form("indexre"))
rs("indexsp")=int(request.form("indexsp"))
rs("indexclass")=int(request.form("indexclass"))
rs("indexclassh")=int(request.form("indexclassh"))
rs("indexhot")=int(request.form("indexhot"))
rs("indexsold")=int(request.form("indexsold"))
rs("webstata")=trim(request.form("webstata"))
Dim strIntro
For i = 1 To Request.Form("webimg12").Count 
strIntro = strIntro & Request.Form("webimg12")(i) 
Next 
rs("webimg12")=strIntro
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('网站资料修改成功！');history.go(-1);</script>"
end if%>
<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">
        <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>
        网站信息设置</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="config.asp?action=save">
          <%set rs=server.CreateObject("adodb.recordset")
            rs.Open "select * from config",conn,1,1%>
          <tr> 
            <td COLSPAN="3"><DIV ALIGN="CENTER"><strong><font size="2">基本信息</font></strong></DIV></td>
          </tr>
          <tr> 
            <td width="16%">网站网址：</td>
            <td ><INPUT NAME="weburl" TYPE="text" ID="weburl" SIZE="28" VALUE="<%=trim(rs("weburl"))%>"></td>
            <td ><font color="#B15688">务必正确填写网址否则邮件无法发送正常,不要加http://比如: www.sdxco.cn</font></td>
           </tr>
           
          <tr> 
            <td>网站名称：</td>
            <td COLSPAN="2"> <input name="webname" type="text" id="webname" size="28" value="<%=trim(rs("webname"))%>"> 
            </td>
          </tr>
          <tr> 
            <td>网站Email：</td>
            <td COLSPAN="2"> <input name="webemail" type="text" id="webemail" size="28" value="<%=trim(rs("webemail"))%>"> 
            </td>
          </tr>
          <tr> 
            <td>地址：</td>
            <td COLSPAN="2"> <input name="address" type="text" id="address" size="28" value="<%=trim(rs("address"))%>"> 
            </td>
          </tr>
          <tr> 
            <td>公司邮编：</td>
            <td COLSPAN="2"> <input name="postcode" type="text" id="postcode" size="28" value="<%=trim(rs("postcode"))%>"	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>公司电话：</td>
            <td COLSPAN="2"> <input name="tel" type="text" id="tel" size="28" value="<%=trim(rs("tel"))%>"> 
            </td>
          </tr>
          <tr> 
            <td>公司传真：</td>
            <td COLSPAN="2"> <input name="fax" type="text" id="fax" size="28" value="<%=trim(rs("fax"))%>"> 
            </td>
          </tr>
          <tr> 
            <td>联系 <strong>QQ</strong>：</td>
            <td COLSPAN="2"><input name="qq" type="text" id="qq" size="28" value="<%=trim(rs("qq"))%>"></td>
          </tr>
           <tr> 
            <td>联系 <strong>旺旺</strong>：</td>
            <td COLSPAN="2"><input name="ww" type="text" id="ww" size="28" value="<%=trim(rs("ww"))%>"></td>
          </tr>
          <tr> 
            <td>网站版权：</td>
            <td COLSPAN="2"> <input name="copyright" type="text" size="28" value="<%=trim(rs("copyright"))%>"> 
            </td>
          </tr>
          <tr> 
            <td width="16%" height="20">商品小图宽度：</td>
            <td COLSPAN="2"><INPUT NAME="webimg9" TYPE="text" ID="webimg9" SIZE="28" VALUE="<% = rs("webimg9") %>"></td>
          </tr>
          <tr> 
            <td height="20">商品小图高度：</td>
            <td COLSPAN="2"><INPUT NAME="webimg10" TYPE="text" ID="webimg10" SIZE="28" VALUE="<% = rs("webimg10") %>"></td>
          </tr>
          <tr> 
            <td height="22">免邮费设置：</td>
            <td height="22" colspan="2"><INPUT NAME="webbj5" TYPE="text" ID="webbj5" SIZE="28" VALUE="<% = rs("webbj5") %>">
              （购物满多少免附加邮费，设置成0表示关闭此功能）</td>
          </tr>
          <tr> 
            <td height="20">积分转预存款比例：</td>
            <td COLSPAN="2"><INPUT NAME="webbj6" TYPE="text" ID="webbj6" SIZE="28" VALUE="<% = rs("webbj6") %>"></td>
          </tr>
           <tr> 
            <td height="20">注册送积分：</td>
            <td COLSPAN="2"><INPUT NAME="webimg7" TYPE="text" ID="webimg7" SIZE="28" VALUE="<% = rs("webimg7") %>"></td>
          </tr>
	  <tr> 
            <td height="20">推荐人奖励积分：</td>
            <td COLSPAN="2"><INPUT NAME="webimg13" TYPE="text" ID="webimg13" SIZE="28" VALUE="<% = rs("webimg13") %>"></td>
          </tr>
           <tr> 
            <td height="20">首页新品显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexnew" value=6  <% if rs("indexnew")=6   Then Response.write("checked ") %>>5 &nbsp;
                            <input type=radio name="indexnew" value=11 <% if rs("indexnew")=11  Then Response.write("checked ") %>>10 &nbsp;
                            <input type=radio name="indexnew" value=16 <% if rs("indexnew")=16  Then Response.write("checked ") %>>15 &nbsp;
                            <input type=radio name="indexnew" value=21 <% if rs("indexnew")=21  Then Response.write("checked ") %>>20 &nbsp;
                            <input type=radio name="indexnew" value=26 <% if rs("indexnew")=26  Then Response.write("checked ") %>>25 &nbsp;
                            <input type=radio name="indexnew" value=31 <% if rs("indexnew")=31  Then Response.write("checked ") %>>30 &nbsp;
                            <input type=radio name="indexnew" value=36 <% if rs("indexnew")=36  Then Response.write("checked ") %>>35 &nbsp;
                            <input type=radio name="indexnew" value=41 <% if rs("indexnew")=41  Then Response.write("checked ") %>>40 &nbsp;
           </td>
          </tr>
           <tr> 
            <td height="20">首页推荐显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexre" value=5  <% if rs("indexre")=5   Then Response.write("checked ") %>>4 &nbsp;
                            <input type=radio name="indexre" value=9 <% if rs("indexre")=9    Then Response.write("checked ") %>>8 &nbsp;
                            <input type=radio name="indexre" value=13 <% if rs("indexre")=13    Then Response.write("checked ") %>>12 &nbsp;
                            <input type=radio name="indexre" value=17 <% if rs("indexre")=17  Then Response.write("checked ") %>>16 &nbsp;
                            <input type=radio name="indexre" value=21 <% if rs("indexre")=21  Then Response.write("checked ") %>>20 &nbsp;
                            <input type=radio name="indexre" value=25 <% if rs("indexre")=25  Then Response.write("checked ") %>>24 &nbsp;
                            <input type=radio name="indexre" value=29 <% if rs("indexre")=29  Then Response.write("checked ") %>>28 &nbsp;
                            <input type=radio name="indexre" value=33 <% if rs("indexre")=33  Then Response.write("checked ") %>>32 &nbsp;
           </td>
          </tr>
           <tr> 
            <td height="20">首页特价显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexsp" value=5  <% if rs("indexsp")=5   Then Response.write("checked ") %>>4 &nbsp;
                            <input type=radio name="indexsp" value=9 <% if rs("indexsp")=9    Then Response.write("checked ") %>>8 &nbsp;
                            <input type=radio name="indexsp" value=13 <% if rs("indexsp")=13    Then Response.write("checked ") %>>12 &nbsp;
                            <input type=radio name="indexsp" value=17 <% if rs("indexsp")=17  Then Response.write("checked ") %>>16 &nbsp;
                            <input type=radio name="indexsp" value=21 <% if rs("indexsp")=21  Then Response.write("checked ") %>>20 &nbsp;
                            <input type=radio name="indexsp" value=25 <% if rs("indexsp")=25  Then Response.write("checked ") %>>24 &nbsp;
                            <input type=radio name="indexsp" value=29 <% if rs("indexsp")=29  Then Response.write("checked ") %>>28 &nbsp;
                            <input type=radio name="indexsp" value=33 <% if rs("indexsp")=33  Then Response.write("checked ") %>>32 &nbsp;
           </td>
          </tr>
            <tr> 
            <td height="20">首页热门显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexhot" value=1  <% if rs("indexhot")=1   Then Response.write("checked ") %>>2 &nbsp;
                            <input type=radio name="indexhot" value=2 <% if rs("indexhot")=2    Then Response.write("checked ") %>>4 &nbsp;
                            <input type=radio name="indexhot" value=3 <% if rs("indexhot")=3    Then Response.write("checked ") %>>6 &nbsp;
                            <input type=radio name="indexhot" value=4 <% if rs("indexhot")=4    Then Response.write("checked ") %>>8 &nbsp;
                            <input type=radio name="indexhot" value=5 <% if rs("indexhot")=5  Then Response.write("checked ") %>>10 &nbsp;
                            <input type=radio name="indexhot" value=6 <% if rs("indexhot")=6  Then Response.write("checked ") %>>12 &nbsp;
                            <input type=radio name="indexhot" value=7 <% if rs("indexhot")=7  Then Response.write("checked ") %>>14 &nbsp;
                            <input type=radio name="indexhot" value=8 <% if rs("indexhot")=8  Then Response.write("checked ") %>>16 &nbsp;
           </td>
          </tr>
          <tr> 
            <td height="20">首页热销显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexsold" value=1  <% if rs("indexsold")=1    Then Response.write("checked ") %>>2 &nbsp;
                            <input type=radio name="indexsold" value=2  <% if rs("indexsold")=2    Then Response.write("checked ") %>>4 &nbsp;
                            <input type=radio name="indexsold" value=3  <% if rs("indexsold")=3    Then Response.write("checked ") %>>6 &nbsp;
                            <input type=radio name="indexsold" value=4 <% if rs("indexsold")=4    Then Response.write("checked ") %>>8 &nbsp;
                            <input type=radio name="indexsold" value=5 <% if rs("indexsold")=5   Then Response.write("checked ") %>>10 &nbsp;
                            <input type=radio name="indexsold" value=6 <% if rs("indexsold")=6   Then Response.write("checked ") %>>12 &nbsp;
                            <input type=radio name="indexsold" value=7 <% if rs("indexsold")=7   Then Response.write("checked ") %>>14 &nbsp;
                            <input type=radio name="indexsold" value=8 <% if rs("indexsold")=8   Then Response.write("checked ") %>>16 &nbsp;
           </td>
          </tr>
           <tr> 
            <td height="20">首页分类推荐显示数量：</td>
            <td COLSPAN="2"><input type=radio name="indexclass" value=5  <% if rs("indexclass")=5    Then Response.write("checked ") %>>4 &nbsp;
                            <input type=radio name="indexclass" value=9  <% if rs("indexclass")=9    Then Response.write("checked ") %>>8 &nbsp;
                            <input type=radio name="indexclass" value=13  <% if rs("indexclass")=13    Then Response.write("checked ") %>>12 &nbsp;
                            <input type=radio name="indexclass" value=17  <% if rs("indexclass")=17    Then Response.write("checked ") %>>16 &nbsp;
                            <input type=radio name="indexclass" value=21 <% if rs("indexclass")=21   Then Response.write("checked ") %>>20 &nbsp;
                            <input type=radio name="indexclass" value=25 <% if rs("indexclass")=25   Then Response.write("checked ") %>>24 &nbsp;
                            <input type=radio name="indexclass" value=29 <% if rs("indexclass")=29   Then Response.write("checked ") %>>28 &nbsp;
                            <input type=radio name="indexclass" value=33 <% if rs("indexclass")=33   Then Response.write("checked ") %>>32 &nbsp;
                            该栏目高度：<INPUT NAME="indexclassh" TYPE="text" ID="indexclassh" SIZE="5" VALUE="<% = rs("indexclassh") %>">
           </td>
          </tr>
          <tr> 
            <td height="20">网站备案号：</td>
            <td COLSPAN="2"><INPUT NAME="webid" TYPE="text" ID="webid" SIZE="28" VALUE="<% = rs("webid") %>" ></td>
          </tr>
          <tr> 
            <td height="20">是否允许匿名购物：</td>
            <td COLSPAN="2"><select name="webimg6" id="webimg6">
				<option value="0" <% if rs("webimg6")="0" Then Response.write("Selected") %>>关闭</option>
			    <option value="1" <% if rs("webimg6")="1" Then Response.write("Selected") %>>允许</option>
              </select>
			</td>
          </tr>
          <tr> 
            <td height="20">是否调用QQ在线：</td>
            <td COLSPAN="2"><select name="qqon" id="qqon">
			   <option value="0" <% if rs("qqon")="0" Then Response.write("Selected") %>>关闭</option>
			    <option value="1" <% if rs("qqon")="1" Then Response.write("Selected") %>>浮动式调用</option>
                            <option value="2" <% if rs("qqon")="2" Then Response.write("Selected") %>>浮动式小QQ调用</option>
                            <option value="3" <% if rs("qqon")="3" Then Response.write("Selected") %>>拉窗式调用</option>
              </select>
			</td>
          </tr>
           <tr> 
            <td bgcolor="#FFFFFF">网站logo：</td>
            <td bgcolor="#FFFFFF"><input name="weblogo" type="text" id="weblogo" size="28" value=<%=trim(rs("weblogo"))%>>
              <input type="button" name="Submit12" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=weblogo&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td bgcolor="#FFFFFF"  COLSPAN="2"></td>
          </tr>
          <tr> 
            <td valign="top">网站统计代码：</td>
            <td COLSPAN="2"> <textarea name="webstata" cols="60" rows="10"><%=  rs("webstata") %>
				</textarea>主要免费统计服务网站：<a href=http://www.cnzz.com/ target=_blank>站长统计</a>|<a href=http://www.51.la/ target=_blank>我要啦</a>|<a href=http://count.51yes.com/ target=_blank>51Yes</a>
            </td>
          </tr>
          <tr> 
            <td colspan="3" align="center"><font size="2"><strong>邮件设置(服务器要支持相应的邮件组件才能正常发信)</strong></font></td>
          </tr>
          <tr> 
            <td height="22">邮件服务器地址：</td>
            <td width="28%" height="22"><INPUT NAME="webbj7" TYPE="text" ID="webbj7" SIZE="28" VALUE="<% = rs("webbj7") %>"></td>
            <td width="56%" height="22">&nbsp;</td>
          </tr>
          <tr> 
            <td height="22">邮件登录用户名：</td>
            <td height="22"><INPUT NAME="webbj8" TYPE="text" ID="webbj8" SIZE="28" VALUE="<% = rs("webbj8") %>"></td>
            <td height="22">&nbsp;</td>
          </tr>
          <tr> 
            <td height="22">邮件登录密码：</td>
            <td height="22"><strong> 
              <INPUT NAME="webbj9" TYPE="password" ID="webbj9" SIZE="28" VALUE="<% = rs("webbj9") %>">
              </strong></td>
            <td height="22">&nbsp;</td>
          </tr>
	 <tr> 
            <td height="22">邮件附加的签名：</td>
            <td height="22"><INPUT NAME="webbj3" TYPE="text" ID="webbj3" SIZE="28" VALUE="<% = rs("webbj3") %>"></td>
            <td height="22">&nbsp;</td>
          </tr>
		            <tr> 
            <td height="22">使用的邮件组件：</td>
            <td height="22"><select name="webbj4" id="webbj4">
				<option value="Nothing" <% if rs("webbj4")="Nothing" Then Response.write("Selected") %>>关闭</option>
			    <option value="Jmail" <% if rs("webbj4")="Jmail" Then Response.write("Selected") %>>Jmail</option>
                <option value="CDONTS" <% if rs("webbj4")="CDONTS" Then Response.write("Selected") %>>CDONTS</option>
              </select></td>
            <td height="22">&nbsp;</td>
          </tr>
            <tr> 
            <td height="22">会员邮件标题：</td>
            <td height="22"><INPUT NAME="webbj14" TYPE="text" ID="webbj14" SIZE="28" VALUE="<% = rs("webbj14") %>"></td>
            <td height="22">&nbsp;</td>
          </tr>
           
          <tr> 
            <td valign="top">会员邮件内容：</td>
            <td COLSPAN="2"> <INPUT type="hidden" name="webimg12" value="<% = Server.HtmlEncode(rs("webimg12")) %>">	
              <iframe ID="webimg12" src="htmledit/ewebeditor.asp?id=webimg12&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe> 
            </td>
          </tr>
         
          <tr> 
            <td height="5" COLSPAN="3">&nbsp; </td>
          </tr>
          
          <tr> 
            <td height="22" colspan="3"> <div align="center"> 
                <input type="submit" name="Submit" value="提 交">
                <input name="action" type="hidden" value="save">
                &nbsp;&nbsp; 
                <input type="reset" name="Submit2" value="恢 复">
              </div></td>
          </tr>
        </form>
      </table>
      <%rs.Close
          set rs=nothing
		  conn.close
		  set conn = Nothing %>
    </td>
  </tr>
</table>
<!--#include file="footer.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>
