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

📄 admin_classmod.asp

📁 驴友格子(access)版v1.50 (中国驴友网开发http://www.hikers.cn) 后台管理:admin 管理员用户名:admin 管理员密码:admin (md5加密后
💻 ASP
字号:
<!--#include file="../inc/conn.asp"-->
<!--#include file="admin_popedom.asp"-->
<%
dim id,rss,sql
if IsNumeric(request.QueryString("id"))=False then
response.write"<SCRIPT language=JavaScript>alert('非法操作,正在启动删除你C:\盘相关文件文件!');" 
response.write"javascript:history.go(-1)</SCRIPT>" 
end if
id=request("id")
set rss=server.createobject("adodb.recordset")
sql="select * from G_class where G_classid="&id
rss.open sql,conn,,1,1%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/css.css" rel="stylesheet" type="text/css">
<title>『驴友俱乐部』网站管理系统</title>
<style type="text/css">
<!--
body {
	background-color: #efe8d7;
	margin-left: 15px;
}
-->
</style>
</head>
<%
dim server_v1,server_v2
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))'本地路径
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))'服务器路径
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style='font:9pt Verdana'>"
response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱该参数!"
response.write "</td></tr></table></center>"
response.end
end if
%>
<%
dim G_class
dim rs
dim del
dim delpro
if Request.QueryString("add")="yes" then
G_class=Request("G_class")
If G_class="" Then
response.write "SORRY <br>"
response.write "<a href=""javascript:history.go(-1)"">分类名称不能为空,请返回重输</a>"
response.end
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from G_class where G_classid="&id
rs.open sql,conn,1,3
rs("G_class")=G_class
rs.update
rs.close
response.redirect "admin_classadd.asp"
end if%>
<body><div align="center">
  <table width="780" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <table cellSpacing=0 borderColorDark=#ffffff cellPadding=0  width="780" align=center borderColorLight=#c89f7b border=1>
    <tr>
      <td height="30" align="center"><font color="#FF0000">『驴友俱乐部』</font>网站分类管理</td>
    </tr>
    <tr>
      <td height="30" align="center"><table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr><form name="form1" method="post" action="admin_classadd.asp?add=yes">
          <td align="center">
            <table width="760" border="0" cellspacing="0" cellpadding="0">
              <tr align="center">
                <td width="100">网站分类:</td>
                <td><input name="G_class" type="text" id="G_class" value="<%=rss("G_class")%>" size="40"></td>
                <td><input type="submit" name="Submit" value="修改分类"></td>
              </tr>
            </table>
          </td>
 </form></tr>
      </table></td>
    </tr>
    <tr>
      <td align="center"><!--管理员列表开始-->
	  <%
	  dim row_count
	  set rs=server.CreateObject("adodb.recordset")
 sql="select * from G_class order by G_classid desc"
 rs.open sql,conn,1,1%>
      <table width="760" border="0" cellspacing="0" cellpadding="0">
        <%row_count=1 %>
        <tr align="center"><%if rs.eof and rs.bof then
response.write "暂时没有分类!"
else
Do While Not rs.EOF%>
          <td width="760" align="left"><table width="380" border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td height="24" align="center"><%=rs("G_class")%></td>
                <td width="35" height="24" align="center"><a href="admin_classmod.asp?id=<%=rs("G_classid")%>">修改</a></td>
                <td width="35" height="24" align="center"><a href="admin_classadd.asp?del=yes&id=<%=rs("G_classid")%>" onclick="{if(confirm('真的要删除吗?')){return true;}return false;}" alt="删除该分类">删除</a></td>
              </tr>
              <tr bgcolor="#c89f7b">
                <td height="1" colspan="3" align="center"><!--表格高度1象素,谗嘴猫QQ:29771424--></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="1" colspan="3" align="center"><!--表格高度1象素,谗嘴猫QQ:29771424--></td>
                </tr>
          </table></td>
          <% if row_count mod 2 =0 then%>
        </tr><%end if     
rs.MoveNext      
row_count=row_count+1      
Loop      
rs.close
end if%>
      </table>
      <table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="24">&nbsp;</td>
        </tr>
      </table><!--管理员列表结束--></td>
    </tr>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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