📄 admin_all.asp
字号:
<%
if session("AdminName") = "" then
response.Redirect "Admin_Login.asp"
end if
%>
<!--#include file="Conn.asp" -->
<!--#include file="Sql_Erro.asp"-->
<%
Function SafeRequest(ParaName,ParaType)
Dim ParaValue
ParaValue=Request(ParaName)
If ParaType=1 Then
Else
ParaValue=replace(ParaValue,"'","''")
End if
SafeRequest=ParaValue
End function
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="images/Admin_Style.css">
<head>
<title>管理中心</title>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<script language="javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<%
Select case Request("method")
Case 1
Call DelPhoto()
Call picreview()
End Select
keyword=request("keyword")
const MaxPerPage=20
dim totalPut
dim CurrentPage
if not isempty(request("page")) then
currentPage=SafeRequest("page",1)
else
currentPage=1
end if
%>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
<tr align="center">
<td height=23 colspan=2 class="topbg"><strong>日志管理</strong></tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr align="center" class="topbg">
<td height="25"><b>ID</b></td>
<td><b>选定</b></td>
<td><b>图片名称</b></td>
<td><b>大小</b></td>
<td><b>加入时间</b></td>
<td><b>尺寸</b></td>
<td><b>审核</b></td>
</tr>
<form action="" name="form1" method="post">
<%
set rs=server.createobject("adodb.recordset")
if keyword="" then
Sql = "Select * from iXs_UpFiles order by F_ID desc"
else
Sql = "Select * from iXs_UpFiles where F_Namelike '%"& keyword &"%' order by F_ID desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write "<center><font color=red>指量添加日志已经清空!</font></center>"
else
totalPut=rs.recordcount
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
showContent
showpage totalput,MaxPerPage,"Admin_log.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"Admin_log.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"Admin_log.asp"
end if
end if
rs.close
set rs = nothing
end if
sub showContent
dim i
i=0
%>
<%do while not rs.eof%>
<tr align="center" class="tdbg">
<td height="25" ><%=rs(0)%></td>
<td height="25" ><input type="checkbox" name="id" value="<%=rs(0)%>"></td>
<td height="25" ><%=Replace(Rs("F_Name"),Keyword,"<font color=red><b>"&Keyword&"</b></font>")%></td>
<td height="25"><%=rs("F_Size")%>b</td>
<td ><%=rs("p_SubmitTime")%></td>
<td ><%=rs("F_Width")%>*<%=rs("F_Height")%></td>
<td ><% if rs("name")=0 then %>没有审核
<%else%>
<font color="#FF0000">已经审核</font></a>
<%end if%></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr class="tdbg">
<td height="25" colspan="7" width="727"> 管理操作:全部选择
<input type="checkbox" name="chkall" onClick="javascript:CheckAll(this.form)" value="ON">
<input onClick="{if(confirm('确定删除选定的图片吗?\n\n删除后的图片将不能恢复。')){this.document.form1.submit();return true;}return false;}" type=submit value=删除 name=action class="tbutton">
<input type="hidden" name="method" value="1">
</td>
</tr>
</form>
<form action="" method="POST">
<tr class="tdbg">
<td height="25" colspan="7" width="727">
图片查找:<input type="text" name="keyword" maxlength="50" size="18" value="<%=keyword%>"><input type="submit" name="Submit2" value="提交"></td>
</tr></form>
<tr class="tdbg">
<td height="25" colspan="7" width="727">
<%
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
response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"?keyword="& keyword &"""><tr><td align=center> "
if CurrentPage<2 then
response.write "共<b><font color=red>"&totalnumber&"</font></b>个图片 首页 上一页 "
else
response.write "共<b><font color=red>"&totalnumber&"</font></b>个图片 <a href="&filename&"?page=1&keyword="& keyword &">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&keyword="& keyword &">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&keyword="& keyword &">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&keyword="& keyword &">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>个/页 "
%>
转到:<form method="POST" action="Admin_All.asp">
<input type="text" name="page" size="5" value="<%=Page+1%>"> <input type="submit" value="提交" name="B1">
<%
response.write "</td></tr></FORM></table>"
end function
dim sql1
Sub DelPhoto()
id = SafeRequest("id",1)
sql = "delete * from iXs_UpFiles where Desktopid in ("& id &")"
conn.execute(sql)
Response.Write("<script>alert(""图片删除成功"");location.href=""Admin_log.asp"";</script>")
Response.End()
End Sub
%>
</td>
</tr>
</table>
</div>
<!--#include file="../admin/copyright.asp" -->
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -