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

📄 admin_file_index.asp

📁 个人网站模板
💻 ASP
字号:
<!--#include file="conn_admin.asp" -->
<!--#include file="check_admin.asp"-->
<!--#include file="../char.asp" -->
<html>
<head>
<%
type_name=Request.QueryString("type_name")
typeid=cint(Request.QueryString("typeid"))
classview=cint(Request.QueryString("classview"))
set temprs=conn.execute("select name,classid from type where id="&typeid)
  	if not isempty(request("selAnnounce")) then
     		idlist=request("selAnnounce")
     		if instr(idlist,",")>0 then
			dim idarr
			idArr=split(idlist)
			dim id
		for i = 0 to ubound(idarr)
	       		id=clng(idarr(i))
	       		call deleteannounce(id)
		next
     		else
			call deleteannounce(clng(idlist))
     		end if
  	end if 
%>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="sys.css" rel="stylesheet" type="text/css">
<link href="sys_admin.css" rel="stylesheet" type="text/css">
</head>
<body text="#000000" leftmargin="0" topmargin="0">
<table width="100%" height="30" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr> 
    <td width="100%" height="30" bgcolor="#000000"> 
      <div align="center"> 
        <table width="100%" border="0" cellpadding="3" cellspacing="0">
          <tr> 
            <td width="3%"> <div align="left"><br>
              </div></td>
            <%
sql = "SELECT * FROM index_type ORDER BY indexid ASC" 
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,0,1
if rs.eof and rs.bof then
Response.Write"还没有分类"
else
do while not rs.eof %>
            <td height="24"> <a href='admin_file_index.asp?typeid=<%=rs("id")%>&type_name=<%=rs("name")%>'><font color="#FFFFFF"><%=rs("name")%></font></a> 
            </td>
            <%
rs.movenext
loop
end if
rs.close
Set rs=Nothing
%>
          </tr>
        </table>
      </div></td>
  </tr>
</table>

<table width='100%' border='0' align="center" cellpadding='0' cellspacing='8'>
  <tr align='left'> 
    <td height="54"> 
     <form action="admin_file_index.asp">
	  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="#CCCCCC" bordercolorlight="#FFFFFF">
        <tr bgcolor="#006600"> 
          <td> <div align="center"><font color="#FFFFFF"><strong>ID</strong></font></div></td>
          <td><font color="#FFFFFF"><strong>次栏目名称</strong></font></td>
          <td><strong><font color="#FFFFFF">
              <input type="submit" name="Submit" value="删除选中次栏目">
            </font></strong></td>
        </tr>
        <% 
sql = "SELECT * FROM index_produce where typeid="&typeid&" ORDER BY listid asc,id DESC"
Set rs = Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 
do while NOT rs.EOF 
if not rs.eof then%>
        <tr> 
          <td height="18">
<div align="center"> <%=rs("id")%></div></td>
          <td> 
            <div align="left"><a href='indexsort_edit.asp?id=<%=rs("id")%>&typeid=<%=rs("typeid")%>&cz=editfile'><b><%=rs("cm_title")%></b></a></div></td>
          <td>
<input type='checkbox' name='selAnnounce' value='<%=cstr(rs("ID"))%>'>
          </td>
        </tr>
		
        <% 
		irecordsshown = irecordsshown +1 
		rs.movenext  
		end if 
		loop
		rs.Close
		set rs=nothing
		%>
      </table>
	  </form>
    </td>
  </tr>
</table>
<%

  sub deleteannounce(id)
    dim rs,sql
    set rs=server.createobject("adodb.recordset")
    sql="delete from index_produce where id="&cstr(id)
    conn.execute sql
    if err.Number<>0 then
	err.clear
	response.write "删 除 失 败 !<br>"
    else
    response.write "操作成功!<br>"
    end if
  End sub
  %>
</body>
</html>

⌨️ 快捷键说明

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