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

📄 pic_list.asp

📁 图利文章管理系统。毕业设计郑州科技学院2006级计算机系计算机信息管理专业
💻 ASP
字号:
<!--#include file="ubbhtml.asp"-->
<%
  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")>2 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if

%>
<%


%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>搞笑图片=文章列表</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<!--#include file="conn.asp"-->
<%
   	const MaxPerPage=18
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	dim i,j
   	dim idlist
   	dim title

	title=request("txtitle")
	shen=request("shen")
	
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
'开始审核操作
if request("action")="shen" then
id=request("id")
sql="Select * from pic where picid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("picsy")=1
	rs("adate")=now()
	rs.update
rs.Close
set rs=Nothing

url="pic_list.asp?page=" & currentPage
response.redirect url
response.end
end if

'否决审核操作
if request("action")="fou" then
id=request("id")
sql="Select * from pic where picid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("picsy")=0
	rs.update
rs.Close
set rs=Nothing

url="pic_list.asp?page=" & currentPage
response.redirect url
response.end
end if


'开始精品推荐操作
if request("action")="jtj" then
id=request("id")
sql="Select * from pic where picid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("picsy")=5
	rs.update
rs.Close
set rs=Nothing

url="pic_list.asp?page=" & currentPage
response.redirect url
response.end
end if

'否决精品操作
if request("action")="yjtj" then
id=request("id")
sql="Select * from pic where picid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("picsy")=6
	rs.update
rs.Close
set rs=Nothing

url="pic_list.asp?page=" & currentPage
response.redirect url
response.end
end if


'删除操作	
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 

dim sql
dim rs
%>

<body leftmargin="0" topmargin="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border"> 
<tr background="images/bg.gif"> <td class="topbg" height="22" colspan="2" align="center"><b>文 
章 管 理</b></td></tr> <tr> <td class="tdbg" width="70" height="30"><b>管理导航:</b></td><td class="tdbg" height="30">&nbsp;<a href="pic_list.asp">漫画管理首页</a>&nbsp;|&nbsp;<a href="pic_add.asp?action=add">添加漫画</a>&nbsp;|&nbsp;<a href="pic_list.asp?shen=t">查看未审核</a></td></tr> 
</table><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<form method=Post action="pic_list.asp"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> 
<tr> <td width="58%" valign="bottom"> <%  
	if title<>"" and shen="" then  
	sql="select * from pic where picname like '%"&trim(title)&"%' order by picid desc"  
	elseif title="" and shen="" then
	sql="select * from pic order by picid desc" 
	elseif title<>"" and shen="t" then  
	sql="select * from pic where picname like '%"&trim(title)&"%' and picsy=0 order by picid desc"  
	elseif title="" and shen="t" then
	sql="select * from pic where picsy=0 order by picid desc" 
    end if
	
	Set rs= Server.CreateObject("ADODB.Recordset")  
	rs.open sql,conn,1,1
  
  	if rs.eof and rs.bof then  
       		response.write "<p align='center'> 还 没 有 任 何 文 章 <br><br><a href='javascript:history.go(-1)'><font color=#FF0000>返回上页</font></a></p>"  
   	else 
	 		
      		totalPut=rs.recordcount  
      		ye=totalPut/MaxPerPage
		if currentpage<1 then  
          		currentpage=1  
      		end if  
      		if (currentpage-1)*MaxPerPage>totalput then  
	   		if (totalPut mod MaxPerPage)=0 then  
	     			currentpage= totalPut \ MaxPerPage  
	  		else  
	      			currentpage= totalPut \ MaxPerPage + 1  
	   		end if  
  
      		end if  
        		if currentPage=1 then  
           		showpage totalput,MaxPerPage,"pic_list.asp"  
            		showContent  
            		showpage totalput,MaxPerPage,"pic_list.asp"  
       		else  
          		if (currentPage-1)*MaxPerPage<totalPut then  
            			rs.move  (currentPage-1)*MaxPerPage  
            			dim bookmark  
            			bookmark=rs.bookmark  
           			showpage totalput,MaxPerPage,"pic_list.asp"  
            			showContent  
             			showpage totalput,MaxPerPage,"pic_list.asp"  
        		else  
	        		currentPage=1  
           			showpage totalput,MaxPerPage,"pic_list.asp"  
           			showContent  
           			showpage totalput,MaxPerPage,"pic_list.asp"  
	      		end if  
	   	end if 
   	rs.close  
   	end if  
	          
   	set rs=nothing    
   	conn.close  
   	set conn=nothing  
    
   	sub showContent  
       	dim i  
	   i=0  
	response.write count 
%> </td><td width="29%" valign="middle">&nbsp;查找文章: <input class=smallInput type="text" name="txtitle" size="13"> 
<input class=buttonface type="submit" value="查 询" name="title"> </td><td width="13%" valign="middle" align="center">&nbsp; 
</td></tr> </table><table border="0" cellspacing="1" width="100%" cellpadding="2"  class="border"> 
<tr> <td width="80" align="center" class="title" height="20"><strong>ID</strong></td><td align="center" class="title" width="576"><strong>文章名/分类</strong></td><td width="188" align="center" class="title"><b>漫画审核</b></td>
<td width="138" align="center" class="title"> 
<input type='submit' class=buttonface value='删 除'> </td></tr> <%do while not rs.eof%> 
<tr> <td height="23" class="tdbg" align="center" width="80"> <%=rs("picid")%> 
</td><td class="tdbg" width="576"> <li> <a href="pic_add.asp?id=<%=rs("picid")%>&action=edit&a=edit"><%=rs("picname")%></a></td><td width="188" class="tdbg" align="center"> <%if  rs("picsy")=0  then
					response.write "<a href='pic_list.asp?page="&CurrentPage&"&id="&rs("picid")&"&action=shen'>审核</a>"
				 else
				    response.write "<a href='pic_list.asp?page="&CurrentPage&"&id="&rs("picid")&"&action=fou'><font color=#FF0000>审核</font></a>"
				end if%></td><td width="138" class="tdbg" align="center"> 
<p> <input type='checkbox' name='selAnnounce' value='<%=cstr(rs("picid"))%>'> 
</td></tr> <% 
	i=i+1 
	      if i>=MaxPerPage then exit do 
	      rs.movenext 
	loop 
%> </table><div align="right"><br> <TABLE WIDTH="98%" BORDER="0" CELLSPACING="3" CELLPADDING="0"><TR><TD ALIGN="RIGHT" WIDTH="82%" VALIGN="BOTTOM"><% 
   end sub  
function showpage(totalnumber,maxperpage,filename) 
  dim n 
  if totalnumber mod maxperpage=0 then 
     n= totalnumber \ maxperpage 
  else 
     n= totalnumber \ maxperpage+1 
  end if 
  
  if CurrentPage<2 then 
    response.write "<font color='#000000'>首页 上一页</font>&nbsp;" 
  else 
    response.write "<a href="&filename&"?page=1>首页</a>&nbsp;" 
    response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a>&nbsp;" 
  end if 
  if n-currentpage<1 then 
    response.write "<font color='#000000'>下一页 尾页</font>" 
  else 
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&">" 
    response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>" 
  end if 
   response.write "<font color='#000000'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000000'>/"&n&"</strong>页</font> " 
    response.write "<font color='#000000'>&nbsp;共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页</font> " 
        
end function 
 response.write count
  sub deleteannounce(id) 
    dim rs,sql 
    set rs=server.createobject("adodb.recordset") 
    sql="delete from pic where picid="&cstr(id) 
    conn.execute sql 
    if err.Number<>0 then 
	err.clear 
	response.write "删 除 失 败 !<br>" 
    else 
        response.write "操作成功!<br>" 
    end if 
  End sub 
%></TD><TD WIDTH="18%">直接到第 <SELECT NAME="page"><%for ii=1 to ye%><OPTION VALUE="<%=ii%>"><%=ii%></OPTION><%next%></SELECT> 
页 <INPUT TYPE="submit" NAME="go" VALUE="Go"> <INPUT TYPE="hidden" NAME="sort" VALUE=<%=sort%>> 
</TD></TR></TABLE></div></form></td></tr> </table><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border"> 
<tr background="images/bg.gif"> <td class="topbg" height="22" colspan="2" align="center"><b>文 
章 说 明</b></td></tr> <tr> <td class="tdbg" width="70" height="30"><b>文章说明:</b></td><td class="tdbg" height="30"> 
<li>点击相关文章察看及修改文章资料<br> <li>删除文章请选中相关文章然后点击删除 </td></tr> </table><br> 
</body> 
</html>

⌨️ 快捷键说明

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