📄 list_read.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GB18030" import="java.sql.*"%>
<%@ include file="config.ini"%>
<%@ include file="conn.jsp"%>
<%@ include file="readlogin.jsp"%>
<%
//接收要查询的联系人的id
String id=request.getParameter("id");
if(id==null)
{
out.print("<script>");
out.print("alert('id错误!');");
out.print("location.href='list.jsp';");
out.print("</script>");
}
try
{
sqlstr="select * from list where id="+id;
//调用JavaBean中的业务逻辑方法,进行数据库查询操作
rs=iCanDb.doSelect(sqlstr);
//循环遍历查询后得到的结果集,得到记录的每个字段
if(rs.next())
{
String sort=rs.getString("sort");
String name=rs.getString("name");
String mobile=rs.getString("mobile");
if(mobile==null) mobile=" ";
String home=rs.getString("home");
if(home==null) home=" ";
String office=rs.getString("office");
if(office==null) office=" ";
String email=rs.getString("email");
if(email==null) email=" ";
String qq=rs.getString("qq");
if(qq==null) qq=" ";
String msn=rs.getString("msn");
if(msn==null) msn=" ";
String post=rs.getString("post");
if(post==null) post=" ";
String address=rs.getString("address");
if(address==null) address=" ";
String other=rs.getString("other");
if(other==null) other=" ";
other=turn(other);
%>
<html>
<head>
<%@ include file="head.jsp"%>
</head>
<body>
<center>
<table border="0" width="768" id="table1" cellspacing="0" cellpadding="0">
<tr>
<%@ include file="top.jsp"%>
</tr>
<tr>
<td width="90" valign="top">
<%@ include file="menu.jsp"%> </td>
<td width="588" valign="top">
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="1" width="100%" id="table4" bordercolorlight="#0A9EE4" cellspacing="0" cellpadding="5" bordercolordark="#0A9EE4" height=300>
<tr>
<td valign="top">
<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" width="50%">
</td>
<td width="50%">
<img src="images/n-list.jpg" align="right" width="230" height="70"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr noshade color="#0A9EE4" size="1"></td>
</tr>
<tr>
<td height="20"><form method="POST" action="list_add.jsp?action=save" target=_top name="form1" onsubmit="return on_submit()">
<table border="0" width="574" id="table7" cellspacing="0" cellpadding="5">
<tr>
<td width="121" height="22" align="right">
<p>
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">姓名:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=name%></span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">
分类:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=sort%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<p>
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">移动电话:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=mobile%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">
住宅电话:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=home%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">
办公电话:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=office%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<p>
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">Email:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=email%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">QQ:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=qq%><%if(!qq.trim().equals("")){%><a target=blank href=tencent://message/?uin=<%=qq%>&Site=<%=name%>&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:<%=qq%>:5 alt="点击这里给他发消息"></a><%}%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">
MSN:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=msn%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<p>
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">邮编:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=post%>
</span></td>
</tr>
<tr>
<td width="121" height="22" align="right">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">
通讯地址:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=address%>
</span></td>
</tr>
<tr>
<td width="121" align="right" height="22">
<font color="#0A9EE4">
<span style="font-size: 9pt; font-weight:700">其它:</span></font></td>
<td width="433" height="22" align="left">
<span style="font-size: 9pt"><%=other%>
</span></td>
</tr>
</table></form>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="font-size: 9pt">
<font color="#0A9EE4">[ </font>
<a target="_top" href="list.jsp">
<font color="#0A9EE4">返回</font></a><font color="#0A9EE4">
]</font></span></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="90"> </td>
</tr>
<tr>
<td width="90" valign="top">
</td>
<td width="588" valign="top">
<%@ include file="copyright.jsp"%>
</td>
<td width="90"> </td>
</tr>
</table>
<p>
</center>
</p>
</body>
</html>
<%
}
else
{
out.print("<script>");
out.print("alert('id错误!');");
out.print("location.href='list.jsp';");
out.print("</script>");
}
}
catch(Exception e)
{
out.print("<script>");
out.print("alert('数据库错误!');");
out.print("location.href='list.jsp';");
out.print("</script>");
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -