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

📄 admin_data.asp

📁 asp新闻发布网站系统
💻 ASP
字号:
<!--#include file="admin_yz.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="pageset.asp"-->
<!--#include file="lock.asp"-->
<!--#include file="css.asp"-->
<%
if request("Submit_user")<>"" then
  if request("user")="" then call errmsg("用户名不能为空")
  if instr(request("user"),"'")<>0 then call errmsg("用户名中含有非法字符")
  sql="select username from admin where username='"&request("user")&"'"
  rs.open sql,conn,1,3
  if not(rs.bof and rs.eof) then call errmsg("该用户名已经存在,请换名")
  rs.close
  sql="select username from admin where username='"&session("admin")&"'"
  rs.open sql,conn,1,3
  rs("username")=request("user")
  rs.update
  session("admin")=rs("username")
  rs.close
  call connclose
  response.redirect"admin_data.asp"
response.end
end if

if request("Submit_pwd")<>"" then
  if request("pwd")="" then call errmsg("密码不能为空")
  if instr(request("pwd"),"'")<>0 then call errmsg("密码中含有非法字符")
  sql="select * from admin where username='"&session("admin")&"'"
  rs.open sql,conn,1,3
  rs("password")=request("pwd")
  rs.update
  session("pwd")=rs("password")
  rs.close
  call connclose
  response.redirect"admin_data.asp"
response.end
end if

if request("Submit_msg")<>"" then
  if request("text")="" then call errmsg("公告不能为空")
  sql="select message,messagetime from pageset"
  rs.open sql,conn,1,3
  rs("message")=request("text")
  rs("messagetime")=now
  rs.update
  rs.close
  call connclose
  response.redirect"admin_data.asp"
response.end
end if

if request("Submit_counts")<>"" then
  conn.execute"update pageset set counts="&request("counts")&""
  call connclose
  response.redirect"admin_data.asp"
response.end
end if

if request("Submit_reset")<>"" then
  if not IsNumeric(request("reset")) then call errmsg("时间必须是数字")
  conn.execute"update pageset set reset="&request("reset")&""
  call connclose
  response.redirect"admin_data.asp"
response.end
end if

if request("Submit_locktime")<>"" then
  if not IsNumeric(request("locktime")) then call errmsg("时间必须是数字")
  conn.execute"update pageset set locktime="&request("locktime")&""
  call connclose
  response.redirect"admin_data.asp"
response.end
end if
%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="20" background="images/admin_table1.gif" bgcolor="<%=tablecolor%>"> </td>
    <td valign="top">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="720" height="20" valign="bottom"><strong><font color="#990000">欢迎您管理员,你可以对以下的功能进行修改设置!要是已经满意可以<font color="#000000"> 
            <a href="default.asp">返回</a>&nbsp;</font></font></strong></td>
        </tr>
      </table>
      <hr color="<%=tablecolor%>">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td> 
              <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="720" height="30">[管理员信息]</td>
              </tr>
              <tr> <form name="form3" method="post" action="">
                <td> 
                    <table width="700" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td>用户名: 
                          <input name="user" type="text" id="adminuser6" value="<%=session("admin")%>" maxlength="10">
                          <input name="Submit_user" type="submit" id="Submit_admin2" value="修改">
                        </td>
                      </tr>
                    </table>
                  </td></form>
              </tr>
              <tr><form name="form4" method="post" action="">
                <td>
                    密&nbsp; 码: 
                    <input name="pwd" type="password" id="pwd3" value="<%=session("pwd")%>" maxlength="10">
                    <input name="Submit_pwd" type="submit" id="Submit_pwd" value="修改">
                  </td></form>
              </tr>
            </table>
            </td>
        </tr>
      </table>
      <hr color="<%=tablecolor%>">
      <table width="100%" height="44" border="0" cellpadding="0" cellspacing="0">
        <tr><form name="form5" method="post" action="">
          <td>
              <table width="720" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="720"> <table width="700" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td width="720" height="30">[滚动公告修改]</td>
                      </tr>
                      <tr> 
                        <td height="30"> 内容为: 
                          <textarea name="text" cols="90" rows="2" id="textarea6"><%=message%></textarea>
                          <input name="Submit_msg" type="submit" id="Submit_msg" value="发布"> 
                        </td>
                      </tr>
                    </table></td>
                </tr>
              </table>
            </td></form>
        </tr>
      </table>
      <hr color="<%=tablecolor%>"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><form name="form1" method="post" action="">
          <td>
              <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td>[下部统计] 
                    <input type="radio" name="counts" value="true" <%if counts=true then response.write "checked"%>>
<input name="counts" type="radio" value="false" <%if counts=false then response.write "checked"%>>
                    <input name="Submit_counts" type="submit" id="Submit_counts" value="修改"></td>
                </tr>
              </table>
            </td></form>
        </tr>
      </table>
      <hr color="<%=tablecolor%>">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr><form name="form2" method="post" action="">
          <td>
              <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="720">[公告页刷新时间] 
                    <input name="reset" type="text" id="reset" value="<%=reset%>" size="4" maxlength="4">
                    <input name="Submit_reset" type="submit" id="Submit_reset" value="修改">
                    (-1为不刷新,0为无限刷新不推荐,建议60)</td>
                </tr>
              </table>
            </td></form>
        </tr>
      </table>
      <hr color="<%=tablecolor%>">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><form name="form6" method="post" action="">
          <td>
              <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="720">显示<img border="0" src="images/news.gif" width="20" height="15">的时间
                    <input name="locktime" type="text" id="locktime" value="<%=locktime%>" size="3" maxlength="3">
<input name="Submit_locktime" type="submit" id="Submit_locktime" value="修改"> 
      <hr color="<%=tablecolor%>">
      			<p>&nbsp;</td>
                </tr>
              </table>
            </td></form>
        </tr>
      </table>
            <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="230" height="25"> 
            <div align="left">服务器时间:<%=now()%></div></td>
          <td width="230" height="25"> 
            <div align="left">服务器超时:<%=session.timeout%>分</div></td>
          <td width="230" height="25"> 
            <div align="left">服务器类型<font color="#000000">:<%=request.servervariables("server_software")%></font></div></td>
        </tr>
        <tr> 
          <td height="25"> <div align="left">FSO组件: 
              <%on error resume next
set TestObj=server.CreateObject("Scripting.FileSystemObject")
If Err<>-2147221005 then
	response.Write "支持"
else
	response.Write "不支持"
end if%>
            </div></td>
          <td height="25"> <div align="left">CDONTS组件: 
              <%on error resume next
set TestObj=server.CreateObject("cdonts.newmail")
If Err=-2147221005 then
	response.Write "不支持"
else
	response.Write "支持"
end if
%>
            </div></td>
          <td height="25"> <div align="left"></div></td>
        </tr>
      </table>
      <p align="center"><strong><font color="#990000"><font color="#000000"><a href="default.asp">返回</a></font></font></strong></p>
      <p align="center"> </p></td>
    <td width="20" background="images/admin_table2.gif" bgcolor="<%=tablecolor%>"> </td>
  </tr>
</table>
</body>
</html>
<%call connclose%>

⌨️ 快捷键说明

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