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

📄 logsearch.jsp

📁 一个真实项目的源代码。有一个比较优秀的时间类
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<div align="center">
<form name="logForm" method="post" action="CtrlLog?action=search">
  <table width="95%" height="98" border="0" align="center" cellpadding="0" cellspacing="0" class=table_content>
    <tr id="table_content_root">
      <td colspan="8"> 公司:
          <select name="company" id="select2" onChange="doSearch()">
            <option selected value="">公司名称</option>
            <%
		  if(companyList!=null){
		  for(int i=0;i<companyList.size();i++)
		  {
		  CompanyObj Obj=(CompanyObj)companyList.get(i);
		  %>
            <option value="<%=Obj.getCompanyid()%>"><%=Obj.getName()%></option>
            <%
		  }
		  }
		  %>
          </select>
      部门:
      <select name="department" id="department" onChange="doSearch()">
        <option selected value="">部门名称</option>
        <%
		  if(departmentList!=null){
		  for(int i=0;i<departmentList.size();i++)
		  {
		  UnitObj  Obj=(UnitObj)departmentList.get(i);
		  %>
        <option value="<%=Obj.getUnitid()%>"><%=Obj.getName()%></option>
        <%
		  }
		  }
		  %>
      </select>
      员工:
      <select name="user" id="user" >
        <option selected value="">员工姓名</option>
        <%
		  if(userList!=null){
		  for(int i=0;i<userList.size();i++)
		  {
		  com.langchao.comm.authority.UserinfoObj  Obj=(com.langchao.comm.authority.UserinfoObj)userList.get(i);
		  %>
        <option value="<%=Obj.getUserid()%>"><%=Obj.getUseraccount()%></option>
        <%
		  }
		  }
		  %>
      </select>
    </tr>
    <tr>
      <td colspan="8">模块:
        <select name="funcname" onChange="doSearch()">
          <option value="" selected>选择模块</option>
        <%
		  if(funcList!=null){
		  for(int i=0;i<funcList.size();i++)
		  {
		  FunctableObj  obj=(FunctableObj)funcList.get(i);
		  String funcenname=obj.getFuncenname();
		  if(TextParser.find(functions,funcenname))  //权限控制  wangxd 20060728
		  %>

		<option value="<%=obj.getFuncenname()%>"><%=obj.getFunccnname()%></option>
        <%
		  }
		  }
		  %>
        </select>
      操作:
      <select name="opname" id="opname">
        <option value="" selected>选择操作</option>
       <%
		  if(opList!=null){
		  for(int i=0;i<opList.size();i++)
		  {
		  FunctableObj  obj=(FunctableObj)opList.get(i);
		  %>

		<%
		  String optypeCnname=obj.getOptypecnname();
		   if(optypeCnname==null)
			   optypeCnname="暂无操作";
		%>
		<option value="<%=obj.getOptypeenname()%>"><%=optypeCnname%></option>
        <%
		  }
		  }
		  %>
      </select>
      操作时间:
      <input name="begintime" type="text" id="begintime"   value="<%=begintime%>" size="9">
      <image vwidth="1" vheight="1" src="images/date.gif" name="btFrom" onclick="openCalenderS('begintime');" style="FONT-FAMILY: arial; FONT-SIZE: 9pt; FONT-WEIGHT: bold; " type=button value="..."> 至
      <input name="endtime"  type="text" id="endtime"   value="<%=endtime%>" size="9" >
      <image vwidth="1" vheight="1" src="images/date.gif" name="btFrom" onclick="openCalenderS('endtime');" style="FONT-FAMILY: arial; FONT-SIZE: 9pt; FONT-WEIGHT: bold; " type=button value="...">
		<input type="button" class="button" name="search2"  value="查询" onclick="doSearch()">
		</td>
    </tr>  <tr>
        <td colspan="8" class="table_title_white"><img src="../images/pix.gif" /></td>
      </tr>
    <tr class=tr_content width="100%">
      <td nowrap>
        <div align="center">
          <input type="checkbox" name="chkall" value="checkbox"  id="chkall" onClick="return cf_checkall('logForm.chkdel',this.checked);">
        </div></td>
      <td nowrap><div align="center">编号</div></td>
      <td nowrap><div align="center">操作人</div></td>
      <td nowrap><div align="center">功能模块</div></td>
      <td nowrap><div align="center">操作</div></td>
      <td nowrap><div align="center">失败原因</div></td>

      <td nowrap><div align="center">是否成功</div></td>
      <td nowrap><div align="center">操作时间</div></td>
    </tr>
    <%
			//动态提取内容
			   List itemList = curPage.getList();
			   int itemNum = 0;
			   if(itemList==null)
			     itemNum =0;
			   else
		       itemNum = itemList.size();
			   if(itemNum==0)
			      out.println("没有合适的记录!请重新查找!");
			   else{
			      for(int i=0;i< itemNum;i++){
				   LogObj logObj=(LogObj)itemList.get(i);
		          if (i%2==1)
				  out.println("<tr onDblClick=doDetail('"+logObj.getId()+"') style='cursor:hand' title='双击看详情'>");
				  else
				  out.println("<tr class=tr_content_blue onDblClick=doDetail('"+logObj.getId()+"') style='cursor:hand' title='双击看详情'>");
				%>
    <td nowrap><div align="center">
    <input type="checkbox" name="chkdel"  id="chkdel" onclick="return cf_isDisable('logForm.btndel',this.checked);" value="<%=logObj.getId()%>">
    </div></td>
      <td nowrap><div align="center"><%=logObj.getId()%></div></td>
      <td nowrap><div align="center"><%=logObj.getUseraccount()%></div></td>
      <td nowrap><div align="center"><%=logObj.getFunccnname()%></div>        </td>
      <%
	       String optypeCnname=logObj.getOptypecnname();
	       if(optypeCnname!=null)  {
	  %>
	  <td nowrap><div align="center"><%=optypeCnname%></div></td>
	  <%
		   }     else	{
	  %>
	     <td ><div align="center">&nbsp;</div></td>
      <%
	       }
	  String result = logObj.getResult();
	  %>
      <td><div align="center"><%= result == null || result.trim().equals("") ? "&nbsp;" : result%></div></td>

      <td nowrap><div align="center">
      	<%
      		//处理
      		String isSuccess = logObj.getIssuccess();
      		if(isSuccess==null||isSuccess.trim().equals("")){
      			out.println("&nbsp;");
      		}else{
      		out.println(isSuccess.equals("0") ? "失败" : "成功");
      		}
      	%></div>
      </td>

       <%
		  String timeStamp=logObj.getTimestamp();
	      if(timeStamp!=null){
	   %>
	  <td nowrap><div align="center"><%=timeStamp%></div></td>
	  <%
		  }
	   else{
	   %>
	    <td nowrap><div align="center">&nbsp;</div></td>
		<%
	       }
	   %>
    </tr>
  <%
  }
  }
  %>
    <tr>
        <td colspan="8" class="table_title_white"><img src="../images/pix.gif" /></td>
      </tr>

    <tr id="table_content_root">
      <td colspan="8">
		<div align="center">
       <input name="btndel" type="button" class="button" id="btndel" value="删除" onclick="return delCheck(this.form);"  disabled>
       <%
        if (curPage.getPageCount() > curPage.getCurPageNum()){%>
        共<%=totalRecord%>条记录 共<%=curPage.getPageCount()%>页 当前为第<%=curPage.getCurPageNum()%>页
        <%
        if(curPage.hasPreviousPage())
        {
          int tmpS = curPage.getStartOfPreviousPage();

          out.println("<a href='CtrlLog?action=search&startRecord=" + tmpS + "&pageSize=" + ItemCount+"&user="+user+"&funcname="+funcname+"&opname="+opname+"&begintime="+begintime+"&endtime="+endtime+"'><font color=\"#0000FF\">上一页</font></a>");
        } else{
          %>
           上一页
          <%
          }
          if(curPage.hasNextPage())
          {
            int tmpS = curPage.getStartOfNextPage();

            out.println("<a href='CtrlLog?action=search&startRecord=" + tmpS + "&pageSize=" + ItemCount+"&user="+user+"&opname="+opname+ "&funcname="+funcname+ "&begintime="+begintime+"&endtime="+endtime+"'><font color=\"#0000FF\">下一页</font></a>");
          } else{
            %>
            下一页 
            <%
            }
            %>
            转到第
            <input type="text" name="inputpageNum" class=input size="3">
            页 <input type="button" class="button_go"  value="" onclick="doGo(<%=ItemCount%>,<%=PageCount%>)"></div></td>
    </tr>
    <%  } else{%>
            共<%=totalRecord%>条记录 共<%=curPage.getPageCount()%>页 当前为第<%=curPage.getCurPageNum()%>页
        <%
        if(curPage.hasPreviousPage())
        {
          int tmpS = curPage.getStartOfPreviousPage();

          out.println("<a href='CtrlLog?action=search&startRecord=" + tmpS + "&pageSize=" + ItemCount+"&user="+user+"&funcname="+funcname+"&opname="+opname+"&begintime="+begintime+"&endtime="+endtime+"'><font color=\"#0000FF\">上一页</font></a>");
        } else{
          %>
           上一页
          <%
          }
          if(curPage.hasNextPage())
          {
            int tmpS = curPage.getStartOfNextPage();

            out.println("下一页");
          } else{
            %>
            下一页 
            <%
            }
            %>
            转到第
            <input type="text" name="inputpageNum" class=input size="3">
            页 <input type="button" class="button_go"  value="" onclick="doGo(<%=ItemCount%>,<%=PageCount%>)"></div></td>
    </tr>
    <%} %>

  </table>
  </form>
</div>
</body>
</html>

⌨️ 快捷键说明

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