📄 foundmessage_user.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%
if(session.getValue("ID")==null)
response.sendRedirect("indexs.jsp");
String name="";
String userpassword="";
String usertype="";
name=request.getParameter("name");
String url="jdbc:oracle:thin:@10.0.0.4:1521:ORCL";
String user="mms";
String psw="mms123";
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception e){
out.println("没找到数据库驱动!");
e.printStackTrace();
}
try{
Connection con=DriverManager.getConnection(url,user,psw);
String sql="select * from userinfo where name='"+name+"'";
Statement stm=con.createStatement();
ResultSet rs=stm.executeQuery(sql);
if(rs.next())
{
userpassword=rs.getString("userpassword");
userpassword=new String(userpassword.getBytes("ISO-8859-1"),"gb2312");
usertype=rs.getString("usertype");
usertype=new String(usertype.getBytes("ISO-8859-1"),"gb2312");
}
rs.close();
}
catch(SQLException e){out.print(e);}
String usertype_temp="";
if(usertype.equals("admin"))
usertype_temp="管理员";
else if(usertype.equals("op"))
usertype_temp="操作员";
else
usertype_temp="一般用户";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" href="image/cs.css" type="text/css">
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=505 border=0 align=center>
<tr>
<td height=42 valign=bottom align=right></td>
</tr>
<tr>
<td height=1 bgcolor=4497FC></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=505 border=0 align=center>
<tr>
<td bgcolor=4497FC width=1></td>
<td bgcolor=F4F8FE width=503 valign=top>
<TABLE cellSpacing=0 cellPadding=0 width=503 border=0 align=center>
<tr>
</tr>
<tr>
<td align=left> <BR></td>
</tr>
<tr><td align=center>
<br>
<font color=#A0070F><b>用户查询结果</b></font><br>
</td></tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=212 border=0 align=center>
<tr>
<td class=p2 align=right height=30 width=90><FONT color=1771DE>用户名:</FONT></td>
<td><%=name%></td>
</tr>
<tr>
<td class=p2 align=right height=30 ><FONT color=1771DE>密 码:</FONT></td>
<td><%=userpassword%></td>
</tr>
<tr>
<td class=p2 align=right height=30 ><FONT color=1771DE>类 型:</FONT></td>
<td><%=usertype_temp%></td>
</tr>
</table>
</td>
<td bgcolor=4497FC width=1></td>
</tr>
<tr>
<td height=1 bgcolor=4497FC colspan=3></td>
</tr>
</table>
<br><br><br>
<table cellspacing=0 cellpadding=0 width=606 align=center border=0>
<tr>
<td align=middle>
<script language=JavaScript src="image/bottom.js"></script>
</td>
</tr>
</table>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -