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

📄 bookmark.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
字号:
<!--#include file="../const.asp"-->
<% if session("user")="" then
response.redirect "../err.asp"
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<script language="javaScript" type="text/javascript" SRC="../style.js"></SCRIPT>
<script>
function callpage(htmlurl) {
theURL=htmlurl
wname ="CHROMELESSWIN"
W=300;
H=200;
windowCERRARa 		= "../image/crate.gif"
windowCERRARd 		= "../image/close_d.gif"
windowCERRARo 		= "../image/close_o.gif"
windowNONEgrf 		= ""
windowCLOCK		= "../image/clock.gif"
windowREALtit		= "修改书签"
windowTIT 	    	= "<table width=80% bgcolor=#cccccc><tr><td><b><font style=\"font-size:9pt;color:#000000\"><nobr>&nbsp;&nbsp;&nbsp;书签操作&nbsp;&nbsp;&nbsp;http://www.jxclass.tk</nobr></font></b></td><td width=99% ></td></tr></table>"
windowBORDERCOLOR   	= "#cccccc"
windowBORDERCOLORsel	= "#cccccc"
windowTITBGCOLOR    	= "#cccccc"
windowTITBGCOLORsel 	= "#cccccc"
openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
<table width=100% class=xzy bgcolor=#ffffff>
<tr><td width=180  height=600 background="../image/tablebg.jpg"></td>
<td valign=top align=center>
<% if request("typeid")="" then%>
<table width=100%><tr><td>对不起,请选择书签分类</td></tr></table>
<% else
dim typers,typename,typesql
set typers=Server.CreateObject("ADODB.Recordset")
typesql="select type from bookmark where ID="&request("typeid")
typers.open typesql,conn,1,1
if typers.eof and typers.bof then%>
<table width=100%><tr><td>对不起,不存在所请求的分类</td></tr></table>
<%else%>
<table width=100%><tr><td width=100%><br><img src="../image/narrow.gif">当前位置>>>><a href="../main.asp"><font color=<%=title2color%>>班级主页</font></a>>>><a href="../person.asp"><font color=<%=title2color%>>个人菜单</font></a>>><a href="index.asp"><font color=<%=title2color%>>个人书签</font></a>><%=typers("type")%>
<% typers.close
set typers=nothing%>
<% end if%>
<hr height=1 noshade size=1 color=#000000>
</td>
<td>
</td></tr></table>
<%
dim rs,sql,totalcount,maxpage,page,pagecount,typeid
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from link where user='"&session("user")&"' and typeid="&trim(request("typeid"))&" order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>对不起,在该分类没有找到任何书签</p>"
else
totalcount=rs.recordcount
maxpage=15
page=request("page")
typeid=request("typeid")
if page="" or page<1 then
page=1
end if
if (totalcount mod maxpage)=0 then
pagecount=totalcount\maxpage
else
pagecount=totalcount\maxpage+1
end if
if Page=1 then
showContent
showpage totalcount,maxpage,"bookmark.asp"
elseif (page-1)*maxpage<totalcount then
rs.move  (page-1)*maxpage
showContent
showpage totalcount,maxpage,"bookmark.asp"
else
page=1
showContent
showpage totalcount,maxpage,"bookmark.asp"
end if
rs.close
	
set rs=nothing
sub showContent
dim i
i=0
%>
<table border="1" cellspacing="0" width="95%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
<%do while not rs.eof%>
<tr bgcolor="#ced8ca">
<td align=left width=40%><img src="../image/jiao.gif">
<a href="openurl.asp?linkid=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td><td>点击<%=rs("hits")%>次</td><td align=right>
&nbsp&nbsp<a href="#" onclick="return callpage('');">修改</a>&nbsp&nbsp<a href="#" onclick="return callpage('delurl.asp?linkid=<%=rs("id")%>&typeid=<%=request("typeid")%>');">删除</a>&nbsp&nbsp移动
</td>
</tr>
<tr>
<td colspan="3" width="100%">
网站说明:<%=rs("addinfo")%>
</td>
</tr>
<% i=i+1
if i>=maxpage then exit do
rs.movenext
loop
%>
</table>
<% end sub%>
<%
function showpage(totalcount,maxpage,filename)
dim n
if totalcount mod maxpage=0 then
n= totalcount \ maxpage
else
n= totalcount \ maxpage+1
end if
response.write "<form method=Post action="&filename&"?typeid="&typeid&">"
response.write "<p align='center'><font color='red'></font>&nbsp;"
if Page<2 then
response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
else
response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&Page-1&"&typeid="&typeid&">上一页</a>&nbsp;"
end if
if n-page<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(Page+1)&"&typeid="&typeid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
end if
response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&Page&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'>&nbsp;共<b>"&totalcount&"</b>个书签 <b>"&maxpage&"</b>个书签/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=2 value="&page&">"

response.write "<input type='image'  src='../image/search.gif'></form>"
end function
%>
<% end if%>
<% end if %>

</td>
</tr></table>
<!--#include file="../end.asp"-->

⌨️ 快捷键说明

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