📄 inform.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="con" scope="page" class="numb1.com.db"/>
<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>
<%
String root=(String)session.getAttribute("root");root=ht.donull(root);
String mid=request.getParameter("mid");
String toid="";
String fromid="";
String fromname="";
String title="";
String txt="";
String time="";
int isread=0;
if(root.compareTo("")==0){root="0";}
int step=Integer.parseInt(root);
if(!ht.isNumber(mid)){
out.print("<br><br><center><font color=#FF0000><strong>参数错误!</strong><font></center>");
}else{
String sql="select title,txt,time,isread from massage where toid='inform' and frid='inform' and id="+mid;
ResultSet r=con.query(sql);r.next();
if(r.getRow()==0){
out.print("<br><br><center><font color=#FF0000><strong>该留言不存在!</strong></font></center>");
}else{
title=con.getStr(r.getString(1));
txt=con.getStr(r.getString(2));
time=r.getString(3);
isread=r.getInt(4)+1;
con.close();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显示留言</title>
<style type="text/css">
<!--
td{font-size:13px}
.style3 {color: #787878}
-->
</style>
</head>
<body>
<table width="640" border="0" align="center" cellspacing="1" bgcolor="#cccccc">
<tr>
<td height="22" bgcolor="#7188e0"> <font color="#FFFFFF">论坛管理员 发表于<%=time.substring(5,16)%></font></td>
</tr>
<tr>
<td bgcolor="#f8f8f8" class="style3"><div align="right">[加为好友] </div></td>
</tr>
<tr>
<td bgcolor="#f8f8f8">
<table width="98%" border="0" align="center" cellspacing="8">
<tr>
<td><%=txt%></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#f8f8f8" class="style3"><div align="right">[<a href="javascript:window.close()">关闭</a>] [<a <% if(step>3){%>href="einform.jsp?id=<%=mid%>"<%}%>>编辑</a>] [<a <% if(step>3){%>href="mdel.jsp?id=<%=mid%>"<%}%>>删除</a>] </div></td>
</tr>
</table>
</body>
</html>
<%
con.update("update massage set isread="+isread+" where id="+mid);
}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -