Exemplo n.º 1
0
function price_let($_type, $_field, $_pick = "0", $_term = "pw")
{
    if ($_type == "min") {
        $_default = '<option value="">Minimum</option>';
    } elseif ($_type == "max") {
        $_default = '<option value="">Maximum</option>';
    }
    $_render = '
	<select name="' . $_field . '">	
    ' . $_default . '
	';
    for ($i = 100; $i <= 1000;) {
        $_render .= '<option value="' . $i . '"';
        if ($i == $_pick) {
            $_render .= ' selected';
        }
        if ($_term == "pcm") {
            $_render .= '>' . format_price(pw2pcm($i)) . '</option>
			';
        } else {
            $_render .= '>' . format_price($i) . '</option>
			';
        }
        $i = $i + 50;
    }
    for ($i = 1000; $i <= 5000;) {
        $_render .= '<option value="' . $i . '"';
        if ($i == $_pick) {
            $_render .= ' selected';
        }
        if ($_term == "pcm") {
            $_render .= '>' . format_price(pw2pcm($i)) . '</option>
			';
        } else {
            $_render .= '>' . format_price($i) . '</option>
			';
        }
        $i = $i + 250;
    }
    $_render .= '</select>
		';
    return $_render;
}
Exemplo n.º 2
0
	<td colspan="2"><p><strong><font color="red">' . nl2br($row['card_notes']) . '</font></strong></p><br><br></td>
	</tr>	
	<tr>
	<td valign="top">Front Page:</td>
	<td><span class="footerTitle">' . $row['Address1'] . ', ' . $pc[0] . '<br>' . price_format($row['Price']);
        if ($intSaleLet == 2) {
            $render .= ' p/w';
        }
        $render .= '</span><br><br><br></td>
	</tr>
	<tr>
	<td valign="top">Back Page:</td>
	<td><span class="footerTitle">' . $row['Address1'] . '<br>' . $row["area_title"] . '</span><br><br>
	<span class="greyText">Price:</span><br> ' . price_format($row['Price']);
        if ($intSaleLet == 2) {
            $render .= ' per week / ' . price_format(pw2pcm($row['Price'])) . ' per month';
        }
        $render .= '<br><br>';
        if ($intSaleLet == 1) {
            if ($row["lease_free"] == 1) {
                $leasefree = "Freehold";
            } elseif ($row["lease_free"] == 2) {
                $leasefree = "Leasehold";
            } elseif ($row["lease_free"] == 3) {
                $leasefree = "Share of Freehold";
            }
            $render .= '<span class="greyText">Tenure:</span><br>' . $leasefree . '<br><br>';
        } elseif ($intSaleLet == 2) {
            if ($row["furnished"] == 1) {
                $furnished = "Unfurnished";
            } elseif ($row["furnished"] == 2) {
Exemplo n.º 3
0
}
if ($dea_bathroom == '') {
    $dea_bathroom_word = "(tbc)";
} else {
    $dea_bathroom_word = ucwords($nw->toWords($dea_bathroom));
}
if (!$dea_marketprice) {
    $price = format_price($dea_valueprice) . ' (Valuation)';
} else {
    if ($dea_qualifier !== 'None') {
        $qual = ' (' . $dea_qualifier . ')';
    }
    if ($dea_type == 'Sales') {
        $price = format_price($dea_marketprice) . ' ' . $dea_tenure;
    } elseif ($dea_type == 'Lettings') {
        $price .= format_price($dea_marketprice, 'GBP', true) . ' per week / ' . format_price(pw2pcm($dea_marketprice), 'GBP', true) . ' per month';
    }
    $price .= $qual;
}
foreach ($vendors as $ven_id => $ven_name) {
    $vendor_summary .= $ven_name . ', ';
}
$vendor_summary = remove_lastchar($vendor_summary, ",");
// get state of trade, and history
$sql = "SELECT\nsot_id,sot_status,sot_nextdate,\nCONCAT(use_fname,' ',use_sname) AS use_name,\nDATE_FORMAT(sot_date, '%D %M %Y %l:%i%p') AS date\nFROM\nsot\nLEFT JOIN user ON user.use_id = sot.sot_user\nWHERE\nsot_deal = {$dea_id}\nORDER BY sot_date DESC";
$q = $db->query($sql);
if (DB::isError($q)) {
    die("db error: " . $q->getMessage());
}
$numRows = $q->numRows();
while ($row = $q->fetchRow()) {
Exemplo n.º 4
0
// get property details
$dealSQL = $sql = "SELECT\nmai_id,mai_type,mai_user,mai_deal,use_email,\ndea_marketprice,dea_type,dea_strapline,dea_bedroom,dea_ptype,dea_psubtype,\npro_area,CONCAT(pro_addr3,' ',pro_addr4,' ',LEFT(pro_postcode,4)) AS pro_addr,\nbra_title,bra_email,bra_tel\nFROM mailshot\nLEFT JOIN deal ON mailshot.mai_deal = deal.dea_id\nLEFT JOIN property ON dea_prop = property.pro_id\nLEFT JOIN branch ON dea_branch = branch.bra_id\nLEFT JOIN area ON pro_area = area.are_id\nLEFT JOIN user ON mailshot.mai_user = user.use_id\nWHERE mai_id = " . $mai_id;
$q = $db->query($sql);
if (DB::isError($q)) {
    die("db error: " . $q->getMessage());
}
$numRows = $q->numRows();
while ($row = $q->fetchRow()) {
    $mai_type = $row["mai_type"];
    $mai_deal = $row["mai_deal"];
    $use_email = $row["use_email"];
    $dea_type = $row["dea_type"];
    if ($row["dea_type"] == 'Sales') {
        $price = format_price($row["dea_marketprice"]);
    } elseif ($row["dea_type"] == 'Lettings') {
        $price = format_price($row["dea_marketprice"]) . " per week / " . format_price(pw2pcm($row["dea_marketprice"])) . " per month";
    }
    $price = str_replace("&pound;", "£", $price);
    $strap = $row["dea_strapline"];
    $pro_addr = trim(str_replace("  ", " ", $row["pro_addr"]));
    $bra_title = $row["bra_title"];
    $bra_email = $row["bra_email"];
    $bra_tel = $row["bra_tel"];
    // construct the sql
    // matching to: type, emailalert is yes and email is present, price, beds, ptype+psubtype, area
    if ($row["dea_marketprice"]) {
        $sql_inner_sales .= " (cli_salemin < " . round($row["dea_marketprice"]) . " AND cli_salemax > " . round($row["dea_marketprice"]) . ") AND ";
        $sql_inner_lettings .= " (cli_letmin < " . round($row["dea_marketprice"]) . " AND cli_letmax > " . round($row["dea_marketprice"]) . ") AND ";
    }
    if ($row["dea_bedroom"]) {
        $sql_inner_sales .= " cli_salebed <= " . $row["dea_bedroom"] . " AND ";
Exemplo n.º 5
0
         * @var    $dea_id
         * @var    $pro_addr3
         * @var    $dea_strapline
         * @var    $dea_description
         * @var    $dea_tenure
         */
        foreach ($row as $key => $val) {
            ${$key} = $val;
        }
        $title = $pro_addr3;
        $strap = $dea_strapline;
        $description = $dea_description;
        if ($dea_type == 'Sales') {
            $price = format_price($row["dea_marketprice"]) . ' ' . $dea_tenure;
        } elseif ($dea_type == 'Lettings') {
            $price = format_price($row["dea_marketprice"], 'GBP', '1') . ' per week / ' . format_price(pw2pcm($row["dea_marketprice"]), 'GBP', '1') . ' per month';
        }
        if ($row["med_type"] == 'Photograph') {
            $photos[$row["med_id"]] = array('file' => $row["med_file"], 'title' => $row["med_title"]);
        } elseif ($row["med_type"] == 'Floorplan') {
            $floorplans[$row["med_id"]] = array('file' => $row["med_file"], 'title' => $row["med_title"]);
            $total_area = $total_area + $row["med_dims"];
        } elseif ($row["med_type"] == 'EPC') {
            $epc[$row["med_id"]] = array('file' => $row["med_file"], 'title' => $row["med_title"]);
        }
    }
}
if ($features) {
    $feature_array = explode("~", $features);
    foreach ($feature_array as $val) {
        $feature_render .= '<li>' . $val . '</li>';
Exemplo n.º 6
0
 function makeField($_type, $_name, $_label = NULL, $_value = NULL, $_attr = NULL, $_opt = NULL)
 {
     #echo $_type.'='.$_value.'<br>';
     // remove slashes from value for display 14/06/06
     $_value = str_replace("\\", "", $_value);
     // get attributes from array and create html formatted string (key="val")
     if (is_array($_attr)) {
         foreach ($_attr as $_key => $_val) {
             $_attributes .= ' ' . $_key . '="' . $_val . '"';
         }
     }
     // text field
     if ($_type == "text") {
         $_output .= '<input type="text" name="' . $_name . '" id="' . $_name . '" value="' . $_value . '"' . $_attributes . ' />' . "\n";
     } elseif ($_type == "textarea") {
         $_output .= '<textarea name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . $_value . '</textarea>' . "\n";
     } elseif ($_type == "radio") {
         // get options from $_opt array	(required)
         foreach ($_opt as $_optkey => $_optval) {
             $_output .= '<label for="' . $_name . '' . $_optval . '"><input type="radio" name="' . $_name . '" id="' . $_name . '' . $_optval . '" value="' . $_optval . '"';
             if ($_optkey == $_value) {
                 $_output .= ' checked="checked"';
             }
             $_output .= '' . $_attributes . ' />' . $_optkey . '</label>' . "\n";
         }
     } elseif ($_type == "checkbox") {
         $value_array = explode('|', $_value);
         // get options from $_opt array	(required)
         foreach ($_opt as $_optkey => $_optval) {
             $_output .= '<label for="' . $_name . '' . $_optval . '"><input type="checkbox" name="' . $_name . '[]" id="' . $_name . '' . $_optval . '" value="' . $_optval . '"';
             if (in_array($_optkey, $value_array)) {
                 $_output .= ' checked="checked"';
             }
             $_output .= '' . $_attributes . ' />' . $_optkey . '</label>' . "\n";
         }
     } elseif ($_type == "checkbox_table") {
         $columns = 4;
         $count = 1;
         $value_array = explode('|', $_value);
         // get options from $_opt array	(required)
         foreach ($_opt as $_optkey => $_optval) {
             $_output .= '<td width="' . 100 / $columns . '%"><label for="' . $_name . '' . $_optval . '"><input type="checkbox" name="' . $_name . '[]" id="' . $_name . '' . $_optval . '" value="' . $_optval . '"';
             if (in_array($_optkey, $value_array)) {
                 $_output .= ' checked="checked"';
             }
             // special function for dea_status
             if ($_optkey == "Under Offer with Other") {
                 $_optkey = "U/O with Other";
             }
             $_output .= '' . $_attributes . ' />' . $_optkey . '</label></td>' . "\n";
             if ($count % $columns == 0) {
                 $_output .= '</tr><tr>';
             }
             $count++;
         }
         $_output = '<table class="checkbox_table"><tr>' . $_output . '</tr></table>';
     }
     // file
     if ($_type == "file") {
         $_output .= '<input type="file" name="' . $_name . '" id="' . $_name . '" value="' . $_value . '"' . $_attributes . ' />' . "\n";
     } elseif ($_type == "hidden") {
         $_output .= '<input type="hidden" name="' . $_name . '" id="' . $_name . '" value="' . $_value . '"' . $_attributes . ' />' . "\n";
     } elseif ($_type == "submit" || $_type == "reset" || $_type == "button") {
         $_output .= '<input type="' . $_type . '" name="' . $_name . '" id="' . $_name . '" value="' . $_value . '"' . $_attributes . ' />' . "\n";
     } elseif ($_type == "select") {
         // adding a blank value to top of list if "blank" is present in options array
         if ($_opt['blank']) {
             $_options .= '  <option value=""></option>' . "\n";
             array_shift($_opt);
         }
         // adding a blank value to top of list if no value is selected (ie stored in db)
         if (!$_value) {
             #$_options .= '  <option value=""></option>'."\n";
         }
         // get options from $_opt array	(required)
         foreach ($_opt as $_optkey => $_optval) {
             $_options .= '  <option value="' . $_optkey . '"';
             if ($_optkey == $_value) {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $_optval . '</option>' . "\n";
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n";
         $_output .= $_options . '</select>' . "\n";
     } elseif ($_type == "select_multi") {
         // get output from $_opt array
         // the output comes from other functions, which get specific info as required and return html
         $_output .= $_opt['dd1'] . ' ' . $_opt['dd2'];
     } elseif ($_type == "select_number") {
         // default min and max to 0 => 10
         if (!$_opt['min']) {
             $_opt['min'] = '0';
         }
         if (!$_opt['max']) {
             $_opt['max'] = '10';
         }
         // adding a blank value to top of list if "blank" is present in options array, or if no value is stored
         if ($_opt['blank'] || !$_value) {
             $_options .= '  <option value=""></option>' . "\n";
         }
         for ($_i = $_opt['min']; $_i <= $_opt['max']; $_i++) {
             $_options .= '  <option value="' . $_i . '"';
             if ($_i == "{$_value}") {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $_i . '</option>' . "\n";
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "select_price") {
         // get default value from options array
         $_scope = $_opt['scope'];
         $_term = $_opt['term'];
         $_default = $_opt['default'];
         if ($_default) {
             $_options .= '  <option value="">' . $_default . '</option>';
         }
         // loop through price brackets
         if ($_scope == 'sales') {
             /*
             for ($i = 80000; $i <= 500000;) { 
             	$_options .= '<option value="'.$i.'"';
             	if ($i == $_value) {
             		$_options .= ' selected="selected"';
             		}
             	$_options .= '>'.format_price($i).'</option>
             	'; 
             	$i = $i+5000;
             	}
             */
             for ($i = 80000; $i <= 990000;) {
                 $_options .= '  <option value="' . $i . '"';
                 if ($i == $_value) {
                     $_options .= ' selected="selected"';
                 }
                 $_options .= '>' . format_price($i) . '</option>' . "\n";
                 $i = $i + 10000;
             }
             for ($i = 1000000; $i <= 3000000;) {
                 $_options .= '  <option value="' . $i . '"';
                 if ($i == $_value) {
                     $_options .= ' selected="selected"';
                 }
                 $_options .= '>' . format_price($i) . '</option>' . "\n";
                 $i = $i + 1000000;
             }
         } elseif ($_scope == 'lettings') {
             for ($i = 100; $i <= 1000;) {
                 $_options .= '  <option value="' . $i . '"';
                 if ($i == $_value) {
                     $_options .= ' selected="selected"';
                 }
                 if ($_term == "pcm") {
                     $_options .= '>' . format_price(pw2pcm($i)) . '</option>' . "\n";
                 } else {
                     $_options .= '>' . format_price($i) . '</option>' . "\n";
                 }
                 $i = $i + 50;
             }
             for ($i = 1000; $i <= 5000;) {
                 $_options .= '  <option value="' . $i . '"';
                 if ($i == $_value) {
                     $_options .= ' selected="selected"';
                 }
                 if ($_term == "pcm") {
                     $_options .= '>' . format_price(pw2pcm($i)) . '</option>' . "\n";
                 } else {
                     $_options .= '>' . format_price($i) . '</option>' . "\n";
                 }
                 $i = $i + 250;
             }
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "select_duration") {
         for ($i = 15; $i <= 55;) {
             $_options .= '  <option value="' . $i . '"';
             if ($i == $_value) {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $this->duration($i, $_opt['format']) . '</option>' . "\n";
             $i = $i + 5;
         }
         for ($i = 60; $i <= 300;) {
             $_options .= '  <option value="' . $i . '"';
             if ($i == $_value) {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $this->duration($i, $_opt['format']) . '</option>' . "\n";
             $i = $i + 15;
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "select_branch") {
         $_sql_branch = "SELECT * FROM branch WHERE branch.bra_status = 'Active'";
         $_result_branch = mysql_query($_sql_branch);
         if (!$_result_branch) {
             die("MySQL Error:  " . mysql_error() . "<pre>db_query: " . $_sql_branch . "</pre>");
         }
         while ($_row_branch = mysql_fetch_array($_result_branch)) {
             $_options .= '<option value="' . $_row_branch["bra_id"] . '" style="background-color: #' . $_row_branch["bra_colour"] . '"';
             if ($_row_branch["bra_id"] == "{$_value}") {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $_row_branch["bra_title"] . '</option>' . "\n";
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "select_user") {
         // adding a blank value to top of list if "blank" is present in options array
         if ($_opt) {
             foreach ($_opt as $_optkey => $_optval) {
                 $_options .= '  <option value="' . $_optkey . '">' . $_optval . '</option>' . "\n";
                 #array_shift($_opt);
             }
         }
         /*
         if (!$_value) {
         	$_options .= '  <option value=""></option>'."\n";
         	}
         */
         $_sql_user = "******";
         $_result_user = mysql_query($_sql_user);
         if (!$_result_user) {
             die("MySQL Error:  " . mysql_error() . "<pre>db_query: " . $_sql_user . "</pre>");
         }
         while ($_row_user = mysql_fetch_array($_result_user)) {
             $_options .= '<option value="' . $_row_user["use_id"] . '"';
             if ($_row_user["use_id"] == "{$_value}") {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $_row_user["use_name"] . '</option>' . "\n";
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "select_colour") {
         $_sql_colour = "SELECT col_colour,col_title FROM colour";
         $_sql_colour = "SELECT \n\t\t\tuser.use_colour, \n\t\t\tcolour.col_colour\n\t\t\tFROM user\n\t\t\tLEFT JOIN colour ON user.use_colour != colour.col_colour\n\t\t\tGROUP BY colour.col_colour";
         $_result_colour = mysql_query($_sql_colour);
         if (!$_result_colour) {
             die("MySQL Error:  " . mysql_error() . "<pre>db_query: " . $_sql_colour . "</pre>");
         }
         while ($_row_colour = mysql_fetch_array($_result_colour)) {
             $_options .= '<option value="' . $_row_colour["col_colour"] . '" style="background-color: #' . $_row_colour["col_colour"] . '"';
             if ($_row_colour["col_colour"] == "{$_value}") {
                 $_options .= ' selected="selected"';
             }
             $_options .= '>' . $_row_colour["col_title"] . '</option>' . "\n";
         }
         $_output .= '<select name="' . $_name . '" id="' . $_name . '"' . $_attributes . '>' . "\n" . $_options . '</select>' . "\n";
     } elseif ($_type == "datetime") {
         $_output .= '<input type="text" name="' . $_name . '" id="' . $_name . '" value="' . $_value . '"' . $_attributes . ' onClick="popcal' . $_name . '.select(document.forms[0].' . $_name . ',\'' . $_name . '\',\'dd/MM/yyyy\',\'' . $_value . '\'); return false;" />' . "\n";
         #$_output .= '<a href="javascript:void();" onClick="popcal.select(document.forms[0].'.$_name.',\'anchor\',\'dd/MM/yyyy\',\''.$_value.'\'); return false;" name="anchor" id="anchor"><img src="'.GLOBAL_URL.'img/icons/calendar.gif" width="16" height="16" border="0"></a>'."\n";
         $_output .= '<div id="popCalDiv' . $_name . '" style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"></div>' . "\n";
     } elseif ($_type == "time") {
         $_split = explode(":", $_value);
         // show hours during working day
         for ($_h = 8; $_h <= 20;) {
             $_hours .= '  <option value="' . $_h . '"';
             if ($_h == $_split[0]) {
                 $_hours .= ' selected="selected"';
             }
             $_hours .= '>' . str_pad($_h, 2, "0", STR_PAD_LEFT) . '</option>' . "\n";
             $_h++;
         }
         for ($_m = 0; $_m <= 55;) {
             $_minutes .= '  <option value="' . $_m . '"';
             if ($_m == round_to_nearest($_split[1])) {
                 $_minutes .= ' selected="selected"';
             }
             $_minutes .= '>' . str_pad($_m, 2, "0", STR_PAD_LEFT) . '</option>' . "\n";
             $_m = $_m + 5;
         }
         $_output .= '<select name="' . $_name . '_hour" id="' . $_name . '_hour"' . $_attributes . '>' . "\n" . $_hours . '</select> : ';
         $_output .= '<select name="' . $_name . '_min" id="' . $_name . '_min"' . $_attributes . '>' . "\n" . $_minutes . '</select>' . "\n";
     } elseif ($_type == "htmlarea") {
         require_once "inx/fckeditor/fckeditor.php";
         $htmlarea = new FCKeditor($_name, $_value, $_attr);
         $_output .= $htmlarea->CreateHtml();
     } elseif ($_type == "tel") {
         $count = 1;
         $rows = count($_value);
         if (is_array($_value)) {
             foreach ($_value as $key => $val) {
                 $_tels .= $this->makeField('text', 'tel' . $count, 'Telephone ' . $count, $val['number']);
                 $_tels .= $this->makeField('select', 'tel' . $count . 'type', '', $val['type'], '', db_enum("tel", "tel_type", "array")) . ' ';
                 // make the first field look required. it will be validated if required is set in formData
                 if ($count == 1) {
                     $_tels = '<span class="required">' . "\n" . $_tels . '</span>';
                 }
                 if ($rows > 1) {
                     // delete
                     if ($rows > 1) {
                         $_tels .= '<a href="tel.func.php?action=delete&tel_id=' . $val['id'] . '"><img src="' . GLOBAL_URL . 'img/icons/cross_sm.gif" border="0" alt="Delete this Telephone Number" /></a>';
                     } else {
                         $_tels .= '<img src="' . GLOBAL_URL . 'img/icons/cross_sm_grey.gif" border="0" alt="Delete this Telephone Number" />';
                     }
                     // move up
                     if ($count == 1) {
                         $_tels .= '<img src="' . GLOBAL_URL . 'img/icons/arrow_up_sm_grey.gif" border="0" alt="I can\'t get no higher" />';
                     } else {
                         $_tels .= '<a href="tel.func.php?action=reorder&tel_id=' . $val['id'] . '&cur=' . $count . '&new=' . ($count - 1) . '"><img src="' . GLOBAL_URL . 'img/icons/arrow_up_sm.gif" border="0" alt="Move Up" /></a>';
                     }
                     // move down
                     if ($count == $rows) {
                         $_tels .= '<img src="' . GLOBAL_URL . 'img/icons/arrow_down_sm_grey.gif" border="0" alt="I\'m as low as I can go" />';
                     } else {
                         $_tels .= '<a href="tel.func.php?action=reorder&tel_id=' . $val['id'] . '&cur=' . $count . '&new=' . ($count + 1) . '"><img src="' . GLOBAL_URL . 'img/icons/arrow_down_sm.gif" border="0" alt="Move Down" /></a>';
                     }
                 }
                 $_output .= $this->addLabel('tel' . $count, 'Telephone ' . $count, $_tels);
                 $_tels = '';
                 $count++;
             }
         }
         // add blank for new $_type,$_name,$_label=NULL,$_value=NULL
         if (!is_array($_value)) {
             $_singlevalue = $_value;
         }
         $_tels .= $this->makeField('text', 'telnew', 'New', $_singlevalue);
         $_tels .= $this->makeField('select', 'telnewtype', '', '', '', db_enum("tel", "tel_type", "array")) . ' ';
         if ($_value) {
             $newtel_label = 'Add New &raquo;';
         } else {
             $newtel_label = 'Telephone';
         }
         $tel_output .= $this->addLabel('New', $newtel_label, $_tels);
         $_output .= $tel_output;
     }
     //echo $_name." = ".$this->required[$_name]."<br>";
     if ($this->requiredFields[$_name] == "2" || $this->requiredFields[$_name] == "3") {
         $_output = '<span class="required">' . "\n" . $_output . '</span>' . "\n";
     }
     return $_output;
 }
Exemplo n.º 7
0
     $tel = $row["Branch_Tel"];
     $fax = $row["Branch_Fax"];
 }
 if ($type_id == 1 || $type_id == 2 || $type_id == 5 || $type_id == 7) {
     $proptype = "House";
 } elseif ($type_id == 3 || $type_id == 4 || $type_id == 6) {
     $proptype = "Apartment";
 } elseif ($type_id == 8) {
     $proptype = "Commercial";
 } elseif ($type_id == 9) {
     $proptype = "Live/Work";
 }
 if ($salelet == 1) {
     $formatted_price = price_format($price) . " " . $tenure;
 } elseif ($salelet == 2) {
     $formatted_price = price_format($price) . "pw / " . price_format(pw2pcm($price)) . "pcm";
 }
 $sql = "SELECT * FROM clients WHERE ";
 if ($area) {
     //$sql .= " clients.Areas LIKE '%".$area."%' AND ";
 }
 if ($proptype != "Any") {
     $sql .= " (clients.PropertyType = '" . $proptype . "' OR clients.PropertyType = 'Any') AND ";
 }
 if ($price) {
     $sql .= " clients.MinPrice <= " . $price . " AND clients.MaxPrice >=" . $price . " AND ";
 }
 if ($beds) {
     //$sql .= " clients.Bedrooms >= ".$beds." AND ";
 }
 if ($salelet == 1) {
Exemplo n.º 8
0
    $intBranch = $row["Branch"];
    if ($row["suffix"] == "OIRO") {
        $suffix = " (offers in region of)";
    } elseif ($row["suffix"] == "OIEO") {
        $suffix = " (offers in excess of)";
    }
    if ($SaleLet == 1) {
        // AND property.lease_free = leasefree.id_LeaseFree
        $sqlTenure = "SELECT * FROM leasefree WHERE id_LeaseFree = " . $lease_free . " LIMIT 1";
        $qTenure = $db->query($sqlTenure);
        while ($rowTenure = $qTenure->fetchRow()) {
            $strTenure = $rowTenure["leaseFree_Name"];
        }
        $strPrice = price_format($row["Price"]) . $suffix;
    } elseif ($SaleLet == 2) {
        $strPrice = price_format($row["Price"]) . " per week / " . price_format(pw2pcm($row["Price"])) . " per month" . $suffix;
    }
    $osx = $row["osx"];
    $osy = $row["osy"];
    $strState = "<B><font color=red>" . $row["state_title"] . "</font></B>";
    if ($SaleLet == 1 && ($row["lease_free"] == 2 || $row["lease_free"] == 3)) {
        $strLongDescription .= '
<P><I>The following details have been provided by the vendor and have not been verified.</I></P>
<P><B>Tenure:</B> <I>' . $strTenure;
        //if ($row["lease_length"]) {  $strLongDescription .= ' with some '.$row["lease_length"].' years remaining on the lease'; }
        $strLongDescription .= '</I></P>
<P><B>Service Charge:</B> <I>' . $row["service_charge"] . '</I></P>
<P><B>Ground Rent:</B> <I>' . $row["ground_rent"] . '</I></P>
';
        if ($row["other_details"]) {
            $strLongDescription .= '<P><B>Other Details:</B> <I>' . $row["other_details"] . '</I></P>';