Files
resatennis_tyroltenn/www/cgi-bin/pfsearch.cgi

184 lines
4.4 KiB
Perl
Executable File

#!/usr/sbin/perl
# ----------------------
# VARIBALES
$docroot = "/performer";
$dbsdir = "/var/www/htdocs/performer/dbs";
$cgiroot = "/cgi-bin";
# ----------------------
$SEARCHTYPE = $ARGV[0];
if ($SEARCHTYPE =~ /_HRCHY/) {
($TREE = $SEARCHTYPE) =~ s/LIB(.*)_HRCHY/$1/;
$TREE =~ tr/A-Z/a-z/;
print qq!
<HTML>
<HEAD>
<TITLE>Query Tool</TITLE>
!;
&javafunc();
print qq!
</HEAD>
<BODY BGCOLOR="f2f5bd">
!;
print qq!
<TABLE BORDER=0>
<TR>
<TD WIDTH="200" VALIGN="TOP">
<FONT SIZE="+1"><B>API Search Tool:<BR> Lib${TREE} Hierarchy</B></FONT>
<P>
<FORM>
<input type=image name="Go To Top Page" SRC=\"$docroot/images/api.back.button.gif" BORDER=0 onClick="history.go(-1)">
</FORM>
</TD>
<TD>
!;
&srchbuttons();
print qq!
</TR>
</TABLE>
!;
#print "<HR>\n";
print "\n<CENTER>\n<A HREF=\"$docroot/images/tree.${TREE}.grouping.map\" TARGET=\"results_frame\">\n<IMG SRC=\"$docroot/images/tree.${TREE}.grouping.gif\" BORDER=0 ISMAP ALT=\"${TREE}\"></A>\n</CENTER>";
} else {
$logo = 1;
&searchsetup();
} # end if SEARCHTYPE
# ----------------------------------------
sub searchsetup {
print qq!
<HTML>
<HEAD>
<TITLE>Query Tool</TITLE>
!;
&javafunc();
print qq!
</HEAD>
<BODY BGCOLOR="000000" TEXT="ffffff">
<TABLE>
<TR>
!;
if ($logo eq 1) {
print qq!
<TD ALIGN="CENTER" COLSPAN=2>
<IMG SRC=\"$docroot/images/api.top.gif\">
</TD>\n<TR>\n<TD>\n
!;
} else {
print qq!
<TD ALIGN="CENTER">
</TD>\n<TR>\n<TD>\n
!;
}
&srchbuttons();
if ($logo eq 1) {
print "\<TD VALIGN\=\"BOTTOM\">\n";
#print "\<TD>\n";
&libstr();
print "\</TD\>\n";
} else {
print qq!
<TD>
</TD>
!;
}
print qq!
</TR>
</TABLE>
!;
print "</BODY></HTML>\n";
} # End searchsetup
# --------------------------------------
# Setups the row of buttons at the bottom right corner
sub libstr {
print qq!
<MAP NAME="libbuttons">
<AREA SHAPE="rect" HREF="$cgiroot/pfsearch.cgi?LIBPF_HRCHY" COORDS="62,40,96,55" TARGET="search_frame">
<AREA SHAPE="rect" HREF="$cgiroot/pfsearch.cgi?LIBPFUI_HRCHY" COORDS="47,59,96,74" TARGET="search_frame">
<AREA SHAPE="rect" HREF="$docroot/help/" COORDS="108,28,147,40" TARGET="results_frame">
<AREA SHAPE="rect" HREF="$cgiroot/pfmanpagebrowse.cgi" COORDS="18,45,220,57" TARGET="results_frame">
<AREA SHAPE="rect" HREF="http://www.sgi.com/Technology/Performer/" COORDS="108,62,220,74" TARGET="results_frame">
</MAP>
<IMG BORDER=0 SRC="$docroot/images/api.right.bott.gif" USEMAP="#libbuttons">
!;
} # end libstr
# --------------------------------------
# Setups the row of buttons for searching
sub srchbuttons {
print <<END;
<FORM METHOD="POST" ACTION="$cgiroot/pfresults.cgi" TARGET="results_frame" NAME=theform>
Search for:<BR>
<INPUT NAME="STRING" SIZE=20>
<!-- INPUT TYPE="image" SRC="$docroot/images/api.reset.button.gif" NAME="RESET" BORDER=0 -->
<BR>
For:&nbsp;<INPUT TYPE="CHECKBOX" NAME="CNOT" VALUE="A" CHECKED> C
<INPUT TYPE="CHECKBOX" NAME="LANGCPLUS" VALUE="C" CHECKED> C++
END
# Makes a straight line if in Hierarchy
if ($logo eq 1) {
print " <BR>\n";
}
print <<END;
By:&nbsp;
<INPUT TYPE=HIDDEN NAME=TYPE VALUE="DEFAULT">
<!-- <INPUT TYPE="IMAGE" SRC="$docroot/images/api.class.button.gif" VALUE="CLASS" NAME="CLASS_BUTTON" BORDER=0 onClick="verify(this.form, 'CLASS')"> -->
<A HREF="javascript:verify(document.theform,'CLASS')"><IMG SRC="$docroot/images/api.class.button.gif" NAME="CLASS_BTN" BORDER=0></A>
<A HREF="javascript:verify(document.theform,'METHOD')"><IMG SRC="$docroot/images/api.method.button.gif" NAME="METHOD_BTN" BORDER=0></A>
<A HREF="javascript:verify(document.theform,'TOKEN')"><IMG SRC="$docroot/images/api.token.button.gif" NAME="TOKEN_BTN" BORDER=0></A>
<A HREF="javascript:verify(document.theform,'SAMPLE')"><IMG SRC="$docroot/images/api.samples.button.gif" NAME="SAMPLES_BTN" BORDER=0></A>
</TD>
</FORM>
END
} # end srchbuttons
# ----------------------------------------
sub javafunc {
print qq!
<SCRIPT Language="Javascript">
function verify(theform,modevalue)
{
if(theform.STRING.value=='')
{
alert("You need to completely fill out the form.");
}
else
{
theform.TYPE.value=modevalue;
theform.submit();
}
}
</SCRIPT>
!;
}