📄 admin_down.asp
字号:
rscat.OPEN sqlcat,Conn,1,1
do while not rscat.eof
colparam1=rscat("cat_id")
%><option value="admin_down.asp?action=list&cat_id=<%=rscat("cat_id")%>">·<%=rscat("cat_name")%></option>
<%
Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="SELECT * FROM d_class where cat_id=" &colparam1& ""
rsclass.OPEN sqlclass,Conn,1,1
do while not rsclass.eof
%><option value='admin_down.asp?action=list&cat_id=<%=rsclass("cat_id")%>&class_id=<%=rsclass("class_id")%>'>├ <%=rsclass("class_name")%></option>
<%
rsclass.movenext
loop
rsclass.close
set rsclass=nothing
rscat.movenext
loop
rscat.close
set rscat=nothing
set rstotal=nothing
%></select></td></form>
<form name=form method=post action="admin_down.asp?action=list">
<script language="javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<td align="right">
<%dim flname
flname=""
if request.querystring("class_id")<>"" then
sql="select class_name from d_class where class_id="&request.querystring("class_id")
set rsclass=conn.execute(sql)
flname=rsclass("class_name")
rsclass.close
set rsclass=nothing
elseif request.querystring("class_id")="" and request.querystring("cat_id")<>"" then
sql="select cat_name from d_cat where cat_id="&request.querystring("cat_id")
set rscat=conn.execute(sql)
flname=rscat("cat_name")
rscat.close
set rscat=nothing
end if%>
<font color="#ff6600"><%=flname%></font>分类共有<%=rs.recordcount%>个程序 </td>
</tr>
</table>
<%
Do Until Rs.EOF OR j=adflperpage
Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="select class_name from d_class where class_id="&rs("soft_classid")
rsclass.OPEN sqlclass,Conn,1,1
%>
<%
if rs("istop")="1" then
folder="「置顶」"
else
folder=""
end if
if rs("istop")="0" then
if rs("isbest")=1 then
folder="「推荐」"
else
folder=""
end if
end if
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class="Hxcmsqs" align="center">
<td width="5%"><input type=checkbox Name=soft_id Value=<%=rs("soft_id")%>></td>
<td width="5%"><%If Rs("passed")=1 Then%><a href="?id=<%=rs("soft_id")%>&action=checkpass"><font color=red>pass</font></a><%else%>√<%End If%></td>
<td width="50%"><a href="#"><b><%=rs("soft_name")%></b></a> <span class="date"><%=rs("soft_joindate")%></span> <span class="newshead"><%=rs("soft_dcount")%></span>/<span class="newshead"><%=rs("soft_rcount")%></span> <font color="red"><%=folder%></font></td>
<td width="10%"><%=rsclass("class_name")%></td><td width="10%"><%=rs("tjuser")%></td>
<td width="5%"><font color=red><%=rs("reviewcount")%></font></span>篇评论</td>
<td width="15%"><a href="admin_view.asp?action=down&soft_id=<%=rs("soft_id")%>">评论</a> <a href="admin_down.asp?id=<%=rs("soft_id")%>&action=editsoft">编辑</a></td>
</tr>
<%
rsclass.close
set rsclass=nothing
%>
<tr class="Hxcmsds">
<td colspan="7">简介:<%=cutstr(rs("soft_desc"),60,false,none)%></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<%
j=j+1
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<form name="form3" method="post" action="admin_down.asp?action=list&cat_id=<%=request("cat_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>">
<tr class="Hxcmsds"> <td class=Hxcmsqs colspan="9">
<input type=hidden value=DEL name=operation>
<input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">选中本页所有 <input type=submit value=批量删除 onClick="return confirm('确定删除选中的资源吗?');" class="button"></td>
</tr>
</form>
<%
Response.Write(MultiPages)
Response.Write("</table>")
end if
if request.form("MM_insert") then
if request.Form("action")="newsoft" then
dim soft_name,soft_size,soft_mode,roof,commend,demo,home,showpic,desc,downisbest,downistop,url1,url2,url3,url4,uGrade,points,tjuser
soft_name=trim(replace(request.form("name"),"'",""))
soft_size=trim(replace(request.form("size"),"'",""))
soft_mode=trim(replace(request.form("mode"),"'",""))
roof=trim(replace(request.form("roof"),"'",""))
commend=cint(request.form("commend"))
demo=trim(replace(request.form("demo"),"'",""))
home=trim(replace(request.form("home"),"'",""))
showpic=trim(replace(request.form("showpic"),"'",""))
desc=trim(replace(request.form("desc"),"'",""))
downisbest=request.form("isbest")
downistop=request.form("istop")
url1=trim(replace(request.form("url1"),"'",""))
url2=trim(replace(request.form("url2"),"'",""))
url3=trim(replace(request.form("url3"),"'",""))
url4=trim(replace(request.form("url4"),"'",""))
uGrade=request.form("Grade")
points=request.form("points")
tjuser=request.form("tjuser")
if soft_name="" then
Response.Write("<script language=javascript>alert('你必须填写文件名称!');history.back(1);</script>")
response.end
end if
if commend<1 then
Response.Write("<script language=javascript>alert('你必须选择文件推荐程度!');history.back(1);</script>")
response.end
end if
if request("of")="" then
Response.Write("<script language=javascript>alert('你必须选择所属分类!');history.back(1);</script>")
response.end
end if
if desc="" then
Response.Write("<script language=javascript>alert('你必须填写文件简介!');history.back(1);</script>")
response.end
end if
if url1="" and url2="" and url3="" and url4="" then
Response.Write("<script language=javascript>alert('你必须填写下载地址!');history.back(1);</script>")
response.end
end if
sql="select * from soft"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("soft_name")=soft_name
rs("soft_commend")=commend
rs("soft_desc")=desc
if soft_size="" then
rs("soft_size")="未知"
else
rs("soft_size")=soft_size
end if
if soft_mode="" then
rs("soft_mode")=""
else
rs("soft_mode")=soft_mode
end if
if roof="" then
rs("soft_roof")=""
else
rs("soft_roof")=roof
end if
if cint(downisbest)=1 then
rs("isbest")=cint(downisbest)
end if
if cint(downistop)=1 then
rs("istop")=cint(downistop)
end if
if request("of")<>"" then
Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="SELECT * FROM d_class where class_id="&clng(request("of"))
rsclass.OPEN sqlclass,Conn,1,1
rs("soft_classid")=rsclass("class_id")
rs("soft_classname")=rsclass("class_name")
rs("soft_catid")=rsclass("cat_id")
set rscat = Server.CreateObject("ADODB.Recordset")
sqlcat="select cat_name from d_cat where cat_id="&rsclass("cat_id")
rscat.open sqlcat,conn,1,1
rs("soft_catname")=rscat("cat_name")
rscat.close
rsclass.close
set rscat=nothing
set rsclass=nothing
end if
if demo="" then
rs("soft_demo")=""
else
rs("soft_demo")=demo
end if
if home="" then
rs("soft_home")=""
else
rs("soft_home")=home
end if
if showpic="" then
rs("soft_showpic")=""
else
rs("soft_showpic")=showpic
end if
if url1="" then
rs("soft_url1")=""
else
rs("soft_url1")=url1
end if
if url2="" then
rs("soft_url2")=""
else
rs("soft_url2")=url2
end if
if url3="" then
rs("soft_url3")=""
else
rs("soft_url3")=url3
end if
if url4="" then
rs("soft_url4")=""
else
rs("soft_url4")=url4
end if
rs("Grade")=cint(uGrade)
if cint(uGrade)=0 then
rs("points")=0
else
rs("points")=cint(points)
end if
rs("tjuser")=tjuser
rs.update
rs.close
set rs=nothing
sql="update allcount set softcount = softcount + 1"
conn.execute(sql)
response.redirect "admin_down.asp?action=list"
end if
if request.Form("action")="editsoft" then
if request.Form("id")="" then
Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
response.End
else
if not isInteger(request.form("id")) then
Response.Write("<script language=javascript>alert('非法的软件id参数。');history.back(1);</script>")
response.End
end if
end if
soft_name=trim(replace(request.form("name"),"'",""))
soft_size=trim(replace(request.form("size"),"'",""))
soft_mode=trim(replace(request.form("mode"),"'",""))
roof=trim(replace(request.form("roof"),"'",""))
commend=cint(request.form("commend"))
demo=trim(replace(request.form("demo"),"'",""))
home=trim(replace(request.form("home"),"'",""))
showpic=trim(replace(request.form("showpic"),"'",""))
desc=trim(replace(request.form("desc"),"'",""))
downisbest=request.form("isbest")
downistop=request.form("istop")
url1=trim(replace(request.form("url1"),"'",""))
url2=trim(replace(request.form("url2"),"'",""))
url3=trim(replace(request.form("url3"),"'",""))
url4=trim(replace(request.form("url4"),"'",""))
uGrade=request.form("Grade")
points=request.form("points")
tjuser=request.form("tjuser")
if soft_name="" then
Response.Write("<script language=javascript>alert('你必须填写文件名称!');history.back(1);</script>")
response.End
end if
if commend<1 then
Response.Write("<script language=javascript>alert('你必须选择文件推荐程度!');history.back(1);</script>")
response.End
end if
if request("of")="" then
Response.Write("<script language=javascript>alert('你必须选择所属分类,或者非法操作!');history.back(1);</script>")
response.End
end if
if desc="" then
Response.Write("<script language=javascript>alert('你必须填写文件简介!');history.back(1);</script>")
response.end
end if
if url1="" and url2="" and url3="" and url4="" then
Response.Write("<script language=javascript>alert('你必须填写下载地址!');history.back(1);</script>")
response.end
end if
sql="select * from soft where soft_id="&clng(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("soft_name")=soft_name
rs("soft_commend")=commend
rs("soft_desc")=desc
if soft_size="" then
rs("soft_size")="未知"
else
rs("soft_size")=soft_size
end if
if soft_mode="" then
rs("soft_mode")=""
else
rs("soft_mode")=soft_mode
end if
if roof="" then
rs("soft_roof")=""
else
rs("soft_roof")=roof
end if
rs("isbest")=cint(downisbest)
rs("istop")=cint(downistop)
if request("of")<>"" then
Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="SELECT * FROM d_class where class_id="&request("of")
rsclass.OPEN sqlclass,Conn,1,1
rs("soft_classid")=rsclass("class_id")
rs("soft_classname")=rsclass("class_name")
rs("soft_catid")=rsclass("cat_id")
set rscat = Server.CreateObject("ADODB.Recordset")
sqlcat="select cat_name from d_cat where cat_id="&rsclass("cat_id")
rscat.open sqlcat,conn,1,1
rs("soft_catname")=rscat("cat_name")
rscat.close
rsclass.close
set rscat=nothing
set rsclass=nothing
end if
if demo="" then
rs("soft_demo")=""
else
rs("soft_demo")=demo
end if
if home="" then
rs("soft_home")=""
else
rs("soft_home")=home
end if
if showpic="" then
rs("soft_showpic")=""
else
rs("soft_showpic")=showpic
end if
if url1="" then
rs("soft_url1")=""
else
rs("soft_url1")=url1
end if
if url2="" then
rs("soft_url2")=""
else
rs("soft_url2")=url2
end if
if url3="" then
rs("soft_url3")=""
else
rs("soft_url3")=url3
end if
if url4="" then
rs("soft_url4")=""
else
rs("soft_url4")=url4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -