[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(“” );

echo (‘Rural Connection ‘);
echo(”

\n”);

if ($row[“photos”] == “2”) {
echo (‘Rural Connection ‘);
}

if ($row[“photos”] == “3”) {
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
}

if ($row[“photos”] == “4”) {
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
}

if ($row[“photos”] == “5”) {
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
}

if ($row[“photos”] == “6”) {
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
echo (‘Rural Connection ‘);
}

echo(”

“);
echo(”

“. nl2br($row[“remarks”]) .”

“);
echo(”

Ref: #” .$ref. ”

\n”);

echo(”

Details

\n”);

echo(”

“);
echo(”

 

General

 

“);
if ($row[‘age’]!=”) {echo(”

Age: “.$row[‘age’].”

“);}
if ($row[‘price’]!=”) {echo(”

Price: $”.number_format($row[“price”]).”

“);}
if ($row[‘construction’]!=”) {echo(”

Construction: “.$row[‘construction’].”

“);}
if ($row[‘condition’]!=”) {echo(”

Condition: “.$row[‘condition’].”

“);}
if ($row[‘sqfootage’]!=”) {echo(”

Sq. footage: “.number_format($row[‘sqfootage’]).”

“);}
if ($row[‘acreage’]!=”) {echo(”

Acreage: “.$row[‘acreage’].”

“);}
if ($row[‘survey’]!=”) {echo(”

Survey: “.$row[‘survey’].”

“);}
// echo(”

Range: “.$row[‘range’].”

“);

echo(”

\n”);
echo(”

 

Location

 

“);
if ($row[‘county’]!=”) {echo(”

County: “.$row[‘county’].”

“);}
if ($row[‘address_street’]!=”) {echo(”

Address: “.$row[‘address_street’].”

“);}
if ($row[‘location’]!=”) {echo(”

City: “.$row[‘location’].”

“);}
if ($row[‘address_zip’]!=”) {echo(”

ZIP: “.$row[‘address_zip’].”

“);}
if ($row[‘township’]!=”) {echo(”

Township: “.$row[‘township’].”

“);}
if ($row[‘school’]!=”) {echo(”

School: “.$row[‘school’].”

“);}
if ($row[‘map’]!=”) {echo(”

Map: “.$row[‘map’].”

“);}
if ($row[‘zoning’]!=”) {echo(”

Zoning: “.$row[‘zoning’].”

“);}

echo(”

\n”);
echo(”

 

Description

 

“);
if ($row[‘style’]!=”) {echo(”

Style: “.$row[‘style’].”

“);}
if ($row[‘frontage’]!=”) {echo(”

Frontage: “.$row[‘frontage’].”

“);}
if ($row[‘outbuilding’]!=”) {echo(”

Out-building: “.$row[‘outbuilding’].”

“);}
if ($row[‘porch’]!=”) {echo(”

Porch: “.$row[‘porch’].”

“);}
if ($row[‘topography’]!=”) {echo(”

Topography: “.$row[‘topography’].”

“);}
if ($row[‘view’]!=”) {echo(”

View: “.$row[‘view’].”

“);}
if ($row[‘roof’]!=”) {echo(”

Roof: “.$row[‘roof’].”

“);}
if ($row[‘color’]!=”) {echo(”

Color: “.$row[‘color’].”

“);}

echo(”

\n”);
echo(”

 

Features

 

“);
if ($row[‘totalrooms’]!=”) {echo(”

Total-rooms: “.$row[‘totalrooms’].”

“);}
if ($row[‘livingroom’]!=”) {echo(”

Living-room: “.$row[‘livingroom’].”

“);}
if ($row[‘diningroom’]!=”) {echo(”

Dining-room: “.$row[‘diningroom’].”

“);}
if ($row[‘bedrooms’]!=”) {echo(”

Bedrooms: “.$row[‘bedrooms’].”

“);}
if ($row[‘bathrooms’]!=”) {echo(”

Bathrooms: “.$row[‘bathrooms’].”

“);}
if ($row[‘fireplace’]!=”) {echo(”

Fireplace: “.$row[‘fireplace’].”

“);}
if ($row[‘basement’]!=”) {echo(”

Basement: “.$row[‘basement’].”

“);}
if ($row[‘carpet’]!=”) {echo(”

Carpet: “.$row[‘carpet’].”

“);}
if ($row[‘foundation’]!=”) {echo(”

Foundation: “.$row[‘foundation’].”

“);}
if ($row[‘walls’]!=”) {echo(”

Walls: “.$row[‘walls’].”

“);}
if ($row[‘floors’]!=”) {echo(”

Floors: “.$row[‘floors’].”

“);}
if ($row[‘siding’]!=”) {echo(”

Siding: “.$row[‘siding’].”

“);}
if ($row[‘sign’]!=”) {echo(”

Sign: “.$row[‘sign’].”

“);}
if ($row[‘insulation’]!=”) {echo(”

Insulation: “.$row[‘insulation’].”

“);}
if ($row[‘garage’]!=”) {echo(”

Garage: “.$row[‘garage’].”

“);}
if ($row[‘key’]!=”) {echo(”

Key: “.$row[‘key’].”

“);}

echo(”

\n”);
echo(”

 

Utilities

 

“);
if ($row[‘water’]!=”) {echo(”

Water: “.$row[‘water’].”

“);}
if ($row[‘fuel’]!=”) {echo(”

Fuel: “.$row[‘fuel’].”

“);}
if ($row[‘heat’]!=”) {echo(”

Heat: “.$row[‘heat’].”

“);}
if ($row[‘sewer’]!=”) {echo(”

Sewer: “.$row[‘sewer’].”

“);}
if ($row[‘tv’]!=”) {echo(”

TV: “.$row[‘tv’].”

“);}
if ($row[‘refrig’]!=”) {echo(”

Refrig.: “.$row[‘refrig’].”

“);}
if ($row[‘dishwasher’]!=”) {echo(”

Dish-washer: “.$row[‘dishwasher’].”

“);}
if ($row[‘washer’]!=”) {echo(”

Washer: “.$row[‘washer’].”

“);}
if ($row[‘smokealarm’]!=”) {echo(”

Smoke-alarm: “.$row[‘smokealarm’].”

“);}
if ($row[‘electricity’]!=”) {echo(”

Electricity: “.$row[‘electricity’].”

“);}
if ($row[‘lockbox’]!=”) {echo(”

Lock-box: “.$row[‘lockbox’].”

“);}
if ($row[‘dryer’]!=”) {echo(”

Dryer: “.$row[‘dryer’].”

“);}

echo(”

\n”);
echo(”

 

Financial

 

“);
if ($row[‘taxes’]!=”) {echo(”

Taxes: $”.number_format($row[‘taxes’]).”

“);}
if ($row[‘exempt’]!=”) {echo(”

Exempt: “.$row[‘exempt’].”

“);}
if ($row[‘heatcost’]!=”) {echo(”

Heat-cost: “.$row[‘heatcost’].”

“);}
if ($row[‘financial’]!=”) {echo(”

Financial: “.$row[‘financial’].”

“);}

echo(”

\n”);
if ($row[‘agent’]!=”) {echo(”

Agent: “.$row[‘agent’].”

“);}
if ($row[‘deal’]==’yes’) {echo(”

DEAL PENDING

“);}
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=’hudson’ 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]