<?
?>
<!-- <table width="800" border="0"> -->
<?php OpenTable(); ?>
<table width=100% border="0">
  <tr class=bg3 valign="top"> 
    <td colspan="2">
	<?php OpenTable(); ?> 
      <p class=bg3 align="center"><b>Directory</b></p>
	<?php CloseTable(); ?>  
	<?php OpenTable(); ?>
     <p align="left"><b><?php echo _CODE_DIR_DISP_TXT1 ?></b><?php echo _CODE_DIR_DISP_TXT1_1 ?></p>
		<?php CloseTable(); ?>
		<?php OpenTable(); ?>
      <p><div align="left">
        <table width="100%" border="0">
          <tr class=bg3> 
            <td> 
    <!--          <table border="0"> -->
<?
echo "<form action=\"$app_path/search.php\" method=\"POST\">";
?>
  <!--                <tr class=bg3> -->
                    <td><?php echo _SEARCH; ?></td>
                    <td> 
                      <select class=bg3 name=category>
                        <option class=bg3 value="lastname" selected><?php echo _CODE_DIR_LASTNAME; ?></option>
                        <option class=bg3 value="firstname"><?php echo _CODE_DIR_FIRSTNAME; ?></option>
                        <option class=bg3 value="title"><?php echo _TITLE; ?></option>
                        <option class=bg3 value="phone"><?php echo _CODE_DIR_PHONE; ?></option>
                        <option class=bg3 value="address"><?php echo _CODE_DIR_ADDRESS; ?></option>
                      </select>
                    </td>
                    <td> 
<?
echo "<input type=\"text\" name=\"searchstring\" value\"$searchstring\" ></td><td>
	<input type=\"image\" src=\"$img_path/button_find.gif\" border=\"0\" alt=\"Find it!\">\n";
?>
                    </td>
  <!--                </tr> -->
                </form>
<!--              </table> -->
			  <?php CloseTable(); ?>
            </td>
          </tr>
        </table>
      </div></p>
	  <?php OpenTable(); ?>
      <p align="center"><?php echo _CODE_DIR_DISP_TXT3; ?>.<br></p>
	<?php CloseTable(); ?>	
    </td>
  </tr>
  <tr class=bg3> 
    <td valign="top" class="SmallText" width="25%">
<?
/* List departments in DB */
OpenTable(); 
$result_list = $db->query("$select_dept_list");
print "<u><b>";
echo _CODE_DIR_DISP_TXT5;
print "</b></u><br />";
while ( $a_row = mysql_fetch_array( $result_list ))
	{
	 # print var_dump($a_row);
	 print "<a href=\"$app_path/list.php?dept=$a_row[serial]\">
		$a_row[department]</a><br>\n";
	}
CloseTable();
?>
</td>
