📄 index.jsp
字号:
<!--start------------------------------------------------------------------------------------------------------------>
<%
out.println("<form method='post' name='adminForm' target='_self' id='adminForm' action='/servlet/AdminServlet'>");
out.println("<input name='pageID' id='pageID' type='hidden' value='"+currentPageNum+"'>");
%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td height="20" align="center" bgcolor="#99cc66"><strong>以下是同学们的发言<font color="#FF0000">【本站管理员:呼呼猪】</font></strong></td>
</tr>
<%
while(rsc.isAvailable())
{
//由于SUBJECT.ID和USERINFO.ID有冲突,所以使用序列取得数据
String subjectID=rsc.getData(1);
String head=rsc.getData("HEAD");
String username=rsc.getData("USERNAME");
String exp=rsc.getData("EXP");
String totalPublish=rsc.getData("TOTAL_PUBLISH");
String totalVote=rsc.getData("TOTAL_VOTE");
String totalLogin=rsc.getData("TOTAL_LOGIN");
String uid=rsc.getData(6);
String qq=rsc.getData("QQ");
String msn=rsc.getData("MSN");
String realname=rsc.getData("REALNAME");
String email=rsc.getData("EMAIL");
String content=rsc.getData("CONTENT");
String pubDate=rsc.getData("PUB_DATE");
String mood=rsc.getData("MOOD");
String state=rsc.getData("STATE");
%>
<tr>
<td bgcolor="#e7e7e7"><table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="150" rowspan="3" align="left" valign="top" style="border-right-style:dotted; border-right-width:thin; border-right-color:#000000" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>>用户名:<a title="点击查看该用户详细信息" href="userinfo.jsp?uid=<%=uid%>"><%=username%></a><br><br><img src="<%=head%>" width="90" height="90" border="0"><br><br>
经验值:<%=exp%><br>总发言:<%=totalPublish%><br>总投票:<%=totalVote%><br>总登陆:<%=totalLogin%></td>
<td height="15" colspan="3" valign="middle" style="border-bottom-style:dotted; border-bottom-width:thin; border-bottom-color:#000000" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>>
<%
if(qq!=null&&qq!="")
{
out.print("<img src='/image/subject/oicq.gif' alt='"+qq+"'>");
out.print(" ");
}
if(msn!=null&&msn!="")
{
out.print("<img src='/image/subject/friend.gif' alt='"+msn+"'>");
out.print(" ");
}
if(realname!=null&&realname!="")
{
out.print("<img src='/image/subject/profile.gif' alt='"+realname+"'>");
out.print(" ");
}
if(email!=null&&email!="")
{
out.print("<img src='/image/subject/email.gif' alt='"+email+"'>");
out.print(" ");
}
out.print("<img src='/image/subject/find.gif'>");
%>
</td>
</tr>
<tr>
<td width="10" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>> </td>
<td <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>>
<%if(state.equals("0")){out.println("<img src='image/subject/abstop.gif' width='17' height='17' border=0> <font color='red'>该帖被管理员设定为固顶</font><br><br>");}else{out.println("<br>");}%>
<img src="image/mood/<%=mood%>" border="0"> <%=content%><br>
<%
while(picRs.next())
{
if(picRs.getString("SUBJECT_ID").equals(subjectID))
{
out.println("<br><img src='image/subject/showpic.gif'><br>");
out.println("<img src='upload/uploadPic/"+picRs.getString("PIC_NAME")+"'><br>");
}
}
//指针归位
picRs.beforeFirst();
%>
<br><br><br></td>
<td align="right" valign="top" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>>
<%
if(loginUserClass!=null&&Integer.parseInt(loginUserClass)>0||loginUserID.equals(uid))
{
out.print("删除该帖<input name='canDelete' type='checkbox' id='canDelete' value='"+subjectID+"'><br>");
if(Integer.parseInt(state)==1&&loginUserClass!=null&&Integer.parseInt(loginUserClass)>0)
{
out.print("设为置顶<input name='canTop' type='checkbox' id='canTop' value='"+subjectID+"'><br>");
}
if(Integer.parseInt(state)==0&&loginUserClass!=null&&Integer.parseInt(loginUserClass)>0)
{
out.print("取消置顶<input name='cancelTop' type='checkbox' id='cancelTop' value='"+subjectID+"'><br>");
}
}
%></td>
</tr>
<tr>
<td height="20" valign="bottom" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>> </td>
<td height="20" valign="bottom" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>>发表日期:<%=pubDate%></td>
<td width="100" align="right" valign="bottom" <%if(state.equals("0")){out.print("bgcolor='#FFCCCC'");}%>><a href="#top"><img src="image/subject/p_up.gif" width="19" height="17" border="0"></a></td>
</tr>
</table></td>
</tr>
<%}%>
</table>
<table width="95%" border="0" align="center"><tr><td align="right">
<%
out.println("<table width='95%' border='0' align='center'><tr><td align='right'><input name='doAdmin' type='submit' id='doAdmin' value='提交操作'></td></tr></table>");
out.println("</form>");
%>
</td></tr></table>
<!--end------------------------------------------------------------------------------------------------------------>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="200"><a href="#showPost"></a> </td>
<td align="center">本校友录共有<font color="#FF0000"><strong><%=totalCounts%></strong></font>条发言,每页显示<font color="#FF0000"><strong><%=rowsPerPage%></strong></font>条发言,当前显示第<font color="#FF0000"><strong><%=currentPageNum%></strong></font>页/共<font color="#FF0000"><strong><%=totalPages%></strong></font>页</td>
<td align="right">
<%if(currentPageNum!=1){%>
<a href="index.jsp?page=1"><img src="image/subject/firstpage.gif" width="59" height="21" border="0"></a>
<%}%>
<%if(currentPageNum!=1){%>
<a href="index.jsp?page=<%=currentPageNum-1%>"><img src="image/subject/previouspage.gif" width="59" height="21" border="0"></a>
<%}%>
<%if(currentPageNum!=totalPages){%>
<a href="index.jsp?page=<%=currentPageNum+1%>"><img src="image/subject/nextpage.gif" width="59" height="21" border="0"></a>
<%}%>
<%if(currentPageNum!=totalPages){%>
<a href="index.jsp?page=<%=totalPages%>"><img src="image/subject/lastpage.gif" width="59" height="21" border="0"></a>
<%}%>
</td>
<%
//关闭数据库
if(dbConn!=null)
{
dbConn.close();
}
%>
<form action="index.jsp" method="post" name="subjectForm" target="_self" id="subjectForm">
<td width="50" align="right"><input name="page" type="text" class="form" id="page" size="4" maxlength="10"></td>
<td width="40"><input name="imageField2" type="image" src="image/subject/fav_add.gif" alt="直接跳转" width="24" height="24" border="0"></td>
</form>
</tr>
</table>
<br>
<form action="/servlet/PostServlet" method="post" enctype="multipart/form-data" name="post" target="_self" id="post" onSubmit="return checkPost();">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><a name="addPost"><img src="image/index/topic.gif" width="90" height="25" border="0"></a></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#ECE9D8">
<td width="200">请选择心情</td>
<td><img src="image/mood/1.gif" width="20" height="20">
<label><input name="mood" type="radio" value="1.gif" checked></label>
<img src="image/mood/2.gif" width="20" height="20">
<label><input type="radio" name="mood" value="2.gif"></label>
<img src="image/mood/3.gif" width="20" height="20">
<label><input type="radio" name="mood" value="3.gif"></label>
<img src="image/mood/4.gif" width="20" height="20">
<label><input type="radio" name="mood" value="4.gif"></label>
<img src="image/mood/5.gif" width="20" height="20">
<label><input type="radio" name="mood" value="5.gif"></label>
<img src="image/mood/6.gif" width="20" height="20">
<label><input type="radio" name="mood" value="6.gif"></label>
<img src="image/mood/7.gif" width="20" height="20">
<label><input type="radio" name="mood" value="7.gif"></label>
<img src="image/mood/8.gif" width="20" height="20">
<label><input type="radio" name="mood" value="8.gif"></label>
<img src="image/mood/9.gif" width="20" height="20">
<label><input type="radio" name="mood" value="9.gif"></label>
<img src="image/mood/10.gif" width="20" height="20">
<label><input type="radio" name="mood" value="10.gif"></label><br>
<img src="image/mood/11.gif" width="20" height="20">
<label><input type="radio" name="mood" value="11.gif"></label>
<img src="image/mood/12.gif" width="20" height="20">
<label><input type="radio" name="mood" value="12.gif"></label>
<img src="image/mood/13.gif" width="20" height="20">
<label><input type="radio" name="mood" value="13.gif"></label>
<img src="image/mood/14.gif" width="20" height="20">
<label><input type="radio" name="mood" value="14.gif"></label>
<img src="image/mood/15.gif" width="20" height="20">
<label><input type="radio" name="mood" value="15.gif"></label>
<img src="image/mood/16.gif" width="20" height="20">
<label><input type="radio" name="mood" value="16.gif"></label>
<img src="image/mood/17.gif" width="20" height="20">
<label><input type="radio" name="mood" value="17.gif"></label>
<img src="image/mood/18.gif" width="20" height="20">
<label><input type="radio" name="mood" value="18.gif"></label>
<img src="image/mood/19.gif" width="20" height="20">
<label><input type="radio" name="mood" value="19.gif"></label>
<img src="image/mood/20.gif" width="20" height="20">
<label><input type="radio" name="mood" value="20.gif"></label> </td>
</tr>
<tr bgcolor="#ECE9D8">
<td>上传图片
</td>
<td><input name="uploadPic" type="file" class="form" id="uploadPic" size="50"></td>
</tr>
<tr bgcolor="#ECE9D8">
<td valign="top">发言内容<br> <br>
最大长度不能超过1024个字节</td>
<td><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#ECE9D8">
<tr>
<td width="550" valign="bottom">
<select name="selectFont" id="selectFont" onChange="setFont(this.options[this.selectedIndex].value)">
<option selected>选择字体</option>
<option value="宋体">宋体</option>
<option value="黑体">黑体</option>
<option value="隶书">隶书</option>
<option value="幼圆">幼圆</option>
<option value="仿宋_GB2312">仿宋_GB2312</option>
<option value="Arial">Arial</option>
<option value="Times New Roman">Times New Roman</option>
</select>
<select name="selectSize" id="selectSize" onChange="setSize(this.options[this.selectedIndex].value)">
<option selected>字体大小</option>
<option value="6">6</option>
<option value="8">8</option>
<option value="10">10</option>
<option value="12">12</option>
<option value="14">14</option>
<option value="18">18</option>
<option value="24">24</option>
<option value="36">36</option>
</select>
<select name="selectColor" id="selectColor" onChange="setColor(this.options[this.selectedIndex].value)">
<option value="" selected>选择颜色</option>
<option value="red">红色</option>
<option value="blue">蓝色</option>
<option value="yellow">黄色</option>
<option value="green">绿色</option>
</select>
<br>
<a href="javascript:" onClick="addBold()"><img src="image/ubb/bold.gif" alt="字体加粗" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addEm()"><img src="image/ubb/italic.gif" alt="字体倾斜" width="20" height="20" border="0"></a>
<img src="image/ubb/separator.gif" width="6" height="20"> <a href="javascript:" onClick="addLeft()">
<img src="image/ubb/left.gif" alt="字体左对齐" width="20" height="20" border="0"></a> <a href="javascript:" onClick="addCenter()">
<img src="image/ubb/center.gif" alt="字体居中" width="20" height="20" border="0"></a> <a href="javascript:" onClick="addRight()">
<img src="image/ubb/right.gif" alt="字体靠右" width="20" height="20" border="0"></a> <img src="image/ubb/separator.gif" width="6" height="20">
<a href="javascript:" onClick="addImage()"><img src="image/ubb/image.gif" alt="引用外部图片" width="20" height="20" border="0"></a>
<img src="image/ubb/date.gif" alt="插入日期" width="20" height="20"> <img src="image/ubb/separator.gif" width="6" height="20">
<a href="javascript:" onClick="addQuote()"><img src="image/ubb/quote.gif" alt="插入引用" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addURL()"><img src="image/ubb/link.gif" alt="加入超链接" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addEmail()"><img src="image/ubb/email.gif" alt="插入Email" width="20" height="20" border="0"></a> </td>
<td><strong>UBB代码简要说明:(<a href="#">UBB代码使用详细说明</a>)</strong> </td>
</tr>
<tr>
<td valign="top">
<div id="postArea">
<textarea name="content" cols="70" rows="15" wrap="VIRTUAL" class="form" id="content" style="background-color:#E4E4E4"></textarea>
</div>
</td>
<td valign="top">
<font color="#FF0000">本站UBB代码必须使用小写字母</font><br>
[b]:字体加粗[/b]<br>
[i]:字体倾斜[/i]<br>
[img]:加入图片的链接(外部链接)[/img]<br>
[url]:加入超链接[/url]<br>
[email]:加入邮件地址[/email]<br>
[red]:红色字体[red]<br>
[blue]:兰色字体[blue]<br>
[green]:绿色字体[green]<br>
[yellow]:黄色字体[/yellow]<br>
[hr]:加入水平线[/hr]<br>
[h1]~[h6]:标题字体[/h1]~[/h6]<br>
[font=宋体]:字体改为宋体[/font]<br>
[font=黑体]:字体改为黑体[/font]<br>
[font=隶书]:字体改为隶书[/font]<br>
[size=x]:字体大小改为x=6,8,10,12,14,18,24,36[/size]<br>
[quote]这里是引用段[/quote]
</td>
</tr>
<tr>
<td><div id="ch">
<input name="button" type="button" onClick="change(30)" value="扩大编辑区域">
</div>
<input name="checkButton" type="button" id="checkButton" onClick="checkLength()" value="查看文章长度"></td>
<td valign="top"> </td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#ECE9D8">
<td bgcolor="#FFFFFF">在发言中加入表情</td>
<td bgcolor="#FFFFFF">
<script type="text/javascript" language="javascript">
for(var i=0;i<20;i++)
{
if(i<10)
{
document.write("<a href=\"javascript:\" onClick=\"addMood(\':em0"+i+"\')\"><img src='image/face/0"+i+".gif' border=0></a>");
}
else
{
document.write("<a href=\"javascript:\" onClick=\"addMood(\':em"+i+"\')\"><img src='image/face/"+i+".gif' border=0></a>");
}
}
</script>
</td>
</tr>
<tr align="center" bgcolor="#ECE9D8">
<td colspan="2"><input name="Submit" type="submit" class="form" value="提交发言"></td>
</tr>
</table>
</form>
<br>
<jsp:include page="include/bottom.htm"/>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -