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

📄 db.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="",lastposttitleicon="",postisvote="0",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");
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+" and db!="+db);
//查看论坛是否有新帖
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/openfold.gif" border=0> <%=vicedbname%>
     </font>
  </td>
 </tr>
</table>
<br>
<%@ include file="include/announcement.jsp"%>
<%
if(onlineview.equals("1")) {
%>
<%@ include file="include/boardstatus.jsp"%>
<%
}
%>
<br>
<%@ include file="include/dbadmin.jsp"%>
<%
if(cookiemode.equals("4"))
 isadmin=1;
else
 isadmin=connect.getRowNum("admin where db="+db+" and authorid="+cookieid);
%>
<table cellpadding=0 cellspacing=0 width=<%=tablewidth%> align=center>
 <tr>
  <td>&nbsp;
<%
rs=connect.executeQuery("select id,title,author from xzb where db="+db+" and (UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(postat))<24*60*60 order by postat desc limit 1");
if(rs.next()) {
  xzbid=rs.getInt(1);
  xzbtitle=rs.getString(2);
  xzbauthor=rs.getString(3);
%>
   小字报: <img src=images/icon.gif width=14 height=12> <a href="javascript:openScript('xzb.jsp?action=view&db=<%=db%>&id=<%=xzbid%>',420,320)" title="<%=xzbtitle%>"><%=xzbtitle%></a> -- <a href="profile.jsp?action=show&member=<%=xzbauthor%>" target=_blank><%=xzbauthor%></a>
<%
}
%>
  </td>
  <td align=right width=*>
   <img src=images/icon.gif width=14 height=12>
    <a href=jinghua.jsp?action=list&db=<%=db%>><font color=<%=fonthighlight%>>本版精华</font></a>
   <img src=images/icon.gif width=14 height=12>
    <a href=lookstyles.jsp?db=<%=db%>>本版配色</a>&nbsp;
  </td>
  <td align=center width=4></td>
 </tr>
</table>
<table cellpadding=0 cellspacing=0 width=<%=tablewidth%> height=24 bordercolor=<%=tablebordercolor%> border=1 align=center>
 <form name=changepages>
 <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>

⌨️ 快捷键说明

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