📄 syscode_down.asp
字号:
<%
'****************************************************
if guestsoft<>"yes" and UserLogined<>True then
call guesterror()
response.end
end if
dim soft_id,cat_id,class_id
dim founderr,errmsg,RsHxcms
if request.querystring("soft_id")<>"" then
if not isInteger(request.querystring("soft_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
soft_id=CLng(request("soft_id"))
else
soft_id=0
end if
if request.querystring("cat_id")<>"" then
if not isInteger(request.querystring("cat_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
cat_id=CLng(request("cat_id"))
else
cat_id=0
end if
if request.querystring("class_id")<>"" then
if not isInteger(request.querystring("class_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
class_id=CLng(request("class_id"))
else
class_id=0
end if
if soft_id>0 then
sql="select * from soft where soft_id="&soft_id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的软件不存在,或者已经被管理员删除!</li>"
else
if rs("Passed")=1 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的软件尚未被管理员审核!</li>"
else
start="软件中心 - "&rs("soft_name")&""
cat_id=CLng(rs("soft_catid"))
class_id=CLng(rs("soft_classid"))
rs("soft_rcount")=rs("soft_rcount")+1
rs.update
end if
end if
end if
'=================================================
if FoundErr=True then
Call HxErrMsg()
response.end
end if
'=================================================
'过程名:main_down
'作 用:显示软件版面位置导航
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub main_down()
if cat_id>0 then
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='down.asp'>下载中心</a>" & vbCrLf
sql="select * from d_cat where cat_id="&cat_id
set rs3=conn.execute(sql)
if rs3.eof then
Response.Redirect "show_error.asp?eid=参数错误,找不到相关的记录!"
Response.End
End IF
Response.Write " >> <a href=""down.asp?cat_id="&rs3("cat_id")&""">"&rs3("cat_name")&"</a>"
if class_id>0 then
sql="select * from d_class where cat_id="&rs3("cat_id")&" and class_id="&class_id
set rs4=conn.execute(sql)
if rs4.eof then
Response.Redirect "show_error.asp?eid=参数错误,找不到相关的记录!"
Response.End
End IF
Response.Write " >> <a href='down.asp?cat_id="&rs4("cat_id")&"&class_id="&rs4("class_id")&"'>"&rs4("class_name")&"</a>"
rs4.close
set rs4=nothing
end if
rs3.close
set rs3=nothing
else
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='down.asp'>下载中心</a>" & vbCrLf
end if
end sub
'=================================================
'过程名:class_down
'作 用:下载分类——纵排
'参 数:无
'Web:www.ynsky.com.cn
'=================================================
sub class_down()
sql="select * from d_cat"
set rs1=conn.execute(sql)
do while not rs1.eof
if request("cat_id")=cstr(rs1("cat_id")) then
response.write " <font color=""#FF0000"">·"&rs1("cat_name")&"</font><BR>"
else
response.write " <font color=""#FF0000"">·</font><a href='down.asp?cat_id="&rs1("cat_id")&"'>"&rs1("cat_name")&"</a><BR>"
end if
sql="select * from d_class where cat_id="&rs1("cat_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
if request("class_id")=cstr(rs2("class_id")) then
response.write " <font color=#008800>├ "&rs2("class_name")&"</a></font><BR>"
else
response.write " <a href='?cat_id="&rs2("cat_id")&"&class_id="&rs2("class_id")&"'>├ "&rs2("class_name")&"</a><BR>"
end if
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing
end sub
'=================================================
'过程名:top_down
'作 用:全部软件排行
'参 数:n-调用条数,nn-显示长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web:www.ynsky.com.cn
'=================================================
sub top_down(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM soft where passed=0 ORDER by soft_dcount DESC,soft_id DESC")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id="&RsHxcms("soft_id")&"' Title='文件名称:"&RsHxcms("soft_name")&"
下载次数:"&RsHxcms("soft_dcount")&"
上传时间:"&RsHxcms("soft_joindate")&"' "&nnn&">"&gotTopic(RsHxcms("soft_name"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>当前没有软件!</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:best_down
'作 用:推荐软件
'参 数:n-调用条数,nn-显示长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web:www.ynsky.com.cn
'=================================================
sub best_down(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM soft where isbest = 1 order by soft_id desc")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id="&RsHxcms("soft_id")&"' Title='文件名称:"&RsHxcms("soft_name")&"
下载次数:"&RsHxcms("soft_dcount")&"
上传时间:"&RsHxcms("soft_joindate")&"' "& nnn &">"&gotTopic(RsHxcms("soft_name"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>没有推荐软件!</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:search_down
'作 用:显示软件搜索表单
'参 数:无
'Web:www.ynsky.com.cn
'=================================================
sub search_down()
Response.Write "<form name='form1' method='post' action='down.asp'><div align=center><input type='radio' name='select' value='soft_name' checked class='inuptCG'>名称 <input type='radio' name='select' value='soft_desc' class='inuptCG'>简介 <input type='radio' name='select' value='review' class='inuptCG'>评论<br><input type='text' name='keyword' size='15' value='搜索关键字' maxlength='50' onfocus=""this.value=''"" class='input'> <input type='submit' name='Submit' value='搜索' onmouseover=""this.className='boton'"" onmouseout=""this.className='botoff'""></div></form>" & vbCrLf
end sub
'=================================================
'过程名:displayList_down
'作 用:带分页功能的软件列表
'参 数:popdownnum------热门点击数
' nn--------------标题长度
' Hxperpage-------每页显示条数
' classyes--------是否显示分类,True为是,False为否
' NewWindows------是否新窗打开,True为是,False为否
'Web:www.ynsky.com.cn
'=================================================
sub displayList_down(nn,Hxperpage,classyes,NewWindows)
Dim CurPage,Url_Add
Url_Add="?"
If Request.QueryString("Page")<>"" Then
Curpage=Request.QueryString("Page")
If IsInteger(Curpage)=False Then Curpage=1
Else
Curpage=1
End If
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
Response.Write "<script language=javascript>alert('搜索参数非法!');javascript:history.back();</script>"
Response.End
end if
end if
if request.querystring("cat_id")<>"" and request("class_id")="" then
sql="SELECT * FROM soft where soft_catid="&cat_id&" and passed=0 order by istop desc,soft_id desc"
Url_Add=Url_Add&"cat_id="&cat_id&"&"
elseif request("class_id")<>"" and request("keyword")="" then
sql="SELECT * FROM soft where soft_classid="&class_id&" and passed=0 order by istop desc,soft_id desc"
Url_Add=Url_Add&"cat_id="&request("cat_id")&"&class_id="&class_id&"&"
elseif request("keyword")<>"" and (request("select")="soft_name" or request("select")="soft_desc" or request("select")="review" or request("select")="tjuser") then
sql="select * from soft where passed=0 and "&request("select")&" like '%"&Jencode(checkspace(request("keyword")))&"%' order by istop desc,soft_id DESC"
Url_Add=Url_Add&"select="&request("select")&"&keyword="&Server.URLEncode(request("keyword"))&"&"
else
sql="SELECT * FROM soft where passed=0 order by istop desc,soft_id desc"
end if
set rssoft=server.createobject("adodb.recordset")
rssoft.open sql,conn,1,1
Response.Write "<table width='100%' border='1' align='center' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF' bordercolor='#f0f0f0' style='border-collapse: collapse'>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td height=30 colSpan=4><FONT color=#b70000> <B>·</B></FONT>"
if request("class_id")<> "" or request("cat_id")<>"" then
Response.Write "本分类共有"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -