x_list_admin_user.jsp
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:5k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html;charset=gb2312"%>
- <%@include file="../include/checkadmin.jsp"%>
- <html>
- <head>
- <title>::::翔鹭石化企业(厦门)有限公司::::</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link rel="stylesheet" href="../include/main.css" type="text/css">
- </head>
- <%@page import="java.sql.*"%>
- <%@include file="../include/db_conn.jsp"%>
- <%@include file="../include/const.jsp"%>
- <%@include file="../include/header.jsp"%>
- <%!String me_ver;%>
- <%!String me_ver_title;%>
- <%!String keyword;%>
- <%
- me_ver=request.getParameter("me_ver");
- if(me_ver==null){
- me_ver="cn";
- me_ver_title="中文版";
- }else if(me_ver.equals("en")){
- me_ver_title="英文版";
- }else if(me_ver.equals("cn")){
- me_ver_title="中文版";
- }else{
- me_ver="cn";
- me_ver_title="中文版";
- }
- keyword=request.getParameter("keyword");
- if(keyword==null){
- keyword="";
- }else{
- keyword=getGBString(keyword);
- }
- String admin_username;
- //获取客户名称
- admin_username = (String)session.getAttribute("admin_username");
- %>
- <script language="javascript">
- function count_checked_items() {
- var number_checked=0;
- var box_count=document.frm_list.admin_id.length;
- if ( box_count==null ) {
- if ( document.frm_list.admin_id.checked==true ) {
- number_checked=1;}else {
- number_checked=0;}}
- else {
- for ( var i=0; i < (box_count); i++ ) {
- if ( document.frm_list.admin_id[i].checked==true ) {
- number_checked++;}}}return number_checked;}
- function select_All(checked){
- for (var i=0;i<document.frm_list.elements.length;i++){
- var e = document.frm_list.elements[i];
- if (e.name != 'allbox')
- e.checked = checked;
- }
- document.all.check_all.checked=checked;
- }
- function select_ok(){
- if(document.all.check_all.checked){
- document.frm_list.button_select.value="取消";
- select_All(true)}
- else{
- document.frm_list.button_select.value="全选";
- select_All(false)
- }
- }
- function select_change(){
- if(document.frm_list.button_select.value=="全选"){
- document.frm_list.button_select.value="取消";
- select_All(true);
- }
- else{
- document.frm_list.button_select.value="全选";
- select_All(false);
- }
- }
- </script>
- <table width="700" border="0" cellspacing="1" cellpadding="0" align="center" height="37" class="p9">
- <tr>
- <td height="24" bgcolor="#f0f0f0"><font face="webdings" color="#666666">8</font><a href="customer_list.jsp">返回主菜单</a> <img src="/pixel.gif" width="200" height="1"><span style="FONT-SIZE: 14px"><b><font color="#666666">用户修改</font></b></span></td>
- </tr>
- <form name="frm_search" action="x_list_admin_user.jsp" method="post">
- <tr>
- <td align="center" bgcolor="#ffffff" height=40>关键字:<input type="text" name="keyword"> <input type="submit" name="s1" value="搜索" style="width:80px;height:22px;"></td>
- </tr>
- </form>
- <%
- int intPageSize; //一页显示的记录数
- int intRowCount; //记录总数
- int intPageCount; //总页数
- int intPage; //待显示页码
- String strPage;
- int i;
- //版本控制
- //设置一页显示的记录数
- intPageSize = 15;
- //取得待显示页码
- strPage = request.getParameter("page");
- if(strPage==null){//表明在QueryString中没有page这一个参数,此时显示第一页数据
- intPage = 1;
- }
- else{//将字符串转换成整型
- intPage = java.lang.Integer.parseInt(strPage);
- if(intPage<1) intPage = 1;
- }
- sql="SELECT * FROM tbl_admin_user where (admin_type in (65,66))and(admin_username <>'"+admin_username+"') ORDER BY admin_type desc";
- if(keyword.length()!=0)
- {
- sql="SELECT * FROM tbl_admin_user where (admin_type in(65,66))and(admin_username <>'"+admin_username+"')";
- sql= sql + "and (admin_username like '%"+keyword+"%') ORDER BY admin_type desc";
- }
- rs=smt.executeQuery(sql);
- //获取记录总数
- rs.last();
- intRowCount = rs.getRow();
- //记算总页数
- intPageCount = (intRowCount+intPageSize-1) / intPageSize;
- //调整待显示的页码
- if(intPage>intPageCount) intPage = intPageCount;
- %>
- <tr bgcolor="#ffffff">
- <td align="center" class=p14 height=80>
- <table border="0" cellpadding="0" cellspacing="0" class="p9" width="100%">
- <form name="frm_list" method="post">
- <tr align=center>
- <td>
- <%@include file="x_l_admin_user.jsp"%>
- </td>
- </tr>
- <input type="hidden" name="page" value=<%=intPage%>>
- <input type="hidden" name="keyword" value=<%=keyword%>>
- </form>
- </table>
- </td>
- </tr>
- <tr align="center">
- <td height="26" bgcolor="#f0f0f0">
- <div align="center">
- <strong>分页显示:</strong> <FONT color=red>第<%=intPage%>页 共<%=intPageCount%>页 | 总<%=intRowCount%>条</FONT>
- <%@include file="../include/showpage.jsp"%>
- 转到第<input type="text" name="goto_page1" value=<%=intPage%> class=box1 size=3 maxlength=3>页
- <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="Go" name="cmd_goto" onclick="javascript:viewPage(document.all.goto_page1.value);">
- </div>
- </td>
- </tr>
- </table>
- <form action="x_list_admin_user.jsp" method=post name="frm_page">
- <input type="hidden" name="page">
- <input type="hidden" name="keyword" value=<%=keyword%>>
- </form>
- <br>
- <%
- rs.close();
- smt.close();
- conn.close();
- %>
- <%@include file="../include/bottom.jsp"%>
- </body>
- </html>