📄 index.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Author" content="Forjj">
<link href="style.css" rel="stylesheet" type="text/css" />
<script defer="defer" type="text/javascript" src="forjj.js"></script>
<style type="text/css">
<!--
a {
font-size: 12px;
color: #FFFFFF;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<script language="javascript">
function searchform()
{
if(search1.searchkey.value=="输入编号或姓名进行查询")
{
alert("输入编号或姓名进行查询")
return false;
}
if(search1.searchkey.value=="")
{
alert("输入编号或姓名进行查询")
return false;
}
}
</script>
</head>
<body>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/top.jpg" width="1002" height="95"></td>
</tr>
</table>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/top2.jpg" width="682" height="168" /></td>
<td width="320"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/bar3.jpg" width="320" height="135" usemap="#Map" border="0"></td>
</tr>
<tr>
<td width="320" height="33" valign="top" background="images/bar6.jpg">
<table width="95%" height="26" border="0" cellpadding="0" cellspacing="0">
<form name="search1" method="post" action="index.asp?sort=0" onSubmit="return searchform();">
<tr>
<td width="90" class="fonts1"> 许愿树查询:</td>
<td><input name="searchkey" type="text" size="22" value="输入编号或姓名进行查询" onClick="this.value=''"></td>
<td><input type="image" src="images/b3.jpg" width="50" height="20"></td>
</tr>
</form>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="1002" height="40" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bg2.jpg" id="link2">
<tr>
<td width="55"> </td>
<td width="78" align="center"><a href="index.asp">所有林区</a></td>
<td width="40" align="left" valign="top"><img src="images/a1.jpg" width="40" height="38" border="0"></td>
<td width="90" align="center"><a href="index.asp?sort=1">爱情林区</a></td>
<td width="54" valign="top"><img src="images/a2.jpg" width="54" height="38" border="0"></td>
<td width="94" align="center"><a href="index.asp?sort=2">学业林区</a></td>
<td width="42" valign="top"><img src="images/a3.jpg" width="42" height="38" border="0"></td>
<td width="90" align="center"><a href="index.asp?sort=3">事业林区</a></td>
<td width="41" valign="top"><img src="images/a4.jpg" width="41" height="38" border="0"></td>
<td width="90" align="center"><a href="index.asp?sort=4">生活林区</a></td>
<td width="34" valign="top"><img src="images/a5.jpg" width="34" height="38" border="0"></td>
<td width="88" align="center"><a href="index.asp?sort=5">梦想林区</a></td>
<td width="41" valign="top"><img src="images/a6.jpg" width="41" height="38" border="0"></td>
<td width="157" valign="top"> </td>
<td width="8"> </td>
</tr>
</table>
<map name="Map" id="Map">
<area shape="rect" coords="83,70,251,121" href="plant.asp" />
</map>
<table width="50%" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<%
MaxPerPage=20
page=request("page")
if isnumeric(page)=true then
if page>0 then
currentPage=int(page)
else
currentPage=1
end if
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
select case request("sort")
case "1","2","3","4","5"
sql="select id,name,sort,hits from forjj_tree where sort="&request("sort")&" order by id desc"
case "0"
searchkey=replace(request("searchkey")," ","")
if IsNumeric(searchkey)=false then
sql="select id,name,sort,hits from forjj_tree where name like '%"&searchkey&"%' order by id desc"
else
sql="select id,name,sort,hits from forjj_tree where id like '%"&searchkey&"%' order by id desc"
end if
case else
sql="select id,name,sort,hits from forjj_tree order by id desc"
end select
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.end
else
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,"index.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"index.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
end if
sub showContent
i=1
row_count=1
%>
<tr>
<%
do while not rs.eof
if rs("hits")<20 then
tree="<img src=""images/tree1_1.png"" width=""48"" height=""76"" border=""0"">"
elseif rs("hits")>19 and rs("hits")<80 then
tree="<img src=""images/tree1_2.png"" width=""94"" height=""129"" border=""0"">"
elseif rs("hits")>79 and rs("hits")<150 then
tree="<img src=""images/tree1_3.png"" width=""133"" height=""151"" border=""0"">"
elseif rs("hits")>149 and rs("hits")<300 then
tree="<img src=""images/tree1_4.png"" width=""161"" height=""145"" border=""0"">"
else
tree="<img src=""images/tree2_"&rs("sort")&".png"" width=""150"" height=""150"" border=""0"">"
end if
%>
<td width="25%" height="190"> <table width="120" height="180" border="0" align="center" cellpadding="0" cellspacing="0" id="link1">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" height="150"><a href="#" onClick="window.open('view.asp?id=<%=rs("id")%>','wish','width=400,height=300,top=100,left=100,location=no,menubar=no,toolbar=no,titlebar=no,scrollbars=no');"><%=tree%></a></td>
</tr>
<tr>
<td height="8"></td>
</tr>
<tr>
<td height="24" align="center"><a href="#" onClick="window.open('view.asp?id=<%=rs("id")%>','wish','width=400,height=300,top=100,left=100,location=no,menubar=no,toolbar=no,titlebar=no,scrollbars=no');"><%=rs("name")%>的许愿树</a></td>
</tr>
<tr>
<td height="24" align="center" class="fonts1"><font color="white">浇水量: <%=rs("hits")%></font></td>
</tr>
</table></td>
</tr>
</table></td>
<%if row_count mod 5=0 then%>
</tr>
<tr>
<%
end if
row_count=row_count+1
if i>=MaxPerPage then exit do
i=i+1
rs.movenext
loop
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
</table>
<table width="50%" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="1002" height="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/search.jpg"><table width="90" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="98%" height="25" border="0" align="left" cellpadding="0" cellspacing="0" id="link1">
<form name="form" method="post" action="index.asp?sort=<%=request("sort")%>&searchkey=<%=searchkey%>">
<tr>
<td width="300"></td>
<td class="fonts4"><b> </b><b>
<%if CurrentPage<2 then%><img src=images/bul_05.gif width=10 height=10 > 首页 <img src=images/bul_05.gif width=10 height=10 > 上一页 <%else%><img src=images/bul_05.gif width=10 height=10 > <a href=<%=filename%>?sort=<%=request("sort")%>&searchkey=<%=searchkey%>&page=1>首页</a> <img src=images/bul_05.gif width=10 height=10 > <a href=<%=filename%>?sort=<%=request("sort")%>&searchkey=<%=searchkey%>&page=<%=CurrentPage-1%>>上一页</a> <%end if%><%if n-currentpage<1 then%><img src=images/bul_05.gif width=10 height=10 > 下一页 <img src=images/bul_05.gif width=10 height=10 > 尾页 <%else%><img src=images/bul_05.gif width=10 height=10 > <a href=<%=filename%>?sort=<%=request("sort")%>&searchkey=<%=searchkey%>&page=<%=CurrentPage+1%>>下一页</a> <img src=images/bul_05.gif width=10 height=10 > <a href=<%=filename%>?sort=<%=request("sort")%>&searchkey=<%=searchkey%>&page=<%=n%>>尾页</a> <%end if%> 页次:<strong><font color="#ff8d07"><%=CurrentPage%></font>/<font color="#ff8d07"><%=n%></font></strong>页 共<b><font color="#ff8d07"><%=totalnumber%></font></b>棵许愿树 转:<input name="page" type="text" size="3" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">页 <input type="submit" name="Submit" value="确定">
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<%
end function
set rs=nothing
conn.close
set conn=nothing
select case request("sort")
case "1","2","3","4","5"
Response.Write "<table width=""1002"" height=""120"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td><img src=""images/show_tree"&request("sort")&".gif"" width=""1002"" height=""181""></td></tr></table>"
end select
%>
<table width="1002" height="90" border="0" cellpadding="0" cellspacing="0" bgcolor="#ACD33C" align="center">
<tr>
<td align="center" class="fonts1">
<b>发表留言请注意:</b><br>
参与本留言即表明您已经阅读并接受下述条款<br>
尊重网上道德,遵守中华人民共和国的各项有关法律法规<br>
许愿林管理人员有权保留或删除其留言中的任意内容<br>
Copyright © 2007 <a href="http://<%=url%>" target="_blank"><font color="#000000"><%=url%></font></a><font color="#000000">
</font>Inc. All Rights Reserved<br>
网站维护:forjj</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -