📄 jinghua.jsp
字号:
lastpostlength=rs.getInt(14);
if(lastpostlength==0) {
lastpostclue="(无内容)";
posttitle+="(无内容)";
}
else if(lastpostclue.length()>20)
lastpostclue=lastpostclue.substring(0,20)+"…";
if(!postauthor.equals("") && !postauthor.equals("客人") && postauthor.equals(cookiename))
isauthor=true;
else
isauthor=false;
if(postisvote.equals("0")) {
posticon="topicnonew.gif";
postreply=connect.getRowNum("posts where db="+db+" and groupid="+posttopic+" and parentid!=0");
if(postreply>0) {
//是否有新帖
if(!cookiemode.equals("1")) {
posthavenewnumber=connect.getRowNum("posts where groupid="+posttopic+" and postat>'"+activetime+"'");
if(posthavenewnumber!=0)
posticon="topicnew0.gif";
}
//是否升级为热门帖
if(postreply>=hottopicmark) {
connect.executeUpdate("update posts set hotpost='1' where id="+postid);
if(posthavenewnumber>0)
posticon="topichot0.gif";
else
posticon="topichotnonew.gif";
}
if(posttop.equals("1"))
posticon="locktop.gif";
else if(postlock.equals("1"))
posticon="topiclocked0.gif";
rs2=connect.executeQuery2("select max(id) from posts where db="+db+" and groupid="+posttopic+" and parentid!=0");
if(rs2.next()) {
lastpostid=rs2.getInt(1);
}
if(lastpostid!=0) {
rs2=connect.executeQuery2("select authorid,author,date_format(postat,'%Y年%m月%d日 %H:%i') as postat,left(content,44),length(content),titleimage from posts where id="+lastpostid);
if(rs2.next()) {
lastpostauthorid=rs2.getInt(1);
lastpostauthor=rs2.getString(2);
lastpostat=rs2.getString(3);
lastpostclue=rs2.getString(4);
lastpostlength=rs2.getInt(5);
lastposttitleicon=rs2.getString(6);
if(lastpostlength==0)
lastpostclue="(无内容)";
else if(lastpostclue.length()>20)
lastpostclue=lastpostclue.substring(0,20)+"…";
}
}
}
}
else {
rs2=connect.executeQuery2("select sum(votenumber) from vote where postsid="+postid);
if(rs2.next())
votenumber=rs2.getInt(1);
posticon="closedb.gif";
//是否升级到热门投票帖
if(votenumber>=hotpollmark) {
connect.executeUpdate("update posts set hotpost='1' where id="+postid);
posticon="closedbhot.gif";
}
if(posttop.equals("1"))
posticon="locktop.gif";
else if(postlock.equals("1"))
posticon="closedb1.gif";
}
%>
<table cellspacing=0 width=<%=tablewidth%> bordercolor=<%=tablebordercolor%> border=1 align=center>
<tr>
<td align=center width=30 bgcolor=<%=forumcolorone%>>
<img src=images/<%=posticon%> width=14 border=0>
</td>
<td width=* class=dp bgColor=<%=forumcolortwo%> onmouseover="this.bgColor='<%=forumcolorone%>';" onmouseout="this.bgColor='<%=forumcolortwo%>';">
<img src=posticons/<%if(sortposticonshow.equals("1") && !lastposttitleicon.equals("")) out.print(lastposttitleicon);else out.print(posttitleicon);%> width=15 height=15 border=0 align=absmiddle>
<span id=forum><a href=topic.jsp?db=<%=db%>&topic=<%=posttopic%> TITLE="最后回复摘要:
<%=lastpostclue%>"><%=posttitle%></a>
<%
if(newmarktime>0) {
if(postintervalnow<newmarktime)
out.println("<img src=images/"+new_blogo+" absmiddle>");
}
else if(postintervalnow<24)
out.println("<img src=images/"+new_blogo+" absmiddle>");
if(isadmin!=0) {
%>
<DIV ALIGN=Right><font color=<%=titlecolor%>><a href=postings.jsp?action=canceljinghua&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>取消精华</font></a>|<a href=postings.jsp?action=locktop&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>固顶</font></a>|<a href=postings.jsp?action=unlocktop&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>消顶</font></a>|<a href=postings.jsp?action=puttop&db=<%=db%>&topic=<%=posttopic%>&checked=yes><font color=<%=titlecolor%>>提前</font></a>|<a href=postings.jsp?action=lock&db=<%=db%>&topic=<%=posttopic%>&checked=yes><font color=<%=titlecolor%>>锁定</font></a>|<a href=postings.jsp?action=unlock&db=<%=db%>&topic=<%=posttopic%>&checked=yes><font color=<%=titlecolor%>>解锁</font></a>|<a href=postings.jsp?action=delete&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>删除</font></a>|<a href=postings.jsp?action=movetopic&db=<%=db%>&topic=<%=posttopic%>&checked=yes><font color=<%=titlecolor%>>移动</font></a>|</font> </DIV>
<%
}
else if(isauthor && arrowuserdel.equals("1")) {
%>
<DIV ALIGN=Right><font color=<%=titlecolor%>>| <a href=postings.jsp?action=lock&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>锁定此贴</font></a> | <a href=postings.jsp?action=unlock&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>解锁此贴</font></a> | <a href=postings.jsp?action=delete&db=<%=db%>&topic=<%=posttopic%>><font color=<%=titlecolor%>>删除此贴</font></a> |</font> </DIV>
<%
}
%>
</span>
</td>
<td align=center width=78 bgcolor=<%=forumcolorone%> title="发布时间: <%=postat%>">
<a href=javascript:O9('<%=postauthorid%>')><%=postauthor%></a>
</td>
<%
if(postisvote.equals("0")) {
%>
<td bgcolor=<%=forumcolortwo%> align=center width=30><%=postreply%></td>
<td bgcolor=<%=forumcolortwo%> align=center width=30><%=postclick%></td>
<%
}
else {
out.println("<td bgcolor="+forumcolortwo+" align=center width=63 rowspan=2>共"+votenumber+"票</td>");
}
%>
<td width=193 bgcolor=<%=forumcolorone%>>
<%=lastpostat%>
<font color=<%=fonthighlight%>> | </font><%if(lastpostid==0) out.println("--------");else out.println("<a href=javascript:O9('"+lastpostauthorid+"')>"+lastpostauthor+"</a>");%>
</td>
</tr>
</table>
<%
}
//rs2.close();
%>
<table cellpadding=0 cellspacing=2 width=<%=tablewidth%> align=center>
<tr height=4><td></td></tr>
<tr>
<%
if(totalpage!=1) {
%>
<td>
<font color=<%=menufontcolor%>>
共<b><%=totalpage%></b>页
<b><%=alltopicnumber%></b>篇主题 <b><%=allreplynumber%></b>篇回复
当前第<b><%out.print(from+"-"+to);%></b>个
第<b><%=pages%></b>页
</font>
</td>
<td>
<A href=jinghua.jsp?db=<%=db%>&pages=1><IMG alt=首页 border=0 src=images/first.gif width=11 height=10></A>
<A href=jinghua.jsp?db=<%=db%>&pages=<%=(pages<2)?pages:(pages-1)%>><IMG alt=上一页 border=0 src=images/previous.gif width=11 height=10></A>
<A href=jinghua.jsp?db=<%=db%>&pages=<%=(pages>totalpage-1)?totalpage:(pages+1)%>><IMG alt=下一页 border=0 src=images/next.gif width=11 height=10></A>
<A href=jinghua.jsp?db=<%=db%>&pages=<%=totalpage%>><IMG alt=末页 border=0 src=images/last.gif width=11 height=10></A>
</td>
<td>
<SELECT name=pages size=1 onchange="changePages()">
<%
for(int i=1;i<=totalpage;i++) {
if(i==pages) {
out.println("<OPTION value='jinghua.jsp?db="+db+"&pages="+i+"' selected>第"+i+"页</OPTION>");
}
else
out.println("<OPTION value='jinghua.jsp?db="+db+"&pages="+i+"'>第"+i+"页</OPTION>");
}
%>
</SELECT>
</td>
<%
}
%>
<td></td>
</form>
<td align=right>
<form action="db.jsp" method="post" name="jump">
<select name="jumpto" onchange="menu()" class=jumpto>
<option value="index.jsp">跳转论坛至...</option>
<%
rs=connect.executeQuery("select id,forumname from forum order by id");
while(rs.next()) {
out.println("<option value='index.jsp?forum="+rs.getInt(1)+"' style=background-color:"+titlecolor+">╋"+rs.getString(2)+"</option>");
rs2=connect.executeQuery2("select id,dbname from db where forum="+rs.getInt(1)+" order by id");
while(rs2.next()) {
out.println("<option value='db.jsp?db="+rs2.getInt(1)+"'> ├"+rs2.getString(2)+"</option>");
}
}
%>
</select>
</td>
</form>
</tr>
</table>
<br>
<%@ include file="include/foot.jsp"%>
<%
rs.close();
connect.close();
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -