$id = -1;
$where = "Active=1";
if (isset($_GET["ID"]))
{
$id = intval($_GET["ID"]);
$where .= " AND ID=". $id;
}
// find gallery to display
$sql = "SELECT * FROM cas_galleries WHERE ". $where ." ORDER BY Created DESC";
$rs = $db->query($sql);
$row = mysql_fetch_array($rs);
if ($row)
{
printf(' %s ', $row["Title"]);
if (strlen($row["Content"]) > 0)
printf('%s ', str_replace("\n", " \n", $row["Content"]));
outputImages($row['ID']);
}
?>
|
|