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

📄 admin_audit.asp

📁 秘密网源代码 传闻拉了 100W风投
💻 ASP
字号:
<!--#include file="setup.asp"-->
<!--#include file="../WoLib/Function.asp"-->
<!-- #include file="CheckAdmin.asp" -->
<%
if RequestCookies("Userpass")="" or RequestCookies("Userpass")<>session("pass") then Response.Write ("<script>top.location.href='login.asp';</script>")	
if UserRoleID <> 1 then Alert("您没有权限进入后台")
sub showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
		dim n, i,strTemp,strUrl
		if totalnumber mod maxperpage=0 then
			n= totalnumber \ maxperpage
		else
			n= totalnumber \ maxperpage+1
		end if
		strTemp= "<table align='center' class='font_3'><tr><td>"
		if ShowTotal=true then 
			strTemp=strTemp & "共 <b>" & totalnumber & "</b> " & strUnit & "&nbsp;&nbsp;"
		end if
		strUrl=JoinChar(sfilename)
		if CurrentPage<2 then
				strTemp=strTemp & "首页 上一页&nbsp;"
		else
				strTemp=strTemp & "<a href='" & strUrl & "page=1'>首页</a>&nbsp;"
				strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage-1) & "'>上一页</a>&nbsp;"
		end if
	
		if n-currentpage<1 then
				strTemp=strTemp & "下一页 尾页"
		else
				strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage+1) & "'>下一页</a>&nbsp;"
				strTemp=strTemp & "<a href='" & strUrl & "page=" & n & "'>尾页</a>"
		end if
		strTemp=strTemp & "&nbsp;页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
		strTemp=strTemp & "&nbsp;<b>" & maxperpage & "</b>" & strUnit & "/页"
		if ShowAllPages=True then
			strTemp=strTemp & "&nbsp;转到:<select class='input' name='page' size='1' onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"   
			for i = 1 to n   
				strTemp=strTemp & "<option value='" & i & "'"
				if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
				strTemp=strTemp & ">第" & i & "页</option>"   
			next
			strTemp=strTemp & "</select>"
		end if
	
		strTemp=strTemp & "</td></tr></table>"
		response.write strTemp
	end sub
	
	function JoinChar(strUrl)	'分页附属函数
		if strUrl="" then
			JoinChar=""
			exit function
		end if
		if InStr(strUrl,"?")<len(strUrl) then 
			if InStr(strUrl,"?")>1 then
				if InStr(strUrl,"&")<len(strUrl) then 
					JoinChar=strUrl & "&"
				else
					JoinChar=strUrl
				end if
			else
				JoinChar=strUrl & "?"
			end if
		else
			JoinChar=strUrl
		end if
	end function 
	
	if Request.ServerVariables("Request_method") = "POST" then
		select case Request.Form("Item")
			case "BatchDel"
				for each ho in Request.Form("SrcID")
					ho=int(ho)
					set userid=conn.execute("select Src_UserID from wo_source where src_id="&ho)
					Conn.Execute("Update Wo_users Set UserMoney=UserMoney+"&SiteConfig("DigDel")&",Experience=Experience+"&SiteConfig("DigDel")&" Where UserID="&userid("Src_UserID"))
					Conn.execute("delete from Wo_SrcTags where SrcTag_SrcID="&ho)
					Sql = "Delete From Wo_Source Where Src_ID="&ho
					Conn.execute(Sql)
					set userid=nothing
				next
				response.Redirect("admin_audit.asp")
			case "BatchShenhe"
				for each ho in Request.Form("SrcID")
					ho=int(ho)
					Conn.Execute("Update Wo_source Set src_isover=true Where src_ID="&ho)
					set userid=nothing
				next
				response.Redirect("admin_manage.asp")
		end select
	end if
	
	action 		= request("action")
	Src_ID		= Request("Src_ID")
	havving		= Request("havving")
	
	dim action,id
	
	response.expires = 0
	currentpage = request("page")
	if currentpage = "" then
		currentpage=1
	end if
				
	maxperpage 		= 25
	totalrecords	= 0
	totalpage		= 1
	
	Set Rs = Server.CreateObject("ADODB.Recordset")
	if action = "del" then
		Conn.Execute("Update Wo_users Set UserMoney=UserMoney+"&SiteConfig("DigDel")&",Experience=Experience+"&SiteConfig("DigDel")&" Where UserID="&Request("userid"))
		Conn.execute("delete from Wo_SrcTags where SrcTag_SrcID="&Src_ID)
		Sql = "Delete From Wo_Source Where Src_ID="&Src_ID
		Conn.execute(Sql)
		Response.Redirect("Admin_Audit.asp")
	end if
%>

<script language="javascript">
<!--
	function frm_onsubmit(){
		return true;
	}
	
	function isDel(id,userid){
		if(confirm("您确定要删除此消息吗?")){
			location.href="Admin_Audit.asp?Action=del&userid="+userid+"&Src_ID="+id+"&link_type2=<%=link_type2%>";
		}
	}
-->
</script>
<script type="text/javascript" src="../Utility/global.js"></script>
<link href="Img/Admin.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<form name="frmselect" action="Admin_Audit.asp" method="post">
<table width="99%" cellspacing=1 cellpadding=0 id=CommonListArea>
  <tr id=CommonListTitle3> 
  	
		<td>&nbsp;&nbsp;分类搜索:<SELECT class=input size=1 name=src_childid onchange='javascript:frmselect.submit();'>
                              <%
							  if Request("src_childid") <> "" then
							  Call WoDig.Get_SrcChild2(1,Request("src_childid"))
							  else
							  Call WoDig.Get_SrcChild2(1,0)
							  end if%>
                            </SELECT></td>
	
  </tr>
</table></form>
<form name="frmwenzhang" action="admin_audit.asp"  method="post" onSubmit="return VerifyRadio('Item');">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
      <td valign="top">			  
			<table cellspacing=1 cellpadding=0 width=100% id=CommonListArea>
			  <tr id=CommonListTitle3> 
			  	<td align="center" width="60"></td>
			  	<td align="center">编号</td>
				<td align="center">发布人</td>
				<td align="center">资源标题</td>
				<td align="center">是否发布</td>
				<td align="center">添加时间</td>				
				<td align="center">操作</td>
			  </tr>
			  <%
			  	Set Rs = Server.CreateObject("Adodb.recordset")
				sql = "SELECT *,Wo_Users.UserID,Wo_Users.UserName From Wo_Source Inner join Wo_Users on Wo_Source.Src_UserID=Wo_Users.UserID where Src_Isover=False "
				if havving <> "" then
					sql = sql & " and Src_Title like '%" & havving & "%'"
				end if
				if Request("src_childid")<>"" then
					sql = sql & " and Src_ChildID="&Request("src_childid")
				end if				
				sql = sql & " order by Src_ID Desc"
				
				Rs.open Sql,conn,1,2
				
				if not Rs.eof then
					rs.pagesize		= maxperpage
					rs.absolutepage	= currentpage
					totalpage		= rs.pagecount
					totalrecords	= rs.recordcount
				end if
				j = 0  
			  	While not rs.eof and j < maxperpage
					j = j + 1
			  %>
			  <tr<%= Tr_MouseOver %> bgcolor="#FFFFFF"> 
			  	<td align="center"><input type=checkbox value="<%=Rs("Src_ID")%>" name=SrcID></td>
			  	<td height="22" align="center"><%=Rs("Src_ID")%></td>
				<td align="center"><a href="../Profile.asp?UserName=<%=Rs("UserName")%>" target="_blank"><%= Server.HTMLEncode(Rs("UserName")) %></a></td>
				<td align="left">&nbsp;<a href="Admin_show.asp?Src_ID=<%=Rs("Src_ID")%>" target="_blank" title="点击预览"><%=Server.HTMLEncode(Rs("Src_Title"))%></a></td>
				<td align="center">
					<%
						if Rs("Src_IsOver") = true then
							Response.write("已审核")
						else
							Response.write("<font color=#ff0000>未审核</font>")
						end if
					%>
				</td>
				<td align="center"> <%= FormatDateTime(rs("Src_AddDate"),2) %></td>				
				<td align="center"> 
					<a href="Admin_show.asp?Src_ID=<%=Rs("Src_ID")%>" target="_blank">查看</a> 
					<a href="javascript:isDel(<%=Rs("Src_ID")%>,<%=Rs("UserID")%>);">删除</a>
					<a href="lists_del.asp?src_id=<%=rs("src_id")%>">审核</a>
				</td>
			  </tr>
			  <%
				Rs.MoveNext 
				Wend
			  %>
			  <tr><td align="left" colspan="7">&nbsp;&nbsp;<input type="checkbox" name="chkall" onClick="CheckAll(this.form)" value="ON">全选
			  <input type="radio" value="BatchDel" name="Item">批量删除&nbsp;&nbsp;<input type="radio" value="BatchShenhe" name="Item">批量审核
			  &nbsp;&nbsp;&nbsp;&nbsp;<input onClick="return window.confirm('您确定执行本次操作?');" type="submit" value=" 执行操作 "></td></tr>
			</table>
			
			<br>			
		
			<table cellspacing=1 cellpadding=0 width=100% id=CommonListArea>
				<tr id=CommonListTitle3> 
					<td width="100%" bgcolor="#FFFFFF" align="right">	
                      <% Call showpage("Admin_Audit.asp?special="&special,totalrecords,maxperpage,true,true,"篇文章") %>
					</td>
				</tr>
			</table>
	</td>	
  </tr>
	<tr> 
	  <td height="22">&nbsp;</td>
	</tr>
</table>
</form>
<script language="JavaScript">
function VerifyRadio() {
	objYN=false;

	for (i=0;i<document.getElementsByName("SrcID").length;i++) {
	if (document.getElementsByName("SrcID")[i].checked) {objYN= true;}
	}
	
	if (objYN==false) {alert ('请选择您要操作的文章!');return false;}
	objYN=false;

	for (i=0;i<document.getElementsByName("Item").length;i++) {
	if (document.getElementsByName("Item")[i].checked) {objYN= true;}
	}
	
	if (objYN==false) {alert ('请选择您要操作的项目!');return false;}


}
</SCRIPT>
<%  
Set Rs = Nothing 
Set Conn = Nothing 
%>

⌨️ 快捷键说明

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