title; $title_font = $row->title_font; $description = $row->description; $keywords = $row->keywords; $bgcolor = $row->bgcolor; $sidebgcolor = $row->sidebgcolor; $topbanner = $row->topbanner; $copyright_name = $row->copyright_name; $content = $row->content; $content_font = $row->content_font; $image_path = $row->image_path; } if(empty($bgcolor)) $bgcolor = 'ffffff'; if(empty($sidebgcolor)) $sidebgcolor = 'ccccff'; PRINT " ".$title."
"; if($customer_id != '' AND $password != ''){ PRINT " (".$customer_id." Logged In) Manage Gallery Logout"; } else { PRINT "Login / Manage Gallery"; } PRINT "
".ucfirst($customer_id)." IMAGE GALLERY

Available Collections

"; $query_string = "SELECT distinct collection, count(collection) as count FROM diygallery WHERE customer_id = '$customer_id' AND collection != '' GROUP BY collection"; $result = mysql_db_query("$dbName",$query_string); while($row = mysql_fetch_object($result)) { $collection_space = str_replace(' ', '+', $row->collection); if($customer_id != '' AND $password != ''){ PRINT "

  • ".$row->collection." (".$row->count.")

    "; } else { PRINT "

  • ".$row->collection." (".$row->count.")

    "; } } PRINT "

    "; if($customer_id != '' AND $password != ''){ PRINT "".$customer_id." Homepage

    "; PRINT "ALL GALLERIES"; } else { PRINT "".$customer_id." Homepage

    "; PRINT "ALL GALLERIES"; } PRINT "

    MIRROR LAB WEBSITE

  • "; if($collection == ''){ if($topbanner != ''){ PRINT "

    "; } PRINT "

    ".$title."

    ".$content."

    "; if($customer_id == 'Mirror_Lab_Galleries'){ PRINT ""; $query_string = "SELECT distinct customer_id FROM diygallery ORDER BY customer_id DESC"; $result = mysql_db_query("$dbName",$query_string); while($row = mysql_fetch_object($result)) { $return = sample_thumb($row->customer_id); PRINT ""; } PRINT "
    customer_id."> ".$return[0]." customer_id.">".$row->customer_id."

    ".$return[1]."

    "; } } else { PRINT "

    ".$collection."

    "; $start_row = "yes"; $query_string = "SELECT image, caption FROM diygallery WHERE customer_id = '$customer_id' AND collection = '$collection' "; $result = mysql_db_query("$dbName",$query_string); while($row = mysql_fetch_object($result)) { if($start_row == 'yes') { echo ""; $start_row = "no"; } $count++; $thumbparts = explode('/', $row->image); $thumb = end($thumbparts); $thumb = str_replace('.jpg', '_thumb.png', $thumb); $thumb = str_replace('.JPG', '_thumb.png', $thumb); $thumb = str_replace('.Jpg', '_thumb.png', $thumb); $thumb = str_replace('.jpeg', '_thumb.png', $thumb); $thumb = str_replace('.jpe', '_thumb.png', $thumb); if($customer_id != '' AND $password != ''){ PRINT ""; } else { PRINT ""; } if($count == 3){ $count = 0; echo ""; $start_row = "yes"; } } PRINT "
    image."&customer_id=".$customer_id."&password=".$password.">
    ".$row->caption."
    image."&customer_id=".$customer_id.">
    ".$row->caption."
    "; } $copyright_year = date("Y"); PRINT "

    Copyright © ".$copyright_year." ".$copyright_name."
    All Rights Reserved
    "; function sample_thumb($customer_id){ require('inc/db.inc.php'); $query_string = "SELECT image FROM diygallery WHERE customer_id = '$customer_id' ORDER BY RAND() LIMIT 1"; $result = mysql_db_query("$dbName",$query_string); while($row = mysql_fetch_object($result)) { $thumbparts = explode('/', $row->image); $thumb = end($thumbparts); $thumb = str_replace('.jpg', '_thumb.png', $thumb); $thumb = str_replace('.JPG', '_thumb.png', $thumb); $thumb = str_replace('.Jpg', '_thumb.png', $thumb); $thumb = str_replace('.jpeg', '_thumb.png', $thumb); $thumb = str_replace('.jpe', '_thumb.png', $thumb); $return[0] = ""; } $query_string = "SELECT description FROM diyhomepage WHERE customer_id = '$customer_id' "; $result = mysql_db_query("$dbName",$query_string); while($row = mysql_fetch_object($result)) { $return[1] = $row->description; } return $return; } // end function sample_thumb ?>