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

📄 setup.asp

📁 这是一个网上购物物网站,数据库的连接在CONN.ASP中,既有前台网站,也有后台管理
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统设置</title>
<link rel=stylesheet type=text/css href=css.asa>
</head>

<body bgcolor="#fffff0">
<!--#include file="head.asp"-->
<div align="center">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="88">
    <tr>
      <td width="100%" height="24">
      <p align="center"> </td>
    </tr>
    <tr>
      <td width="100%" height="64" align="center">
<%
  Set conn=Server.Createobject("ADODB.Connection")
  conn.open ConnStr
  IF Request.Form("IsSub")="YES" THEN
    pass=Server.HTMLEncode(Request.Form("pass"))
    times=Server.HTMLEncode(Request.Form("times"))
    IF pass="" THEN pass="admin"
    IF times="" THEN times="1"
    conn.execute "Update 系统 Set 值='"&pass&"' Where ID=1"
    conn.execute "Update 系统 Set 值='"&times&"' Where ID=2"
    Response.write "<b>.....操作成功.....</b><br><br>已经成功更改了系统设置,请记好你的管理密码<br><br><a href=list.asp><font color=#000000>点击这儿返回列表</font></a>"
  ELSE
    Set rs=conn.execute("Select 值 From 系统 Order By ID")
%>      
      <form method="POST" action="setup.asp">
      <input type="hidden" name="IsSub" value="YES">
          <table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#99CCFF" width="400" id="AutoNumber2" height="36">
            <tr background="dh.gif"> 
              <td width="394" height="10" colspan="2"> 
                <p align="center"><font size="2"><b>系 统 设 置</b></font></td>
          </tr>
            <tr> 
              <td width="75" height="17" bgcolor="#FFFFFF"> 管理员密码</td>
              <td width="314" height="17" bgcolor="#FFFFFF"> 
                <input type="text" name="pass" size="20" value="<%=rs(0)%>"></td>
          </tr>
          <% rs.MoveNext %>
            <tr> 
              <td width="75" height="17" bgcolor="#FFFFFF"> 投票限制</td>
              <td width="314" height="17" bgcolor="#FFFFFF"> 
                <input type="radio" value="1" <% IF rs(0)="1" THEN Response.write "checked " %>name="times"> 不限制<br>
              <input type="radio" name="times" <% IF rs(0)="2" THEN Response.write "checked " %>value="2"> 每位访问者只能投一次票<br>
              <input type="radio" name="times" <% IF rs(0)="3" THEN Response.write "checked " %>value="3"> 每IP只能投一次票</td>
          </tr>
            <tr> 
              <td width="389" height="17" colspan="2" bgcolor="#FFFFFF"> 
                <p align="center"><input type="submit" value="提交" name="B1"></td>
          </tr>
        </table>        
      </form>
<%
    rs.close
    Set rs=nothing
  END IF
  conn.close
  Set conn=nothing
%>      
      </td>
    </tr>
  </table>
</div>
</body>

</html>

⌨️ 快捷键说明

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