Location: PHPKode > projects > Music and Discography Database > music_db/SearchBox.php
<?php
print "
<FORM METHOD=get STYLE='margin:0;padding:0' NAME=searcharea>
<INPUT TYPE=hidden NAME=order_search>
<INPUT TYPE=hidden NAME=extended VALUE=$extended>
<TABLE CELLPADDING=0 CELLSPACING=4 CLASS='searchbox' WIDTH=100% BORDER=0>
<TR>
	<TD>Pattern: <INPUT TYPE=text NAME=SearchString SIZE=25 VALUE=\"$SearchString\"> 
    <SELECT NAME=SearchGenre>";
    for ($i=0;$i<count($genresel);$i++) print "<OPTION>{$genresel[$i][0]}</OPTION>";

print "</SELECT>";
if (isset($inlogin)) print "Ca.No.: <INPUT TYPE=text NAME=SearchDisk SIZE=4>";
print "</TD>
    <TD><INPUT TYPE=submit NAME=search VALUE='search' CLASS=button>";

if (isset($extended) and $extended==1)
	print "<IMG SRC='icons/Button-Close-16x16.png' STYLE='position:relative;left:-6px;top:-8px'  OnClick='ESearch(0)'>";
else
	print "<IMG SRC='icons/Button-Add-16x16.png' STYLE='position:relative;left:-6px;top:-8px' OnClick='ESearch(1)'>";

print "</TD></TR>
<TR><TD>
    Sort By: 
    <SELECT NAME=orderby_first>
        <OPTION>performer</OPTION>
        <OPTION>title</OPTION>
        <OPTION>year</OPTION>
        <OPTION VALUE=storage>CNo.</OPTION>
        <OPTION>quality</OPTION>
        <OPTION VALUE=comment>log</OPTION>
    </SELECT>&nbsp;
    <SELECT NAME=orderby_second>
        <OPTION>title</OPTION>
        <OPTION>performer</OPTION>
        <OPTION>year</OPTION>
        <OPTION VALUE=storage>CNo.</OPTION>
        <OPTION>quality</OPTION>
        <OPTION VALUE=comment>log</OPTION>
    </SELECT>&nbsp;
    <SELECT NAME=direction>
        <OPTION>Asc</OPTION>
        <OPTION>Desc</OPTION>
    </SELECT>&nbsp;";

if (isset($query_label)) print "&nbsp;<b>$query_label: $query_string</b>";
print "</TD>
<TD ALIGN=right><DIV STYLE='font-size:10px;'>results: $length</DIV></TD>
</TR>
<TR>
  <TD STYLE='background:transparent;padding-top:3px'>";
  if (isset($extended) and $extended==1) {
     print "Year between: <INPUT TYPE=text NAME=SearchYearS SIZE=4> and <INPUT TYPE=text NAME=SearchYearE SIZE=4> &nbsp;
     
     Instruments: <SELECT NAME=SearchInstrument[] MULTIPLE='multiple' SIZE=6>";

      for ($i=0;$i<count($instruments);$i++) 
      {
        $ims = preg_split('/,/',$instruments[$i][0]);
        $iname = $ims[$LOCALE];
        if ($iname == '') $iname = $ims[0];
        printf ("<OPTION VALUE=%d>%s</OPTION>",$instruments[$i][1],$iname);
      }
      print "</SELECT> Connection: <SELECT NAME=iconn><OPTION>AND</OPTION><OPTION>OR</OPTION></SELECT>";
  } 
  
  print "</TD>
  </TR>
</TABLE></FORM>";

?>
Return current item: Music and Discography Database