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

📄 jinghua.jsp

📁 jsp bbs源代码
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%
/*##################################################################**
**#  LyBBS ver 1.2.b2 (1.2.beta-2版) / 凌云论坛 ver 1.2.b2         #**
**#                                                                #**
**#  版权所有: 凌云工作室 (原流星电脑工作室)                       #**
**#                                                                #**
**#  制作人  : 星语凌 『teddy (Yongshan Ye)』                      #**
**#                                                                #**
**#  主页地址: http://www.unix-now.com/lybbs   凌云论坛主页        #**
**#            http://www.ierp.info/lybbs      凌云论坛镜像站      #**
**#            http://horseye@sina.com/        凌云论坛支持信箱    #**
**#                                                                #**
**##################################################################*/
%>
<%@ include file="include/config.jsp"%>
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="include/connect.jsp"%>
<%
String tempSTR="",action="";
//boardprepare变量定义
int db=0,styleid=0,number=0,id=0,membergone=0,authornumber=0,postsnumber=0,replynumber=0,announcementid=0;
int now_year=0,now_month=0,now_day=0,now_hour=0,now_minute=0,now_second=0;
String now_date="",now_time="";
String dispview="",boardtitle="",boardname="",title="",version="",copyright="",support="",programmer="",programemail="",homename="",homeurl="",togb="1",status="",maintainreason="",announcement="1",boardurl="",showfastlogin="",dispborn="",styleQuery="";
String cookiename="",cookieid="",cookiemode="";
//announcement变量定义
String announcementtitle="",announcementpostat="";
//论坛状态变量定义
int maxonlinenumber=0,registernumber=0,visitnumber=0,visittimes=0,clicktimes=0,dbusernumber=0;
String recordat="",onlineview="0";
//在线用户变量定义
int onlineid=0,onlinedb=0,onlineusermode=0;
String onlineusername="",onlineuserlocation="",logintime="",lastactivetime="";
ResultSet rs2;
//本页变量定义
int postid=0,posttopic=0,postauthorid=0,lastpostid=0,lastpostauthorid=0,postreply=0,postclick=0,authorfreshtime=0,lastpostlength=0,xzbid=0;
String dbicon="",posticon="",posttitleicon="",posttitle="",lastpostclue="",postauthor="",lastpostauthor="",postat="",lastpostat="",postisvote="0",lastposttitleicon="",xzbtitle="",xzbauthor="";
String posttop="0",postlock="0",sortposticonshow="";
int alltopicnumber=0,allreplynumber=0,posthavenewnumber=0,votenumber=0,postintervalnow=0;
int isadmin=0;
boolean isauthor=false;
%>
<%
tempSTR=request.getParameter("db");
if(tempSTR!=null && !tempSTR.equals(""))
  db=Integer.parseInt(tempSTR);
if(db==0)
  response.sendRedirect("errorPage.jsp");
%>
<%@ include file="include/boardprepare.jsp"%>
<%@ include file="include/style.jsp"%>
<%@ include file="include/dbstyle.jsp"%>
<%@ include file="include/icon.jsp"%>
<%
//取管理员的设置变量
rs=connect.executeQuery("select sortposticonshow from style where adminselected='1'");
if(rs.next()) {
  sortposticonshow=rs.getString(1);
}
//分页变量定义
int e=20;                  //'每页显示的记录数
int totalpage=0;           //'页面总数
int pages=1;               //'显示的当前页面
int count=0;               //'库中数据的总记录数
int from=0,to=0;           //'从from篇到to篇
int p=0;                   //'数据库查询从p开始
if(maxthreads!=0)
  e=maxthreads;
//取页数
tempSTR=request.getParameter("pages");
if(tempSTR!=null && !tempSTR.equals(""))
  pages=Integer.parseInt(tempSTR);
//分页预备
count=connect.getRowNum("posts where db="+db+" and parentid=0 and jinghua='1'");
totalpage=((count%e==0)?(count/e):(count/e+1));
if(totalpage==0) totalpage=1;
if(pages>totalpage) pages=totalpage;
else if(pages<1) pages=1;
if(count!=0)
   from=(pages-1)*e+1;
if(totalpage==pages)
   to=count;
else if(count!=0)
   to=from+e-1;
p= (pages-1)*e;
//论坛是否自动刷新
if(refreshforum.equals("1") && !cookiemode.equals("1")) {
  rs=connect.executeQuery("select freshtime from author where id="+cookieid);
  if(rs.next()) {
     authorfreshtime=rs.getInt(1);
  }
  if(authorfreshtime!=0)
    autofreshtime=authorfreshtime;
  out.println("<meta http-equiv='refresh' content='"+autofreshtime+"; url="+HttpUtils.getRequestURL(request)+"?"+request.getQueryString()+"'>");
}
//更新用户目前的位置
connect.executeUpdate("update author set db="+db+" where id="+cookieid);
//查看论坛是否有新帖
String activetime="0000-00-00";
if(!cookiemode.equals("1")) {
  rs=connect.executeQuery("select activetime from author where id="+cookieid);
  if(rs.next())
    activetime=rs.getString(1);
}
%>
<!--//html from here-->
<%@ include file="include/head.jsp"%>
<script language="JavaScript">
function menu(){
  var URL = document.jump.jumpto.options[document.jump.jumpto.selectedIndex].value;
  location.href = URL; target = '_self';
}
function changePages(){
  var URL = document.changepages.pages.options[document.changepages.pages.selectedIndex].value;
  location.href = URL; target = '_self';
}
function O9(id) {window.open("profile.jsp?action=show&memberid="+id);}
</script>
<body <%=lbbody%>>
<%@ include file="include/userheader.jsp"%>
<style>
TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }
.ha {color: #990000; font: bold;}
.hb {color: #000000; font: bold;}
.dp {padding: 4px 0px;}
</style>
<br>
<%
String vicedbname="";
rs=connect.executeQuery("select dbname from db where id="+db);
if(rs.next())
  vicedbname=rs.getString(1);
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> align=center>
 <tr>
  <td width=30% rowspan=2 valign=top>
   <%@ include file="include/viceadbanner.jsp"%>
  </td>
  <td valign=top align=left>
     <font face="宋体" color=<%=fontcolormisc%>>
     <img src="images/closedfold.gif" border=0> <a href="index.jsp"><%=boardname%></a><br>
     <img src="images/bar.gif" border=0><img src="images/closedfold.gif" border=0> <a href="db.jsp?db=<%=db%>"><%=vicedbname%></a><br>
     &nbsp;&nbsp;&nbsp;<img src="images/bar.gif" border=0><img src="images/openfold.gif" border=0> 本版精华帖子
     </font>
  </td>
 </tr>
</table>
<br>
<%
if(cookiemode.equals("4"))
 isadmin=1;
else
 isadmin=connect.getRowNum("admin where db="+db+" and authorid="+cookieid);
%>
<table cellpadding=0 cellspacing=0 width=<%=tablewidth%> height=24 bordercolor=<%=tablebordercolor%> border=1 align=center>
 <form action="postings.jsp" method=post name=changepages>
 <input type=hidden name="db" value="<%=db%>">
 <input type=hidden name="action" value="delete">
 <tr>
  <td bgcolor=<%=titlecolor%> width=32 align=center background=images/4.gif><font color=<%=titlefontcolor%>><b>状态</b></td>
  <td bgcolor=<%=titlecolor%> width=* align=center background=images/4.gif><font color=<%=titlefontcolor%>><b>主 题</b> (点心情符为新闻方式阅读)</td>
  <td bgcolor=<%=titlecolor%> align=center width=80 background=images/4.gif><font color=<%=titlefontcolor%>><b>作 者</b></td>
  <td bgcolor=<%=titlecolor%> align=center width=32 background=images/4.gif><font color=<%=titlefontcolor%>><b>回复</b></td>
  <td bgcolor=<%=titlecolor%> align=center width=32 background=images/4.gif><font color=<%=titlefontcolor%>><b>点击</b></td>
  <td bgcolor=<%=titlecolor%> width=195 align=center background=images/4.gif><font color=<%=titlefontcolor%>><b>  最后更新   | 最后回复人</b></td>
 </tr>
</table>
<%
alltopicnumber=count;
allreplynumber=connect.getRowNum("posts where db="+db+" and parentid!=0 and jinghua='1'");
rs=connect.executeQuery("select id,groupid,authorid,author,title,clicktimes,date_format(postat,'%Y年%m月%d日 %H:%i') as postat,vote,left(content,44),titleimage,top,titlelock,(UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(postat)) as postintervalnow,length(content) from posts where db="+db+" and parentid=0 and jinghua='1' order by top desc,groupid desc,id desc limit "+p+","+e);
while(rs.next()) {
  postid=rs.getInt(1);
  posttopic=rs.getInt(2);
  postauthorid=rs.getInt(3);
  postauthor=rs.getString(4);
  posttitle=rs.getString(5);
  postclick=rs.getInt(6);
  postat=rs.getString(7);
  lastpostat=postat;
  postisvote=rs.getString(8);
  lastpostclue=rs.getString(9);
  posttitleicon=rs.getString(10);
  if(posttitleicon.equals(""))
    posttitleicon="mood31.gif";
  posttop=rs.getString(11);
  postlock=rs.getString(12);
  postintervalnow=rs.getInt(13)/3600;

⌨️ 快捷键说明

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