include_once("determine_broker.inc");
include_once("functions.inc");
$q_gallery = "SELECT * from SITES_gallery_category where broker_id='$broker_id' and active='Y' order by gallery_category_placement";
$results_gallery = mysql_query($q_gallery);
if (mysql_num_rows($results_gallery) == 1)
{
$row = mysql_fetch_array($results_gallery);
$gallery_category_id = $row["gallery_category_id"];
header("Location: photos.html?gallery_category_id=$gallery_category_id");
exit();
}
include("topnav.inc");
?>
$i = 0;
while ($row = mysql_fetch_array($results_gallery))
{
extract($row);
$q1 = "SELECT * from SITES_gallery where gallery_category_id='$gallery_category_id' and active='Y' order by orderplacement limit 1";
$r1 = mysql_query($q1);
$row1 = mysql_fetch_array($r1);
$gallery_id = $row1["gallery_id"];
if ($gallery_id)
{
if ($i % 4 == 0)
$tablerows .= "";
$tablerows.="";
$tablerows.=" | ";
$i++;
if ($i % 4 == 0)
$tablerows .= "
|
";
}
}
echo $tablerows;
?>
include("footer.inc");
?>