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

📄 tf_manager_info_update.jsp

📁 这是我上次报java培训时
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="../../pub_include/ErrPage.jsp" %> 
 <%request.setCharacterEncoding("gb2312");%> 
 <jsp:include page="../../pub_include/pub_function_javascript.html" flush="true"/>  
<%@ page import="jinLing.pub.*,jinLing.manager.*"%> 
<html>
<head>
<style>
<!--
.style2 {color: #FFFFFF}
-->
</style>
<link rel="stylesheet" type="text/css" href="../../pub_include/hosc.css">
<link href="../../pub_include/body_css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312/"> 
</head> 
<% 
  Collection col = null;
  Hashtable list = new Hashtable(); 
 ManagerInfo managerInfo =new ManagerInfo();
//判断增加修改
  String optype = "1";
  if(null != request.getParameter("optype") && !request.getParameter("optype").toString().equals(""))
    optype=request.getParameter("optype").toString(); 
%> 
<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' background='../../images/bg.gif'   >
  <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' >
     <tr>
      <TD width='100%'class='title'> &nbsp;用户管理</span></TD>
      </tr>
  </table>
  <div align='center'>
  <center>
  <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width=100% >
    <tr>
      <td width='100%' height='10' align='center'></td>
    </tr>
    <tr>
      <td width='100%' height='0' valign='top' align='center'>
        <table width='100%' border='1' style='border-collapse: collapse; padding-left:5' bordercolor='#6595D6' cellpadding='0' cellspacing='0'> 
          <tr class='table_biaoti'> 
            
            <td >帐号</td>
            
			<td >姓名</td>
            <td width='5%' >删除</td>
            <td width='5%' >修改</td>
			<td width='10%'> 权限管理</td>
          </tr>
<%
  String pPageNo = "1"; 
  if (null != request.getParameter("PAGENO") &&!request.getParameter("PAGENO").toString().trim().equals("")) 
     if (Integer.parseInt(request.getParameter("PAGENO"))<1) 
       pPageNo="1"; 
  else 
     pPageNo=request.getParameter("PAGENO"); 
  col = managerInfo.execSel(list,pPageNo,"10");
  String pPageCount = String.valueOf(managerInfo.getRecordcount());
  String allCount = pPageCount; 
  pPageCount = (Integer.parseInt(pPageCount)%10==0)?String.valueOf(Integer.parseInt(pPageCount)/10):String.valueOf(Integer.parseInt(pPageCount)/10+1);
  if (Integer.parseInt(pPageCount)<Integer.parseInt(pPageNo))
    pPageNo=pPageCount;
  Iterator it = col.iterator();
  while (it.hasNext())
   {
     Hashtable rs = (Hashtable) it.next();
%>
          <tr class='table_list_lr'> 
            <td  > <%=rs.get("MAN_NO")%>             </td>
          
			<td  > <%=rs.get("MAN_NAME")%>             </td>
            
    <!--删除和修改还要传一些条件参数-->
            <td align='center' height='20'  valign='middle'>
              <img src='../../images/del.gif' width='18' height='18' border='0' style='cursor:hand' onClick="Del_ID('<%=rs.get("MAN_ID")%>')">
            </td>
            <td  align='center' height='20'  valign='middle'>
              <a href='tf_manager_info_update.jsp?optype=2&MAN_ID=<%=rs.get("MAN_ID")%>'>
                <img src='../../images/edit.gif' width='18' height='18' border='0' style='cursor:hand'>
              </a>
            </td> <td  align='center' height='20'  valign='middle'>
              <a href='tf_role.jsp?optype=2&MAN_ID=<%=rs.get("MAN_ID")%>'>
                <img src='../../images/employee.gif' width='18' height='18' border='0' style='cursor:hand'>
              </a>
            </td>
			
         </tr>
 <% 
   } 
%> 
     </table> 
     <p></td> 
    </tr> 
  </table> 
  <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width=90% > 
    <% 
      String strpageno = "tf_manager_info_update.jsp"; 
    %> 
    <form action='<%=strpageno%>' method='POST' name='form_list'> 
    <tr> 
      <td height='17' valign='top' align='center'>&nbsp; </td> 
      <td  height='17' valign='top' align='center'> 
<% 
  String vFirstURL = strpageno; 
  String vPrevURL =  strpageno+"?&PAGENO="+(Integer.parseInt(pPageNo)-1); 
  String vNextURL =  strpageno+"?&PAGENO="+((Integer.parseInt(pPageCount)<(Integer.parseInt(pPageNo)+1))?(Integer.parseInt(pPageCount)):(Integer.parseInt(pPageNo)+1)); 
  String vLastURL =  strpageno+"?&PAGENO="+pPageCount; 
%> 
        <A onClick="PrevURLFun();"  style="cursor:hand "> 上一页 </A>   
		<A onClick="NextURLFun();" style="cursor:hand "> 下一页 </A>  
<script language=javascript>
   function PrevURLFun()
   {
      self.location = "<%=vPrevURL%>";
	  return true;
   }
   function NextURLFun()
   {
      self.location = "<%=vNextURL%>";
	  return true;
   }

</script>                    
      </td> 
    </tr> 
    </form> 
  </table> 
</center> 
</div> 
<script language="javascript"> 
  function onCommit()    //回车键后触发 
  { 
    var p = document.form_list.PAGENO.value; 
     //输入页数若大于总页数,则跳到最后一页 
    if(parseInt(p)><%=Integer.parseInt(pPageCount)%>) 
      document.form_list.PAGENO.value = <%=Integer.parseInt(pPageCount)%> 
    if (window.event.keyCode==13) 
    { 
      document.form_list.submit(); 
    } 
 } 
    //接收上面传来的唯一A_ID值付给pval 
  function Del_ID(pval) 
  { 
    if (window.confirm("您确认删除吗?")) 
      { 
        self.location = "tf_manager_info_del.jsp?MAN_ID="+pval; 
        return true; 
       } 
                   return false; 
  } 
</script> 
    </td> 
  </tr> 
</table> 
</center> 
</div> 
</center> 
</div> 
<% 
String MAN_ID= "" ;   // 
String MAN_NO= "" ;   //帐号
String MAN_PWD= "" ;   //密码
String MAN_NAME= "" ;   //姓名 
int type=Integer.parseInt(optype);
if(type==2)
{
  if(null != request.getParameter("MAN_ID") && !request.getParameter("MAN_ID").toString().equals(""))
  {
    MAN_ID = request.getParameter("MAN_ID").toString();
    list.put("MAN_ID",MAN_ID);
    col = managerInfo.execSel(list);
    Iterator ir = col.iterator();
    Hashtable tt = new Hashtable();
    if (ir.hasNext())
    {
      tt=(Hashtable)ir.next();
      MAN_ID = Util.getNulltoStr(tt.get("MAN_ID"));   //  
	  MAN_NO = Util.getNulltoStr(tt.get("MAN_NO"));   //帐号 
      MAN_PWD = Util.getNulltoStr(tt.get("MAN_PWD"));   //  密码
      MAN_NAME = Util.getNulltoStr(tt.get("MAN_NAME"));   //  姓名
      
    }
  }
}
%>
<br>
<form action="tf_manager_info_java.jsp" name="form_query" method="post"   onSubmit="return ActionStatus()">
  <input name="optype"  type="hidden"  value="<%=optype%>" >
  <input name="MAN_ID" type="hidden" value="<%=MAN_ID%>">
  <div align="center">
  <center>
    <table width='90%' border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111'>
      <tr> 
        <td height='25'  colspan='4' class='tabletop' >用户管理</td>
      </tr>
      <tr>
        <td width='120' class='table_list'>帐号</td>
        <td  width='230'><input type='text' onKeyDown = 'nextInput()' name='MAN_NO' size='25'   maxlength='' value='<%=MAN_NO%>' >
          <font color='#FF0000'>*</font></td>
        <td width='120' class='table_list'>密码 </td>
        <td  width='230'><input type='password' onKeyDown = 'nextInput()' name='MAN_PWD' size='25'   maxlength='' value='<%=MAN_PWD%>' >
          <font color='#FF0000'>*</font> </td>
      </tr>
      <tr>
        <td width='120' class='table_list'>姓名 </td>
        <td  width='230'><input type="text" onKeyDown = 'nextInput()' name='MAN_NAME' size='25'   maxlength='' value='<%=MAN_NAME%>' >
          <font color='#FF0000'>*</font> </td>
      </tr> 
  <tr>  
    <td height='40' colspan='4' align='center' > <input type="submit"  value="提交"  border="0"  > 
              <input  type="reset"  value="取消">
           </td> 
  </tr> 
</table> 
</center> 
</div> 
<br> 
</form> 
<script language=javascript>
function ActionStatus()
{
  return check_input();
 }
function  check_input(){
 var type=true;
  type=check_null(document.form_query.MAN_NO,'请输入帐号!!')
  if (!type)
   {
     return false;
   }
  type=check_null(document.form_query.MAN_PWD,'请输入密码!!')
  if (!type)
   {
     return false;
   }
  type=check_null(document.form_query.MAN_NAME,'请输入姓名!!')
  if (!type)
   {
     return false;
   }
return true;
  }
 </script>
 </body>
 </html>

⌨️ 快捷键说明

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