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

📄 class.asp

📁 很不错的站件包含的内容和具体功能先删除编译后的debug/release目录以减少压缩包大小
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="check.asp" -->
<script language="javaScript">
function checkdel(test)
{
return confirm("系统提示:\n此操作不可逆,是否确定"+test+"!!");
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理页</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
  </tr>
</table>
<%if request("action") = "add"  then%>
<table width="820" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
<% If request("submit") <> "" Then
sql="insert into 52mt_J111(Class)values('"&server.HTMLEncode(request("Class"))&"')"
conn.execute(sql)
%>
<script language="JavaScript">
<!--
	parent.navigate("admin_index.asp")
//-->
</script>
<%
conn.close
end if
%>
  <tr>
    <td valign="top">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
        
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
        <tr > 
          <td height="26" colspan="2" align="center"  bgcolor="799AE1" class="font"> 
            <table width="99%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr> 
                <td class="font"><strong><font color="#FFFFFF">添加信息分类</font></strong></td>
              </tr>
            </table></td>
        </tr>
        <form name="Add" method="post" action="" onSubmit="return Check()">
		<script language=javascript>
		function Check()
		{if (window.document.Add.Class.value == "")
		return false;
		}
		</script>
          <tr> 
            <td width="10%"height="25" align="center" bgcolor="#FFFFFF" class="td"> 
              分类名称 </td>
            <td align="left" bgcolor="#FFFFFF" class="td"><input name="Class" type="text" class="input" id="Class" size="30">
            </td>
          </tr>
          <tr> 
            <td height="25" align="center" bgcolor="#FFFFFF" class="td">&nbsp;</td>
            <td align="left" bgcolor="#FFFFFF" class="td"><input type="submit" name="Submit" value="确定添加"> 
              <input type="button" name="Submit2" value="返回上页" onClick="history.go(-1)"></td>
          </tr>
        </form>
      </table>
      
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="10"></td>
        </tr>
      </table></td>
  </tr>
</table>
<%end if
if  request("action") = "admin"  then%>
<table width="820" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
        <tr bgcolor="799AE1" > 
          <td height="26" colspan="4" align="center" class="font"> <table width="99%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr> 
                <td class="font"><strong><font color="#FFFFFF">信息分类管理</font></strong></td>
              </tr>
            </table></td>
        </tr>
        <tr align="center"> 
          <td width="5%" height="23" bgcolor="#FFFFFF" class="td">编号</td>
          <td width="20%" height="23" bgcolor="#FFFFFF" class="td">分类名称</td>
          <td width="5%" height="23" bgcolor="#FFFFFF" class="td">编辑</td>
          <td width="70%" height="23" align="left" bgcolor="#FFFFFF" class="td">&nbsp;删除</td>
        </tr >
        <%
Set rc=Server.CreateObject("ADODB.Recordset")
sql="Select * from 52mt_J111 where Class <> '首页' order by ID desc"
rc.open sql,conn,1,1
rc.pagesize=20
dim Page
Page =1
if request("Page") <> "" then
Page=cint(request("Page"))
end if
if not rc.eof and not rc.bof then
rc.absolutepage=Page
end if
count=rc.pagesize
do while not rc.eof and count>0%>
        <TR align="center" bgcolor="#e4edf9" onmouseover="this.bgColor='#dedede'" onmouseout="this.bgColor='#e4edf9'" style="CURSOR:default"> 
          <td width="5%" height="23" class="font"><%=rc("ID")%></td>
          <td width="20%" height="23" align="left" class="font">&nbsp;<%=rc("Class")%></td>
          <td width="5%" height="23"><a href="Class.asp?action=edit&ID=<%=rc("ID")%>"><img src="img/edit.gif" width="12" height="12" border="0"></a></td>
          <td width="70%" height="23" align="left" class="font">&nbsp;<a href="Del.asp?ID=<%=rc("ID")%>&Type=NewsClass&News_Class=<%=rc("Class")%>" onClick="return checkdel('删除该分类并清除所有属于该分类的数据!');"><img src="img/icon_del.gif" width="13" height="13" border="0" align="absmiddle"  style="CURSOR: hand"></a> 
            (若删除<font color="#FF0000">[<%=rc("Class")%>]</font>分类,所有属于<font color="#FF0000">[<%=rc("Class")%>]</font>的信息将会全部更新为<font color="#FF0000">预处理</font>分类) 
          </td>
        </tr>
        <%     
    rc.movenext     
    count=count-1     
    loop     
  %>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
        <tr > 
          <td width="100%"height="24" align="right" class="font"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <form name="pa" method="post" action="">
           
			    <tr> 
                  <td height="20" align="right" valign="middle" class="font">共有<font color="#FF2D00">[<%=rc.RecordCount%>]</font>条信息 
                    分<font color="#FF2D00"><%=rc.pagecount%></font>页 <font color="#FF2D00"><%=rc.pagesize%></font>条/页 
                    当前第<font color="#FF2D00"><%=Page%></font>页 <img src="img/logo_img042.gif" width="11" height="11" align="absmiddle"> 
                    <a href="?Page=1&action=admin">首页</a> 
                    <%if Page>1 then%>
                    <a href="?Page=<%=Page-1%>&action=admin">上页</a> 
                    <%else%>
                    上页 
                    <%end if%>
                    <%if Page < rc.pagecount then %>
                    <a href="?Page=<%=Page+1%>&action=admin">下页</a> 
                    <%else%>
                    下页 
                    <%end if%>
                    <a href=?Page=<%=rc.pagecount%>&action=admin>尾页</a> <img src="img/logo_img044.gif" width="11" height="11" align="absmiddle"> 
                    <input name="Page" type="text" class="put" id="Page" value="<%=Page%>" size="3"> 
                    <input name="Submit3" type="submit" class="button" value="转到该页"> 
                  </td>
                </tr>
				
				
              </form>
            </table></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="10"></td>
        </tr>
      </table></td>
  </tr>
</table>
<%end if
if  request("action") = "edit"  then%>
<table width="820" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
<% If request("submit") <> "" Then
sql="update 52mt_J111_WEB set News_Class = '"&server.HTMLEncode(request("Class"))&"' where News_Class = '"&request("old_Class")&"'"
conn.execute(sql)
sql="update 52mt_J111 set Class = '"&server.HTMLEncode(request("Class"))&"' where ID = "&request("ID")
conn.execute(sql)
%>
<script language="JavaScript">

parent.navigate("admin_index.asp")

</script>
<%
conn.close
else
sql="Select * from 52mt_J111 where ID = "&request("ID")
set rc=conn.execute(sql)
end if
%>
  <tr> 
    <td valign="top"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
        <tr > 
          <td height="26" colspan="2" align="center"  bgcolor="799AE1" class="font"> 
            <table width="99%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr> 
                <td class="font"><strong><font color="#FFFFFF">编辑信息分类</font></strong></td>
              </tr>
            </table></td>
        </tr>
        <form name="Add" method="post" action="" onSubmit="return checkdel('修改该分类并同步更新属于该分类的数据')">
               <tr> 
            <td width="10%"height="25" align="center" bgcolor="#FFFFFF" class="td"> 
              分类名称 </td>
            <td align="left" bgcolor="#FFFFFF" class="td"><input name="Class" type="text" class="input" id="Class" value="<%=rc("Class")%>" size="30"> 
              <input name="old_Class" type="hidden" id="old_Class" value="<%=rc("Class")%>"> 
            </td>
          </tr>
          <tr>
            <td height="25" align="center" bgcolor="#FFFFFF" class="td">注  意</td>
            <td align="left" bgcolor="#FFFFFF" class="td">若修改该分类,所有属于该分类的信息将会同步更新为修改后的分类</td>
          </tr>
          <tr> 
            <td height="25" align="center" bgcolor="#FFFFFF" class="td">&nbsp;</td>
            <td align="left" bgcolor="#FFFFFF" class="td"><input type="submit" name="Submit" value="确定修改"> 
              <input type="button" name="Submit22" value="返回上页" onClick="history.go(-1)"></td>
          </tr>
        </form>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="10"></td>
        </tr>
      </table></td>
  </tr>
</table>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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