📄 g_my.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/ubbcode.asp" -->
<%
'=========================================================
' File: g_my.asp
' Date: 2006-04-06
' Script Written by Leibo
'=========================================================
' Copyright (C) 2002,2008 Mathren.com. All rights reserved.
' Web: http://www.hrbyydz.com
' Email: qa_90@hotmail.com
'=========================================================
if not founduser then
errmsg=errmsg+"<br>"+"<li>您没有<a href=login.asp target=_blank>登录</a>。"
founderr=true
end if
stats="我的留言"
dim postid,titleimg,title,content,addtime,istop
dim currentPage,totalrec,Pcount,page_count,endpage
dim abgcolor,orders
if founderr then
call head()
call head_var("","")
call txl_error()
else
call head()
call head_var("班级留言","g_index.asp")
if founderr then
call txl_error()
else
call main()
if founderr then call txl_error()
end if
end if
call foot()
sub main()
abgcolor="tablebody2"
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">
<tr>
<td width=20% bgcolor=<%=txl_body(10)%> align="center" valign="top">
<br>
<a href=g_post.asp><img src="<%=txl_info(6)&txl_skinpic(3)%>" height="25" border=0></a> <br><br>
<a href=g_my.asp><img src="<%=txl_info(6)&txl_skinpic(4)%>" height="25" border=0></a> <br><br>
<a href=g_down.asp><img src="<%=txl_info(6)&txl_skinpic(5)%>" height="25" border=0></a>
</td>
<td width=80% bgcolor=<%=txl_body(10)%> valign="top">
<br>
<%
'======================show========================
currentPage=request("page")
if currentpage="" or not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
set rs=server.createobject("adodb.recordset")
sql="select g.postid,g.postuser,g.postuserid,g.titleimg,g.title,g.content,g.addtime,g.istop,"
sql=sql &" u.userid,u.oicq,u.email,u.userface,u.realname"
sql=sql &" from gbook g inner join [user] U on U.UserID=g.postUserID and u.realname=g.postuser where g.postuserid="&userid&" order by g.istop desc,g.postid desc"
rs.open sql,conn,1
if rs.eof and rs.bof then
response.write "<br><p align=center> <font color="&txl_body(20)&">您还没有任何留言。</font></p><br>"
else
totalrec=rs.recordcount
if totalrec mod txl_Set(11)=0 then
Pcount= totalrec \ txl_Set(11)
else
Pcount= totalrec \ txl_Set(11)+1
end if
RS.MoveFirst
if currentpage > Pcount then currentpage = Pcount
if currentpage<1 then currentpage=1
RS.Move (currentpage-1) * txl_Set(11)
page_count=0
do while not rs.eof and page_count < Clng(txl_Set(11))
%>
<table width="95%" cellpadding="3" cellspacing="0" style="border: 1px <%=txl_body(9)%> dashed;">
<tr>
<td height="25" colspan=2 class=tablebody2>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr><td height=25 width="50%">
<%
if rs("istop")=1 then
response.write "<img border=0 src="""&txl_info(7)&"folder_top.gif"" align=absmiddle alt=固顶>"
else
response.write "<img align=absmiddle src="""&txl_info(7)&"plus.gif"">"
end if
%> <img src="<%=txl_info(8)&rs("titleimg")%>"> <%=rs("title")%>
</td>
<td height=25 align=right width="50%">
<img src=<%=txl_info(7)%>gotop.gif border=0></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width=100 height="100" class=tablebody1>
<table align=left cellpadding=0 width=100% style='word-break:break-all;'>
<tr>
<td align=center style="line-height:200%"><a href=userinfo.asp?id=<%=rs(2)%> target=_blank><img src='<%=rs(11)%> ' border=0><br><font color=#ce0000><b><%=rs(1)%></font></a> </td>
<td width=1 bgcolor=<%=txl_body(9)%>></td>
</tr>
</table></td>
<td width=* class=tablebody1>
<table width="100%" cellpaddin=0 cellspacing=0 border=0>
<tr><td height=80 colspan=2><blockquote><%=ubbcode(rs(5))%></td>
</tr>
<tr>
<td width=150><% response.write "<a href=g_edit.asp?id="&rs(0)&"><img src="&txl_info(7)&"edit.gif border=0></a> <a href=g_admin.asp?action=del&id="&rs(0)&" onclick=""{if(confirm('确定执行选择的操作吗?')){return true;}return false;}""><img src="&txl_info(7)&"del.gif border=0></a>"
%></td>
<td align=right>发表时间: <%=rs(6)%> </td>
</tr>
</table></td></tr></table><br>
<%
page_count=page_count+1
rs.movenext
loop
end if
'========================end===================
%>
<table border=0 cellpadding=0 cellspacing=0 width="95%">
<tr><td valign=middle nowrap>
页次:<b><%=currentpage%></b>/<b><%=Pcount%></b>页
每页<b><%=txl_Set(11)%></b>条 总<b><%=totalrec%></b>条留言</td>
<td valign=middle nowrap><div align=right><p>分页:
<%
if currentpage > 4 then
response.write "<a href=""?page=1&orders="&orders&""">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=#ce0000>["&i&"]</font>"
else
response.write " <a href=""?page="&i&"&orders="&orders&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href=""?page="&Pcount&"&orders="&orders&""">["&Pcount&"]</a>"
end if
%>
</p></div></td></tr></table>
<%
rs.close
set rs=nothing
%>
<br>
</td>
</tr>
</table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -