g_index.asp
资源名称:txl.zip [点击查看]
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:6k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <!--#include file="conn.asp"-->
- <!-- #include file="inc/const.asp" -->
- <!-- #include file="inc/ubbcode.asp" -->
- <%
- stats="查看留言"
- dim postid,titleimg,title,content,addtime,istop
- dim currentPage,totalrec,Pcount,page_count,endpage
- dim abgcolor
- if Cint(GroupSetting(5))=1 then
- Errmsg=Errmsg+"<br>"+"<li>您没有浏览班级留言的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
- founderr=true
- end if
- if founderr then
- call head()
- call head_var("错误信息",Request.ServerVariables("HTTP_REFERER"))
- 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"
- '---------------star------
- response.write "<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;"">"
- response.write "<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.rootid=0 order by g.istop desc,g.postid desc"
- rs.open sql,conn,1
- if rs.eof and rs.bof then
- response.write "<table width=""100%""><tr><td height=100 align=center class=tablebody1> 还没有同学留言,你来留言先。</font></td></tr></table>"
- 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))
- 'end
- response.write "<table width=""95%"" cellpadding=0 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
- response.write "<img src="&txl_info(8)&rs("titleimg")&"> "&rs("title")&"</td>"&_
- "<td height=25 align=right width=""50%""><a href=g_reply.asp><img src="&txl_info(7)&"reply.gif border=0></a> <a href=""#top""><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)&"><img src="&rs(11)&" border=0><br><font color="&txl_body(20)&"><b>"&rs(1)&"</b></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))&" </blockquote></td>"&_
- "</tr><tr><td width=150>"
- %>
- <%
- dim canadmin
- canadmin=false
- if membername=rs(1) then
- canadmin=true
- elseif master=true then
- canadmin=true
- elseif supermaster=true then
- canadmin=true
- end if
- if canadmin=true then
- 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>"
- end if
- if master or supermaster then
- if rs("istop")=0 then
- response.write "<a href=g_admin.asp?action=istop&id="&rs(0)&"><img src="&txl_info(7)&"istop.gif border=0></a>"
- else
- response.write "<a href=g_admin.asp?action=notop&id="&rs(0)&"><img src="&txl_info(7)&"notop.gif border=0></a>"
- end if
- end if
- response.write "</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"">[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="&txl_body(20)&">["&i&"]</font>"
- else
- response.write " <a href=""?page="&i&""">["&i&"]</a>"
- end if
- end if
- next
- if currentpage+3 < Pcount then
- response.write "... <a href=""?page="&Pcount&""">["&Pcount&"]</a>"
- end if
- %>
- </p></div></td></tr></table>
- <%
- rs.close
- set rs=nothing
- response.write "<br></td></tr></table>"
- end sub
- %>
English
