<?php

/* Import the settings*/
require 'config/settings.php';
/* Connecting Salesforce - Load Data */
$xml = simplexml_load_file(SALESFORCE_URL . LOCATION_PAGE . '?' . http_build_query(array('token' => SF_SECURITY_TOKEN)));
/* Display the result */
__displaySearchForm($xml);
/**
 * HTML-Output function to display the search form
 *
 * @param object $xml XML Object with properties
 *
 */
function __displaySearchForm($xml)
{
    include 'templates/header.php';
    ?>
			<h1>Property Search</h1>
			<div id="pb_searchBox">
				<form action="listing.php" method="get">
				<table>
					<tr>
						<td class="label">Price Range</td>
						<td class="col_1"><select class="input" name="price_from" size="1">
							<option value="30000">30,000</option>
							<option value="50000">50,000</option>
							<option value="100000">100,000</option>
							<option value="150000">150,000</option>
							<option value="200000">200,000</option>v
							<option value="300000">300,000</option>
<?php

/* Display the result */
__displaySearchForm();
/**
 * HTML-Output function to display the search form
 *
 * @param object $xml XML Object with properties
 *
 */
function __displaySearchForm()
{
    include 'templates/header.php';
    ?>
			<h1>Property Search</h1>
			<div id="pb_searchBox">
				<form action="listing.php" method="get">
				<table>
					<tr>
						<td class="label">Price Range</td>
						<td class="col_1"><select class="input" name="min_pb__PurchaseListPrice__c" size="1">
							<option value="30000">30,000</option>
							<option value="50000">50,000</option>
							<option value="100000">100,000</option>
							<option value="150000">150,000</option>
							<option value="200000">200,000</option>v
							<option value="300000">300,000</option>
							<option value="500000">500,000</option>
							<option value="1000000">1,000,000</option>
						</select></td>
						<td class="col_2"><select class="input" name="max_pb__PurchaseListPrice__c" size="1">