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

📄 typesort.asp

📁 3000首FLASH源程序
💻 ASP
字号:
<%PageName="typesort.asp"%>
<!--#include file="top.asp"-->
<%
action=request("action")
if request("typeor")="pic" then 
	typeorsql=request("typeor")
else
	errmsg="<li>错误操作!</li>"
	call error()
	response.end
end if
if request("Nkey")<>"" then
selsql=typeorsql&".Nkey='"&Ucase(request("Nkey"))&"' and "
filsql=filsql&"&Nkey="&Ucase(request("Nkey"))
end if
if request("authorid")<>"" then
selsql=typeorsql&".authorid="&request("authorid")&" and "
filsql=filsql&"&authorid="&request("authorid")
end if
if request("area")<>"" then
sql="select * from author where address='"&request("area")&"'"
rs.open sql,conn,1,1
if not rs.eof then
selsql=typeorsql&".authorid="&rs("authorid")&" and "
else 
selsql=typeorsql&".authorid=0 and "
end if
rs.close
filsql=filsql&"&area="&server.urlencode(request("area"))
end if
if not isempty(request("page")) then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
%>
<table border="0" width=770 align=center cellspacing="1" cellpadding="1" bgcolor="<%=Tablebackcolor%>">
  <tr> 
    <td bgcolor="<%=Tabletitlecolor%>" align="center" width="163" valign="top"> <br>
      <table width="90%" border="0" cellspacing="1" cellpadding="3" bgcolor="<%=Tablebackcolor%>">
        <tr> 
          <td bgcolor="<%=aTablebodycolor%>" align="center">检索作品</td>
        </tr>
        <tr>
          <td bgcolor="<%=aTablebodycolor%>" height="28" align="center">
            <select classid=2 name="select2" onchange="window.open('typesort.asp?typeor=pic&area='+this.options[this.selectedIndex].value,'_self')">
              <option selected>按作者地区检索</option>
              <option value="<%=server.urlencode("大陆地区")%>">大陆地区</option>
              <option value="<%=server.urlencode("港台地区")%>">港台地区</option>
              <option value="<%=server.urlencode("日韩地区")%>">其他地区</option>
            </select>
          </td>
        </tr>
        <tr>
          <td bgcolor="<%=aTablebodycolor%>" height="28" align="center">
            <select classid=2 name="select"  onchange="window.open('typesort.asp?typeor=pic&authorid='+this.options[this.selectedIndex].value,'_self')">
              <option selected>按作者姓名检索</option>
              <%
sql="select authorid,author from author order by Nkey"
rs.open sql,conn,1,1
do while not rs.eof
response.write "<option value="&rs("authorid")&">"&rs("author")&"</option>"
rs.movenext
loop
rs.close
%>
            </select>
          </td>
        </tr>
        <tr>
          <td bgcolor="<%=aTablebodycolor%>" height="28" align="center">
            <select classid=2 size="1" name="Nkey" onchange="window.open('typesort.asp?typeor=pic&Nkey='+this.options[this.selectedIndex].value,'_self')">
              <option value="" selected>按首拼音检索</option>
              <%
		for i=65 to 90
		response.write "<option value="&chr(i)&">== "&chr(i)&" ==</option>"
		next
%>
            </select>
          </td>
        </tr>
      </table>
      <br>
    </td>
    <td bgcolor="<%=Tablebodycolor%>" width="600" height="2" align="center" valign="top">
<%
response.write "<input type=""button"" value=""按图片显示列表"" onclick=""javascript:window.open('typesort.asp?action=pic"
if request("page")<>"" then response.write"&page="&request("page")
response.write filsql&"&typeor="&typeorsql&"','_self')"">"&_
	"&nbsp;<input type=""button"" value=""按文字显示列表"" onclick=""javascript:window.open('typesort.asp?action=text"
if request("page")<>"" then response.write"&page="&request("page")
response.write filsql&"&typeor="&typeorsql&"','_self')"">"
	sql="select "&typeorsql&".id,"&typeorsql&".no,"&typeorsql&".size,"&typeorsql&".classid,"&typeorsql&".title,"&typeorsql&".best,"&typeorsql&".images,"&typeorsql&".title,"&typeorsql&".updatetime,author.author,author.authorid from "&typeorsql&",author where "&selsql&""&typeorsql&".authorid=author.authorid order by id desc"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then 
		response.write "<p align='center'>暂时没有收集</p>" 
	else 
		totalPut=rs.recordcount
		if action="text" then
		PageUrl="typesort.asp?action=text"&filsql&"&typeor="&typeorsql
		else
		PageUrl="typesort.asp?action=pic"&filsql&"&typeor="&typeorsql
		end if
	if currentpage<1 then currentpage=1 
	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 
		showpage totalput,MaxPerPage,PageUrl
		if action="text" then
		showtextContent
		else
		showcontent
		end if
		showpage totalput,MaxPerPage,PageUrl
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move  (currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark 
			showpage totalput,MaxPerPage,PageUrl
			if action="text" then
				showtextContent
			else
				showcontent
			end if
			showpage totalput,MaxPerPage,PageUrl
		else 
			currentPage=1 
			showpage totalput,MaxPerPage,PageUrl
			if action="text" then
				showtextContent
			else
				showcontent
			end if
			showpage totalput,MaxPerPage,PageUrl
		end if 
	end if 
end if 
rs.close 

sub showContent 
i=0 
response.write "<table width=""100%""><tr>"
do while not rs.eof
i=i+1
images=rs("images")
response.write "<td align=center><table><tr><td height=150 valign=bottom align=center><a href="&typeorsql&"list.asp?id="&rs("id")&"&classid="&rs("classid")&" title="&rs("title")&" target=_blank><img src="&images&" border=0 width=100 onLoad=""javascript:if(this.height>150)this.height=150;else if(this.width>90)this.width=90;""></a>"&_
		"</td></tr><tr><td align=center><a href="&typeorsql&"list.asp?id="&rs("id")&"&classid="&rs("classid")&" title="&rs("title")&" target=_blank>"&i&"."
if len(rs("title"))>8 then
response.write left(rs("title"),8)&"..."
else
response.write rs("title")
end if
response.write "</a></td></tr><tr><td align=center>"
	response.write "作者:<a href=authorlist.asp?id="&rs("authorid")&">"&rs("author")&"</a>"
response.write "</td></tr></table></td>"
if i>=MaxPerPage then exit do
if i mod 4=0 and i>=4 then response.write "</tr><tr>"
rs.movenext
loop
response.write "</table>"
end sub 
sub showtextContent 
i=0 
response.write "<table width=""100%"" cellspacing=""1"" cellpadding=""1"" bgcolor=""#666666"">"&_
  "<tr>"
response.write "<td align=center bgcolor="&Tabletitlecolor&" width=""12%"">编 号</td>"&_
    "<td align=center bgcolor="&Tabletitlecolor&" width=""35%"">标 题</td>"&_
	"<td align=center bgcolor="&Tabletitlecolor&" width=""14%"">大 小</td>"&_
	"<td align=center bgcolor="&Tabletitlecolor&" width=""16%"">推荐等级</td>"&_
	"<td align=center bgcolor="&Tabletitlecolor&" width=""10%"">作 者</td>"
response.write "<td align=center bgcolor="&Tabletitlecolor&" width=""13%"">上传日期</td>"&_
  "</tr>"
do while not rs.eof
i=i+1
response.write "  <tr>"&_
	"<td bgcolor=""#FFFFFF"">"&rs("no")&"</td>"&_
    "<td bgcolor="&aTablebodycolor&" onMouseOut=this.style.backgroundColor='' onMouseOver=this.style.backgroundColor='#FFFFFF'><a href="&typeorsql&"list.asp?id="&rs("id")&"&classid="&rs("classid")&" target=_blank>"
if len(rs("title"))>14 then
response.write left(rs("title"),13)&"..."
else
response.write rs("title")
end if
response.write "</a></td>"&_
	"<td bgcolor=""#FFFFFF"">"&rs("size")&"</td>"&_
	"<td bgcolor="&aTablebodycolor&">"&rs("best")&"</td>"&_
    "<td bgcolor="&aTablebodycolor&" onMouseOut=this.style.backgroundColor='' onMouseOver=this.style.backgroundColor='#FFFFFF'>"
		response.write "<a href=authorlist.asp?id="&rs("authorid")&" target=_blank>"&rs("author")&"</a>"
	response.write "</td>"&_
    "<td bgcolor=""#FFFFFF"">"&rs("updatetime")&"</td>"&_
  "</tr>"
if i>=MaxPerPage then exit do
rs.movenext
loop
response.write "</table>"
end sub

function showpage(totalnumber,maxperpage,filename)
 dim n
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
response.write "<div align=right><form method=Post action="&filename&">"&_
				"共找到<b>"&totalnumber&"</b>项记录" 
if CurrentPage<2 then
response.write "&nbsp;首页 上一页&nbsp;"
else
response.write "&nbsp<a href="&filename&"&page=1>首页</a>&nbsp;<a href="&filename&"&page="&CurrentPage-1&">上一页</a>&nbsp;" 
end if
if n-currentpage<1 then
response.write "下一页 末页 "
else
response.write "<a href="&filename&"&page="&CurrentPage+1&">下一页</a>&nbsp;"&_
                "<a href="&filename&"&page="&n&">末页</a>" 
end if
response.write "&nbsp;页次:<strong>"&CurrentPage&"/"&n&"</strong>页  转到:<select name='page' size='1' onchange='javascript:submit()'>"
               for i = 1 to n
response.write "<option value="&i
 				if cint(CurrentPage)=cint(i) then response.write " selected "
response.write ">第"&i&"页</option>"
                next
response.write "</select></form></div>"     
end function
%>
    </td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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