📄 default.asp
字号:
<!--#include file="dbpath.asp"-->
<!--#include file="confirm.asp"-->
<%mainborderlight = objrs1("mainborderlight")
mainborderdark = objrs1("mainborderdark")
mainbordersize = objrs1("mainbordersize")
trback = objrs1("trback")
tabwidth = objrs1("tabwidth")
MaxPerPage=objrs1("number")
%>
<HTML>
<HEAD>
<TITLE><%=objrs1("sitename")%>::<%=objrs1("galleryname")%></TITLE>
<link rel="stylesheet" type="text/css" href="links.css">
<script language="javascript">
function popwin2(id,path)
{ window.open("open.asp?id="+id+"&ppath="+path,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function popwin3(id)
{ window.open("review.asp?id="+id,"","height=400,width=550,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</HEAD>
<% dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim catname
catid=request("catid")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim rscat
dim catsql
dim catid,catname1
if not isEmpty(request("catid")) then
catid=request("catid")
else
catid=0
end if
set rscat=server.createobject("adodb.recordset")
catsql="select * from cat where catid="&catid&""
rscat.open catsql,objconn,1,1
if not rscat.eof then
catname1=rscat("catname")
else catname1="所有图片"
end if
rscat.close
%>
<BODY>
<!--#include file="header.asp"-->
<tbody>
<table width="777" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="178" align="center" valign="top">
<table width="98%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000" bordercolordark="#FFFFFF">
<tbody>
<tr>
<td background="images/background.gif" height="20" align="center"><b>在线::图库::</b></td>
</tr>
<tr>
<td align=left width="100%" height="20">
<div align="center"><a href="default.asp" target="_top">所 有 图 片</a> </div>
</td>
</tr>
<tr>
<td align=left width="100%" height="20">
<div align="center"><a href="new.asp?catid=<%=catid%>" target="_top">新 进 图 片</a></div>
</td>
</tr>
<tr>
<td align=left width="100%" height="20">
<div align="center"><a href="top.asp?catid=<%=catid%>" target="_top">点 击 排 行</a></div>
</td>
</tr>
<!--#include file="cat.asp"-->
</table>
</td>
<td width="716">
<table border=0 cellpadding=0 cellspacing=0 width=100% align="center">
<tr>
<td width=100% align=left background="images/background.gif" height="18"><a href=" <%=objrs1("siteurl")%> " > <%=objrs1("sitename")%></a>::<a href=" <%=objrs1("url")%> " ><%=objrs1("galleryname")%></a>::
<%response.write ""&catname1&""%>
</td>
</tr>
<tr>
<%
if catid=0 then
sql="select * from gallery order by id desc"
else
sql="select * from gallery where catid="&catid&" order by id desc"
end if
Set objrs= Server.CreateObject("ADODB.Recordset")
objrs.open sql,objconn,1,1
if objrs.eof then
response.write "<td><img src=images/comingsoon.gif></td>"
else
totalPut=objrs.recordcount
if currentpage<1 then
currentpage=1
end if
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
showContent
showdown totalput,MaxPerPage,"default.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
objrs.move (currentPage-1)*MaxPerPage
showContent
showdown totalput,MaxPerPage,"default.asp"
else
currentPage=1
showContent
showdown totalput,MaxPerPage,"default.asp"
end if
end if
objrs.close
end if
set objrs=nothing
objconn.close
set objconn=nothing%>
<%sub showcontent
dim i
i=1%>
<table width="<%=tabwidth%>%" border="<%= mainbordersize%>" cellspacing="2" cellpadding="1" bgcolor="<%= trback%>" align="center" bordercolorlight="<%= mainborderlight%>" bordercolordark="<%= mainborderdark%>">
<%do while not objrs.eof and i < MaxPerPage
%>
<tr>
<%Dim Column
Column = 0
Do WHILE column <> 4 AND not objrs.eof AND i <= MaxPerPage%>
<td width=33%>
<table>
<tbody>
<tr>
<td align=center><a href="javascript:popwin2(<%=objrs("id")%>)">
<%
if not isnull(objrs("thumb")) and objrs("thumb")<> "" then%>
<img src=<%=objrs("thumb")%> border=0 >
<%else%>
<img src="images/nothumb.gif" border=0>
<%end if%>
</a> </td>
</tr>
<tr>
<td align=center> 点击:<%=objrs("hits")%>
<br>
</tr>
</tbody>
</table>
</td>
<%
objrs.MoveNext
column = column + 1
i = i + 1
Loop%>
<tr>
<%loop%>
</table>
<%
end sub
function showdown(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
Response.Write "<table border=""0"" cellspacing=""1"" width=""100%"">"
response.write "<tr><td width=""100%"" background=""images/background.gif"" height=""18"">图片总数:<font face=""arial"" color=""#FF0000"">"&totalnumber&"</font> 页面总数:<font color=""#FF0000"">"&n&"</font> 当前页面:<font color=""#FF0000"">"¤tpage&"</font>"
if CurrentPage <> 1 Then
response.write "[<a href="&filename&"?catid="&catid&"&page="&CurrentPage-1&"><< 上一页</a>] "
end if
if CurrentPage < n Then
response.write "[<a href="&filename&"?catid="&catid&"&page="&CurrentPage+1&">下一页 >></a>] "
end if
Response.Write "</div></td></tr></table>"
gotopage
end function
sub gotopage %>
<table width="100%">
<tr><form action=default.asp?catid=<%=catid%> method="POST" name=form1>
<td width=40%>跳转页面:
<input type="Text" name="page" value=<%=currentpage%> size="4" maxlength="4" style="font-size:9pt;background-color:#FFFFFF;border-left: 1px solid rgb(138,138,138); border-right: 1px solid rgb(138,138,138); border-top: 1px solid rgb(138,138,138); border-bottom: 1px solid rgb(138,138,138)">
<input type=image height=19 width=23 src="images/go.gif" border=0 name=form1 align="absbottom"></form>
<td width=60%><script src="http://on-line.cn/admin/count/count.asp"></script>
<form action="search.asp" method="post" name=form2>
查找图片:
<input type="text" name=keyword size=14 maxlength="30" style="font-size:9pt;background-color:#F7F7F7;border-left: 1px solid rgb(192,192,192); border-right: 1px solid rgb(192,192,192); border-top: 1px solid rgb(192,192,192); border-bottom: 1px solid rgb(192,192,192)">
<input type=image height=19 width=23 src="images/go.gif" border=0 name=form2 align="absbottom">
</form>
</td>
</tr>
</table>
<%end sub%>
</table>
</td>
</tr>
</table>
<!--#include file="footer.asp"-->
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -