home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
CMCD0703.ISO
/
Software
/
Freeware
/
Programare
/
bugzero
/
jsp
/
query.jsp
< prev
next >
Wrap
Text File
|
2003-06-09
|
6KB
|
151 lines
<%@ page
import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
%>
<html>
<head>
<title>Find and Search</title>
<script LANGUAGE="JavaScript" src="script/query.js"></script>
</head>
<body topmargin=0>
<%@ include file="_cache.jspf" %>
<%@ include file="_header.jspf" %>
<%
String baseUrl = contextPath+"/servlet/query";
String projectId = person.getProject();
Project conf = Project.getInstance(projectId);
String[] optionList;
String switchB = ListMaker.makeOptionList(new String[]{"<", ">", "-"}, new String[]{"before", "after", "between"}, null);
// used only to get the default show columns etc.
com.websina.bean.Query query = person.getQuery();
if (query.getFilter() == null) {
query.loadFilter();
}
%>
<center>
<font size=+1><b><%=label.get("query", projectId)%></b></font>
<p>
<form name="queryForm">
<table cellspacing=1 cellpadding=1 border=1>
<tr bgcolor="#cccccc">
<td><a href="#" class="clickme"
TITLE="click to <%=label.get("submit_stored_query")%>"
onClick="if(queryForm.queryname.selectedIndex>-1) href=do_query('<%=baseUrl%>', 'submit_stored_query', queryForm.queryname.options[queryForm.queryname.selectedIndex].value);">
<%=label.get("submit_stored_query")%><img src="img/query.gif" border=0 align=middle vspace=-10></a></td>
<td><select name="queryname">
<%=ListMaker.makeOptionList(person.getStoredQuery().getValue())%>
</select>
</td>
<td><a href="#" class="clickme"
TITLE="click to <%=label.get("remove_stored_query")%>"
onClick="if(queryForm.queryname.selectedIndex>-1) href=do_query('<%=baseUrl%>', 'remove_stored_query', queryForm.queryname.options[queryForm.queryname.selectedIndex].value);">
<img src="img/delete.gif" border=0 align=middle><%=label.get("remove_stored_query")%></a></td>
</tr>
</table>
</form>
<form name="query_form" method="post" action="<%=baseUrl%>">
<input type="hidden" name="action" value="advanced_query">
<%@ include file="_queryform.jspf" %>
<table cellspacing=4 cellpadding=2 border=0>
<tr>
<td align=center bgcolor="#e0e0e0"><%=label.get("responsible", projectId)%><br>
<select name=responsible size=4 multiple>
<%=ListMaker.makeOptionList(conf.getAccess().getUsers("edit"), default_option) %>
</select></td>
<% if (!Group.isGuest(person.getGroup())) { %>
<td align=center>
<select name=author_responsible>
<option value="OR"> | |</option>
<option value="AND">&&</option>
</select>
</td><td align=center bgcolor="#e0e0e0">
<%=label.get("author", projectId)%><br>
<select name=author size=4 multiple>
<%=ListMaker.makeOptionList(conf.getAccess().getAuthors(), default_option) %>
</select></td>
<% } %>
</tr></table>
<table cellspacing=4 cellpadding=2 border=0>
<tr>
<td bgcolor="#e0e0e0"><%=label.get("synopsis", projectId)%> <font color=red>¹</font></td>
<td><input size=50 name=synopsis> </td>
</tr><tr>
<td bgcolor="#e0e0e0">
<%=label.get("issue_description", projectId)%>/
<br>
<%=label.get("issue_response", projectId)%> <font color=red>¹</font>
</td>
<td><input size=50 name=issue_description></td>
</tr></table>
<table cellspacing=4 cellpadding=2 border=0>
<tr><td><table cellspacing=2 cellpadding=4 border=1>
<tr>
<td align=center><b><%=label.get("search_by_date")%></b> <font color=red>²</font></td>
<td align=center>mm/dd/yyyy or yyyy-mm-dd h24:MI:ss</td></tr>
<tr>
<td bgcolor="#e0e0e0"><%=label.get("arrived_date")%></td>
<td><select name=arrived_date_switch>
<%=switchB%>
</select>
<input size=30 name=arrived_date></td></tr>
<tr>
<td bgcolor="#e0e0e0"><%=label.get("last_modified")%></td>
<td><select name=last_modified_switch>
<%=switchB%>
</select>
<input size=30 name=last_modified></td></tr>
<tr>
<td bgcolor="#e0e0e0"><%=label.get("closed_date")%></td>
<td><select name=closed_date_switch>
<%=switchB%>
</select>
<input size=30 name=closed_date></td></tr>
</table>
</td>
<td align=center bgcolor="#e0e0e0"><b><%=label.get("show_columns")%></b><br>
<select name="show_columns" size=7 multiple>
<%=ListMaker.makeOptionList(label, projectId, conf.columnFields(), query.getShowColumns()) %>
</select></td>
</tr>
<tr bgcolor="#ffffff"><td align=center colspan=2>
<br>
<%=label.get("ignore_closed")%>
<input type="checkbox" name="ignore_closed" value="closed" checked>
<%=label.get("show_numbers")%>
<input type="text" name="show_numbers" size=1 maxlength=3 value="<%=query.getShowNumbers()%>">
<%=label.get("sort_order_label")%>
<select name="sort_field">
<%=ListMaker.makeOptionList(label, projectId, conf.sortFields(), query.getSortOrder()) %>
</select>
</td></tr>
<tr>
<td height=40 align=center valign=bottom colspan=2><input type=submit value="<%=label.get("submit_query_button")%>">
<input type=reset value="<%=label.get("reset_button")%>"></td>
</tr>
<tr>
<td colspan=2>
<br>
<font color=red>¹</font>
<font size="-1">
You can use AND(&, +) and OR(|) between words in text fields. A comma or space
is treated as OR.</font>
<br>
<font color=red>²</font>
<font size="-1">
If you use 'between' for the date, please seperate the start and the end dates with a comma(,).
</font>
</td></tr>
</table>
</form>
</center>
</body></html>