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

📄 photo.asp

📁 这是一个学生毕业时做的教务系统
💻 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">&nbsp;</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>&gt;&gt;〖学校影集〗</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">&nbsp;</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">&nbsp;</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 "&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;分页&nbsp;"
    response.write "&nbsp;共"&totalnumber&"组影集&nbsp;每页显示"&maxperpage&"组&nbsp;目前显示第<font color=#ff6600>"&CurrentPage&"</font>/"&n&"页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
 if CurrentPage<2 then
    response.write "首页&nbsp;&nbsp;上一页&nbsp;&nbsp;"
  else
    response.write "<a class=bai1 href="&filename&"?page=1 class=a-xixian>首页</a>&nbsp;&nbsp;"
    response.write "<a class=bai1 href="&filename&"?page="&CurrentPage-1&" class=a-xixian>上一页</a>&nbsp;&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "下一页&nbsp;&nbsp;尾页"
  else
    response.write "<a class=bai1 href="&filename&"?page="&(CurrentPage+1)
    response.write " class=bai1 >下一页</a>&nbsp;&nbsp;<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">&nbsp;</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 + -