📄 ad_softcheck.asp
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=3
Const PurviewLevel_Soft=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ad_code_soft.asp"-->
<%
dim strFileName,FileName
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages
dim i,j
dim keyword,strField
dim sql,rsSoftList
dim ClassID,Passed
dim PurviewChecked
dim strAdmin,arrAdmin
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster
dim ManageType
ManageType=trim(request("ManageType"))
PurviewChecked=false
FileName="ad_SoftCheck.asp"
ClassID=Trim(request("ClassID"))
keyword=trim(request("keyword"))
if keyword<>"" then
keyword=ReplaceBadChar(keyword)
end if
strField=trim(request("Field"))
Passed=trim(request("Passed"))
if Passed="" then
if Session("Passed")="" then
Passed="False"
else
Passed=Session("Passed")
end if
end if
session("Passed")=Passed
if ClassID="" then
ClassID=0
if strField="" and AdminPurview=2 and AdminPurview_Soft=3 then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster,ClassID From SoftClass where ClassMaster like '%" & AdminName & "%'")
do while not tClass.eof
if CheckClassMaster(tClass(6),AdminName)=true then
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
ClassID=tClass(7)
PurviewChecked=True
exit do
end if
tClass.movenext
loop
end if
else
ClassID=CLng(ClassID)
end if
if ClassID>0 and PurviewChecked=False then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster From SoftClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
Call WriteErrMsg()
response.end
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
PurviewChecked=CheckClassMaster(tClass(6),AdminName)
if PurviewChecked=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from SoftClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked=True then exit do
tClass.movenext
loop
end if
end if
end if
strFileName=FileName & "?ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<html>
<head>
<title>软件管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="ad_Style.css">
<SCRIPT language=javascript>
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}
</SCRIPT>
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="topbg">
<td height="22" colspan="2" align="center"><strong>文 章 审 核</strong></td>
</tr>
<form name="Passed" method="Post" action="<%=strFileName%>">
<tr class="tdbg">
<td width="70" height="30" ><strong>软件选项:</strong></td>
<td >
<input name="Passed" type="radio" value="False" onclick="submit();" <%if Passed="False" then response.write " checked"%>>
未审核的软件
<input name="Passed" type="radio" value="True" onclick="submit();" <%if Passed="True" then response.write " checked"%>>
已审核的软件
</td>
</tr>
</form>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="title">
<td height="22"><%call Admin_ShowRootClass()%></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22"><%call Admin_ShowPath("软件审核")%></td>
<td width="200" height="22" align="right">
<select name='JumpClass' id="JumpClass" onchange="if(this.options[this.selectedIndex].value!=''){location='<%=FileName & "?ClassID="%>'+this.options[this.selectedIndex].value;}">
<option value='' selected>跳转栏目至…</option>
<%call Admin_ShowClass_Option(2,0)%>
</select>
</td>
</tr>
</table>
<%
sql="select S.SoftID,S.ClassID,C.ClassName,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.SoftSize,S.OnTop,S.Elite,S.Passed,S.Stars,S.SoftLevel,S.SoftPoint from Soft S"
sql=sql & " inner join SoftClass C on S.ClassID=C.ClassID where S.Deleted=False and Passed=" & Passed
if ClassID>0 then
if Child>0 then
ChildID=""
set tClass=conn.execute("select ClassID from SoftClass where ParentID=" & ClassID & " or ParentPath like '" & ParentPath & "," & ClassID & ",%'")
do while not tClass.eof
if ChildID="" then
ChildID=tClass(0)
else
ChildID=ChildID & "," & tClass(0)
end if
tClass.movenext
loop
sql=sql & " and S.ClassID in (" & ChildID & ")"
else
sql=sql & " and S.ClassID=" & ClassID
end if
end if
if strField<>"" then
if keyword<>"" then
select case strField
case "SoftName"
sql=sql & " and S.SoftName like '%" & keyword & "%' "
case "SoftIntro"
sql=sql & " and S.SoftIntro like '%" & keyword & "%' "
case "Author"
sql=sql & " and S.Author like '%" & keyword & "%' "
case "Editor"
sql=sql & " and S.Editor like '%" & keyword & "%' "
case else
sql=sql & " and S.SoftName like '%" & keyword & "%' "
end select
end if
end if
sql=sql & " order by S.SoftID desc"
Set rsSoftList= Server.CreateObject("ADODB.Recordset")
rsSoftList.open sql,conn,1,1
if rsSoftList.eof and rsSoftList.bof then
totalPut=0
if Child=0 then
if Passed="True" then
response.write "<p align='center'><br>没有任何已审核的软件!<br></p>"
else
response.write "<p align='center'><br>没有任何待审核的软件!<br></p>"
end if
else
if Passed="True" then
response.write "<p align='center'><br>此栏目的下一级子栏目中没有任何已审核的软件!<br></p>"
else
response.write "<p align='center'><br>此栏目的下一级子栏目中没有任何待审核的软件!<br></p>"
end if
end if
else
totalPut=rsSoftList.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 strFileName,totalput,MaxPerPage,true,true,"个软件"
else
if (currentPage-1)*MaxPerPage<totalPut then
rsSoftList.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsSoftList.bookmark
showContent
showpage strFileName,totalput,MaxPerPage,true,true,"个软件"
else
currentPage=1
showContent
showpage strFileName,totalput,MaxPerPage,true,true,"个软件"
end if
end if
end if
rsSoftList.close
set rsSoftList=nothing
sub showContent
dim SoftNum
SoftNum=0
%>
<table width='100%' border="0" cellpadding="0" cellspacing="0"><tr>
<form name="myform" method="Post" action="ad_SoftProperty.asp">
<td><table class="border" border="0" cellspacing="1" width="100%" cellpadding="0">
<tr class="title" height="22">
<td height="22" width="30" align="center"><strong>选中</strong></td>
<td width="25" align="center" height="22"><strong>ID</strong></td>
<td align="center" ><strong>软件名称及版本</strong></td>
<td width="60" align="center" ><strong>软件大小</strong></td>
<td width="60" align="center" ><strong>下载次数</strong></td>
<td width="60" align="center" ><strong>软件属性</strong></td>
<td width="40" align="center" ><strong>已审核</strong></td>
<td width="80" align="center" ><strong>操作</strong></td>
</tr>
<%do while not rsSoftList.eof%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td width="30" align="center"><input name='SoftID' type='checkbox' onclick="unselectall()" id="SoftID" value='<%=cstr(rsSoftList("SoftID"))%>'></td>
<td width="25" align="center"><%=rsSoftList("Softid")%></td>
<td>
<%
if rsSoftList("ClassID")<>ClassID then
response.write "<a href='" & FileName & "?ClassID=" & rsSoftList("ClassID") & "'>[" & rsSoftList("ClassName") & "]</a> "
end if
response.write "<a href='ad_SoftShow.asp?SoftID=" & rsSoftList("SoftID") & "'"
response.write " title='软件名称:" & rsSoftList("SoftName") & vbcrlf & "软件版本:" & rsSoftList("SoftVersion") & vbcrlf & "软件作者:" & rsSoftList("Author") & vbcrlf & "更新时间:" & rsSoftList("UpdateTime") & vbcrlf
response.write "下载次数:" & rsSoftList("Hits") & vbcrlf & "关 键 字:" & mid(rsSoftList("Keyword"),2,len(rsSoftList("Keyword"))-2) & vbcrlf & "推荐等级:"
if rsSoftList("Stars")=0 then
response.write "无"
else
response.write string(rsSoftList("Stars"),"★")
end if
response.write vbcrlf & "下载等级:"
if rsSoftList("SoftLevel")=9999 then
response.write "游客"
elseif rsSoftList("SoftLevel")=999 then
response.write "注册用户"
elseif rsSoftList("SoftLevel")=99 then
response.write "收费用户"
elseif rsSoftList("SoftLevel")=9 then
response.write "VIP用户"
elseif rsSoftList("SoftLevel")=5 then
response.write "管理员"
end if
response.write vbcrlf & "阅读点数:" & rsSoftList("SoftPoint")
response.write "'>" & rsSoftList("SoftName") & " " & rsSoftList("SoftVersion") & "</a>"
%>
</td>
<td width="60" align="center"> <%=rsSoftList("SoftSize") & " K"%>
</td>
<td width="60" align="center"><%= rsSoftList("Hits") %></td>
<td width="60" align="center"> <%
if rsSoftList("OnTop")=true then
response.Write "<font color=blue>顶</font> "
else
response.write " "
end if
if rsSoftList("Hits")>=HitsOfHot then
response.write "<font color=red>热</a> "
else
response.write " "
end if
if rsSoftList("Elite")=true then
response.write "<font color=green>荐</a>"
else
response.write " "
end if
%> </td>
<td width="40" align="center"> <%
if rsSoftList("Passed")=true then
response.write "是"
else
response.write "否"
end if%></td>
<td width="80" align="center">
<%
if AdminPurview=1 or AdminPurview_Soft<=2 or PurviewChecked=true then
If rsSoftList("Passed")=False Then
response.write "<a href='ad_SoftProperty.asp?Action=SetPassed&SoftID=" & rsSoftList("SoftID") & "'>通过审核</a>"
Else
response.write "<a href='ad_SoftProperty.asp?Action=CancelPassed&SoftID=" & rsSoftList("SoftID") & "'>取消通过</a>"
End If
end if %></td>
</tr>
<%
SoftNum=SoftNum+1
if SoftNum>=MaxPerPage then exit do
rsSoftList.movenext
loop
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
选中本页显示的所有软件 </td>
<td><input name="submit" type='submit' value="<%if Passed="True" then response.write "取消"%>审核选定的软件" <%if AdminPurview=2 and PurviewChecked=False then response.write "disabled"%>>
<input name="Action" type="hidden" id="Action" value="<% if Passed="False" then
response.write "SetPassed"
else
response.write "CancelPassed"
end if%>">
</td>
</tr>
</table>
</td></form></tr></table>
<%
end sub
if ClassID>0 and Child>0 then
%>
<br>
<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class='border'>
<tr height="20" class='tdbg'>
<td width='150' align="right">【<%response.write "<a href='" & strFileName & "'>" & ClassName & "</a>"%>】子栏目导航:</td>
<td><%call Admin_ShowChild()%></td></tr>
</table>
<%
end if
%>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
<tr class="tdbg">
<td width="80" align="right"><strong>软件搜索:</strong></td>
<td>
<%call Admin_ShowSearchForm(FileName,2)%>
</td>
</tr>
</table>
</body>
</html>
<%
call CloseConn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -