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

📄 index.asp

📁 一个很好的班级同学录
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../public/conn.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上传照片</title>
<link href="../mycss.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="../public/top.asp" -->
<table width="760" border="1" align="center" cellpadding="5" cellspacing="1">
  <tr>
    <td class="font9Black"><h3 align="center"> 班级照片 </h3>
<% 
   if not isempty(request("page")) then
      Page=cint(request("page"))
   else
      Page=1
   end if

   set rs1=server.createobject("adodb.recordset")  
   sql1 ="select * from photo" 
   rs1.open sql1,secondconn,1,1
   
   if rs1.eof and rs1.bof then  
      response.write "<p align='center'>【<a href='javascript:window.close()'>关闭窗口</a>】"
   else
      const maxperpage=10
      rs1.pagesize=maxperpage
      totalrecord=rs1.recordcount
      totalpage=rs1.pagecount
      if page>totalpage then page=totalpage
      rs1.absolutepage=page
      i=0
	  dim id(),phototitle(),photointro(),photoauthor(),photofilename(),phototime()
      do while not rs1.eof and (i<rs1.pagesize)
        i=i+1
        redim preserve id(i),phototitle(i),photointro(i),photoauthor(i),photofilename(i),phototime(i)
        id(i)=rs1("id")
		phototitle(i)=rs1("phototitle")
		photointro(i)=rs1("photointro")	
		photoauthor(i)=rs1("photoauthor")
		photofilename(i)=rs1("photofilename")
		phototime(i)=year(rs1("phototime")) & "年" & month(rs1("phototime")) & "月" & day(rs1("phototime")) & "日"
        rs1.movenext
      loop
  end if
  rs1.close
  set rs1=nothing
%>  
<table width="30%" height="128"  border="0" align="center" cellpadding="20" cellspacing="10" class="font9Black">
<%temp=0%>
<%for j=1 to 2%>   
   <tr>
      <%for k=1 to 3%>
	     <%temp=temp+1%>
		 <%if temp<=i then%>
            <td>
			  <div align="center">
              <a href="upphoto/<%=photofilename(temp)%>" target="_blank">
			  <img src="upphoto/<%=photofilename(temp)%>" alt="<%=photointro(temp)%>" width="180" height="120" border="0">
			  </a>
			  </div>            
              图片标题:<%=phototitle(temp)%><br>
              <%=photoauthor(temp)%>于<%=phototime(temp)%>上传。
              <%if session("quanxian")="master" then%>
				 <br>
				 <a href="editphoto.asp?id=<%=id(temp)%>">编辑</a>&nbsp;&nbsp;
				 <a href="delphoto.asp?id=<%=id(temp)%>">删除</a>
              <%end if%>
		    </td>
		  <%else%>
		    <td></td>
		  <%end if%>
	  <%next%>
    </tr>
<%next%>
</table>
	  <table width="100%"  border="0" cellspacing="1" cellpadding="5">
        <tr>
          <td>
            <div align="center"> 共有<%=totalrecord%>条记录, 每页<%=maxperpage%>条,共<font color=red><%=totalpage%></font>页 第<%=page%>页
                    <%if page-1>0 then%>
                    <a href="index.asp?page=<%=page-1%>">上一页</a>
                    <%else%>
        上一页
        <%end if%>
        <%if page+1<=totalpage then%>
        <a href="index.asp?page=<%=page+1%>">下一页</a>
        <%else%>
        下一页
        <%end if%>
          </div></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="../public/bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

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