<?php

$file = __FILE__;
include ("inc/inc_common.php");
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
include ("inc/inc_getdate.php");
include ("inc/inc_forumname.php");
$page = "Search";
$pagelink = $file;
include("inc/inc_setonline.php");
$title = "Search";
include ("inc/inc_head.php");
include ("inc/inc_body.php");
$title = "Search";
include ("inc/inc_title.php");
if ($groupid == "")
{
    print "</centeR><table border=0 width=\"100%\" cellpadding=1 cellspacing=0><tr><td  width=\"20%\">
    <table border=0 cellpadding=1 cellspacing=0><tr><td>
    <font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"index.php\">$name1&nbsp;Home</a>
    </td></tr>
    <tr><td><image src=\"images/folder_line.gif\">
    <font face=\"$font\" size=$fontsize><image src=\"images/open_folder_icon.gif\">&nbsp;Search</td></tr>
    </table>
    </td><td><center>";
}
else
{
    print "</centeR><table border=0 width=\"100%\" cellpadding=1 cellspacing=0><tr><td  width=\"20%\">
    <table border=0 cellpadding=1 cellspacing=0><tr><td>
    <font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"index.php\">$name1&nbsp;Home</a>
    </td></tr>
    <tr><td><image src=\"images/folder_line.gif\">
    <font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"forums.php\">$name2</a></td></tr>
    <tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
    <image src=\"images/folder_icon.gif\">&nbsp;<a href=\"topics.php?groupid=$groupid\">$name3</a></td></tr><tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
    <image src=\"images/open_folder_icon.gif\">&nbsp;Search</a></td></tr>
    </table>
    </td><td><center>";
}

include ("inc/inc_navigation.php");
include ("inc/inc_newmailsdisplay.php");
print "</td></tr></table><br><center>";

//end of include files...

print "<br> <table border=1 cellpadding=0 cellspacing=0 style=\"border-collapse: collapse\" bordercolor=\"$bordercolor\" width=\"80%\"><tr>
<td width=\"100%\" bgcolor=\"$fgcolour\" align=\"center\">
<br>
<form action=\"search_go.php\" method=\"POST\">
<font face=\"$font\" size=$fontsize color=\"$fontcolor\">
Search for
<input type=\"text\" onfocus=\"document.onkeypress=function(){};\" value=\"$member\" name=\"search\" style=\"background-image: url('images/textbox_background.gif')\">
in
<select name=\"where\" width=\"1\">
<option selected value=\"All\">All open forums</option> <option value=\"All\">-------</option>
<option>Members</option><option value=\"All\">-------</option>";

$result = mysql_query( "SELECT * FROM $grouptable WHERE ynGroupMaster < 2 ORDER BY intGroupId, intGroupOrder DESC" );
$num_rows = mysql_num_rows( $result );
//Display Records
while ( $a_row = mysql_fetch_object( $result ) )
{
    if ( $a_row->ynGroupMaster == 1 )
    {
        print "<optionvalue=\"All\">-------</option><option value=\"$a_row->intId\">$a_row->strName</option>";
    }
    else
    {
        print "<option value=\"$a_row->intId\">&nbsp;&nbsp;&nbsp;$a_row->strName</option>";
    }
}

print "</select> in the <select name=\"what\" width=\"1\">
<option selected>Subject</option>
<option>Post</option></select>&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"hidden\" value=\"$groupid\" name=\"groupid\">
<input type=\"submit\" value=\"Search $name1\"><br><br></td></tr>
</table><br><br>";

include ("inc/inc_footer.php");