?? photo.asp
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--#include file=include/conn.asp-->
<HTML><HEAD><TITLE><%=redcaff%></TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<link href="news.css" rel="stylesheet" type="text/css">
</HEAD>
<!--#include file=include/top.asp -->
<%
const MaxPerPage=16
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
dim sql2
dim rs2
sql2="select * from admin"
Set rs2= Server.CreateObject("ADODB.Recordset")
rs2.open sql2,conn,1,1
%>
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from photo_type 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
totalPut=rs.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
showpage totalput,MaxPerPage,"photo.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"photo.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"photo.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
<body topmargin="0">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" background="images/bgimg_left.gif"> </td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80"><img src="images/photo_logo.jpg" width="160" height="400"></td>
<td width="1" bgcolor="#CCCCCC"></td>
<td valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" bgcolor="#f4f4f4">當前位置:<a class=bai1 href="..">首頁</a>>>〖學校影集〗</td>
</tr>
</table>
<br>
<%do while not rs.eof%>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" bgcolor="#FFFFFF"><img src="images/arrow.gif" width="25" height="8"><a class=bai1 href="photo_show.asp?id=<%=rs("id")%>"><%= rs("name")%></a></td>
</tr>
</table>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%> <br></td>
</tr>
</table></td>
<td width="5" background="images/bgimg_right.gif"> </td>
</tr>
</table>
<table width="778" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" height="1" background="../images/bgimg_left.gif"></td>
<td> <table width="768" height="1" border=0 align="center" cellpadding=0
cellspacing=0 bgcolor="#FFFFFF" i>
<tbody>
<tr>
<td height="1" valign=middle bgcolor="#CCCCCC"></td>
</tr>
</tbody>
</table></td>
<td width="5" height="1" background="../images/bgimg_right.gif"></td>
<table width="778" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" background="../images/bgimg_left.gif"> </td>
<td> <table width="768" height="20" border=0 align="center" cellpadding=0
cellspacing=0 bgcolor="#FFFFFF" i>
<tbody>
<tr> </tr>
<tr>
<td height="20" valign=middle bgcolor="#FFFFFF">
<%
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 " >>分頁 "
response.write " 共"&totalnumber&"組影集 每頁顯示"&maxperpage&"組 目前顯示第<font color=#ff6600>"&CurrentPage&"</font>/"&n&"頁 "
if CurrentPage<2 then
response.write "首頁 上一頁 "
else
response.write "<a class=bai1 href="&filename&"?page=1 class=a-xixian>首頁</a> "
response.write "<a class=bai1 href="&filename&"?page="&CurrentPage-1&" class=a-xixian>上一頁</a> "
end if
if n-currentpage<1 then
response.write "下一頁 尾頁"
else
response.write "<a class=bai1 href="&filename&"?page="&(CurrentPage+1)
response.write " class=bai1 >下一頁</a> <a class=bai1 href="&filename&"?page="&n&" class=bai1 >尾頁</a>"
end if
end function
%>
</td>
</tr>
</tbody>
</table></td>
<td width="5" background="../images/bgimg_right.gif"> </td>
</tr>
</table>
<table width="778" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" height="1" background="../images/bgimg_left.gif"></td>
<td> <table width="768" height="1" border=0 align="center" cellpadding=0
cellspacing=0 bgcolor="#FFFFFF" i>
<tbody>
<tr>
<td height="1" valign=middle bgcolor="#CCCCCC"></td>
</tr>
</tbody>
</table></td>
<td width="5" height="1" background="../images/bgimg_right.gif"></td>
</tr>
</table>
<!--#include file=include/BOTTOM.asp -->
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -