admin_precycle.asp
资源名称:txl.zip [点击查看]
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:5k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <!--#include file="conn.asp"-->
- <!-- #include file="inc/const.asp" -->
- <!--#include file="md5.asp"-->
- <title><%=txl_info(0)%>--管理页面</title>
- <!--#include file="inc/admin_css.asp"-->
- <meta NAME=GENERATOR Content="Microsoft FrontPage 3.0" CHARSET=GB2312>
- <BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
- <%
- if not supermaster or session("flag")="" then
- Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
- call txl_error()
- response.end
- end if
- %>
- <table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
- <tr>
- <th align=left colspan=6 height=23>照片回收站</th>
- </tr>
- <tr>
- <td width=10% class=txlrow>注意事项</td>
- <td width=90% class=txlrow colspan=3 style="line-height: 150%">①选定照片后点“还原”可以还原已被删除的照片;<br>②选定照片后点“删除”将彻底删除所选照片,不可恢复;<br>③“清空回收站”将彻底删除回收站中的照片,不可恢复;<br>④请谨慎使用删除功能,在回收站中删除后将不可恢复。</td>
- </tr>
- <%
- dim delid
- delid=replace(request("delid"),"'","")
- delid=replace(delid,";","")
- delid=replace(delid,"--","")
- delid=replace(delid,"(","")
- if founderr=true then
- call txl_error()
- else
- if request("action")="删除" then
- call delete()
- elseif request("action")="还原" then
- call redel()
- elseif request("action")="清空回收站" then
- call Alldel()
- else
- call main()
- end if
- end if
- conn.close
- set conn=nothing
- sub main()
- %>
- <tr>
- <th colspan=6 align=left height=23>已经删除照片列表</th>
- </tr>
- <%
- dim currentpage,page_count,Pcount
- dim totalrec,endpage
- currentPage=request("page")
- if currentpage="" or not isInteger(currentpage) then
- currentpage=1
- else
- currentpage=clng(currentpage)
- if err then
- currentpage=1
- err.clear
- end if
- end if
- Set rs= Server.CreateObject("ADODB.Recordset")
- sql="select * from imgdata where picset=2 order by addtime desc"
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- response.write "<tr><td colspan=6 class=txlrow>没有找到相关记录。</td></tr>"
- else
- %>
- <FORM name=recycle action=admin_precycle.asp method=post>
- <tr align=center>
- <td class=txlHeaderBackgroundAlternate><B>操作</B></td>
- <td class=txlHeaderBackgroundAlternate><B>上传人</B></td>
- <td class=txlHeaderBackgroundAlternate><B>照片说明</B></td>
- <td class=txlHeaderBackgroundAlternate><B>所属类别</B></td>
- </tr>
- <%
- dim trs
- rs.PageSize = Cint(txl_set(12))
- rs.AbsolutePage=currentpage
- page_count=0
- totalrec=rs.recordcount
- while (not rs.eof) and (not page_count = Cint(txl_set(12)))
- set trs=conn.execute("select classname from imgclass where classID="&rs("classID"))
- %>
- <tr>
- <td width=10% class=txlrow align=center><input type=checkbox name="delid" value="<%=rs("picid")%>"></td>
- <td width=10% class=txlrow align=center><%=rs("postuser")%></td>
- <td width=70% class=txlrow><a href=<%=txl_info(12)&rs("filename")%> target=_blank><%=rs("picinfo")%></a></td>
- <td width=10% class=txlrow align=center><%=trs("classname")%></td>
- </tr>
- <%
- page_count = page_count + 1
- rs.movenext
- wend
- Pcount=rs.PageCount
- %>
- <tr><td colspan=4 class=txlrow align=center>分页:
- <%
- if currentpage > 4 then
- response.write "<a href=""?page=1"">[1]</a> ..."
- end if
- if Pcount>currentpage+3 then
- endpage=currentpage+3
- else
- endpage=Pcount
- end if
- for i=currentpage-3 to endpage
- if not i<1 then
- if i = clng(currentpage) then
- response.write " <font color=#ce0000>["&i&"]</font>"
- else
- response.write " <a href=""?page="&i&""">["&i&"]</a>"
- end if
- end if
- next
- if currentpage+3 < Pcount then
- response.write "... <a href=""?page="&Pcount&""">["&Pcount&"]</a>"
- end if
- %>
- </td>
- </tr>
- <tr>
- <td colspan=4 class=txlrow><input type=submit name=action value="还原" onclick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}"> <input type=submit name=action value="删除" onclick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}"> <input type=submit name=action value="清空回收站" onclick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}"></td>
- </tr>
- </FORM>
- </table>
- <%
- end if
- rs.close
- set rs=nothing
- end sub
- '还原回收站内容
- sub redel()
- response.write "<tr><th colspan=4 height=23 align=left>执行结果</th></tr>"
- if isnull(delid) or delid="" then
- response.write "<tr><td colspan=4 class=txlrow>请指定相关参数。</td></tr>"
- response.end
- else
- conn.execute("update imgdata set picset=0 where picid in ("&delid&")")
- end if
- response.write "<tr><td colspan=4 class=txlrow>还原成功。</td></tr>"
- end sub
- '删除回收站内容
- sub delete()
- response.write "<tr><th colspan=4 height=23 align=left>执行结果</th></tr>"
- if isnull(delid) or delid="" then
- response.write "<tr><td colspan=4 class=txlrow>请指定相关参数。</td></tr>"
- response.end
- else
- conn.execute("delete from imgdata where picid in ("&delid&")")
- response.write "<tr><td colspan=4 class=txlrow>删除成功。</td></tr>"
- end if
- end sub
- '全部删除回收站内容
- sub AllDel()
- response.write "<tr><th colspan=4 height=23 align=left>执行结果</th></tr>"
- conn.execute("delete from imgdata where picset=2")
- response.write "<tr><td colspan=4 class=txlrow>清空回收站成功。</td></tr>"
- end sub
- %>
English
