| 发表于:2007-03-16 08:35:23 楼主 |
<table width= "500 " border= "0 " cellpadding= "0 " cellspacing= "0 " class= "lantable "> <tr> <td width= "20 " height= "20 " align= "center " bgcolor= "#ebfaee " class= "xialan "> id </td> <td width= "100 " align= "center " class= "xialan "> 来自 </td> <td width= "200 " align= "center " class= "xialan "> 标题 (点击查看并回复) </td> <td width= "110 " align= "center " class= "xialan "> 发送时间 </td> <td width= "90 " align= "center " class= "xialan "> 操作 </td> </tr> <% set rs=server.createobject( "adodb.recordset ") rs.open "select * from [ns_user] where username= ' "&session( "ns_username ")& " ' ",conn,1,1 user_id=rs( "id ") rs.close set rs=server.createobject( "adodb.recordset ") sql= "select * from [ns_msg] where geter= "&user_id& " order by id desc " rs.open sql,conn,1,1 if rs.recordcount=0 then response.write " <tr> <td colspan=6 align=center class=xialan height=30> 暂无任何短信 </td> </tr> " else page=request.querystring( "page ") rs.pagesize=5 total=rs.recordcount if not isempty(trim(request( "page "))) then page = cint(request( "page ")) if page> rs.pagecount then rs.absolutepage = rs.pagecount elseif page <= 0 then page = 1 else rs.absolutepage = page end if end if page = rs.absolutepage for i=1 to rs.pagesize if rs.eof then exit for end if %> <tr onmouseover= "this.style.backgroundcolor= '#eeeeee ' " onmouseout= "this.style.backgroundcolor= '#ffffff ' " > <td width= "20 " align= "center " bgcolor= "#ebfaee " class= "xialan "> <%=i%> </td> <td width= "100 " align= "left " class= "xialan " height= "25 "> <% set rs1=server.createobject( "adodb.recordset ") rs1.open "select * from [ns_user] where id= "&rs( "sender "),conn,1,1 response.write rs1( "username ") rs1.close %> </td> <td width= "200 " align= "left " class= "xialan "> <a href=ns_sms.asp?action=view&id= <%=rs( "id ")%> > <%=rs( "title ")%> </a> </td> <td width= "110 " align= "center " class= "xialan " > <%=rs( "sendtime ")%> </td> <td width= "90 " align= "center " class= "xialan "> <a href= "ns_sms.asp?action=del&id= <%=rs( "id ")%> "> 删除 </a> </td> </tr> <%rs.movenext next%> <tr> <td height= "10 " colspan= "5 "> <table width= "100% " border= "0 " cellpadding= "0 " cellspacing= "0 "> <tr> <td height= "20 " align= "center "> <%if rs.pagecount <> 1 and rs.pagecount <> 0 then%> <%if page <rs.pagecount then%> <%if page=1 then %> [首页] [上一页] <%else%> [ <a href= "ns_sms.asp?page= <%=1%> "> 首页 </a> ] [ <a href= "ns_sms.asp?page= <% =page-1 %> "> 上一页 </a> ] <% end if %> [ <a href= "ns_sms.asp?page= <%=page+1%> "> 下一页 </a> ] [ <a href= "ns_sms.asp?page= <%=rs.pagecount%> "> 尾页 </a> ] <%else%> [ <a href= "ns_sms.asp?page= <% = 1%> "> 首页 </a> ] [ <a href= "ns_sms.asp?page= <% =page -1 %> "> 上一页 </a> ] [下一页] [尾页] <%end if %> <%else%> [首页] [上一页] [下一页] [尾页] <%end if%> [页次: <font color=red> <b> <%=page%> </b> </font> / <%=rs.pagecount%> ] [共 <%=rs.recordcount%> 条 <font color=red> <b> <%=rs.pagesize%> </b> </font> 条/页] </td> </tr> </table> </td> </tr> </table> |
|
|
|
|