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

📄 admin_down.asp

📁 为中小型企业与欲创业的个人提供一个合适的企业型网站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Include/Tyi86_setup.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="Include/check.asp"-->
<%CheckAdmin3%>

<%
function cutstr(str,strlen,more,url)
if len(str)>strlen then
	 str=left(str,strlen) & "......"
end if
if (len(str)>strlen) and more then
  str=str+"&nbsp;&nbsp;&nbsp;[url="+url+"]点这里查看详情[/url]"
end if
cutstr=str
end function

function AutoUrl(str)
	on error resume next
	Set url=new RegExp
	url.IgnoreCase =True
	url.Global=True
	url.MultiLine = True
	url.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@:+!]+)"
	str = url.Replace(str,"[url=$1]$1[/url]")
	url.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@:+!]+)$"
	str = url.Replace(str,"[url=$1]$1[/url]")
	url.Pattern = "^(www.[A-Za-z0-9\./=\?%\-&_~`@:+!]+)"
	str = url.Replace(str,"[url=http://$1]$1[/url]")
	url.Pattern = "(www.[A-Za-z0-9\./=\?%\-&_~`@:+!]+)$"
	str = url.Replace(str,"[url=http://$1]$1[/url]")
	set url=Nothing
	AutoUrl=str
end function

Rem 判断数字是否整形
function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
end function

Function FormatStr(String)
  on Error resume next
  String = Replace(String, CHR(13), "")
  String = Replace(String, CHR(32), "&nbsp;")
  String = Replace(String, "", "&nbsp;")
  String = Replace(String, "<", "&lt;")
  String = Replace(String, ">", "&gt;")
  String = Replace(String, CHR(10) & CHR(10), "<BR><BR>")
  String = Replace(String, CHR(10), "<BR>")
  FormatStr = String
End Function

Function Ubb2Html(str, showemot, showimg)
ON ERROR RESUME NEXT
if not str<>"" then exit function
  tmpstr="uNobwab"
  str=UbbStr(str,"url")
  str=UbbStr(str,"quote")
  str=UbbStr(str,"color")
  str=UbbStr(str,"size")
  str=UbbStr(str,"face")
  if showemot then
    for i=1 to 16
      str=replace(str,":em"&i&":","<img src='emot/em"&i&".gif'>",1,6,1)
      str=replace(str,":em"&i&":","",1,-1,1)
    next
  end if
  if showimg then
    str=UbbStr(str,"img")
    str=UbbStr(str,"swf")
	str=UbbStr(str,"dir")
	str=UbbStr(str,"rm")
	str=UbbStr(str,"mp")
	str=UbbStr(str,"qt")
  end if
  str=UbbStr(str,"frame")
  str=replace(str,"[b]","<b>",1,-1,1)
  str=replace(str,"[/b]","</b>",1,-1,1)
  str=replace(str,"[u]","<u>",1,-1,1)
  str=replace(str,"[/u]","</u>",1,-1,1)
  str=replace(str,"[br]","<br>",1,-1,1)
  str=replace(str,"[center]","<center>",1,-1,1)
  str=replace(str,"[/center]","</center>",1,-1,1)
  str=replace(str,"[fly]","<marquee>",1,-1,1)
  str=replace(str,"[/fly]","</marquee>",1,-1,1)
  str=replace(str,"["&tmpstr,"[",1,-1,1)
  str=replace(str,tmpstr&"]","]",1,-1,1)
  str=replace(str,"/"&tmpstr,"/",1,-1,1)
  Ubb2Html=str
End Function
%>

<HTML><HEAD><TITLE>通盈系统 -- 下载管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="other/Admin.css" rel="stylesheet" type="text/css">
</HEAD>

<p align="center"><a href="admin_down.asp?action=newsoft">添加下载</a> | <a href="admin_down.asp?action=list">管理下载</a></p>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) > 

	  <%
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 soft_id,soft_name,soft_joindate,soft_classname,soft_rcount,soft_dcount,soft_desc,review,reviewcount from soft order by soft_joindate desc"
if cat_id<>"" and class_id="" then
    sql="SELECT soft_id,soft_name,soft_joindate,soft_classname,soft_rcount,soft_dcount,soft_desc,review,reviewcount FROM soft where soft_catid="&cat_id&" order by soft_joindate desc"
elseif class_id<>"" and keyword="" then
	sql="SELECT soft_id,soft_name,soft_joindate,soft_classname,soft_rcount,soft_dcount,soft_desc,review,reviewcount FROM soft where soft_classid="&class_id&" order by soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
	sql="select soft_id,soft_name,soft_joindate,soft_classname,soft_rcount,soft_dcount,soft_desc,review,reviewcount from soft where "&colname&" like '%"&keyword&"%' order by soft_joindate desc"
else
	sql="SELECT soft_id,soft_name,soft_joindate,soft_classname,soft_rcount,soft_dcount,soft_desc,review,reviewcount FROM soft order by 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" style="border-collapse: collapse">
<tr><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></td></form><td align="right"> 
                  <font color="#ff6600"><%=flname%></font>分类共有<%=rs.recordcount%>个程序 </td>
              </tr>
            </table>
            <br>
<%
dim softperpage
softperpage = 10
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%>
 <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" style="border-collapse: collapse">
              <tr> 
                <td width="60%"><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></td>
<!-- <td width="20%" align="center"><font color=red><%=rs("reviewcount")%></font></span>篇评论</td> -->
                <td width="20%" align="center">  <!-- <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="admin_down.asp?id=<%=rs("soft_id")%>&action=delsoft">删除</a> </td>
              </tr>
              <tr> 
                <td colspan="3"><%=cutstr(rs("soft_desc"),40,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" style="border-collapse: collapse">
              <tr> 
                <td align="center">当前没有程序!</td>
              </tr>
            </table>
<%end if
end if%>
 <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" 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> 
            <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">
            </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,roof,commend,demo,home,showpic,desc,downisbest,url1,url2,url3,url4,ReadGrade
soft_name=trim(replace(request.form("name"),"'",""))
soft_size=trim(replace(request.form("size"),"'",""))
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")
url1=trim(replace(request.form("url1"),"'",""))
url2=trim(replace(request.form("url2"),"'",""))
url3=trim(replace(request.form("url3"),"'",""))
url4=trim(replace(request.form("url4"),"'",""))
ReadGrade=cint(request.form("ReadGrade"))
rs("ReadGrade")=ReadGrade


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 cint(downisbest)=1 then
  rs("isbest")=cint(downisbest)
end if
if desc="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写文件简介!');history.back(1);</script>")
else
  rs("soft_desc")=desc
end if
if url1="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写下载地址!');history.back(1);</script>")
end if
if url1="" then
  rs("soft_url1")=""
else
  rs("soft_url1")=url1
end if

⌨️ 快捷键说明

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