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

📄 sendinformation.jsp

📁 一个用jsp+servlet编写的小论坛。直接编译就可以生成可部署的项目。
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看帖子信息</title>
</head>
<jsp:useBean id="connection" scope="request" class="com.JDBConnection"/>
<%
request.setCharacterEncoding("gb2312");

String url=request.getParameter("url");

String ip=request.getRemoteHost();
String account="MrFriend";
String oicq="";
String sex="男";
String email="mingrisoft.com";
if(session.getAttribute("account")!=null){
account=(String)session.getAttribute("account");
String sql="select * from tb_forumUser where account='"+account+"'";
ResultSet rs=connection.executeQuery(sql);
try{
while(rs.next()){
  sex=rs.getString("sex");
oicq=rs.getString("oicq");
email=rs.getString("email");

}
}catch (Exception e){}
}
%>
<body onLoad="clockon(bgclock);">
<jsp:include page="top.jsp" flush="true"/>
<jsp:include page="top1.jsp" flush="true"/>
<jsp:include page="top2.jsp" flush="true"/>
<jsp:include page="top3.jsp" flush="true"/>
<table width="777" height="33" border="0" align="center" cellpadding="0" cellspacing="0" background="image/navigation3.jpg">
  <tr>
    <td> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">≡ 发表主题 ≡ </font></td>
  </tr>
</table>
<table width="777"  background="image/information.jpg" height="386" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="239" height="242" valign="top">	<table width="208" border="0" align="center">
      <tr align="center">
        <td width="202" height="40"> === 发帖人信息 === </td>
      </tr>
	  <tr align="center">
        <td height="40"><%=account%></td>
      </tr>
	  <tr align="center">
        <td height="60">
          <%if(sex.equals("男")){%>
          <img src="image/boy.gif">
        <%}else{%><img src="image/girl.gif"><%}%>
        </td>
      </tr>
      <tr align="center">
        <td height="40">我是:<%=sex%></td>
      </tr>
      <tr align="center">
        <td height="40"><img src="image/email.gif">&nbsp;<%=email%></td>
      </tr>
	  <tr align="center">
        <td height="40"><img src="image/oicq.gif">&nbsp;QQ:<%=oicq%></td>
      </tr>
      <tr align="center">
        <td height="40"><img src="image/ip.gif">&nbsp;IP:<%=ip%></td>
      </tr>
    </table></td>
    <td width="56">&nbsp;</td>
    <td width="482" valign="top"><table width="446" border="0">
      <form name="form" method="post" action="sendDealwith.jsp" onSubmit="return sendInformation()">
      <tr>
        <td width="51" height="30">类别:</td>
        <td width="330">JSP<input name="sort" type="hidden" value="JSP"><input name="ip" type="hidden" value="<%=ip%>"></td>
      </tr>
      <tr>
        <td height="30">主题:</td>
        <td><input name="title" type="text" size="54"><input name="account" type="hidden" value="<%=account%>"></td>
      </tr>
      <tr>
        <td height="237" valign="top"> <br>内容: </td>
        <td><textarea name="content" cols="53" rows="16"></textarea><input name="url" type="hidden" value="<%=url%>"></td>
      </tr>
      <tr>
        <td height="30"><p>字节: </p></td>
        <td>最多允许 1600个字节</td>
      </tr>
      <tr>
        <td height="30">&nbsp;</td>
        <td>
          <input type="submit" name="Submit"  class="btn_grey" value="提交主题信息">
          <input type="reset" name="Submit2" class="btn_grey" value="重写主题信息">
          <input type="button" name="Submit2" class="btn_grey" value="返回首页" onClick="window.location.href='index.jsp'">
        </td>

      </tr>  </form>
    </table></td>
  </tr>
</table>
<jsp:include page="low.jsp" flush="true"/>
</body>
</html>

⌨️ 快捷键说明

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