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

📄 index.asp

📁 提供给大家学习交流,图片制作程序.希望大家提出提意见.
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
dim rs
dim sql
msg_per_page = 20
set rs = server.createobject("adodb.recordset")
sql="select * from photo order by time DESC"
rs.cursorlocation = 3

rs.pagesize = msg_per_page
rs.open sql,conn,0,1 
%>
<html>
<head>
<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">
<style type="text/css">
<!--
.style3 {font-size: 1pt;
	color: #FFFFFF;
}
.ziti {font-family: "宋体";
	font-size: 12px;
	font-weight: bold;
	color: #FFFFFF;
}
.ziti1 {font-size: 12px;
	font-weight: normal;
	color: #000000;
}
.ziti2 {font-family: "宋体";
	font-size: 12px;
	font-weight: bold;
	color: #FFFFFF;
}
.ziti2 {	font-family: "宋体";
	font-size: 12px;
	font-weight: normal;
	color: #000000;
}
.ziti3 {
	font-family: "宋体";
	font-size: 14px;
	font-weight: normal;
	color: #000000;
}
-->
</style>


<title>中国移动杯齐齐哈尔市第二届青少年雪雕大赛____获奖作品展</title>
</head>

<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
	<center>
	<table style="BORDER-RIGHT: #cae2f8 1px solid; BORDER-TOP: #cae2f8 1px solid; BORDER-LEFT: #cae2f8 1px solid; BORDER-BOTTOM: #cae2f8 1px solid" width="770" border="0" cellspacing="0" cellpadding="0" height="860">
      <tr>
        <td height="228" colspan="2"><img src="images/top.jpg" width="770" height="228"></td>
        </tr>
      <tr>
        <td  background="images/menu.jpg" height="34" colspan="2"><table width="100%" height="24"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="2" colspan="2"></td>
        </tr>
      <tr>
        <td width="626" valign="top">
		
		
		<table width="626" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="626" height="227" align="center" valign="top" class="style3">  
      <table border="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" background=images/xian.jpg cellspacing="1">
        <tr>
          <td><p align="left"> </td>
        </tr>
        <%
if err.number<>0 then 
response.write "数据库操作失败:" & err.description
err.clear
else
if not (rs.eof and rs.bof) then 
totalrec = RS.RecordCount 
if rs.recordcount mod msg_per_page = 0 then 
n = rs.recordcount\msg_per_page 
else 
n = rs.recordcount\msg_per_page+1 
end if 

currentpage = request("page") 
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage < 1 then 
currentpage = 1
end if 
if err.number <> 0 then 
err.clear
currentpage = 1
end if
else
currentpage = 1
End if 
if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
currentPage=1
end if
rs.absolutepage = currentpage 
rowcount = rs.pagesize 
%>
        <%
dim r
dim j
dim k
r=0
 while not rs.eof and rowcount > 0
 if r mod 5=0 then
  row="<tr>"
 else
  row="&nbsp;"
 end if
 r=r+1
 response.write(row)
 response.write("<td width=100 class=ziti2 align=center>" & "<a target=_blank href=photoview.asp?id=" & rs("id") & "><img width=80 height=60 border=0 src=uploadimg/" & rs("url") & "></a><p>")
 response.write(rs("name") &"<br>")
 rowcount=rowcount-1
 rs.MoveNext
 wend
 end if
 end if
 rs.close
 set rs=nothing

%>
      </table></td>
  </tr>
  <tr>
    <td height="20" class="ziti1">
    <table border="0" align="center">
<tr>
<td align="center" valign="middle" class="ziti1"> 
<%call listPages()%></td>
</tr>
</table>
    <span class="ziti1">
    <%
sub listPages() 
for i=0 to n\msg_per_page-1 
for j=1 to msg_per_page 
%> 
    <b>
    <a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">
    <font color="#000000" class="ziti1">[
    <% =i*msg_per_page+j %>
    ]</font></a></b></font>&nbsp;&nbsp;  
    <% 
next 
next
EndPage = n mod msg_per_page 
for j=1 to EndPage 
%> 
    <b>
    <a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">
    <font color="#000000" class="ziti1">[
    <% =i*msg_per_page+j %>
    ]</font></a></b>
    <%next%>
    <br>
    <b>
    <font size="2" class="ziti1">当前页:<%=currentpage%>/<%=n%>总页数 &nbsp;&nbsp;<%=msg_per_page%>张照片/页 &nbsp;&nbsp;总照片数:<%=totalrec%>张</font></b><font size="2">
<%end sub%> 
    </font></span></td>
  </tr>
</table>

		
		
		
		</td>
        <td width="167" height="502" valign="top" background="images/right.jpg">
		<table width="100%" height="502"  border="0" cellpadding="3" cellspacing="3">
          <tr>
            <td height="33"> </td>
          </tr>
          <tr>
            <td valign="top">

<%
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select Top 20 * from photo  order by time desc",conn,1,1

for i=1 to 25

response.write "&nbsp;<img src=images/dot.gif><a target=_blank style=font-size=12;color:#000000 href=photoview.asp?id=" & rs2("id") & ">"
				if len(trim(rs2("name")))>12 then
				response.write left(trim(rs2("name")),10)&".."
				else
				response.write trim(rs2("name"))
				end if
				response.write "</a><font style=font-size=12>(" & rs2("time") &")</font><br>"
rs2.movenext
next
	rs2.close
	set rs2=nothing
 conn.close
 set conn=nothing
%> 

            
            
            
            </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="1" colspan="2"></td>
      </tr>
      <tr>
        <td height="91" colspan="2"  background="images/foot.jpg"><div align="center">
			<font style=font-size:13><br>
			版权所有 &copy 2006&nbsp; </font>
			<font style=font-size:13>齐齐哈尔市团委 </font><font style=font-size:13> <br>
			<br>
			网站制作与维护:齐齐哈尔职业学院计算机软件052班 袁利峰</font><br>
			<br>
			<br>
          </div></td>
      </tr>
    </table>
	</center>
	</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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