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

📄 photo.asp

📁 单班同学录 一个非常漂亮的同学录 哦
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="session.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="CHAR.asp" -->
<%

set rs=server.CreateObject("adodb.recordset")
sql="select photo.*,user.realname from photo inner join [user] on user.username=photo.photouser order by photo.phototime desc"
rs.open sql,conn,1,1
if not rs.eof then
rs.PageSize =9 '每页记录条数
result_num=rs.RecordCount '记录总数
										
maxpage=rs.PageCount 
page=request("page")
											
if Not IsNumeric(page) or page="" then
	page=1
else
	page=cint(page)
end if
											
if page<1 then
	page=1
elseif  page>maxpage then
	page=maxpage
end if
											
	rs.AbsolutePage=Page
										
else
	result_num=0
	maxpage=0
	page=0
end if
formPath="upload"
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title><%=classname%>同学录</title>
<link href="css/class.css" type=text/css rel=stylesheet>

<script language="JavaScript">
<!--
var flag=false;
function DrawImage(ImgD){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= 120/80){
     if(image.width>120){  
     ImgD.width=120;
     ImgD.height=(image.height*120)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"×"+image.height;
     }
    else{
     if(image.height>80){  
     ImgD.height=80;
     ImgD.width=(image.width*80)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"×"+image.height;
     }
    }
   /*else{
    ImgD.src="";
    ImgD.alt=""
    }*/
   } 
//-->
</script>
</head>

<body background="images/1.GIF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="3"><img src="images/top_t.gif" width="776" height="43"></td>
  </tr>
  <tr> 
    <td width="138"><img src="images/top_l.gif" width="138" height="39"></td>
    <td width="584" align="right" bgcolor="#666B52">&nbsp;</td>
    <td width="54"><img src="images/top_r.gif" width="54" height="39"></td>
  </tr>
  <tr> 
    <td colspan="3"><table width="776" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="120" valign="top" background="images/left_x.gif"><img src="images/left_img.gif" width="120" height="480"></td>
          <td valign="top" bgcolor="#F2F2EA"> <div align="center">
          <!--#include file="top.asp" -->
            </div>
            <table width="618" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td valign="top"> 
                  <div align="center"><br>
                    <!--#include file="left.asp" -->
                  </div>
				</td>
                <td width="10">&nbsp;</td>
                <td width="418" valign="top"><table width="400" border="0" align="center" cellpadding="2" class="font1">
                    <tr> 
                      <td width="459">你的位置&gt;<a href="index.asp"><%=classname%>同学录</a>&gt;班级相册</td>
                      <td width="27"> </td>
                    </tr>
                  </table>
                  <div align="center">
                    <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/gnymtbz.gif">
                            <tr> 
                              <td width="135"><img src="images/bjxc.gif" width="135" height="36"></td>
                              <td>&nbsp;</td>
                              <td width="100"><img src="images/scxp.gif" width="100" height="36" border="0" usemap="#Map"></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/n_bk.gif">
                            <tr> 
                              <td><table border="0" cellpadding="0" cellspacing="0" width="400">
                                  <tr> 
                                    <td>&nbsp;</td>
                                  </tr>
                                  <tr> 
                                    <td> <div align="center"> 
                                        <table border="0" cellpadding="2" width="390">
                                          <%
								    if not rs.eof then
									i=1
									dim ii
									ii=0
									for i=1 to rs.PageSize
									if i>3 then
									response.Write "</tr><tr>"
									ii=ii+1
									i=1
								    end if
								  %>
                                          <td width="150"> <table width="120" border="0" cellpadding="0" cellspacing="0" bgcolor="#666B52">
                                              <tr> 
                                                <td><table width="100%" border="0" cellspacing="1" cellpadding="4">
                                                    <tr> 
                                                        <td width="120" height="120" align="center" valign="middle" bgcolor="#FFFFFF"><a href="photoview.asp?id=<%=rs("photoid")%>" target="_blank"><img src="<%=formPath%>/<%=rs("photoname")%>" width="100" height="100" border="0" onload="javascript:DrawImage(this);" ></a></td>
                                                    </tr>
                                                    <tr> 
                                                        <td bgcolor="#FFFFFF"><strong>标题:</strong><%=trim(rs("phototitle"))%></td>
                                                    </tr>
                                                    <tr> 
                                                        <td bgcolor="#FFFFFF"><strong>上传人:<a href="member.asp?id=<%=rs("photouser")%>"></a></strong><a href="member.asp?id=<%=rs("photouser")%>"><%=trim(rs("photouser"))%></a></td>
                                                    </tr>
                                                  </table></td>
                                              </tr>
                                            </table></td>
                                          <%rs.movenext:if rs.EOF or ii*3+i=rs.PageSize then Exit For
											next
											if i<>1 then
												for j=1 to 4-i
													response.Write("<td width='150'>&nbsp;</td>")
												next
											end if
										end if
										rs.close
										set rs=nothing
										%>
                                          <tr> 
                                            <td colspan="3"> <div align="center">
                                                <% call LastNextPage(maxpage,page,result_num) %>
                                              </div></td>
                                          </tr>
                                        </table>
                                      </div></td>
                                  </tr>
                                  <tr> 
                                    <td>&nbsp;</td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td><img src="images/n_foot.gif" width="400" height="10"></td>
                      </tr>
                    </table>
                    
                  </div>          
                    </td>
              </tr>
            </table> 
          </td>
          <td width="38" valign="top" background="images/right_b.gif"><img src="images/right_b.gif" width="38" height="5"></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td colspan="3"><img src="images/z_f.gif" width="776" height="26"></td>
  </tr>
</table>
<div align="center"></div>          
                    
<map name="Map">
  <area shape="rect" coords="19,11,88,28" href="photoadd.asp">
</map>
</body>
</html>

⌨️ 快捷键说明

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