⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view_user.jsp~96~

📁 一个完整的门户网站,基于JSP环境下开发的,使用SQL数据库.
💻 JSP~96~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.bwm.model.User" %>
<%@ page import="com.bwm.core.*" %>
<%@ page import="java.util.*" %>
<html>
<head>
<title>view_user</title>
</head>
<%
        User u=(User)session.getAttribute("user");
        if(u.getUid()==null||"".equals(u.getUid())||u.getStatus()!=FinalConstants.STATUS_ADMIN){
                return;
        }
%>
<link href="../css/css.css" rel="stylesheet" type="text/css">
<body> 
<table border="1" align="center" cellpadding="0" cellspacing="0" class="tableBorder2"> 
  <tr align="center"> 
    <td height="27" colspan="5" >管理用户</td> 
  </tr> 
  <tr align="center"> 
    <td height="27">用户ID</td> 
    <td>注册时间</td> 
    <td>用户权根</td> 
    <td>用户状态</td> 
    <td>&nbsp;</td> 
  </tr> 
  <%
        BasetableFactory bf=BasetableFactory.getInstance();
        int submit_page=ParamUtils.getIntParameter(request,"page");
        Collection coll=bf.ListUser(submit_page,"");
        if(coll==null||coll.size()<=0){
%> 
  <tr align="center"> 
    <td height="27" colspan="5">当前用户记录为空</td> 
  </tr> 
  <%
        }else{
            Iterator it=coll.iterator();
            while(it.hasNext()){
                User user=(User)it.next();
%> 
  <tr align="center"> 
    <td height="27"><%=user.getUid()%> </td> 
    <td><%=user.getRegtime()%></td> 
    <form  method="post" action="modify_user.jsp"> 
      <td> <input type="radio" name="status" value="1" <%=user.getStatus()==FinalConstants.STATUS_ADMIN?"checked":""%>  onClick="Jscript:submit();" > 
        管理员
        <input type="radio" name="status" value="0" <%=user.getStatus()==FinalConstants.STATUS_USER?"checked":""%> onClick="Jscript:submit();" > 
        普通用户
        <input type="hidden" name="uid" value="<%=user.getUid()%>"></td> 
    </form> 
    <form  method="post" action="modify_user.jsp"> 
      <td> <input type="radio" name="state" value="0" <%=user.getState()==FinalConstants.STATE_FREE?"checked":""%> onClick="Jscript:submit();" > 
        正常
        <input type="radio" name="state" value="1" <%=user.getState()==FinalConstants.STATE_FREEZE?"checked":""%> onClick="Jscript:submit();" > 
        冻结
        <input type="hidden" name="uid" value="<%=user.getUid()%>"></td> 
    </form> 
    <form  method="post" action="modify_user.jsp"> 
      <td><input name="" type="image" src="../images/del.gif"> 
        <input type="hidden" name="uid" value="<%=user.getUid()%>"></td> 
    </form> 
  </tr> 
  <%
                }
%> 
  <tr align="right"> 
    <td height="27" colspan="5"><%=HtmlUtils.table(bf.getRow("user"),submit_page,"view_user.jsp")%></td> 
  </tr> 
  <%
        }
%> 
</table> 
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -