[insert_php]
if (isset($_GET[‘ref’]))
{
$ref = $_GET[‘ref’];
// connect
$con=mysqli_connect(“MySQL.theruralconnection.com”,”xtheruralconnect”,”aAces1865!?”, “xtheruralconnection-1”);
// Get DB
$result = mysqli_query ($con,
“SELECT * FROM properties WHERE status=’up’ AND ref=’$ref'”
) or die(“Error: “.mysqli_error($con));
//$result = mysqli_query($con,$query);
$row = mysqli_fetch_array($result);
if ($row[‘region’] == ‘hudson’) {$region=’Hudson Valley’;}
if ($row[‘region’] == ‘catskills’) {$region=’Catskills’;}
echo(”
\n”);
echo(”
” .$row[‘location’].”, NY – $”.number_format($row[“price”]).”
“);
echo(”
“.$row[‘address_street’].”, ” .$row[‘location’].”, NY “.$row[‘address_zip’].” – “.$region.”
“);
echo(”
\n”);
echo(“” );
\n”);
if ($row[“photos”] == “2”) {
echo (‘
‘);
}
if ($row[“photos”] == “3”) {
echo (‘
‘);
echo (‘
‘);
}
if ($row[“photos”] == “4”) {
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
}
if ($row[“photos”] == “5”) {
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
}
if ($row[“photos”] == “6”) {
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
echo (‘
‘);
}
echo(”
“);
echo(”
“. nl2br($row[“remarks”]) .”
“);
echo(”
Ref: #” .$ref. ”
\n”);
echo(”
Details
\n”);
echo(”
echo(”
General
“);
if ($row[‘age’]!=”) {echo(”
“);}
if ($row[‘price’]!=”) {echo(”
“);}
if ($row[‘construction’]!=”) {echo(”
“);}
if ($row[‘condition’]!=”) {echo(”
“);}
if ($row[‘sqfootage’]!=”) {echo(”
“);}
if ($row[‘acreage’]!=”) {echo(”
“);}
if ($row[‘survey’]!=”) {echo(”
“);}
// echo(”
“);
echo(”
\n”);
echo(”
Location
“);
if ($row[‘county’]!=”) {echo(”
“);}
if ($row[‘address_street’]!=”) {echo(”
“);}
if ($row[‘location’]!=”) {echo(”
“);}
if ($row[‘address_zip’]!=”) {echo(”
“);}
if ($row[‘township’]!=”) {echo(”
“);}
if ($row[‘school’]!=”) {echo(”
“);}
if ($row[‘map’]!=”) {echo(”
“);}
if ($row[‘zoning’]!=”) {echo(”
“);}
echo(”
\n”);
echo(”
Description
“);
if ($row[‘style’]!=”) {echo(”
“);}
if ($row[‘frontage’]!=”) {echo(”
“);}
if ($row[‘outbuilding’]!=”) {echo(”
“);}
if ($row[‘porch’]!=”) {echo(”
“);}
if ($row[‘topography’]!=”) {echo(”
“);}
if ($row[‘view’]!=”) {echo(”
“);}
if ($row[‘roof’]!=”) {echo(”
“);}
if ($row[‘color’]!=”) {echo(”
“);}
echo(”
\n”);
echo(”
Features
“);
if ($row[‘totalrooms’]!=”) {echo(”
“);}
if ($row[‘livingroom’]!=”) {echo(”
“);}
if ($row[‘diningroom’]!=”) {echo(”
“);}
if ($row[‘bedrooms’]!=”) {echo(”
“);}
if ($row[‘bathrooms’]!=”) {echo(”
“);}
if ($row[‘fireplace’]!=”) {echo(”
“);}
if ($row[‘basement’]!=”) {echo(”
“);}
if ($row[‘carpet’]!=”) {echo(”
“);}
if ($row[‘foundation’]!=”) {echo(”
“);}
if ($row[‘walls’]!=”) {echo(”
“);}
if ($row[‘floors’]!=”) {echo(”
“);}
if ($row[‘siding’]!=”) {echo(”
“);}
if ($row[‘sign’]!=”) {echo(”
“);}
if ($row[‘insulation’]!=”) {echo(”
“);}
if ($row[‘garage’]!=”) {echo(”
“);}
if ($row[‘key’]!=”) {echo(”
“);}
echo(”
\n”);
echo(”
Utilities
“);
if ($row[‘water’]!=”) {echo(”
“);}
if ($row[‘fuel’]!=”) {echo(”
“);}
if ($row[‘heat’]!=”) {echo(”
“);}
if ($row[‘sewer’]!=”) {echo(”
“);}
if ($row[‘tv’]!=”) {echo(”
“);}
if ($row[‘refrig’]!=”) {echo(”
“);}
if ($row[‘dishwasher’]!=”) {echo(”
“);}
if ($row[‘washer’]!=”) {echo(”
“);}
if ($row[‘smokealarm’]!=”) {echo(”
“);}
if ($row[‘electricity’]!=”) {echo(”
“);}
if ($row[‘lockbox’]!=”) {echo(”
“);}
if ($row[‘dryer’]!=”) {echo(”
“);}
echo(”
\n”);
echo(”
Financial
“);
if ($row[‘taxes’]!=”) {echo(”
“);}
if ($row[‘exempt’]!=”) {echo(”
“);}
if ($row[‘heatcost’]!=”) {echo(”
“);}
if ($row[‘financial’]!=”) {echo(”
“);}
echo(”
\n”);
if ($row[‘agent’]!=”) {echo(”
“);}
if ($row[‘deal’]==’yes’) {echo(”
“);}
echo(”
“);
echo(”
“);
echo(”
“);
echo (“Back to Properties“);
}
else {
// ALL PROPERTY LISTINGS
//connect
$con=mysqli_connect(“MySQL.theruralconnection.com”,”xtheruralconnect”,”aAces1865!?”, “xtheruralconnection-1”);
// Get DB
$result = mysqli_query ($con,
“SELECT * FROM properties where status=’up’ AND region=’catskills’ ORDER by ref DESC”
) or die(“Error: “.mysqli_error($con));
while($row= mysqli_fetch_array($result))
{
echo(”
echo(“” .$row[‘location’].”, NY “.$row[‘address_zip’].”“);
echo(”
Offered for $”.number_format($row[“price”]).”
” );
}
}
[/insert_php]


