www.gusucode.com > 盐城分类信息网asp源码程序 > admin/admindiary.asp
<% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %><!--#include file=cookies.asp--> <% '下面这一行设置默认每页显示条数 thesize=10 '默认为10 pagesize=Request("pagesize") if request("page")="" then curpage = 1 else curpage = cint(request("page")) end if %> <html> <head> <meta http-equiv="Copyright" content="Ajiang http://www.138587.cn"> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title><%=request.cookies("cnmai")("username")%>的日记</title> <STYLE type=text/css>A { TEXT-DECORATION: none } TD { COLOR: #333333; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; LINE-HEIGHT: 150% } INPUT { BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; COLOR: #666666; FONT-SIZE: 10pt; HEIGHT: 20px } BUTTON { FONT-SIZE: 9pt; HEIGHT: 20px } SELECT { FONT-SIZE: 9pt; HEIGHT: 20px } .border { BACKGROUND: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid } .border2 { BACKGROUND: #ffffff; BORDER-BOTTOM: #ffffff 1px solid } .menu { BACKGROUND-COLOR: #ededed; BORDER-BOTTOM: 1px; BORDER-LEFT: 1px; BORDER-RIGHT: 1px; BORDER-TOP: 1px; WIDTH: 100% } TD.MenuBody { BACKGROUND-COLOR: #f3f3f3 } .css1 { font-size: 12pt; } .css2 { font-size: 12pt; color: #000000; text-decoration: none; font-weight: bolder; } .css3 { font-size: 9pt; color: #000000; } .css4 { font-size: 12px; font-weight: bold; color: #000000; text-decoration: none; } </STYLE> </head> <body topmargin="0" leftmargin="0"> <% if pagesize="0" or pagesize="" then pagesize=thesize set conn=server.createobject("adodb.connection") DBPath = Server.MapPath("../alldata/mdb.asp") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath Set rs = Server.CreateObject("ADODB.Recordset") dim rs, sql set rs = server.createobject("adodb.recordset") dim curpage, strcate if keyword <> "" then keyword = replace(keyword,"'","") '过滤关键字 keyword = replace(keyword,"[","") keyword = trim(keyword) wherestr=" where name like '%" & trim(keyword) & "%' or content like '%" & trim(keyword) & "%' or title like '%" & trim(keyword) & "%'" end if sql = "SELECT * FROM guestbook " & wherestr & " ORDER BY id DESC" rs.open sql,conn,1,1 if rs.bof and rs.eof then rs.close response.write "<br><center>还没添加日记呢,赶快加入吧!<a href='javascript:history.back()'>返回上一页</a> </center>" else dim i,Allrecord rs.pagesize = pagesize Allrecord=rs.Recordcount if rs.pagecount < curpage then rs.absolutepage=rs.pagecount curpage=rs.pagecount else rs.absolutepage = curpage end if for i = 1 to rs.pagesize %> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="72%" id="AutoNumber3" align="center"> <tr> <td valign="top"> </td> <td> <br> <div align="center"> <center> <table style="word-break:break-all" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="100%" id="AutoNumber4"> <tr> <td height="20" bgcolor="#eefee0" width="75%"> <img src="../gb-index2.gif" align="absmiddle"<%if Session.Contents("thegbmaster")="yes" then%> title="IP:<%=rs("ip")%>"<%end if%>"> <a href=../per.asp?username=<%=rs("name")%> target=_blank><%=rs("name")%></a> <font color="#3F8805"> 的日记</font></td> <td height="20" bgcolor="#eefee0" width="25%"> <p align="right" style="margin-right: 10"> <%if Session.Contents("thegbmaster")="yes" then%> <a title="删除" href="del.asp?id=<%=rs("id")%>&page=<%=page%>&pagesize=<%=pagesize%>&keyword=<%=keyword%>">管理员删除</a> <a title="修改" href="reply.asp?id=<%=rs("id")%>&page=<%=page%>&pagesize=<%=pagesize%>&keyword=<%=keyword%>">管理员修改</a> <% end if %> </td> </tr> <tr> <td colspan="2" height="2" style="WORD-WRAP: break-word"> <center><FONT color=#3300cc><STRONG>主题:<%=rs("title")%></STRONG></FONT> <table border="0" width="100%" cellspacing="0" id="table1" style="border:1px dotted #CC9900; "> <tr> <td height="0"></td> </tr> </table> <p style="line-height: 140%; margin-left: 15; margin-right: 10; margin-top: 10; margin-bottom: 5" align=left> <% Response.Write cstr(rs("content")) if rs("reply")<> "" then %> <p style="line-height: 140%; margin-left: 15; margin-right: 10; margin-top: 10; margin-bottom: 5" align=left><font color=Orange></font><br><font class="fonts"><%=rs("reply")%></font> <%end if%> <p style="line-height: 140%; margin-left: 15; margin-right: 10; margin-top: 10; margin-bottom: 5" align=right> <%=formatdatetime(rs("addtime"),2) & " " & formatdatetime(rs("addtime"),4)%> </p> </td> </tr> </table> </center> </div> </td> </tr> </table> <% rs.movenext if rs.eof then i = i + 1 exit for end if next %> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="72%" id="AutoNumber5" align="center"> <tr> <td valign="top"> </td> <td> <br> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="100%" id="AutoNumber6"> <tr> <td width="99%" align="center" bgcolor="#eefee0"> 共有 <font color="#CC5200"><%=Allrecord%></font> 条日记 <%for i=1 to rs.pagecount if curpage <> i then%> <a class=a1 href="?page=<%=i%>&pagesize=<%=pagesize%>&keyword=<%=keyword%>">第<%=i%>页</a> <%else%> <font style="color:#000000">第<%=i%>页</font> <%end if next if Session.Contents("thegbmaster")="yes" then%> <%end if%> 每页10条</td> </tr> </table> </center> </div> </td> </tr> </table> <% rs.close end if set rs=nothing conn.Close set conn=nothing %> </body> </html> <% function changechr(str) changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ") end function %> <% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %>