DEBUG MODE - Active Query
$query_img"); //echo "
DEBUG MODE - Active Query
$sql
"; } $result_img=mysql_query($query_img); $num_img=mysql_numrows($result_img); if ($_SERVER['SERVER_NAME'] != 'localhost'){ if($num_img==0) { return "$website_url/images/no_image.gif"; } else { $row_img = mysql_fetch_assoc($result_img); return $row_img['File_url']; } }else{ if($num_img==0) { return "$website_url/images/no_image.gif"; } else { #return "images/mock_page.jpg"; $row_img = mysql_fetch_assoc($result_img); return $row_img['File_url']; } } } /////////////////////////////////// // SELECT SINGLE VEBRA PROPERTY /////////////////////////////////// function single_property($prop_id) { global $debug; db_connect(); $query="SELECT * FROM vebraproperties WHERE Prop_VebraID='$prop_id'"; $result=mysql_query($query); $num=mysql_numrows($result); if ($debug=="on"){ popmsg(" DEBUG MODE - Active Query
$query"); //echo "
DEBUG MODE - Active Query
$sql
"; } if ($num==0) { echo "$noarticles
"; } else { //start of puling date $row = mysql_fetch_assoc($result); $Prop_ID = $row['Prop_ID']; $Prop_FirmID = $row['Prop_FirmID']; $Prop_BranchID = $row['Prop_BranchID']; $Prop_Name = $row['Prop_Name']; $Prop_Street = $row['Prop_Street']; $Prop_Town = $row['Prop_Town']; $Prop_County = $row['Prop_County']; $Prop_DisplayPcode = $row['Prop_DisplayPcode']; $Prop_Postcode = $row['Prop_Postcode']; $Prop_Price = $row['Prop_Price']; $Prop_PriceQualifier = $row['Prop_PriceQualifier']; $Prop_PropType = $row['Prop_PropType']; $Prop_Status = $row['Prop_Status']; $Prop_Bedrooms = $row['Prop_Bedrooms']; $Prop_Receptions = $row['Prop_Receptions']; $Prop_Description = $row['Prop_Description']; $Prop_LastUpload = $row['Prop_LastUpload']; $Prop_Bullet1 = $row['Prop_Bullet1']; $Prop_Bullet2 = $row['Prop_Bullet2']; $Prop_Bullet3 = $row['Prop_Bullet3']; $Prop_Bullet4 = $row['Prop_Bullet4']; $Prop_Bullet5 = $row['Prop_Bullet5']; $Prop_Bullet6 = $row['Prop_Bullet6']; $Prop_Bullet7 = $row['Prop_Bullet7']; $Prop_Bullet8 = $row['Prop_Bullet8']; $Prop_Bed1Imp = $row['Prop_Bed1Imp']; $Prop_Bed2Imp = $row['Prop_Bed2Imp']; $Prop_Bed3Imp = $row['Prop_Bed3Imp']; $Prop_Bed4Imp = $row['Prop_Bed4Imp']; $Prop_Bed5Imp = $row['Prop_Bed5Imp']; $Prop_Bed6Imp = $row['Prop_Bed6Imp']; $Prop_Rec1Imp = $row['Prop_Rec1Imp']; $Prop_Rec2Imp = $row['Prop_Rec2Imp']; $Prop_Rec3Imp = $row['Prop_Rec3Imp']; $Prop_Rec4Imp = $row['Prop_Rec4Imp']; $Prop_KitchImp = $row['Prop_KitchImp']; $Prop_Bed1Met = $row['Prop_Bed1Met']; $Prop_Bed2Met = $row['Prop_Bed2Met']; $Prop_Bed3Met = $row['Prop_Bed3Met']; $Prop_Bed4Met = $row['Prop_Bed4Met']; $Prop_Bed5Met = $row['Prop_Bed5Met']; $Prop_Bed6Met = $row['Prop_Bed6Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec2Met = $row['Prop_Rec2Met']; $Prop_Rec3Met = $row['Prop_Rec3Met']; $Prop_Rec4Met = $row['Prop_Rec4Met']; $Prop_KitchMet = $row['Prop_KitchMet']; $Prop_Locality = $row['Prop_Locality']; $Prop_AddrFields = $row['Prop_AddrFields']; $Prop_AgentRef = $row['Prop_AgentRef']; $Prop_PriceIsPcm = $row['Prop_PriceIsPcm']; $Prop_Systemid = $row['Prop_Systemid']; $Prop_Category = $row['Prop_Category']; $Prop_DisplayPrice = $row['Prop_DisplayPrice']; $Prop_HasImage = $row['Prop_HasImage']; $Prop_HasVTour = $row['Prop_HasVTour']; $Prop_VebraID = $row['Prop_VebraID']; $Prop_EECurrent = $row['Prop_EECurrent']; $Prop_EEPotential = $row['Prop_EEPotential']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EIPotential = $row['Prop_EIPotential']; $Prop_Furnished = $row['Prop_Furnished']; $Prop_FrenchDepartment = $row['Prop_FrenchDepartment']; $Prop_PropType3 = $row['Prop_PropType3']; $Prop_CommRent = $row['Prop_CommRent']; $Prop_ImpMinArea = $row['Prop_ImpMinArea']; $Prop_ImpArea = $row['Prop_ImpArea']; $Prop_MetArea = $row['Prop_MetArea']; $Prop_MetMinArea = $row['Prop_MetMinArea']; $Prop_AgentLocn = $row['Prop_AgentLocn']; //new fields added 21 September 2010 $Prop_DisplayAddress = $row['Prop_DisplayAddress']; $Prop_Bathrooms = $row['Prop_Bathrooms']; $Prop_deposit = $row['Prop_deposit']; $Prop_rmrentaltype = $row['Prop_rmrentaltype']; $Prop_detailsurl = $row['Prop_detailsurl']; $Prop_vebra360url = $row['Prop_vebra360url']; $Prop_availdate = $row['Prop_availdate']; $Prop_bullet9 = $row['Prop_bullet9']; $Prop_bullet10 = $row['Prop_bullet10']; // convert zero beds to studio if($Prop_Bedrooms==0){ $Prop_Bedrooms="Studio"; } $title_txt="$Prop_Street, $Prop_Town
$Prop_Bedrooms Bed $Prop_PropType "; // Build page link url $property_uid=$Prop_PropType.'_'.$Prop_ID; //concat the property type with the unique id $link_txt=str_replace(",","","$Prop_Town-manchester/$Prop_Street-manchester/$property_uid");// strip out commas $link_txt=str_replace(".","","$link_txt");// strip out dots $link_txt=str_replace(" ","-",$link_txt);//replace spaces with - $alt_txt=strtolower($link_txt);// make everything lower case return array($Prop_ID,$Prop_Street,$Prop_Town,$Prop_Bedrooms,$Prop_PropType,$Prop_Bullet1,$Prop_Bullet2,$Prop_Bullet3,$alt_txt,$title_txt); } } /////////////////////////// // TRACKER //////////////////////////// function update_property_count($prop_id,$lst_fig) { $new_tot=$lst_fig+1; mysql_query("UPDATE vebraproperties SET Prop_AgentLocn='$new_tot' WHERE Prop_VebraID='$prop_id'"); } /////////////////////////// // PROPERTY LIST VIEWS //////////////////////////// function property_list($cat,$view="view_property_list_home",$limit=4,$order="",$where="") // category/view/limit/orderby/where // category - buy(1) or let(2) // view - select from various view set in the views folder - default is view_property_list_home // limit - limit the results to x - default 4 // orderby - the way the data will be ordered - default Prop_id // where - the where clause as written - default is blank { db_connect(); global $debug; global $website_url; global $prop_start; global $prop_cat; global $prop_view; global $home_query; // if this is a homepage query them overwrite the previous query global $one_slug_under; // the id number of the page that is one slug under url ="http://mywebite.co.uk/my_properties/property_1010" - $one_slug_under=my_properties global $current_slug_id; // the id number of the page that is the current slug $search_variables=$_SESSION['search_variables'];// variables set by the search facility //check if the search variable contains the term status if(check_if_word_exists($search_variables,"Prop_Status")==1){ // check if the result is more than 0 $result_check=mysql_num_rows(mysql_query("SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$search_variables")); // if results are less than zero, remove the prop status value if($result_check==0){ $search_variables="";// remove all search variables } } // if so check if this will bring a result // if not remove from variables. $listby=$_SESSION['listby']; if($listby=="bedrooms"){ $listby="Prop_Bedrooms"; }elseif($listby=="price"){ $listby="Prop_Price"; }elseif($listby==""){ $listby="Prop_Bedrooms"; } $orderby=$_SESSION['orderby']; if($orderby=="hi"){ $orderby="desc"; }elseif($orderby=="lo"){ $orderby="asc"; }elseif($orderby==""){ $orderby="asc"; } if($where!=""){ $where=" ".$where;// add space to the end of where if it exists } // Carry out some checks on order and limit if($order!==""){ $orderby_it="$order"; $limit_it="LIMIT $limit"; }elseif($order==""){ $orderby_it="$listby $orderby"; $limit_it="LIMIT $limit"; }else{ $limit_it="LIMIT " . $prop_start . ", $rowsPerPage"; } // if this is a homepage query them overwirte the previous query if(isset($home_query)){ $query="SELECT * FROM vebraproperties WHERE Prop_VebraID IN($home_query)$where ORDER BY $listby $orderby LIMIT $limit"; }elseif(isset($search_variables)){ $query="SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$search_variables ORDER BY $listby $orderby LIMIT $limit"; }else{ $query="SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$where ORDER BY $orderby_it $limit_it"; } if ($debug=="on"){ popmsg(" DEBUG MODE - Active Query
$query"); //echo "
DEBUG MODE - Active Query
$sql
"; } //echo $query; $result=mysql_query($query); $num=mysql_numrows($result); if ($num==0) { echo "$noarticles
"; echo"
Sorry! No propeties were found!

Please contact us directly,
as new properties are added thoughout the day.
"; } else { //start of puling date while($row = mysql_fetch_assoc($result)) { $Prop_ID = $row['Prop_ID']; $Prop_FirmID = $row['Prop_FirmID']; $Prop_BranchID = $row['Prop_BranchID']; $Prop_Name = $row['Prop_Name']; $Prop_Street = $row['Prop_Street']; $Prop_Town = $row['Prop_Town']; $Prop_County = $row['Prop_County']; $Prop_DisplayPcode = $row['Prop_DisplayPcode']; $Prop_Postcode = $row['Prop_Postcode']; $Prop_Price = $row['Prop_Price']; $Prop_PriceQualifier = $row['Prop_PriceQualifier']; $Prop_PropType = $row['Prop_PropType']; $Prop_Status = $row['Prop_Status']; $Prop_Bedrooms = $row['Prop_Bedrooms']; $Prop_Receptions = $row['Prop_Receptions']; $Prop_Description = $row['Prop_Description']; $Prop_LastUpload = $row['Prop_LastUpload']; $Prop_Bullet1 = $row['Prop_Bullet1']; $Prop_Bullet2 = $row['Prop_Bullet2']; $Prop_Bullet3 = $row['Prop_Bullet3']; $Prop_Bullet4 = $row['Prop_Bullet4']; $Prop_Bullet5 = $row['Prop_Bullet5']; $Prop_Bullet6 = $row['Prop_Bullet6']; $Prop_Bullet7 = $row['Prop_Bullet7']; $Prop_Bullet8 = $row['Prop_Bullet8']; $Prop_Bed1Imp = $row['Prop_Bed1Imp']; $Prop_Bed2Imp = $row['Prop_Bed2Imp']; $Prop_Bed3Imp = $row['Prop_Bed3Imp']; $Prop_Bed4Imp = $row['Prop_Bed4Imp']; $Prop_Bed5Imp = $row['Prop_Bed5Imp']; $Prop_Bed6Imp = $row['Prop_Bed6Imp']; $Prop_Rec1Imp = $row['Prop_Rec1Imp']; $Prop_Rec2Imp = $row['Prop_Rec2Imp']; $Prop_Rec3Imp = $row['Prop_Rec3Imp']; $Prop_Rec4Imp = $row['Prop_Rec4Imp']; $Prop_KitchImp = $row['Prop_KitchImp']; $Prop_Bed1Met = $row['Prop_Bed1Met']; $Prop_Bed2Met = $row['Prop_Bed2Met']; $Prop_Bed3Met = $row['Prop_Bed3Met']; $Prop_Bed4Met = $row['Prop_Bed4Met']; $Prop_Bed5Met = $row['Prop_Bed5Met']; $Prop_Bed6Met = $row['Prop_Bed6Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec2Met = $row['Prop_Rec2Met']; $Prop_Rec3Met = $row['Prop_Rec3Met']; $Prop_Rec4Met = $row['Prop_Rec4Met']; $Prop_KitchMet = $row['Prop_KitchMet']; $Prop_Locality = $row['Prop_Locality']; $Prop_AddrFields = $row['Prop_AddrFields']; $Prop_AgentRef = $row['Prop_AgentRef']; $Prop_PriceIsPcm = $row['Prop_PriceIsPcm']; $Prop_Systemid = $row['Prop_Systemid']; $Prop_Category = $row['Prop_Category']; $Prop_DisplayPrice = $row['Prop_DisplayPrice']; $Prop_HasImage = $row['Prop_HasImage']; $Prop_HasVTour = $row['Prop_HasVTour']; $Prop_VebraID = $row['Prop_VebraID']; $Prop_EECurrent = $row['Prop_EECurrent']; $Prop_EEPotential = $row['Prop_EEPotential']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EIPotential = $row['Prop_EIPotential']; $Prop_Furnished = $row['Prop_Furnished']; $Prop_FrenchDepartment = $row['Prop_FrenchDepartment']; $Prop_PropType3 = $row['Prop_PropType3']; $Prop_CommRent = $row['Prop_CommRent']; $Prop_ImpMinArea = $row['Prop_ImpMinArea']; $Prop_ImpArea = $row['Prop_ImpArea']; $Prop_MetArea = $row['Prop_MetArea']; $Prop_MetMinArea = $row['Prop_MetMinArea']; $Prop_AgentLocn = $row['Prop_AgentLocn']; //new fields added 21 September 2010 $Prop_DisplayAddress = $row['Prop_DisplayAddress']; $Prop_Bathrooms = $row['Prop_Bathrooms']; $Prop_deposit = $row['Prop_deposit']; $Prop_rmrentaltype = $row['Prop_rmrentaltype']; $Prop_detailsurl = $row['Prop_detailsurl']; $Prop_vebra360url = $row['Prop_vebra360url']; $Prop_availdate = $row['Prop_availdate']; $Prop_bullet9 = $row['Prop_bullet9']; $Prop_bullet10 = $row['Prop_bullet10']; // SHOW BANNER ABOVE PICTURE IF STATUS HAS CHANGED--> if($Prop_Status==3 && $Prop_Category==1){ //sales $banner = "banner_sold.png"; }elseif($Prop_Status==6 && $Prop_Category==1){ $banner = "banner_new_instruction.png"; }elseif($Prop_Status==8 && $Prop_Category==1){ $banner = "banner_reduced.png"; }elseif($Prop_Status==1 && $Prop_Category==2){ $banner = "banner_let.png"; }elseif($Prop_Status==2 && $Prop_Category==2){ $banner = "banner_under_offer.png"; }else{ $banner = ""; } // convert zero beds to studio if($Prop_Bedrooms==0){ $Prop_Bedrooms="Studio"; }else{ $Prop_Bedrooms=$Prop_Bedrooms." Bed";} $title_txt="$Prop_Street, $Prop_Town - $Prop_Bedrooms $Prop_PropType "; // used form main description //$title_txt old="$Prop_Bedrooms $Prop_PropType "; // used form main description // Build page link url if($Prop_PropType=="(Not Specified)"){ $Prop_PropType="apartment"; } $Prop_PropType=str_replace("/","",$Prop_PropType);//replace / with nothing $Prop_Street=str_replace("/","",$Prop_Street);//replace / with nothing $Prop_Town=str_replace("/","",$Prop_Town);//replace / with nothing $property_uid=str_replace("/","",$Prop_PropType.'_'.$Prop_ID); //concat the property type with the unique id $link_txt=str_replace(",","","$Prop_Town-manchester/$Prop_Street-manchester/$property_uid");// strip out commas $link_txt=str_replace(".","","$link_txt");// strip out dots $link_txt=str_replace(" ","-",$link_txt);//replace spaces with - $link_txt=strtolower($link_txt);// make everything lower case // if the bedz is zero convert to alt if($Prop_Bedrooms==0){ $alt_txt="$Prop_Street, $Prop_Town - $Prop_Bedrooms"; }else{ $alt_txt="$Prop_Street, $Prop_Town - $Prop_Bedrooms Bed - $Prop_PropType"; } $seo_name="$Prop_Street, $Prop_Town "; $catch_phrase="$Prop_Bullet1, $Prop_Bullet2, $Prop_Bullet3, $Prop_Bullet4, $Prop_Bullet5, $Prop_Bullet6, $Prop_Bullet7, $Prop_Bullet8"; $homepage_snippet="$Prop_Bullet1,$Prop_Bullet2,$Prop_Bullet3,$Prop_Bullet4,$Prop_Bullet5"; $phase=""; // produce the loop for each property $rental_loop=''.include("views/".$view.".php").''; $link_txt=""; } // end loop } // end if else } //end fucntion /////////////////////////// // PROPERTY LIST VIEWS //////////////////////////// function property_list_query($cat,$view="view_property_list_home",$limit=4,$order="",$where="") // category/view/limit/orderby/where // category - buy(1) or let(2) // view - select from various view set in the views folder - default is view_property_list_home // limit - limit the results to x - default 4 // orderby - the way the data will be ordered - default Prop_id // where - the where clause as written - default is blank { db_connect(); global $debug; global $website_url; global $prop_start; global $prop_cat; global $prop_view; global $home_query; // if this is a homepage query them overwrite the previous query global $one_slug_under; // the id number of the page that is one slug under url ="http://mywebite.co.uk/my_properties/property_1010" - $one_slug_under=my_properties global $current_slug_id; // the id number of the page that is the current slug $search_variables=$_SESSION['search_variables'];// variables set by the search facility //check if the search variable contains the term status if(check_if_word_exists($search_variables,"Prop_Status")==1){ // check if the result is more than 0 $result_check=mysql_num_rows(mysql_query("SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$search_variables")); // if results are less than zero, remove the prop status value if($result_check==0){ $search_variables="";// remove all search variables } } // if so check if this will bring a result // if not remove from variables. $listby=$_SESSION['listby']; if($listby=="bedrooms"){ $listby="Prop_Bedrooms"; }elseif($listby=="price"){ $listby="Prop_Price"; }elseif($listby==""){ $listby="Prop_Bedrooms"; } $orderby=$_SESSION['orderby']; if($orderby=="hi"){ $orderby="desc"; }elseif($orderby=="lo"){ $orderby="asc"; }elseif($orderby==""){ $orderby="asc"; } if($where!=""){ $where=" ".$where;// add space to the end of where if it exists } // Carry out some checks on order and limit if($order!==""){ $orderby_it="$order"; $limit_it="LIMIT $limit"; }elseif($order==""){ $orderby_it="$listby $orderby"; $limit_it="LIMIT $limit"; }else{ $limit_it="LIMIT " . $prop_start . ", $rowsPerPage"; } // if this is a homepage query them overwirte the previous query if(isset($home_query)){ $query="SELECT * FROM vebraproperties WHERE Prop_VebraID IN($home_query)$where ORDER BY $listby $orderby LIMIT $limit"; }elseif(isset($search_variables)){ $query="SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$search_variables ORDER BY $listby $orderby LIMIT $limit"; }else{ $query="SELECT * FROM vebraproperties WHERE Prop_Category='$cat'$where ORDER BY $orderby_it $limit_it"; } return $query; } //end fucntion /////////////////////////// // INDIVIDUAL PROPERTY VIEW //////////////////////////// function property_view($id,$vebra_id='') { db_connect(); if($vebra_id!==''){ // if vebra id is declared then show it. else use id $query="SELECT * FROM vebraproperties WHERE Prop_VebraID='$vebra_id'"; }else{ $query="SELECT * FROM vebraproperties WHERE Prop_ID='$id'"; } //echo $query; $result=mysql_query($query); $num=mysql_numrows($result); if ($num==0) { echo "$noarticles
"; #echo"
Add A New $pg
"; } else { //start of puling date $row = mysql_fetch_assoc($result); $Prop_ID = $row['Prop_ID']; $Prop_FirmID = $row['Prop_FirmID']; $Prop_BranchID = $row['Prop_BranchID']; $Prop_Name = $row['Prop_Name']; $Prop_Street = $row['Prop_Street']; $Prop_Town = $row['Prop_Town']; $Prop_County = $row['Prop_County']; $Prop_DisplayPcode = $row['Prop_DisplayPcode']; $Prop_Postcode = $row['Prop_Postcode']; $Prop_Price = $row['Prop_Price']; $Prop_PriceQualifier = $row['Prop_PriceQualifier']; $Prop_PropType = $row['Prop_PropType']; $Prop_Status = $row['Prop_Status']; $Prop_Bedrooms = $row['Prop_Bedrooms']; $Prop_Receptions = $row['Prop_Receptions']; $Prop_Description = $row['Prop_Description']; $Prop_LastUpload = $row['Prop_LastUpload']; $Prop_Bullet1 = $row['Prop_Bullet1']; $Prop_Bullet2 = $row['Prop_Bullet2']; $Prop_Bullet3 = $row['Prop_Bullet3']; $Prop_Bullet4 = $row['Prop_Bullet4']; $Prop_Bullet5 = $row['Prop_Bullet5']; $Prop_Bullet6 = $row['Prop_Bullet6']; $Prop_Bullet7 = $row['Prop_Bullet7']; $Prop_Bullet8 = $row['Prop_Bullet8']; $Prop_Bed1Imp = $row['Prop_Bed1Imp']; $Prop_Bed2Imp = $row['Prop_Bed2Imp']; $Prop_Bed3Imp = $row['Prop_Bed3Imp']; $Prop_Bed4Imp = $row['Prop_Bed4Imp']; $Prop_Bed5Imp = $row['Prop_Bed5Imp']; $Prop_Bed6Imp = $row['Prop_Bed6Imp']; $Prop_Rec1Imp = $row['Prop_Rec1Imp']; $Prop_Rec2Imp = $row['Prop_Rec2Imp']; $Prop_Rec3Imp = $row['Prop_Rec3Imp']; $Prop_Rec4Imp = $row['Prop_Rec4Imp']; $Prop_KitchImp = $row['Prop_KitchImp']; $Prop_Bed1Met = $row['Prop_Bed1Met']; $Prop_Bed2Met = $row['Prop_Bed2Met']; $Prop_Bed3Met = $row['Prop_Bed3Met']; $Prop_Bed4Met = $row['Prop_Bed4Met']; $Prop_Bed5Met = $row['Prop_Bed5Met']; $Prop_Bed6Met = $row['Prop_Bed6Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec1Met = $row['Prop_Rec1Met']; $Prop_Rec2Met = $row['Prop_Rec2Met']; $Prop_Rec3Met = $row['Prop_Rec3Met']; $Prop_Rec4Met = $row['Prop_Rec4Met']; $Prop_KitchMet = $row['Prop_KitchMet']; $Prop_Locality = $row['Prop_Locality']; $Prop_AddrFields = $row['Prop_AddrFields']; $Prop_AgentRef = $row['Prop_AgentRef']; $Prop_PriceIsPcm = $row['Prop_PriceIsPcm']; $Prop_Systemid = $row['Prop_Systemid']; $Prop_Category = $row['Prop_Category']; $Prop_DisplayPrice = $row['Prop_DisplayPrice']; $Prop_HasImage = $row['Prop_HasImage']; $Prop_HasVTour = $row['Prop_HasVTour']; $Prop_VebraID = $row['Prop_VebraID']; $Prop_EECurrent = $row['Prop_EECurrent']; $Prop_EEPotential = $row['Prop_EEPotential']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EICurrent = $row['Prop_EICurrent']; $Prop_EIPotential = $row['Prop_EIPotential']; $Prop_Furnished = $row['Prop_Furnished']; $Prop_FrenchDepartment = $row['Prop_FrenchDepartment']; $Prop_PropType3 = $row['Prop_PropType3']; $Prop_CommRent = $row['Prop_CommRent']; $Prop_ImpMinArea = $row['Prop_ImpMinArea']; $Prop_ImpArea = $row['Prop_ImpArea']; $Prop_MetArea = $row['Prop_MetArea']; $Prop_MetMinArea = $row['Prop_MetMinArea']; $Prop_AgentLocn = $row['Prop_AgentLocn']; //new fields added 21 September 2010 $Prop_DisplayAddress = $row['Prop_DisplayAddress']; $Prop_Bathrooms = $row['Prop_Bathrooms']; $Prop_deposit = $row['Prop_deposit']; $Prop_rmrentaltype = $row['Prop_rmrentaltype']; $Prop_detailsurl = $row['Prop_detailsurl']; $Prop_vebra360url = $row['Prop_vebra360url']; $Prop_availdate = $row['Prop_availdate']; $Prop_bullet9 = $row['Prop_bullet9']; $Prop_bullet10 = $row['Prop_bullet10']; // if the beds is zero convert to alt if($Prop_Bedrooms==0){ $prop_title_txt="$Prop_Street, $Prop_Town - Studio $Prop_PropType"; }else{ $prop_title_txt="$Prop_Street, $Prop_Town - $Prop_Bedrooms Bed - $Prop_PropType"; } return array($Prop_ID,$Prop_FirmID,$Prop_BranchID,$Prop_Name,$Prop_Street,$Prop_Town,$Prop_County,$Prop_DisplayPcode,$Prop_Postcode,$Prop_Price,$Prop_PriceQualifier,$Prop_PropType,$Prop_Status,$Prop_Bedrooms,$Prop_Receptions,$Prop_Description,$Prop_LastUpload,$Prop_Bullet1,$Prop_Bullet2,$Prop_Bullet3,$Prop_Bullet4,$Prop_Bullet5,$Prop_Bullet6,$Prop_Bullet7,$Prop_Bullet8,$Prop_Bed1Imp,$Prop_Bed2Imp,$Prop_Bed3Imp,$Prop_Bed4Imp,$Prop_Bed5Imp,$Prop_Bed6Imp,$Prop_Rec1Imp,$Prop_Rec2Imp,$Prop_Rec3Imp,$Prop_Rec4Imp,$Prop_KitchImp,$Prop_Bed1Met,$Prop_Bed2Met,$Prop_Bed3Met,$Prop_Bed4Met,$Prop_Bed5Met,$Prop_Bed6Met,$Prop_Rec1Met,$Prop_Rec2Met,$Prop_Rec3Met,$Prop_Rec4Met,$Prop_KitchMet,$Prop_Locality,$Prop_AddrFields,$Prop_AgentRef,$Prop_PriceIsPcm,$Prop_Systemid,$Prop_Category,$Prop_DisplayPrice,$Prop_HasImage,$Prop_HasVTour,$Prop_VebraID,$Prop_EECurrent,$Prop_EEPotential,$Prop_EICurrent,$Prop_EICurrent,$Prop_EIPotential,$Prop_Furnished,$Prop_FrenchDepartment,$Prop_PropType3,$Prop_CommRent,$Prop_ImpMinArea,$Prop_ImpArea,$Prop_MetArea,$Prop_MetMinArea,$Prop_slug,$Prop_AgentLocn,$Prop_DisplayAddress,$Prop_Bathrooms,$Prop_deposit,$Prop_rmrentaltype,$Prop_detailsurl,$Prop_vebra360url,$Prop_availdate,$Prop_bullet9,$Prop_bullet10,$prop_title_txt); } // end if else } //end fucntion ///////////////////////////// // NEW DEVELOPMENTS FUNCTION ///////////////////////////// function newdevelopments($dev_id) { db_connect(); $query="SELECT * FROM tbldevelopments WHERE dev_id ='$dev_id'"; $result=mysql_query($query); $row=mysql_fetch_assoc($result); $dev_id=$row['dev_id']; $name=$row['name']; $description=$row['description']; $floors=$row['floors']; $accomodation=$row['accomodation']; $location=$row['location']; $carparking=$row['carparking']; $maintenance_fee=$row['maintenance_fee']; $comments=$row['comments']; $archived=$row['archived']; $pic1=$row['pic1']; $pic2=$row['pic2']; $pic3=$row['pic3']; $pic4=$row['pic4']; $pic5=$row['pic5']; $pic6=$row['pic6']; $pic7=$row['pic7']; $pic8=$row['pic8']; $pic9=$row['pic9']; $pic10=$row['pic10']; $DateAdded=$row['DateAdded']; $virtual_tour=$row['virtual_tour']; $post_code=$row['post_code']; $street=$row['street']; $area=$row['area']; return array($dev_id,$name,$description,$floors,$accomodation,$location,$carparking,$maintenance_fee,$comments,$archived,$pic1,$pic2,$pic3,$pic4,$pic5,$pic6,$pic7,$pic8,$pic9,$pic10,$DateAdded,$virtual_tour,$post_code,$street,$area); } ///////////////////////////// // FIND SLUG BASED ON VALUE IN URL ///////////////////////////// function find_slug($place=1) { global $checkSlug; $checkDir = count($checkSlug); // count elements $n = $checkDir - $place; // find last element $findSlug = $checkSlug[$n]; // isolate the last part of the url $slug = str_replace("page.php?id=", "", $findSlug); // isolate the slug return $slug; } ################################################### # # DESCRIPTION: # This function returns the last occurance of a string, # rather than the last occurance of a single character like # strrpos does. It also supports an offset from where to # start the searching in the haystack string. # # ARGS: # $haystack (required) -- the string to search upon # $needle (required) -- the string you are looking for # $offset (optional) -- the offset to start from # # RETURN VALS: # returns integer on success # returns false on failure to find the string at all # ################################################### function strrpos_string($haystack, $needle, $offset = 0) { if(trim($haystack) != "" && trim($needle) != "" && $offset <= strlen($haystack)) { $last_pos = $offset; $found = false; while(($curr_pos = strpos($haystack, $needle, $last_pos)) !== false) { $found = true; $last_pos = $curr_pos + 1; } if($found) { #return $last_pos - 1; return true; } else { return false; } } else { return false; } } ///////////////////////////////////////////////////////// ///////Remove all non numeric characters ///////////////////////////////////////////////////////// function get_numbers_from_string( $string ) { return ereg_replace( '[^0-9]+', '', $string ); } ///////////////////////////////////////////////////////// ///////check if word exists ///////////////////////////////////////////////////////// function check_if_word_exists($string, $fieldname) { if (preg_match("/$fieldname/i", "$string")) { return 1; } else { return 2; } } ///////////////////////////////////////////////////////// ///////HOW MANY SLUG LEVELS TO LOOK FOR A VALUE ///////////////////////////////////////////////////////// function how_many_slugs_deep($depth) { $slug_pre=find_slug($depth);// pull slug one down list($one_slug_under)=select_page_from_db_by_pagename($slug_pre); return $one_slug_under; } // tracker starts here // only run if not localhost //if ($_SERVER['SERVER_NAME'] != 'localhost'){ //include_once $_SERVER[ 'DOCUMENT_ROOT' ].'/stats/api/LogRequest.php'; //twatchLogRequest(true); //} ///////////////////////////////////////////////////////// ///////PULL REVIEWS ///////////////////////////////////////////////////////// function all_reviews($limit=100) { db_connect(); $query="SELECT * FROM enquiries WHERE msg_status!='1' AND enq_type!='EPC Online Request' ORDER BY dt DESC limit $limit"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); if ($num==0) { echo "
Currently no new reviews
"; } else { $i=0; echo'
'; } }//end of reviews //SELECT FUNCTION HERE function select_blog_comments($vlist=1,$where='',$admin=0) { //$where = your extra query db_connect(); $query = "SELECT * FROM blog_comments $where"; //echo $query; $result = mysql_query($query); $num_rows = mysql_numrows($result); if($num_rows>0) { while ($row=mysql_fetch_assoc($result)) { $blog_comments_id=$row['blog_comments_id']; $blog_comments_username_id=$row['blog_comments_username_id']; $blog_comments_date=$row['blog_comments_date']; $com_title=$row['com_title']; $com_details=$row['com_details']; $com_status=$row['com_status']; echo "
  • $com_title

    $com_details
    "; if($admin==1){ echo "x"; } echo"
  • "; } } //return $vlist; } ?>