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

📄 admin_down.asp

📁 本程序采用花香内核
💻 ASP
📖 第 1 页 / 共 4 页
字号:
          <tr> 
            <td class=lanyuss>删除分类</td>
          </tr>
          <tr> 
            <td class=lanyuds>分类名称- 
              <input type="text" name="cat_name2" size="40" class="textarea" value="<%=request.querystring("name")%>"> 
            </td>
          </tr>
          <tr> 
            <td class=lanyuqs align="center"> <input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
<input type="button" value="返回"  onClick="location.href='admin_down.asp'" class="button"></td>
          </tr>
          <input type="hidden" name="action" value="delcat">
          <input type="hidden" name="id" value="<%=request.querystring("id")%>">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%end if
	  if request.querystring("action")="delclass" then%>
     <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
        <form name="form2" method="post" action="admin_down.asp">
          <tr> 
            <td class=lanyuss>删除子分类</td>
          </tr>
          <tr> 
            <td class=lanyuds>子分类名称-<%=request.querystring("name")%>
              <br>
              所属分类- 
                <%sql="select * from d_cat where cat_id="&cint(request.querystring("cid"))
set rs=conn.execute(sql)
%>
<%=rs("cat_name")%>
</td>
          </tr>
          <tr> 
            <td class=lanyuqs align="center"> <input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
<input type="button" value="返回"  onClick="location.href='admin_down.asp'" class="button"></td>
          </tr>
          <input type="hidden" name="action" value="delclass">
          <input type="hidden" name="id" value="<%=request.querystring("id")%>">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%end if
if request.form("operation")="DEL" then
    num=request.form("soft_id").Count
    for i=1 to num
      conn.execute("delete from soft where soft_id="&request.form("soft_id")(i))
    next
  end if
if request.querystring("action")="list" then
dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
keyword=trim(replace(request.form("keyword"),"'",""))
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")
sql="select * from soft order by istop desc,soft_joindate desc"
if cat_id<>"" and class_id="" then
sql="SELECT * FROM soft where soft_catid="&cat_id&" order by soft_joindate desc"
elseif class_id<>"" and keyword="" then
sql="SELECT * FROM soft where soft_classid="&class_id&" order by soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
sql="select * from soft where "&colname&" like '%"&keyword&"%' order by soft_joindate desc"
else
sql="SELECT * FROM soft order by istop desc,soft_joindate desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" align="center" border="0" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
<tr class=lanyuqs><form name="form1" method="post" action="admin_down.asp?action=list"><td> 
<select name="colname"><option value=0 selected>--==搜索范围==--</option><option value="soft_name">软件名称</option><option value="soft_desc">软件描述</option></select>&nbsp; <input type="text" name="keyword" class="textarea" size="20">&nbsp;&nbsp; <input type="submit" name="Submit" value="搜索" class="button"></td></form><form><td >跳转到<select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'><option value="admin_down.asp?action=list">==选择分类==</option><option value="admin_down.asp?action=list">·管理首页</option><%
Set rscat = Server.CreateObject("ADODB.Recordset")
sqlcat="SELECT * FROM d_cat"
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>
            <br>
<%if not rs.eof then
rs.movefirst
rs.pagesize=softperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   totalsoft=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*softperpage<totalsoft then
	       rs.move(currentpage-1)*softperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalsoft mod softperpage)=0 then
      totalpages=totalsoft\softperpage
   else
      totalpages=totalsoft\softperpage+1
   end if
i=0
do while not rs.eof and i<softperpage%>
<%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=lanyubk style="border-collapse: collapse">
              <tr class="lanyuqs" 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="checktj.asp?id=<%=rs("soft_id")%>&action=pass&hx66=checkdown"><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>&nbsp;<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> 
                  <a href="checktj.asp?id=<%=rs("soft_id")%>&action=del&hx66=checkdown">删除</a> </td>
              </tr>
<%
rsclass.close
set rsclass=nothing
%>
              <tr class="lanyuds"> 
                <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>
<%i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then%>
 <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
              <tr class="lanyuss"> 
                <td align="center">当前没有程序!</td>
              </tr>
            </table>
<%end if
end if%>
 <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk 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="lanyuds"> <td class=lanyuqs colspan="9"><table width="100%" align="center">
            <td align="seft"> 
            <input type=hidden value=DEL name=operation>
	 <input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">选中本页所有 <input type=submit value=批量删除 onclick="return Del()"> </td>
            <td align="right"><%=currentpage%> /<%=totalpages%>页,<%=totalsoft%>条记录/<%=softperpage%>个每页. 
              <%
i=1
showye=totalpages
if showye>10 then
showye=10
end if

for i=1 to showye
if i=currentpage then
%>
              <%=i%> 
              <%else%>
              <a href="admin_down.asp?action=list&page=<%=i%>&cat_id=<%=request("cat_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>"><%=i%></a> 
              <%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
              <a href="admin_down.asp?action=list&page=<%=i%>&cat_id=<%=request("cat_id")%>&class_id=<%=request("class_id")%>" title="下一页">>></a> 
              <%end if%>
              &nbsp;&nbsp;&nbsp;&nbsp; 
              <input type="text" name="page" class="textarea" size="4">
              <input type="submit" name="Submit" value="Go" class="button">
            </table></td>
          </tr>
        </form>
      </table>
<%end if
if request.form("MM_insert") then

if request.Form("action")="newsoft" then
sql="select * from soft"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
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
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写文件名称!');history.back(1);</script>")
else
  rs("soft_name")=soft_name
end if
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 commend<1 then
  founderr=true
Response.Write("<script language=javascript>alert('你必须选择文件推荐程度!');history.back(1);</script>")
else
  rs("soft_commend")=commend
end if
if cint(downisbest)=1 then
  rs("isbest")=cint(downisbest)
end if
if cint(downistop)=1 then
  rs("istop")=cint(downistop)
end if

⌨️ 快捷键说明

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