ibm-information-center/dist/eclipse/plugins/i5OS.ic.apifinder_5.4.0.1/table/results.jsp

205 lines
7.0 KiB
Plaintext
Raw Normal View History

2024-04-02 14:02:31 +00:00
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<title>API finder</title>
<link rel="stylesheet" type="text/css" href="finder.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
<script language="javascript" type="text/javascript">
//START NON-TRANSLATABLE
function openFinder() {
window.location = "/help/topic/apifinder/finder.htm";
}
//END NON-TRANSLATABLE
</script>
</head>
<body>
<h2>API finder</h2>
<script language="javascript" type="text/javascript">
var alert_string = "Enter a value in the search field.";
//START NON-TRANSLATABLE
//alert(window.location);
function openLink(url)
{
var url_low = url.toLowerCase();
var topic_string = "/help/topic/apis/";
if (url_low.indexOf("http://") == 0 ||
url_low.indexOf("https://") == 0 ||
url_low.indexOf("file://") == 0 ||
url_low.indexOf("ftp://") == 0 )
{
window.open(url, 'pdf_window');
}
else if ( url_low.lastIndexOf('.pdf') == url.length-4)
{
window.open(topic_string+url, 'pdf_window');
}
else
{
location = topic_string+url;
}
}
<%
String temp_string = (String)request.getParameter("sort_type");
if (temp_string != null)
out.println("var original_sort_type = \""+temp_string+"\";");
else
out.println("var original_sort_type = \"ascending\";");
temp_string = (String)request.getParameter("sort_column");
if (temp_string != null)
out.println("var original_sort_column = \""+temp_string+"\";");
else
out.println("var original_sort_column = \"apidescriptivename\";");
temp_string = (String)request.getAttribute("query");
if (temp_string != null)
out.println("var original_query = \""+temp_string+"\";");
else
out.println("var original_query = \"\";");
temp_string = (String)request.getParameter("field");
if (temp_string != null)
out.println("var original_field = \""+temp_string+"\";");
else
out.println("var original_field = \"_all\";");
%>
function submitSort(sort_column) {
if (sort_column == original_sort_column)
{
if (original_sort_type == "ascending")
document.form_1.sort_type.value = "descending";
else
document.form_1.sort_type.value = "ascending";
}
else
document.form_1.sort_type.value = "ascending";
document.form_1.sort_column.value = sort_column;
document.form_1.query.value = original_query;
document.form_1.field.value = original_field;
document.form_1.submit();
}
//END NON-TRANSLATABLE
////////// -->
</script>
<form name="form_1" method="GET" action="InteractiveTableManager">
<%
//START NON-TRANSLATABLE
temp_string = (String)request.getParameter("query");
String outString = "";
if (temp_string != null) {
outString = "<input type=hidden name=\"query\" value=\""+temp_string+"\">";
} else {
outString = "<input type=hidden name=\"query\">";
}
out.print(outString);
String lang = (String)request.getParameter("lang");
outString = "<input type=hidden name=\"lang\" value=\""+lang+"\">";
out.print(outString);
temp_string = (String)request.getParameter("query_filter");
if (temp_string != null) {
outString = "<input type=hidden name=\"query_filter\" value=\""+temp_string+"\">";
} else {
outString = "<input type=hidden name=\"query_filter\" value=\"\">";
}
out.print(outString);
//END NON-TRANSLATABLE
%>
<input type=hidden name="table_name" value="table" />
<input type=hidden name="function" value="search" />
<input type=hidden name="sort_type" value="ascending" />
<input type=hidden name="sort_column" value="description" />
<input type=hidden name="field" value="_all" />
<%
//START NON-TRANSLATABLE
temp_string = (String)request.getParameter("search_type");
if (temp_string != null && temp_string.equals("or")) {
outString = "<input type=hidden name=\"search_type\" value=\"or\">";
} else {
outString = "<input type=hidden name=\"search_type\" value=\"and\">";
} out.print(outString);
//END NON-TRANSLATABLE
%>
</form>
<%
//START NON-TRANSLATABLE
String temp_string2 = (String)request.getParameter("query");
String temp_string3 = (String)request.getParameter("field");
//END NON-TRANSLATABLE
String output1 = "<table border='0' width='95%'><tr><td><strong>Results for '"+temp_string2+"'</strong></td><td align='right'><a href=\"javascript:openFinder()\">Back to API command finder</a></td></tr></table>";
String output2 = "<table border='0' width='95%'><tr><td><strong>Results</strong></td><td align='right'><a href=\"javascript:openFinder()\">Back to API finder</a></td></tr></table>";
String output3 = "<table border='0' width='95%'><tr><td><strong>Exit programs</strong></td><td align='right'><a href=\"javascript:openFinder()\">Back to API command finder</a></td></tr></table>";
String output4 = "<table border='0' width='95%'><tr><td><strong>Changed APIs</strong></td><td align='right'><a href=\"javascript:openFinder()\">Back to API command finder</a></td></tr></table>";
String output5 = "<table border='0' width='95%'><tr><td><strong>New APIs</strong></td><td align='right'><a href=\"javascript:openFinder()\">Back to API command finder</a></td></tr></table>";
//START NON-TRANSLATABLE
if (temp_string2 != null) {
if (temp_string2.equals("exitprogram") && temp_string3.equals("specialapi"))
out.print(output3);
else
if (temp_string2.equals("updated") && temp_string3.equals("changestatus"))
out.print(output4);
else
if (temp_string2.equals("new") && temp_string3.equals("changestatus"))
out.print(output5);
else
out.print(output1);
} else {
out.print(output2);
}
//END NON-TRANSLATABLE
%>
<form name="form_2">
<table width="95%" cellpadding="0" cellspacing="5" class="output">
<!-- table definition file must match your results.jsp as far as number and order of columns -->
<tr>
<th align="left" valign="bottom">Descriptive name<br /><input type="button" value="Sort" onClick="submitSort('apidescriptivename');" /></th>
<th align="left" valign="bottom">
<%
output1 = "API name";
output2 = "Exit program";
//START NON-TRANSLATABLE
if (temp_string2.equals("exitprogram") && temp_string3.equals("specialapi"))
out.print(output2);
else
out.print(output1);
//END NON-TRANSLATABLE
%>
<br /><input type="button" value="Sort" onClick="submitSort('apiname');" /></th>
<!-- <th align="left" valign="bottom">Special API<br /><input type="button" value="Sort" onClick="submitSort('specialapi');" /></th>-->
<th align="left" valign="bottom">Category<br /><input type="button" value="Sort" onClick="submitSort('firstlevel');" /></th>
</tr>
<% out.print((String)request.getAttribute("table_data"));%>
</table>
</form>
</body>
</html>