📄 userlist.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" %>
<jsp:useBean id="ShowPage" scope="page" class="forum.ShowPage" />
<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.sql.*" %>
<%@ include file="const.jsp" %>
<%@ include file="conn.jsp" %>
<%
String ps_SQLCmd="",ps_id,ps_SiteName="",ps_Email="",ps_URL="",ps_statadmin="";
int pi_RecCount=0,pi_PageRecord=0,pi_PageCount=0,pi_step=0,pi_curpage=0,pi_InitIP=0,pi_CoutIP=0;
ps_statadmin = (String)session.getAttribute("statadmin");
if (ps_statadmin==null)
{
ps_statadmin="";
}
else
{
ps_statadmin=ps_statadmin.trim();
}
if (ps_statadmin.equals("true"))
{
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-M-d H:mm:ss");
//取用户总数
ps_SQLCmd="select count(*) from statuser";
rs=stmt.executeQuery(ps_SQLCmd);
rs.next();
pi_RecCount=rs.getInt(1);
rs.close();
pi_PageRecord=20;
pi_PageCount=pi_RecCount/pi_PageRecord;
if (pi_RecCount%pi_PageRecord > 0)
{
pi_PageCount=pi_PageCount+1;
}
pi_step=0;
if (request.getParameter("page")==null)
{
pi_curpage = 1;
}
else
{
pi_curpage=Integer.parseInt(request.getParameter("page"));
}
if (pi_curpage==1)
{
ps_SQLCmd="select * from statuser order by CreateDate asc limit 0," + pi_PageRecord;
}
else
{
ps_SQLCmd="select * from statuser order by CreateDate asc limit " + ((pi_curpage-1)*pi_PageRecord) + "," + pi_PageRecord;
}
rs=stmt.executeQuery(ps_SQLCmd);
%>
<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">
<%@ include file="./css.jsp" %>
<title>计数器用户管理</title>
</head>
<body bgcolor="<%=ps_BgColor%>" text="#FFFFFF" link="#FFFFCC" vlink="#FFFFCC" alink="#CCCCFF">
<div align="center">
<center>
<table width="750" border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF">
<tr>
<td width="100%">
<div align="center">
<div align="center">
<center>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<td width="100%" colspan="8" align="center">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="<%=ps_TableColor%>">
<td width="100%" bgcolor="<%=ps_TableColor%>" height="5" colspan="3"> </td>
</tr>
<tr bgcolor="<%=ps_TableColor%>">
<td width="19%"></td>
<td width="61%" rowspan="2" valign="middle" align="center"><font color="#FFFFFF">【<b>计数器用户管理</b>】</font></td>
<td width="20%"></td>
</tr>
<tr bgcolor="<%=ps_TableColor%>" height="5" >
<td width="19%" height="5"> </td>
<td width="20%" height="5" align="right"> </td>
</tr>
<tr bgcolor="<%=ps_TableColor%>">
<td width="100%" bgcolor="<%=ps_TableColor%>" height="5" colspan="3"> </td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td>
<center>
<div align="center">
<table border="1" bgcolor="#E1E1E1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" width="100%" cellpadding="3">
<tr>
<td width="5%" align="center"><font color="#0000FF">序号</font></td>
<td width="8%" align="center"><font color="#0000FF">用户名</font></td>
<td width="21%" align="center"><font color="#0000FF">网站名称</font></td>
<td width="19%" align="center"><font color="#0000FF">管理员邮箱</font></td>
<td width="19%" align="center"><font color="#0000FF">申请时间</font></td>
<td width="8%" align="center"><font color="#0000FF">初始IP</font></td>
<td width="8%" align="center"><font color="#0000FF">IP数</font></td>
<td width="10%" align="center"><font color="#0000FF">操作</font></td>
</tr>
<%
while(rs.next())
{
pi_step++;
ps_id = rs.getString("id");
ps_SiteName = rs.getString("SiteName");
ps_URL = rs.getString("url");
ps_Email = rs.getString("email");
pi_InitIP = rs.getInt("InitIP");
pi_CoutIP = rs.getInt("CoutIP");
%>
<tr>
<td width="5%" align="center"><font color="#000000"><%=pi_step%></font></td>
<td width="8%" align="center"><font color="#000000"><%=ps_id%></font></td>
<td width="21%"><a href="<%=ps_URL%>" target="_blank"><font color="#000000"><%=ps_SiteName%></font></a></td>
<td width="19%"><a href="mailto:<%=ps_Email%>"><font color="#000000"><%=ps_Email%></font></a></td>
<td width="19%" align="center"><font color="#000000"><%=formatter.format(rs.getTimestamp("CreateDate"))%></font></td>
<td width="8%" align="center"><font color="#000000"><%=pi_InitIP%></font></td>
<td width="8%" align="center"><font color="#000000"><%=pi_CoutIP%></font></td>
<td width="10%" align="center"><font color="#000000"><a target="_blank" href="./infmodify.jsp?id=<%=ps_id%>">修改</a></font> <font color="#000000"><a href="./userdel.jsp?id=<%=ps_id%>&page=<%=pi_curpage%>">删除</a></font></td>
</tr>
<%}
rs.close();
%>
</table>
</center>
</div>
</table>
</center>
</div>
</td>
</tr></table>
<%=ShowPage.ShowPage("userlist.jsp",pi_curpage,pi_PageCount,true,0,true,"#FFFFFF")%>
<table width="750" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF">
<tr>
<td align="center" height="10" width="100%"></td>
</tr>
<tr>
<td align="center" width="100%"><form method="POST" action="adminpass.jsp">
<p>修改管理员密码:<input type="text" name="password" size="20">(不改请置空!) <input type="submit" value="修改" name="B1"></p>
</form>
</td>
</tr>
<tr>
<td align="center" width="100%"><a href="./regstep1.jsp" target="_blank">申请记数器</a>
</td>
</tr>
<tr>
<td align="center" height="10" width="100%"></td>
</tr>
<tr>
<td align="center" width="100%">
<%@ include file="./copyright.jsp" %>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
}
else
{
%>
<meta http-equiv=refresh content=0;url=./login.jsp>
<%}%>
<%@ include file="disconn.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -