require( "admin/config.inc.php" );
// $id (property ID) should come through GET
// define the templates for general layout and the page content
$tpl->define(array(
"common" => "common.tpl.html",
"body" => "spec2.tpl.html"
));
$tpl->define_dynamic( "row", "body" );
// get property info for the given ID
$sql = "
SELECT name, descr, type
FROM properties
WHERE id='$id' AND display='visible'
";
$result = mysql_query( $sql );
if( mysql_num_rows($result) == 0 ){
echo "Invalid ID!";
exit;
}
$row = mysql_fetch_object($result);
if( $row->type == 'progress' ) $typeText = 'Work in Progress';
else $typeText = 'Finished Projects';
$tpl->assign(array(
"TOP_NAVIGATION" => "Home :: $typeText :: ".$row->name,
"PROPERTY_DESCR" => nl2br($row->descr)
));
// get the photos for this property
$sql = "SELECT id,info FROM photos WHERE property_id='$id' ORDER BY pic_order";
$phresult = mysql_query( $sql );
while( $phrow1 = mysql_fetch_object($phresult) ){
$photo_id_1 = $phrow1->id;
$photo_id_1_info = $phrow1->info;
$tpl->assign(array(
"PHOTO_1" => "",
"PHOTO_1_info" => "$photo_id_1_info",
"HR1" => "