📄 topic.jsp
字号:
<br><font color=<%=postfontcolorone%>>经验: <img src=images/bar5.gif width=<%=authorexperiencelength%> height=8 alt="<%=authorexperience%>"></font>
<br><font color=<%=postfontcolortwo%>>金钱: <%=authormoney%> <%=coinname%></font>
<br><font color=<%=postfontcolorone%>>总发贴数: <b><%=authorpostnumber%></b> 篇</font>
<br><font color=<%=postfontcolortwo%>>注册日期: <%=authorregistertime%></font><BR>
<%
}
else {
%>
<font color=<%=postfontcolortwo%>>威望: 未知</font>
<br><font color=<%=postfontcolorone%>>级别: 未知</font>
<br><font color=<%=postfontcolortwo%>>魅力: 未知</font>
<br><font color=<%=postfontcolorone%>>经验: 未知</font>
<br><font color=<%=postfontcolortwo%>>金钱: 未知</font>
<br><font color=<%=postfontcolorone%>>总发贴数: 未知</font>
<br><font color=<%=postfontcolortwo%>>注册日期: 未知</font><BR>
<%
}
%>
</td>
</tr>
</table>
<td bgcolor=<%=titlecolor%> width=1 rowspan=2>
<table width=1 cellpadding=0 cellspacing=0 bgcolor=<%=titlecolor%>>
<tr>
<td width=1></td>
</tr>
</table>
</td>
<td bgcolor=<%=tempbgcolor%> valign=top width=*>
<table>
<tr>
<td height=5></td>
</tr>
</table>
<a href="javascript:openScript('messanger.jsp?action=msgsend&toname=<%=postauthor%>',420,320)" title="给<%=postauthor%>发送一个短消息"><img src=images/message.gif border=0 width=16 height=16 align=absmiddle>消息</a>
<a href=profile.jsp?action=show&member=<%=postauthor%> title="查看<%=postauthor%>的个人资料"><img src=images/profile.gif border=0 width=16 height=16 align=absmiddle>查看</a>
<a href="search.jsp?action=startsearch&TYPE_OF_SEARCH=username_search&NAME_SEARCH=topictitle_search&FORUMS_TO_SEARCH=1&SEARCH_STRING=<%=postauthor%>" target=_blank title="搜索<%=postauthor%>在本分论坛的全部贴子"><img src=images/find.gif border=0 width=16 height=16 align=absmiddle>搜索</a>
<a href="javascript:openScript('friendlist.jsp?action=adduser&friendname=<%=postauthor%>',420,320)" title="加<%=postauthor%>为我的好友"><img src=images/friend.gif border=0 width=16 height=16 align=absmiddle>好友</a>
<%
if(posttitlelock.equals("0")) {
%>
<a href=post.jsp?action=reply&db=<%=db%>&topic=<%=topic%>><img src=images/replynow.gif border=0 alt=回复贴子 width=16 height=16>回复</a>
<%
}
if(!authoremail.equals("")) {
%>
<a href=mailto:<%=authoremail%> title=电子邮件地址><img src=images/email.gif border=0 width=16 height=16 align=absmiddle>邮件</a>
<%
}
if(!authorhomepage.equals("http://") && !authorhomepage.equals("")) {
%>
<a href=<%=authorhomepage%> target=_blank title="访问 <%=postauthor%> 的主页"><img src=images/homepage.gif border=0 width=16 height=16 align=absmiddle>主页</a>
<%
}
if(!authorqq.equals("")) {
%>
<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=authorqq%> target=_blank title="查看 QQ:<%=authorqq%>的资料"><img src=images/oicq.gif border=0 width=16 height=16 align=absmiddle>QQ</a>
<%
}
if(!authoricq.equals("")) {
%>
<a href="javascript:openScript('misc.jsp?action=icq&UIN=<%=authoricq%>',450,300)" title="给 ICQ:<%=authoricq%> 发个消息"><img src=http://wwp.icq.com/scripts/online.dll?icq=<%=authoricq%>&img=5 border=0 width=16 height=16 align=absmiddle>ICQ</a>
<%
}
if(postvote.equals("0")) {
%>
<a href=post.jsp?action=copy&db=<%=db%>&topic=<%=topic%>&postid=<%=postid%> title=复制这个贴子><img src=images/copy.gif border=0 width=16 height=16 align=absmiddle>复制</a>
<%
}
%>
<BR><hr width=100% size=1 color=<%=tablebordercolor%>>
<table cellpadding=0 cellspacing=0 width=100% style="TABLE-LAYOUT: fixed">
<tr>
<td width=32 valign=top> </td>
<td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word; 130; 0pt">
<font color=<%=postfontcolortwo%>>
<br>
<%
if(postvote.equals("1")) {
%>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td>
<font color=<%=postfontcolortwo%>><%=postcontent%></font>
</td>
</tr>
</table>
<%
if(!cookiemode.equals("1")) {
number=connect.getRowNum("voterecord where postsid="+postid+" and votename='"+cookiename+"'");
if(number==0)
canvote=true;
}
if(posttitlelock.equals("0") && !cookiemode.equals("1") && canvote) {
%>
<table cellpadding=1 cellspacing=0 bgcolor=<%=tablebordercolor%> align=center>
<tr>
<td nowrap>
<table cellpadding=4 cellspacing=0 width=100% bgcolor=<%=postcolortwo%>>
<form action="poll.jsp" method=post>
<tr>
<td nowrap>
<input type=hidden name=action value="poll">
<input type=hidden name=topic value="<%=topic%>">
<input type=hidden name=db value="<%=db%>">
<input type=hidden name=postid value="<%=postid%>">
<%
rs2=connect.executeQuery2("select id,votetitle from vote where postsid="+postid+" order by id");
while(rs2.next()) {
voteid=rs2.getInt(1);
votetitle=rs2.getString(2);
out.println("<input type='radio' name='myChoice' value='"+voteid+"'>"+votetitle+"<br>");
}
%>
</td>
</tr>
<tr>
<td align=center nowrap>
<HR size=1 width=85%>
<input type=submit name=results value='参加投票'>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
}
rs2=connect.executeQuery2("select sum(votenumber) from vote where postsid="+postid);
if(rs2.next())
allvotenumber=rs2.getInt(1);
%>
<table width=510>
<tr>
<td colspan=3><HR size=1 width=100%></td>
</tr>
<tr>
<td colspan=3>
目前共有 <font color=<%=fonthighlight%>><B><%=allvotenumber%></B></font> 人参加投票,结果如下:
<HR size=1 width=100%><BR>
</td>
</tr>
<%
int i=0;
rs2=connect.executeQuery2("select id,votetitle,votenumber from vote where postsid="+postid+" order by id");
while(rs2.next()) {
voteid2=rs2.getInt(1);
votetitle=rs2.getString(2);
votenumber=rs2.getInt(3);
if(allvotenumber!=0)
votelength=(votenumber*260)/allvotenumber;
i++;
if(i==11)
i=1;
%>
<tr>
<td nowarp><%=votetitle%> </td>
<td nowarp> <img src=images/bar<%=i%>.gif width=<%=votelength%> height=10> <b><%=votenumber%></b> 票数 <%=(votelength*10)/26%>% </td>
<td nowarp>
<%
if(isauthor || isadmin!=0) {
if(votenumber==0) {
out.print("[没有人投票]");
}
else {
%>
<select>
<option selected>投票人名单</option>
<option>----------</option>
<%
rs3=connect.executeQuery("select votename from voterecord where voteid="+voteid2+" order by id");
while(rs3.next()) {
votename=rs3.getString(1);
out.println("<option value="+votename+">"+votename+"</option>");
}
%>
</select>
<%
}
}
%>
</td>
</tr>
<%
}
%>
<tr>
<td colspan=3><HR size=1 width=100%></td>
</tr>
<tr>
<td colspan=3>
<font color=<%=fonthighlight%>>
<%
if(posttitlelock.equals("1"))
out.println("对不起,此投票已经关闭!");
else if(cookiemode.equals("1"))
out.println("客人不能投票,请注册登录!");
else if(!canvote)
out.println("谢谢,您已经投过票了!");
%>
</font>
</td>
</tr>
</table>
<%
}
else {
%>
<table cellpadding=0 cellspacing=0 width=100% style="TABLE-LAYOUT: fixed">
<tr>
<td width=32 valign=top>
<%
if(!posttitleimage.equals(""))
out.println("<img src=posticons/"+posttitleimage+" width=15 height=15>");
%>
</td>
<td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word; 130; 0pt">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td>
<font color=<%=postfontcolortwo%>><%=postcontent%></font>
</td>
</tr>
</table>
<%
if(!authorsignature.equals("")) {
%>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td>
<br><br>-----------------------------------------------------------------<br>
<%=authorsignature%>
</td>
</tr>
</table>
<%
}
%>
<BR>
</td>
<td width=16></td>
</tr>
</table>
<%
}
%>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class=bottomline bgcolor=<%=tempbgcolor%> valign=bottom>
<BR><hr width=100% size=1 color=<%=tablebordercolor%>>
<table width=100% cellpadding=0 cellspacing=0 bgcolor=>
<tr>
<td valign=bottom>
<font color=<%=postfontcolortwo%>>
<%
if(postvote.equals("0") && isauthor) {
%>
<a href=post.jsp?action=edit&db=<%=db%>&topic=<%=topic%>&postid=<%=postid%> title=编辑这个贴子><img src=images/edit.gif border=0 width=16 height=15 align=absmiddle>编辑</a>
<%
}
if((isadmin!=0 || (isauthor && arrowuserdel.equals("1"))) && postparentid!=0) {
%>
<a href=postings.jsp?action=directdel&db=<%=db%>&topic=<%=topic%>&postid=<%=postid%> title=删除这个回复><img src=images/del.gif border=0 width=16 height=16>删除</a>
<%
}
%>
<img src=images/posttime.gif width=16 height=15 alt=发贴时间 align=absmiddle><%=postat%>
<img src=images/ip.gif width=13 height=15 alt="" align=absmiddle>IP: 已设置保密
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
}
%>
<br>
<table cellspacing=0 cellpadding=0 width=95% align=center>
<tr>
<td>
<a href=#top><img src=images/gotop.gif height=15 width=15 border=0 align=absmiddle>顶端</a>
</td>
<td nowrap align=right>
<%
if(isadmin!=0) {
%>
<font color=<%=menufontcolor%>><b>主题管理</b>:
<%if(postvote.equals("0")) {%>|<a href=postings.jsp?action=jinghua&db=<%=db%>&topic=<%=topic%>>精华</a><%}%>|<a href=postings.jsp?action=locktop&db=<%=db%>&topic=<%=topic%>>固顶</a>|<a href=postings.jsp?action=unlocktop&db=<%=db%>&topic=<%=topic%>>消顶</a>|<a href=postings.jsp?action=puttop&db=<%=db%>&topic=<%=topic%>&checked=yes>提前</a>|<a href=postings.jsp?action=lock&db=<%=db%>&topic=<%=topic%>&checked=yes>锁定</a>|<a href=postings.jsp?action=unlock&db=<%=db%>&topic=<%=topic%>&checked=yes>解锁</a>|<a href=postings.jsp?action=delete&db=<%=db%>&topic=<%=topic%>>删除</a><%if(postvote.equals("0")) {%>|<a href=postings.jsp?action=movetopic&db=<%=db%>&topic=<%=topic%>&checked=yes>移动</a><%}%>|
</font>
<%
}
%>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=2 width=<%=tablewidth%> align=center>
<tr height=4><td></td></tr>
<tr>
<td>
<font color=<%=menufontcolor%>>
共<b><%=totalpage%></b>页
<b>1</b>篇主题 <b><%=(count-1)%></b>篇回复
当前第<b><%out.print(from+"-"+to);%></b>个
第<b><%=pages%></b>页
</font>
</td>
<form name=changepages>
<%
if(totalpage>1) {
%>
<td>
<A href=topic.jsp?db=<%=db%>&topic=<%=topic%>&pages=1><IMG alt=首页 border=0 src=images/first.gif width=11 height=10></A>
<A href=topic.jsp?db=<%=db%>&topic=<%=topic%>&pages=<%=(pages<2)?pages:(pages-1)%>><IMG alt=上一页 border=0 src=images/previous.gif width=11 height=10></A>
<A href=topic.jsp?db=<%=db%>&topic=<%=topic%>&pages=<%=(pages>totalpage-1)?totalpage:(pages+1)%>><IMG alt=下一页 border=0 src=images/next.gif width=11 height=10></A>
<A href=topic.jsp?db=<%=db%>&topic=<%=topic%>&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='topic.jsp?db="+db+"&topic="+topic+"&pages="+i+"' selected>第"+i+"页</OPTION>");
}
else
out.println("<OPTION value='topic.jsp?db="+db+"&topic="+topic+"&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>
<%
if(dispquickreply.equals("1")) {
%>
<%@ include file="include/quickreply.jsp"%>
<%
}
%>
<br><br>
<%@ include file="include/foot.jsp"%>
<%
rs.close();
connect.close();
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -