📄 regstep1.jsp
字号:
<%
/**
* Title:Lerx计数器(JSP+MySQL)
* Description:含有动网最新IP数据库 165501条 2004年11月5日更新,我找到的最新的也最合适的就是这个了,花了些时间处理导入到MySQL里。
* Copyright: Copyright (c) 2005
* Company:www.lerx.com,www.5z.com.cn,www.huafang.com.cn
* @author:lzh@5z.com.cn() QQ:27723812
* @version 1.0
* 开发平台:红旗Linux4.1,JDK 1.5.0_04-b05,Tomcat 5.5.9,MySQL 3.23.58
* 完成时间:2005.12.2
*/
%>
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.sql.*" %>
<%@ include file="const.jsp" %>
<%@ include file="conn.jsp" %>
<%
String ps_NewName,ps_SQLCmd,ps_error;
boolean pb_continue;
ps_error="";
pb_continue=true;
ps_NewName = request.getParameter("T_newname");
if (ps_NewName == null){
ps_NewName="";
pb_continue=false;
}
else
{
ps_NewName=ps_NewName.trim();
}
if (ps_NewName.equals("")){
pb_continue=false;
}
//检查数据库
if (pb_continue)
{
ps_SQLCmd="select * from statuser where id='"+ps_NewName+"'";
rs=stmt.executeQuery(ps_SQLCmd);
if (rs.next())
{
pb_continue=false;
ps_error="<br><font color=#FF0000>错误提示:已经存在相同的用户名,请您重新输入一个!</font><br>";
}
}
%>
<%@ include file="disconn.jsp" %>
<%
if (pb_continue)
{
%>
<meta http-equiv=refresh content=0;url=./regstep2.jsp?id=<%=ps_NewName%>>
<%
}
else
{
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>申请记数器——第一步:请输入一个用户名</title>
</head>
<body bgcolor="<%=ps_BgColor%>" text="#FFFFFF" link="#FFFFCC" vlink="#FFFFCC" alink="#CCCCFF">
<div align="center">
<center>
<table border="0" width="750" border="1" height="100%" bgcolor="<%=ps_TableColor%>">
<tr>
<td width="100%" valign="middle" align="center">
<form method="POST" action="regstep1.jsp">
<table border="0" width="100%">
<tr>
<td width="100%" align="center"><b>申请记数器</b></td>
</tr>
<tr>
<td width="100%" align="center" height="40"></td>
</tr>
<tr>
<td width="100%" align="center">请输入一个用户名(注意:请用英文字母或数字!)<%=ps_error%></td>
</tr>
<tr>
<td width="100%" align="center" height="20"></td>
</tr>
<tr>
<td width="100%" align="center">
<p><input type="text" name="T_newname" tabindex="1" size="20"> <input type="submit" value="提交" name="B1"></p>
</td>
</tr>
<tr>
<td width="100%" align="center" height="40">
</td>
</tr>
<tr>
<td width="100%" align="center"><%@ include file="./copyright.jsp" %></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -