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

📄 searchcompanyresult.jsp

📁 解觖java技术中后台无法上传数给的情况
💻 JSP
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/searchcompanyresult.jsp,v 1.23.2.1 2006/07/10 12:59:21 phuongpdd Exp $
 - $Author: phuongpdd $
 - $Revision: 1.23.2.1 $
 - $Date: 2006/07/10 12:59:21 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2006 by MyVietnam.net
 -
 - All copyright notices regarding mvnForum MUST remain 
 - intact in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - http://www.mvnForum.com and http://www.MyVietnam.net in 
 - the footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 -
 - This program is free software; you can redistribute it and/or modify
 - it under the terms of the GNU General Public License as published by
 - the Free Software Foundation; either version 2 of the License, or
 - any later version.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -
 - Support can be obtained from support forums at:
 - http://www.mvnForum.com/mvnforum/index
 -
 - Correspondence and Marketing Questions can be sent to:
 - info at MyVietnam net
 -
 - @author: Tran Van Giang   
 --%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="net.myvietnam.mvncore.util.ParamUtil" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html>
<head>
  <title><fmt:message key="mvnforum.common.forum.title_name"/> - Search Company Results</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="inc_js_checkvalid_myvietnamlib.jsp"%>
<script type="text/javascript">
function SubmitForm(){
  if (ValidateForm() == true ){
    document.submitform.submitbutton.disabled=true;
    document.submitform.submit();
  }
}

function ValidateForm() {
  if (document.submitform.companyname.value  == '' && 
      document.submitform.companyaddress.value == '' && 
      document.submitform.companycreationdate.value == '' && 
      document.submitform.companymodifieddate.value == '' && 
      (document.submitform.fromcompanycreationdate.value == '' || 
      document.submitform.tocompanycreationdate.value == '')) {
    alert("Please enter key word to search company.");
    return false;
  }
  return true;
}
</script>

<%@ include file="header.jsp"%>
<br/>
<%
String strCompanyName = (String)request.getAttribute("CompanyName");
String strCompanyAddress = (String)request.getAttribute("CompanyAddress");
String strCompanyCreationDate = (String)request.getAttribute("CompanyCreationDate");
String strCompanyModifiedDate = (String)request.getAttribute("CompanyModifiedDate");
String strFromCompanyCreationDate = (String)request.getAttribute("FromCompanyCreationDate");
String strToCompanyCreationDate = (String)request.getAttribute("ToCompanyCreationDate");

String sort  = ParamUtil.getParameterFilter(request, "sort");
String order = ParamUtil.getParameterFilter(request, "order");
if (sort.length() == 0) sort = "CompanyName";
if (order.length() == 0) order = "ASC";

int totalCompanies = ((Integer)request.getAttribute("TotalCompanies")).intValue();
//int resultPerPage = ((Integer)request.getAttribute("rows")).intValue();
int companyPostsPerPage = onlineUser.getPostsPerPage();
%>
<table width="98%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" nowrap>
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index", URLResolver.RENDER_URL, "view")%>"><fmt:message key="mvnforum.common.nav.index"/></a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>">Admin CP</a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "companymanagement")%>">Company Management</a>&nbsp;&raquo;&nbsp; 
    Search Company Results
    </td>
  </tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="pagedesc">
    <td>
      There are&nbsp;<b><%=totalCompanies%></b>&nbsp;company have been found.</td>
  </tr>
</table>
<br/>
<pg:pager
  url="searchcompanyprocess"
  items="<%= totalCompanies %>"
  maxPageItems="<%= companyPostsPerPage %>"
  isOffset="true"
  export="offset,currentPageNumber=pageNumber"
  scope="request">
<% String rowsType = "Total Companies"; %>
<pg:param name="sort"/>
<pg:param name="order"/>
<pg:param name="companyname"/>
<pg:param name="companyaddress"/>
<pg:param name="rows"/>
<br/>
<table width="98%" align="center">
  <tr>
    <td>
      <%@ include file="inc_pager.jsp"%>
    </td>
  </tr>
</table>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td align="center">Company Name</td>
    <td align="center">Address</td>
    <td align="center">Phone</td>
    <td align="center">E-mail</td>
    <td align="center">Creation Date</td>
    <td align="center">Modified Date</td>
  </tr>
<%
Collection companyBeans = (Collection) request.getAttribute("CompanyBeans");
//int offset = ((Integer)request.getAttribute("offset")).intValue();

int rowIndex = 0;
for (Iterator iterator = companyBeans.iterator(); iterator.hasNext(); ) {
    CompanyBean companyBean = (CompanyBean)iterator.next();
%>
<pg:item>
  <tr class="<%=MyUtil.getRowCSS(rowIndex++)%>">
    <td nowrap>
        <a class="companyName" href="<%=urlResolver.encodeURL(request, response, "viewcompany?companyid=" + companyBean.getCompanyID())%>"><%=companyBean.getCompanyName()%></a>
    </td>
    <td>
       <%=companyBean.getCompanyAddress()%>
    </td>
    <td nowrap>
       <%=companyBean.getCompanyPhone()%>
    </td>
    <td>
      <a href="mailto:<%=companyBean.getCompanyEmail()%>"><%=companyBean.getCompanyEmail()%></a>
    </td>
    <td align="center"><%=onlineUser.getGMTTimestampFormat(companyBean.getCompanyCreationDate())%>
    </td>
    <td align="center"><%=onlineUser.getGMTTimestampFormat(companyBean.getCompanyModifiedDate())%>   
    </td>
  </tr>
</pg:item>
<%
}//for
if (companyBeans.size() == 0) { %>
  <tr class="portlet-section-body"><td colspan="7" align="center">There are no companies.</td></tr>
<% }//if %>
</table> 
<table width="98%" align="center">
  <tr>
    <td>
      <%@ include file="inc_pager.jsp"%>
    </td>
  </tr>
</table>
</pg:pager>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="pagedesc">
    <td>
      To continue search company here. After this search, the result search will be display above:</td>
  </tr>
</table>
<br/>
<form action="<%=urlResolver.encodeURL(request, response, "searchcompanyprocess")%>" name="submitform">
<%=urlResolver.generateFormAction(request, response, "searchcompanyprocess")%>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td nowrap colspan="2">Search company by...</td>
  </tr>
  <tr class="portlet-section-body">
    <td nowrap width="20%">Company Name has words</td>
    <td nowrap width="78%"> 
    <input type="text" name="companyname" size="60" value="<%=strCompanyName%>"> or</td>
  </tr>
  <tr class="portlet-section-alternate">
    <td nowrap width="20%">Company Address has words </td>
    <td nowrap width="78%"> <input type="text" name="companyaddress" size="60" value="<%=strCompanyAddress%>"></td>
  </tr>
  <!--tr class="portlet-section-body">
    <td nowrap width="20%">Creation Date</td>
    <td nowrap width="78%"> <% if (strCompanyCreationDate.equals("")) strCompanyCreationDate = "dd/MM/yyyy"; %>
    <input type="text" name="companycreationdate" size="60" value="<%=strCompanyCreationDate%>">&nbsp;or
 </td>
  </tr>
  <tr class="portlet-section-alternate">
    <td nowrap width="20%">Modified Date</td>
    <td nowrap width="78%">  <% if (strCompanyModifiedDate.equals("")) strCompanyModifiedDate = "dd/MM/yyyy"; %>
    <input type="text" name="companymodifieddate" size="60" value="<%=strCompanyModifiedDate%>">&nbsp;or
 </td>
  </tr>
  <tr class="portlet-section-body">
    <td nowrap width="20%">From Creation Date</td>
    <td nowrap width="78%">
    <% if (strFromCompanyCreationDate.equals("")) strFromCompanyCreationDate = "dd/MM/yyyy"; 
       if (strToCompanyCreationDate.equals("")) strToCompanyCreationDate = "dd/MM/yyyy"; 
    %>
    <input type="text" name="fromcompanycreationdate" size="26" value="<%=strFromCompanyCreationDate%>"> to 
    <input type="text" name="tocompanycreationdate" size="28" value="<%=strToCompanyCreationDate%>"></td>
  </tr-->
  
  <tr class="portlet-section-body">
    <td>Creation date</td>
    <td>
      <select name="date">
        <option value="0">Any date</option>
        <option value="1">Yesterday</option>
        <option value="7">A week ago</option>
        <option value="14">2 weeks ago</option>
        <option value="30">A month ago</option>
        <option value="90">3 months ago</option>
        <option value="180">6 months ago</option>
        <option value="365">A year ago</option>
      </select> and &nbsp;
      <select name="beforeafter">
        <option value="1">Newer</option>
        <option value="2">Older</option>
      </select>&nbsp;or
    </td>
  </tr>
  <!--tr class="portlet-section-alternate">
    <td>Modified date</td>
    <td>
      <select name="modifieddate">
        <option value="0">Any date</option>
        <option value="1">Yesterday</option>
        <option value="7">A week ago</option>
        <option value="14">2 weeks ago</option>
        <option value="30">A month ago</option>
        <option value="90">3 months ago</option>
        <option value="180">6 months ago</option>
        <option value="365">A year ago</option>
      </select>. And &nbsp;
      <select name="modifiedbeforeafter">
        <option value="1">Newer</option>
        <option value="2">Older</option>
      </select>
    </td>
  </tr-->
  <tr class="portlet-section-footer" align="center">
    <td nowrap colspan="2"> 
    <input type="submit" value="Search" name="submitbutton" onclick="javascript:SubmitForm();" class="portlet-form-button">
    <input type="reset" name="B2" class="liteoption"></td>
  </tr>
</table>
</form>

<br/>
</fmt:bundle>
<%@ include file="footer.jsp"%>
</body>
</html>

⌨️ 快捷键说明

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