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

📄 admin.asp

📁 XXX档案美女图片站适合给图片广告的站长下载使用
💻 ASP
📖 第 1 页 / 共 2 页
字号:
}

function go(src,q){
	var ret;
	ret = confirm(q);
	if(ret!=false)window.location=src;
}

function openwin(URL, width, height){
	var win = window.open(URL,"openscript",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=1,menubar=0,status=1');
}
//-->
</script>
<%
	dim view,page_num
		view=request.querystring("view")
		if request.querystring("page_num")="" then
			page_num=20
		else
			page_num=request.querystring("page_num")
		end if

	select case request.querystring("view")
		case "1"
			sql="select * from topic where (not checked=1) order by usertime desc"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
		case "2"
			sql="select * from topic where (not reply=1) order by usertime desc"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
		case else
			sql="select * from topic order by usertime desc"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
	end select

	if rs.eof and rs.bof then
	%>
	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="390">
		<tr>
			<td valign="middle" align="center"><font size="4">没有此类留言。</font></td>
		</tr>
	</table>
	<%
		set rs=nothing
		call skin2()
		response.end
	end if

		rs.pagesize = page_num
		rs.absolutepage=currentpage
		page_count=0
		totalrec=rs.recordcount

%>
<form name="batch_form" action="admin.asp?act=" method="post" onsubmit="return Submit_all(batch_form);">
<div align="center">
	<table border="0" cellpadding="3" cellspacing="1" width="95%">
		<tr>
			<td width="100%" align="right">
			显示:<select name="menu_view" onChange="MM_jumpMenu('parent',this,0)">
			<option value="?act=batch&page_num=<%=page_num%>"<%if view="" then%> selected<%end if%>>所有留言</option>
			<option value="?act=batch&view=1&page_num=<%=page_num%>"<%if view="1" then%> selected<%end if%>>所有未通过审核的留言</option>
			<option value="?act=batch&view=2&page_num=<%=page_num%>"<%if view="2" then%> selected<%end if%>>所有未被回复的留言</option>
			</select>&nbsp;每页显示:<select name="menu_page_num" onChange="MM_jumpMenu('parent',this,0)">
			<option value="?act=batch&view=<%=view%>&page_num=10"<%if page_num="10" then%> selected<%end if%>>10条</option>
			<option value="?act=batch&view=<%=view%>&page_num=20"<%if page_num="20" then%> selected<%end if%>>20条</option>
			<option value="?act=batch&view=<%=view%>&page_num=50"<%if page_num="50" then%> selected<%end if%>>50条</option>
			<option value="?act=batch&view=<%=view%>&page_num=100"<%if page_num="100" then%> selected<%end if%>>100条</option>
			</select></td>
		</tr>
	</table>
	<table border="0" cellpadding="5" cellspacing="1" width="95%">
		<tr>
			<td width="6%" align="center">
			<input type="hidden" value="<%=Request.ServerVariables("HTTP_URL")%>" name="thisURL">
			<input type="checkbox" value="on" name="chkall" onclick="CheckAll(this.form)"><br>全选
			</td>
			<td width="30%">
			<input type="submit" name="Submit_Del" value="批量删除" onclick="SetSubmitType('del');">
			<input type="submit" name="Submit_Check" value="批量审核" onclick="SetSubmitType('check');">
			</td>
			<td width="64%">
			<%call pages(currentpage,page_count,pcount,totalrec,endpage,page_num,view)%>
			</td>
		</tr>
	</table>
	<table border="0" cellpadding="5" cellspacing="1" width="95%" class="table1">
		<%while (not rs.eof) and (not page_count = rs.pagesize)%>
		<tr>
			<td width="6%" class="tablebody3" align="center" rowspan="2"><input type="checkbox" name="id" value="<%=rs("id")%>"></td>
			<td width="94%" class="tablebody3">
			<B>标题</B>:<%=batchEncode(rs("usertitle"))%><br><B>时间</B>:<font face="Verdana" SIZE="1"><%=rs("usertime")%></font>
			</td>
		</tr>
		<tr>
			<td class="tablebody3">
			<B>内容代码</B>:<%=batchEncode(rs("usercontent"))%>
			</td>
		</tr>
		<tr>
			<td class="tablebody1" colspan="2" align="right">
			<%if rs("checked")=0 then%><a href="javascript:go('admin.asp?act=check&id=<%=rs("id")%>&thisURL=<%=Request.ServerVariables("HTTP_URL")%>','您确定要通过审核?')"><font COLOR="red"><b>通过审核</b></font></a>&nbsp;&nbsp;<%end if%><a href="javascript:go('admin.asp?act=del&id=<%=rs("id")%>&thisURL=<%=Request.ServerVariables("HTTP_URL")%>','您确定要删除?')">删除</a>&nbsp;&nbsp;<%if rs("whisper")=1 and rs("replycode")="" then%><font COLOR="red"><b>无法回复的悄悄话</b></font><%else%><a href="reply.asp?id=<%=rs("id")%>"><%if rs("whisper")=1 then%><font COLOR="red"><b>悄悄话回复/编辑回复</b></font><%else%>回复/编辑回复<%end if%></a><%end if%>&nbsp;&nbsp;<a href="edit.asp?id=<%=rs("id")%>">编辑</a>&nbsp;&nbsp;留言IP:<%=rs("ip")%>
			</td>
		</tr>
		<%page_count = page_count + 1
		rs.movenext
		wend%>
	</table>
	<table border="0" cellpadding="5" cellspacing="1" width="95%">
		<tr>
			<td width="6%" align="center">
			<input type="checkbox" name="chkall2" onclick="javascript:chkall.click()"><br>全选
			</td>
			<td width="30%">
			<input type="submit" name="Submit_Del2" value="批量删除" onclick="SetSubmitType('del');">
			<input type="submit" name="Submit_Check2" value="批量审核" onclick="SetSubmitType('check');">
			</td>
			<td width="64%">
			<%call pages(currentpage,page_count,pcount,totalrec,endpage,page_num,view)%>
			</td>
		</tr>
	</table>
</div>
</form>
<%

rs.close
set rs=nothing
'--------------页面主题显示结束--------
call skin2()
end sub

sub pages(currentpage,page_count,pcount,totalrec,endpage,page_num,view)	'--分页代码--
dim ii,p,n
if totalrec mod page_num=0 then
	n= totalrec \ page_num
else
	n= totalrec \ page_num+1
end if
p=(currentpage-1) \ 10
response.write "<table border=0 cellpadding=0 cellspacing=3 width='97%' align=center>"&_
"<tr>"&_
"<td valign=middle align=right>页次:<b>"& currentpage &"/"& n &"</b>页,共<b>"& totalrec &"</b>条&nbsp;&nbsp;"

if currentpage=1 then
	response.write "<font face=webdings>9</font>	 "
else
	response.write "<a href='?act=batch&view="& view &"&page_num="& page_num &"&page=1' title=首页><font face=webdings>9</font></a>	 "
end if
if p*10>0 then response.write "<a href='?act=batch&view="& view &"&page_num="& page_num &"&page="&cstr(p*10)&"' title=上十页><font face=webdings>7</font></a>	 "
response.write "<b>"
for ii=p*10+1 to p*10+10
	if ii=currentpage then
		response.write "<font size=4>"+cstr(ii)+"</font> "
	else
		response.write "<a href='?act=batch&view="& view &"&page_num="& page_num &"&page="&cstr(ii)&"'>"+cstr(ii)+"</a>	 "
	end if
	if ii=n then exit for
	'p=p+1
next
response.write "</b>"
if ii<n then response.write "<a href='?act=batch&view="& view &"&page_num="& page_num &"&page="&cstr(ii)&"' title=下十页><font face=webdings>8</font></a>	 "
if currentpage=n then
	response.write "<font face=webdings>:</font>	 "
else
	response.write "<a href='?act=batch&view="& view &"&page_num="& page_num &"&page="&cstr(n)&"' title=尾页><font face=webdings>:</font></a>	 "
end if
response.write "</table>"
end sub

function batchEncode(fString)
	if not isnull(fString) then
		fString = back_filter(fString)
		fString = replace(fString, ">", "&gt;")
		fString = replace(fString, "<", "&lt;")
		fString = Replace(fString, "''", "'")
		fString = Replace(fString, CHR(32), "&nbsp;")
		fString = Replace(fString, CHR(9), "&nbsp;")
		fString = Replace(fString, CHR(34), "&quot;")
		fString = Replace(fString, CHR(39), "&#39;")
		fString = Replace(fString, CHR(36), "&#36;")
		batchEncode = fString
	end if
end function

sub del()		'-----------------删除留言
	dim id
	id = request("id")

	if not session("userkey")=4 then
		errinfo="<li>您未登陆或已经退出登陆,不能进入该页。"
		call error()
	else
		if id="" then
			errinfo="<li>您未选定任何留言。"
			call error()
		end if

		sql="select id from topic where id in ("&id&")"
		set rs=server.createobject("adodb.recordset")
		rs.open sql,conn,1,3

		if rs.eof and rs.bof then
		rs.close
		set rs=nothing
		errinfo="<li>该留言不存在。"
		call error()
		end if

		rs.close
		set rs=nothing

		sql="delete from [topic] where id in ("&id&")"
		conn.execute(sql)

		if request.querystring("page")="" then
			response.redirect request("thisURL")
		else
			response.redirect request("thisURL") & "&page=" & request.querystring("page")
		end if
		response.flush

	end if
end sub

sub check()		'-----------------审核留言
	dim id
	id = request("id")

	if not session("userkey")=4 then
		errinfo="<li>您未登陆或已经退出登陆,不能进入该页。"
		call error()
	else
		if id="" then
			errinfo="<li>您未选定任何留言。"
			call error()
		end if

		sql="select id from topic where id in ("&id&")"
		set rs=server.createobject("adodb.recordset")
		rs.open sql,conn,1,3
		if rs.eof and rs.bof then
			rs.close
			set rs=nothing
			errinfo="<li>该留言不存在。"
			call error()
		else
			rs.close
			set rs=nothing
		end if

		sql="update topic set checked='1' where id in ("&id&")"
		conn.execute(sql)

		if request.querystring("page")="" then
			response.redirect request("thisURL")
		else
			response.redirect request("thisURL") & "&page=" & request.querystring("page")
		end if
		response.flush

	end if
end sub

sub logout()
	session("login")="false"
	response.redirect "manage.asp"
end sub
%>

⌨️ 快捷键说明

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