📄 checkuser.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="data.LoginData"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/html">
<!--
.STYLE1 {font-size: 9px}
-->
</style>
<style type="text/css">
<!--
.STYLE2 {
font-size: 24px;
font-weight: bold;
}
.STYLE3 {
font-size: 14px;
font-weight: bold;
color: #3399FF;
}
.STYLE4 {
font-family: "宋体";
font-weight: bold;
}
.STYLE6 {color: #3399FF}
.STYLE9 {font-size: 24px; font-weight: bold; color: #3399FF; }
-->
</style>
</head>
<body>
<jsp:useBean id="show" class="Bean.MachSearch" scope="page">
</jsp:useBean>
<jsp:useBean id="connDbBean" scope="page" class="db.dbConn"/>
<%
Connection conn=null;
Statement stmt=null;
ResultSet rs=null;
String strSql="";
%>
<table width="975" border="0" cellpadding="0" cellspacing="0" bordercolor="#333399">
<!--DWLayoutTable-->
<tr>
<td width="975" height="76" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="171" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="171" height="76" valign="middle"><img src="image/tushu2.bmp" /></td>
</tr>
</table> </td>
<td width="75" height="28"> </td>
<td width="100"> </td>
<td width="18"> </td>
<td width="101"> </td>
<td width="26"> </td>
<td width="100"> </td>
<td width="30"> </td>
<td width="100"> </td>
<td width="49"> </td>
<td width="100"> </td>
<td width="105"> </td>
</tr>
<tr>
<td height="48"> </td>
<td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="48" align="center" valign="bottom" bgcolor="#F5F5F5"><a href="Untitled-1.jsp" class="STYLE9">图书检索</a></td>
</tr>
</table></td>
<td> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="48" align="center" valign="bottom" bgcolor="#F5F5F5"><a href="CheckUser.jsp" class="STYLE9"><strong>我的图书</strong></a></td>
</tr>
</table></td>
<td> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="48" align="center" valign="bottom" bgcolor="#F5F5F5"><a href="test.jsp" class="STYLE9">新书通报</a></td>
</tr>
</table></td>
<td> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="48" align="center" valign="bottom" bgcolor="#F5F5F5" class="STYLE9"><a href="test.jsp" class="STYLE9">信息发布</a></td>
</tr>
</table></td>
<td> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="48" align="center" valign="bottom"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="30" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="975" height="30" bgcolor="#3366CC"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td height="276" align="center" valign="middle">
<%
String username = (String)request.getParameter("username");
String password = (String)request.getParameter("password");
strSql="SELECT * FROM userdb WHERE PASSWORD='"+password+"'"+" "+"AND"+" "+"USERNAME='"+username+"'";
rs = connDbBean.executeQuery(strSql);
try{
if(rs.next()){
response.sendRedirect("MylibSearch.jsp");
}
else{
response.sendRedirect("error.jsp");
}
}catch(Exception ex){
ex.printStackTrace();
}
%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -