⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.asp

📁 一个电子商务网站完整代码,在.net平台下开发
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if session("rank")>1 then
response.Write "<div align=center><font size=5 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,musicid,musicurl,webemail,address,postcode,tel,qq,copyright,weblogo,weburl,webbanner,bigbanner,bgclr1,bgclr2,bgclr3,bgclr4,bgclr5,bgclr6,bgclr7,bgclr8,webimg1,webimg2,webimg3,webimg4,webimg5,webimg6,webimg7,webimg8,webimg9,webimg10,webimg11,webimg12,webbj1,webbj2,webbj3,webbj4,webbj5,webbj6,webbj7,webbj8,webbj9 from config ",conn,1,3
rs("webname")=trim(request("webname"))
rs("webemail")=trim(request("webemail"))
rs("address")=trim(request("address"))
rs("postcode")=trim(request("postcode"))
rs("tel")=trim(request("tel"))
rs("qq")=trim(request("qq"))
rs("copyright")=trim(request("copyright"))
rs("webbanner")=trim(request("webbanner"))
rs("bigbanner")=trim(request("bigbanner"))
rs("webimg1")=trim(request("webimg1"))
rs("webimg2")=trim(request("webimg2"))
rs("webimg3")=trim(request("webimg3"))
rs("webimg4")=trim(request("webimg4"))
rs("webimg5")=trim(request("webimg5"))
rs("webimg6")=trim(request("webimg6"))
rs("webimg7")=trim(request("webimg7"))
rs("webimg8")=trim(request("webimg8"))
rs("webimg9")=trim(request("webimg9"))
rs("webimg10")=trim(request("webimg10"))
rs("webimg11")=trim(request("webimg11"))
rs("webimg12")=trim(request("webimg12"))
rs("weburl")=trim(request("weburl"))
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="#FF00FF">
  <tr> 
    <td height="16" bgcolor="#FF00FF"> <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 webname,musicurl,musicid,webemail,address,postcode,tel,qq,copyright,weblogo,weburl,webbanner,bigbanner,bgclr1,bgclr2,bgclr3,bgclr4,bgclr5,bgclr6,bgclr7,bgclr8,webimg1,webimg2,webimg3,webimg4,webimg5,webimg6,webimg7,webimg8,webimg9,webimg10,webimg11,webimg12,webbj1,webbj2,webbj3,webbj4,webbj5,webbj6,webbj7,webbj8,webbj9 from config",conn,1,1%>
          <tr> 
            <td COLSPAN="3"><DIV ALIGN="CENTER"><strong><font size="3">基本信息</font></strong></DIV></td>
          </tr>
          <tr> 
            <td width="19%">网站网址: 
            <DIV ALIGN="RIGHT"></DIV></td>
            <td COLSPAN="2"><INPUT NAME="weburl" TYPE="text" ID="weburl" SIZE="28" VALUE="<%=trim(rs("weburl"))%>"></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>联系 <strong>QQ</strong>:</td>
            <td COLSPAN="2"><input name="qq" type="text" id="qq" size="28" value="<%=trim(rs("qq"))%>"></td>
          </tr>
          <tr> 
            <td>网站版权:</td>
            <td COLSPAN="2"> <input name="copyright" type="text" size="28" value="<%=trim(rs("copyright"))%>"> 
            </td>
          </tr>
          <tr> 
            <td valign="top">公司简介:</td>
            <td COLSPAN="2"><textarea name="webimg12" cols="60" rows="10" id="webimg12" VALUE="<%=trim(rs("webimg12"))%>"><% = rs("webimg12") %>
</textarea></td>
          </tr>
<tr> 
            <td height="0">大商品图片宽度:</td>
            <td height="0" WIDTH="24%"><INPUT NAME="webimg7" TYPE="text" ID="webimg7" SIZE="28" VALUE="<% = rs("webimg7") %>"></td>
            <td height="0" WIDTH="57%">&nbsp;</td>
          </tr>
          <tr> 
            <td height="0">大商品图片高度:</td>
            <td height="0" WIDTH="24%"><INPUT NAME="webimg8" TYPE="text" ID="webimg8" SIZE="28" VALUE="<% = rs("webimg8") %>"></td>
            <td height="0" WIDTH="57%">&nbsp;</td>
          </tr>
          <tr> 
            <td height="0">小商品图片宽度:</td>
            <td height="0"><INPUT NAME="webimg9" TYPE="text" ID="webimg93" SIZE="28" VALUE="<% = rs("webimg9") %>"></td>
            <td height="0">&nbsp;</td>
          </tr>
          <tr> 
            <td height="0">小商品图片高度:</td>
            <td height="0"><INPUT NAME="webimg10" TYPE="text" ID="webimg103" SIZE="28" VALUE="<% = rs("webimg10") %>"></td>
            <td height="0">&nbsp;</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="提 交">
                &nbsp;&nbsp; 
                <input type="reset" name="Submit2" value="恢 复">
              </div></td>
          </tr>
        </form>
      </table>
      <%rs.Close
          set rs=nothing%>
    </td>
  </tr>
</table>
<br>
<!--#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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -