📄 admin_log.asp
字号:
<%
if session("AdminName") = "" then
response.Redirect "Admin_Login.asp"
end if
%>
<!--#include file="Include/MyDbPath.asp" -->
<!--#include file="../admin/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">
<span style="font-size: 9pt">
<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()
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
%>
</span>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
<tr align="center">
<td height=23 colspan=2 class="topbg">
<p align="left"><strong>
<span style="font-size: 9pt">图片批量上传>>日志管理</span></strong></tr>
</table>
<span style="font-size: 9pt">
<br>
</span>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr align="center" class="topbg">
<td height="25"><span style="font-size: 9pt">ID</span></td>
<td><span style="font-size: 9pt">选定</span></td>
<td><span style="font-size: 9pt">图片名称</span></td>
<td><span style="font-size: 9pt">大小</span></td>
<td><span style="font-size: 9pt">加入时间</span></td>
<td><span style="font-size: 9pt">尺寸</span></td>
<td><span style="font-size: 9pt">审核</span></td>
</tr>
<form action="" name="form1" method="post">
<%
dim rs
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_Name like '%"& keyword &"%' order by F_ID desc"
end if
rs.open sql,conn,3,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" ><span style="font-size: 9pt"><%=rs(0)%></span></td>
<td height="25" ><span style="font-size: 9pt"><input type="checkbox" name="id" value="<%=rs(0)%>"></span></td>
<td height="25" ><span style="font-size: 9pt"><%=Replace(Rs("F_Name"),Keyword,"<font color=red><b>"&Keyword&"</b></font>")%></td>
<td height="25"><%=rs("F_Size")%>b</span></td>
<td ><span style="font-size: 9pt"><%=rs("p_SubmitTime")%></span></td>
<td ><span style="font-size: 9pt"><%=rs("F_Width")%>*<%=rs("F_Height")%></span></td>
<td ><span style="font-size: 9pt"><% if rs("name")=0 then %>没有审核
<%else%>
<font color="#FF0000">已经审核</font></a>
<%end if%></span></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr class="tdbg">
<td height="25" colspan="7" width="727"><span style="font-size: 9pt"> 管理操作:全部选择
<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">
</span>
</td>
</tr>
</form>
<form action="" method="POST">
<tr class="tdbg">
<td height="25" colspan="7" width="727">
<span style="font-size: 9pt"> 图片查找:<input 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=" action="Admin_All.asp">
<input name="page" size="5" value="<%=Page+1%>"> <input type="submit" value="提交" name="B1">
<%
response.write "</td></tr></FORM></table>"
end function
Sub DelPhoto()
id = SafeRequest("id",1)
sql = "delete * from iXs_UpFiles where F_ID in ("& id &")"
conn.execute(sql)
Response.Write("<script>alert(""图片删除成功"");location.href=""Admin_log.asp"";</script>")
Response.End()
End Sub
%>
</span>
</td>
</tr>
</table>
<span style="font-size: 9pt">
</div>
<!--#include file="../admin/copyright.asp" -->
</span>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -