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

📄 admin_padmin.asp

📁 此文件为一个电子同学录
💻 ASP
字号:
<!--#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>③选择要删除的照片,点击删除按钮即可删除照片,但照片文件还保留在文件夹<%=txl_info(12)%>中;<br>④当误删除照片后,可到“照片回收站”中还原。</td>
</tr>
<%
dim delid
delid=replace(request("delid"),"'","")
delid=replace(delid,";","")
delid=replace(delid,"--","")
delid=replace(delid,"(","")
	if request("action")="del" then
		call delete()
	else
		call main()
	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 METHOD=POST ACTION="?action=del">
<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><%=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>
<td width=10% class=txlrow align=center><input type=checkbox name="delid" value="<%=rs("picid")%>"></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 align=right><input type=submit name=submit1 value="删 除"  onclick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}"></td>
</tr>
</FORM>
</table>
<%
	end if
	rs.close
	set rs=nothing	
	end sub

	sub delete()
	dim filename,objfso
	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=2 where picid in ("&delid&")")
	end if
	response.write "<tr><td colspan=4 class=txlrow>删除成功。</td></tr>"
	end sub
%>

⌨️ 快捷键说明

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