<?
include ("../../mainfile.php");
include (XOOPS_ROOT_PATH."/header.php");
global $xoopsTheme;
if ( @file_exists(XOOPS_ROOT_PATH."/modules/directory/language/".$bcoosConfig['language'].'/language.php') ) {
	include_once(XOOPS_ROOT_PATH."/modules/directory/language/".$bcoosConfig['language'].'/language.php');
	} else {
		include_once(XOOPS_ROOT_PATH."/modules/directory/language/english/language.php");
	}
include ('dbkey.php');
include ('queries.php');
include ('functions.php');
include ('head.php');
?>
<td valign="top">
<?php OpenTable();	?>	
  <table width="100%" border="0">
    <tr class=bg3>
	  <td valign="top" colspan="4">
<?
echo "<p class=Highlight>";
echo _CODE_DIR_DISP_RESULTS;
echo " <b>\"";
	
if ($category == "firstname") {
	echo _CODE_DIR_FIRSTNAME;
}
elseif ($category == "lastname") {
    echo _CODE_DIR_LASTNAME;
}
elseif ($category == "title") {
	echo _TITLE;
}
elseif ($category == "address") {
	echo _CODE_DIR_ADDRESS;
}	
else {
	echo _CODE_DIR_PHONE;
}
echo "\"</b> ";
echo _CODE_DIR_DISP_MATCH;
echo "<b>\"$searchstring\"</b></p>";
?>
      </td>
	</tr>
	<tr class=bg3>
	  <td class=bg3 valign="top"><b><?php echo _NAME ?></b></td>
	  <td class=bg3 valign="top"><b><?php echo_CODE_DIR_DEPARTMENT ?></b></td>
	  <td class=bg3 valign="top"><b><?php echo _TITLE ?></b></td>
	  <td class=bg3 valign="top"><b><?php echo _CODE_DIR_PHONE ?></b></td>
	  <td class=bg3 valign="top"><b><?php echo _CODE_DIR_ADDRESS ?></b></td>	
	</tr>
<?
/* Show search results */
$result_list = $db->query($select_search);
while ( $a_row = mysql_fetch_array( $result_list ))
	{
	 print "<tr class=bg3><td valign=\"top\">$a_row[lastname], $a_row[firstname]</td>
			<td valign=\"top\">$a_row[department]</td>
            <td valign=\"top\">$a_row[title]</td>
            <td valign=\"top\">$a_row[phone]</td>
            <td valign=\"top\">$a_row[address]</td></tr>\n";
	}
?>
		</table>
<?php CloseTable();	?>		
	  </td>
	</tr>
<!--  </table> -->
</td> 
<?
include ('footer.php');
include (XOOPS_ROOT_PATH."/footer.php");
?>
