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

📄 viewmess.jsp

📁 网上购物系统
💻 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>JSP吧!专业与JSP虚拟主机提供商!</title>
<LINK href="css/style.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	font-size: 12px;
	color: #FFFFFF;
	letter-spacing: 2px;
}
.style3 {
	color: #FFFF00;
	font-weight: bold;
}
-->
</style></head>
<jsp:useBean id="ConBean" scope="session" class="com.bitc.ch13.DBCon"/>
<body>
<div align="center"></div>
<SCRIPT Language = javascript>
<!--
function datacheck()
{

if(frmLogin.nr.value == "")
	{
	window.alert("请输入内容!"); 
		document.frmLogin.elements(0).focus();
		return ;
}

	frmLogin.submit();
	}
-->
</SCRIPT>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 height=250 
cellSpacing=0 cellPadding=0 width=482 border=0>
  <TBODY>
    <TR>
      <TD align=right colSpan=3 height=1></TD>
    </TR>
    <TR>
      <TD vAlign=bottom colSpan=3 height=17><IMG height=17 
      src="image/sj111.gif" width=482 border=0></TD>
    </TR>
    <TR>
      <TD width=20 height="163" background=image/sj112.gif><IMG height=1 
      src="image.files/line.gif" width=1></TD>
      <TD vAlign=top width=450><BR>
          <%
						 String h = ""; //是否回复的标志
						 String tie ="";//是否结帖的标志
						 String id = request.getParameter("id");
						String faxinren = ""; //这个是后台管理员特有的,目的的设置发信人~~~和后台回复时的收信人,写在程序里while.jsp提取不到,所以写在最开始的地方了
Connection con = ConBean.getConnection();
Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rsl=stmt.executeQuery("SELECT id,hui,tie,biaoti,neirong,faxinren,convert(varchar(19),riqi,120)as thistimes FROM jsp8_mess WHERE id = '"+id+"'");
if(!rsl.next()){
session.setAttribute("yy","您访问了不属于您的消息!");
session.setAttribute("yyh","管理员<font color=red><b>"+session.getAttribute("adminuser")+"</font></b>在后台查看新消息时访问了不属于他的消息,为典型的人为试探型攻击,系统已阻止,无须理会!技术代码:参数: jsp8_mess WHERE id ="+id);
response.sendRedirect("../../error/index.jsp");
return;
}else{
h = rsl.getString("hui"); //查询该主题是否允许回复
tie = rsl.getString("tie"); //查询该主题是否已经结帖
%>
          <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
            <TBODY>
              <TR>
                <TD height=20 colspan="3">
                  <DIV align=center><STRONG><%=rsl.getString("biaoti")%><BR>
                    </STRONG>
                      <HR noShade SIZE=1>
                      <STRONG></STRONG></DIV></TD>
              </TR>
              <TR>
                <TD colspan="3">
                  <DIV align=right> </DIV></TD>
              </TR>
              <TR>
                <TD height="62" colspan="3"><%=rsl.getString("neirong")%></TD>
              </TR>
              <TR>
                <TD height="16" colspan="3">&nbsp;</TD>
              </TR>
              <TR>
                <TD width="20%" height="18" align="right">&nbsp;</TD>
                <TD width="21%" align="right">发信人:<% faxinren = rsl.getString("faxinren");out.println(faxinren);%></TD>
                <TD width="59%" align="right"><%=rsl.getString("thistimes")%></TD>
              </TR>
            </TBODY>
          </TABLE>
          <%
						}
rsl.close(); 
if(h.equals("no")){ //如果h等于不回复,就直接退出完成;

}else{ 
%>
          <%@include file="while.jsp"%>
          <%
}
try{
Connection conn = ConBean.getConnection();
Statement stmtl = conn.createStatement();
String	strde = "update jsp8_mess set guanliyuanzhuangtai = '已读' where id = '"+id+"'";
stmtl.executeUpdate(strde);
stmtl.close();
}catch(Exception ee){
session.setAttribute("yy","查看新信息失败!<br><br>请重新查看!如果该问题依然出现请和我们工作人员联系!给您带来不便请谅解!");
session.setAttribute("yyh","管理员<font color=red><b>"+session.getAttribute("adminuser")+"</font></b>在后台查看新消息时更新消息为已读时发生错误,系统找不到原因,建议亲自测试,或者和施政联系!错误代码:"+ee.toString());
response.sendRedirect("../../error/index.jsp");
return;
}
ConBean.close();
%></TD>
      <TD width=12 align="center" valign="middle" background=image/sj113.gif> <IMG height=1 
      src="image.files/line.gif" width=1></TD>
    </TR>
    <TR align=middle>
      <TD colSpan=3 height=25>
        <P align=center><IMG height=25 src="image/sj114.gif" width=482 
      useMap=#FPMap0 border=0> </P></TD>
    </TR>
  </TBODY>
</TABLE>
<map name="FPMap0">
  <area shape="rect" coords="399,1,477,24" href="myuser.jsp" alt="关闭">
</map>
</body>
</html>

⌨️ 快捷键说明

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