?? regist.jsp
字號:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.lang.*,java.sql.*" %>
<html>
<title>小小的太陽</title>
<body style="color: #123FFF">
<div align="center">
<table border="3" borderColor="#ffffff" borderColorDark="#ffffff" borderColorLight="#ffffff" cellSpacing="0" height="1008" style="BORDER-BOTTOM-COLOR: #ffffff; BORDER-BOTTOM-STYLE: solid; BORDER-LEFT-COLOR: #ffffff; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: #ffffff; BORDER-RIGHT-STYLE: solid; BORDER-TOP-COLOR: #ffffff; BORDER-TOP-STYLE: solid" width="892">
<tbody>
<tr>
<td align="middle" bgColor="#ccccff" height="1" width="80%">
<%@ include file="headRegist.html" %>
</td>
</tr>
<tr>
<jsp:useBean id="DbLink" scope="page" class="MyBook.DbLink" />
<td align="middle" bgColor="#ccffff" height="557" width="884">
<table border="3" bordercolor="#1ccfff" height="30%" width="50%">
<form method="post" action="Regist.jsp?Param=param">
<tr>
<%
String Param = (String)request.getParameter("Param");
if ((Param != null)&&(! Param.equals("Lost")))
{
String YHM = (String) request.getParameter("YHM");
String MM = (String) request.getParameter("MM");
String StrSQL = "Select count(*) as Counter from Login where YHM='"+YHM+"' and MM='"+MM+"'";
String StrSQL1 = "Select GLCS from Login where YHM='"+YHM+"' and MM='"+MM+"'";
DbLink.DbLink("sa","123456","MyDataBase");
ResultSet rs = DbLink.DbQuery(StrSQL);
rs.next();
int Count = rs.getInt("Counter");
rs.close();
if (Count !=0)
{
session.setAttribute("SaveYHM",YHM);
session.setAttribute("SavePassword",MM);
session.setMaxInactiveInterval(600);
ResultSet RQ = DbLink.DbQuery(StrSQL1);
RQ.next();
int GLCS = RQ.getInt("GLCS");
RQ.close();
GLCS++;
DbLink.DbExcute("update Login set GLCS="+GLCS+" where YHM='"+YHM+"'");
out.println("<input type=\"Hidden\" name=\"YHM\" value="+YHM+">");
out.println("<input type=\"Hidden\" name=\"GLCS\" value="+Integer.toString(GLCS)+">");
response.sendRedirect("ZWM.jsp?YHM="+YHM+"&GLCS="+GLCS);
}
else
{
out.println("<td align=\"Center\" colspan=\"2\">輸入數據有誤!請重新登錄:</td>");
}
}
if((Param != null)&&(Param.equals("Lost")))
{
out.println("<td align=\"Center\" colspan=\"2\">用戶已經過期,請登錄先!</td>");
}
%>
<td align="Center" colspan="2">
</td>
</tr>
<td align="right" colspan="1">用戶名: </td>
<td align="Left" colspan="1"> <input type="text" maxLength="12" name="YHM"> </td>
<tr>
<td align="right" colspan="1">密 碼: </td>
<td align="left" colspan="1"> <input type="password" maxLength="12" name="MM"></td>
</tr>
<tr>
<td align="middle" colspan="2"><input type="submit" value="提交"> <input type="reset" value="重置"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="middle" bgColor="#ccccff" height="1" width="80%">
<%@ include file = "botton.html" %>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -