---
title: "userlist.jsp"
author: "wangle860102"
date: "2008-05-26T11:36:05Z"
tags: []
slug: "userlist-jsp"
draft: false
lastmod: "2008-05-26T11:36:05Z"
id: 196960
url: "https://wangle.iteye.com/blog/196960"
---

&lt;%@ include file="../../public/include/page.jsp"%&gt;  
&lt;%@ page pageEncoding="GBK"%&gt;  
&lt;html:html&gt;  
&lt;head&gt;  
&lt;/head&gt;  
&lt;script language="JavaScript"&gt;  
 function movetogroup(){  
  with(document.forms\[0]){  
   var codeStr = all\['username'];  
   if(codeStr == null){  
    alert('未选择任何的记录!');  
    return false;  
   }else if(codeStr.length == null){  
    if(username.checked == false){  
     alert('请选择要添加的记录!');  
     return false;  
    }  
   }else if(codeStr.length !== null){  
    var flagStr = true;  
      for(i=0;i&lt;codeStr.length;i++){        
       if(username\[i].checked == true){  
        flagStr = false;  
        break;  
       }    
      }   
      if(flagStr){  
       alert('请选择要添加的记录');  
       return false;  
      }  
   }  
   action = "&lt;%=root%&gt;/manage/policeUserAction.do?method=moveToGroup";  
   submit();  
  }  
 }  
   
 function toDel(){  
  with(document.forms\[0]){  
   var codeStr = all\['username'];  
   if(codeStr == null){  
    alert('未选择任何的记录!');  
    return false;  
   }else if(codeStr.length == null){  
    if(username.checked == false){  
     alert('请选择要删除的记录!');  
     return false;  
    }  
   }else if(codeStr.length !== null){  
    var flagStr = true;  
      for(i=0;i&lt;codeStr.length;i++){        
       if(username\[i].checked == true){  
        flagStr = false;  
        break;  
       }    
      }   
      if(flagStr){  
       alert('请选择要删除的记录');  
       return false;  
      }  
   }  
   
   question = confirm('是否真的删除所选的记录');  
   if (question != "0"){  
   var str = "&lt;%=root%&gt;/manage/policeUserAction.do?method=deletePoliceUser";  
   action=str;  
   submit();  
   }  
  }  
  return true;  
 }  
   
   
 function checkboxes(flag){  
  with(document.forms\[0]){  
   var codeStr = all\['username'];  
   if(flag == "allTrue"){  
   //全选  
    if( codeStr != null && codeStr.length != null ){          
       for(i=0;i&lt;codeStr.length;i++){         
        username\[i].checked=true;  
       }        
      }else if( codeStr != null && codeStr.length == null ){  
          username.checked=true;;  
      }      
   }else if(flag == "allFalse"){  
   //全不选  
    if( codeStr != null && codeStr.length != null ){          
       for(i=0;i&lt;codeStr.length;i++){         
        username\[i].checked=false;  
       }        
      }else if( codeStr != null && codeStr.length == null ){  
          username.checked=false;  
      }      
   }else{  
   //反选  
    if( codeStr != null && codeStr.length != null ){          
       for(i=0;i&lt;codeStr.length;i++){  
        if(username\[i].checked == true){  
         username\[i].checked=false;  
        }else{  
         username\[i].checked=true;  
        }     
       }        
      }else if( codeStr != null && codeStr.length == null ){  
       if(username.checked == true){  
        username.checked=false;  
       }else{  
        username.checked=true;  
       }     
      }      
   }     
    }  
    return true;    
   }  
     
   function toModify(username1){  
    with(document.forms\[0]){  
   action = "&lt;%=root%&gt;/manage/policeUserAction.do?method=toModifyPoliceUser&username="+username1;  
   submit();  
    }  
   }  
     
   function clean(){  
   with(document.forms\[0]){  
    turename.value = "";  
    policeid.value = "3205";  
    isuse.value = "";  
    isonline.value = "";  
    turename.focus();  
   }  
 }  
   
 function showAdd(){  
    url = "&lt;%=root%&gt;/manage/policeUserAction.do?method=toAddPoliceUser";  
    var fram = document.getElementById("newFrame");  
    fram.src = url;  
   }  
       //点击修改按钮时，弹出修改页面  
 function showEdit()  
   {  
    // 获取所选信息的编号  
    var username = getChecked(document.all.item("username"));  
    // 如果没有选择记录  
      if(username == null)  
      {  
       alert("请选择一条记录！");  
       return false;  
      }  
    var url = "&lt;%=root%&gt;/manage/policeUserAction.do?method=toModifyPoliceUser&username="+username.value;  
    var fram = document.getElementById("newFrame");  
    fram.src = url;  
    return true;  
   }  
   function detailtoAdd()  
   {  
     document.forms\[0].action = "&lt;%= request.getContextPath()%&gt;/manage/policeUserAction.do?method=queryPoliceUser";  
      document.forms\[0].submit();  
   }  
&lt;/script&gt;  
&lt;body ondragstart="return false"&gt;  
 &lt;html:form action="/manage/policeUserAction.do?method=queryPoliceUser" method="post"&gt;  
  &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"  
   class="table\_border02" onClick="showHiddenColumn(1);"&gt;  
   &lt;tr style="CURSOR: hand"&gt;  
    &lt;td&gt;  
     &lt;img src="&lt;%=request.getContextPath()%&gt;/images/pic/title\_left.gif"  
      width="3" height="25"&gt;  
    &lt;/td&gt;  
    &lt;td width="100%" class="column\_title"&gt;  
     &lt;nobr&gt;  
      公安局用户列表  
     &lt;/nobr&gt;  
    &lt;/td&gt;  
    &lt;td class="column\_title" style="padding-right:6px;"&gt;  
     &lt;img  
      src="&lt;%=request.getContextPath()%&gt;/images/pic/icon\_column\_opened.gif"  
      width="17" height="17" border="0" id="columnIcon1"&gt;  
    &lt;/td&gt;  
    &lt;td class="column\_title" style="padding-right:6px;"&gt;  
     &nbsp;  
    &lt;/td&gt;  
    &lt;td&gt;  
     &lt;img src="&lt;%=request.getContextPath()%&gt;/images/pic/title\_right.gif"  
      width="3" height="25"&gt;  
    &lt;/td&gt;  
   &lt;/tr&gt;  
  &lt;/table&gt;  
  &lt;div id="columnDiv1" style="display:block;padding-bottom:6px;"&gt;  
  &lt;table class="table-form"&gt;  
   &lt;tr&gt;  
    &lt;th&gt;  
     用户姓名  
    &lt;/th&gt;  
    &lt;td&gt;  
     &lt;html:text name="policeUserActionForm" property="policeUserQO.turename" styleId="turename" styleClass="box"/&gt;  
    &lt;/td&gt;

    &lt;th&gt;  
     所属部门  
    &lt;/th&gt;  
    &lt;td&gt;  
     &lt;hpmis:orgtree name ="policeUserActionForm" property="policeUserQO.policeid" orgInfoName="orgInfo" styleId="policeid"/&gt;  
     &lt;%--&lt;param:select type="policeDepa" name="policeUserActionForm" property="policeUserQO.policeid" nullStr="--请选择--" styleId="policeid" /&gt;--%&gt;  
    &lt;/td&gt;  
   &lt;/tr&gt;   
   &lt;tr&gt;  
    &lt;th&gt;  
     帐户是否可用  
    &lt;/th&gt;  
    &lt;td&gt;  
     &lt;param:select type="isuse" name="policeUserActionForm" nullStr="全部" property="policeUserQO.isuse" styleId="isuse" /&gt;  
    &lt;/td&gt;  
    &lt;th&gt;  
     是否在线  
    &lt;/th&gt;  
    &lt;td&gt;  
     &lt;param:select type="hasPay" name="policeUserActionForm" nullStr="全部" property="policeUserQO.isonline" styleId="isonline" /&gt;  
    &lt;/td&gt;  
   &lt;/tr&gt;  
  &lt;/table&gt;  
  &lt;table width="100%" height="4px" border="0" cellpadding="0" cellspacing="0"&gt;  
     &lt;tr&gt;  
     &lt;td&gt;&lt;/td&gt;  
   &lt;/tr&gt;  
   &lt;/table&gt;  
  &lt;table width="100%" border="0" cellspacing="0" cellpadding="0" style="cursor:pointer;"&gt;  
     &lt;tr&gt;  
      &lt;td align="center"&gt;  
       &lt;input id="add" name="add" type="submit" class="button\_fix" value="查&nbsp;&nbsp;询" onMouseOver="this.className='button\_fix\_over'" onMouseOut="this.className='button\_fix'" onMouseDown="this.className='button\_fix\_down'"  
        onMouseUp="this.className='button\_fix\_over'" onFocus="this.blur();"/&gt;  
       &lt;input id="edit" name="edit" type="button" class="button\_fix" value="重&nbsp;&nbsp;置" onMouseOver="this.className='button\_fix\_over'" onMouseOut="this.className='button\_fix'" onMouseDown="this.className='button\_fix\_down'"  
        onMouseUp="this.className='button\_fix\_over'" onFocus="this.blur();" onClick="clean()" /&gt;  
      &lt;/td&gt;  
     &lt;/tr&gt;  
   &lt;/table&gt;  
    
    
  &lt;display:table htmlId="singleCheckHtmlId" name="pageInfo" defaultorder="descending"  export="false" id="node"  pagesize="10" requestURI="" class="grid"&gt;  
     &lt;display:column title="选择框" sortable="false"&gt;  
      &lt;INPUT type="radio" name="username" id="username" value="&lt;bean:write name="node" property="username"/&gt;" onclick="showEdit()"&gt;  
     &lt;/display:column&gt;  
        
     &lt;display:column property="username" title="用户帐号"/&gt;  
        
     &lt;display:column property="turename" title="用户姓名"/&gt;  
        
     &lt;display:column title="所属部门"&gt;  
      &lt;param:display type="police" name="node" property="policeid"/&gt;  
     &lt;/display:column&gt;  
       
     &lt;display:column title="是否绑定IP"&gt;  
      &lt;param:display type="isip" name="node" property="isip"/&gt;  
     &lt;/display:column&gt;  
       
     &lt;display:column property="ip" title="IP地址"/&gt;  
        
     &lt;display:column title="帐号是否可用"&gt;  
      &lt;param:display type="isuse" name="node" property="isuse"/&gt;  
     &lt;/display:column&gt;  
       
     &lt;display:column title="是否在线"&gt;  
      &lt;param:display type="hasPay" name="node" property="isonline"/&gt;  
     &lt;/display:column&gt;  
       
    &lt;/display:table&gt;  
   &lt;table width="100%" height="4px" border="0" cellpadding="0" cellspacing="0"&gt;  
     &lt;tr&gt;  
     &lt;td&gt;&lt;/td&gt;  
   &lt;/tr&gt;  
   &lt;/table&gt;  
   &lt;table width="100%" border="0" cellspacing="0" cellpadding="0" style="cursor:pointer;"&gt;  
     &lt;tr&gt;  
      &lt;td align="center"&gt;  
       &lt;input id="add" name="add" type="button" class="button\_fix" value="增&nbsp;&nbsp;加" onMouseOver="this.className='button\_fix\_over'" onMouseOut="this.className='button\_fix'" onMouseDown="this.className='button\_fix\_down'"  
        onMouseUp="this.className='button\_fix\_over'" onFocus="this.blur();" onClick="showAdd();" /&gt;  
       &lt;input id="edit" name="edit" type="button" class="button\_fix" value="修&nbsp;&nbsp;改" onMouseOver="this.className='button\_fix\_over'" onMouseOut="this.className='button\_fix'" onMouseDown="this.className='button\_fix\_down'"  
        onMouseUp="this.className='button\_fix\_over'" onFocus="this.blur();" onClick="showEdit();" /&gt;  
      &lt;/td&gt;  
     &lt;/tr&gt;  
   &lt;/table&gt;  
 &lt;/div&gt;  
 &lt;/html:form&gt;  
 &lt;table width="100%" height="4px" border="0" cellpadding="0" cellspacing="0"&gt;  
     &lt;tr&gt;  
     &lt;td&gt;&lt;/td&gt;  
   &lt;/tr&gt;  
   &lt;/table&gt;  
 &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"  
  onClick="showHiddenColumn(2);"&gt;  
  &lt;tr style="CURSOR: hand"&gt;  
   &lt;td&gt;  
    &lt;img src="&lt;%=request.getContextPath()%&gt;/images/pic/title\_left.gif"  
     width="3" height="25"&gt;  
   &lt;/td&gt;  
   &lt;td width="100%" class="column\_title"&gt;  
    &lt;nobr&gt;  
     增加/修改公安局用户  
    &lt;/nobr&gt;  
   &lt;/td&gt;  
   &lt;td class="column\_title" style="padding-right:6px;"&gt;  
    &lt;img src="&lt;%=request.getContextPath()%&gt;/images/pic/icon\_column\_opened.gif"  
     width="17" height="17" border="0" id="columnIcon2"&gt;  
   &lt;/td&gt;  
   &lt;td class="column\_title" style="padding-right:6px;"&gt;  
    &nbsp;  
   &lt;/td&gt;  
   &lt;td&gt;  
    &lt;img src="&lt;%=request.getContextPath()%&gt;/images/pic/title\_right.gif"  
     width="3" height="25"&gt;  
   &lt;/td&gt;  
  &lt;/tr&gt;  
 &lt;/table&gt;  
 &lt;div id="columnDiv2" style="display:block;padding-bottom:6px;"&gt;  
  &lt;iframe id="newFrame" src="" style="filter: Chroma(Color=white)"  
   width=100% height="350" frameborder="0" scrolling="auto" /&gt;  
  &lt;/iframe&gt;  
 &lt;/div&gt;  
&lt;/body&gt;  
&lt;/html:html&gt;