| Server IP : 172.67.178.83 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/corbizre/nextgreathome.com/ |
Upload File : |
<?php
include_once "config.php";
include_once "lib/common.lib.php";
require_once "lib/main.php";
require_once "lib/dbmysql.class.php";
error_reporting(E_ALL);
date_default_timezone_set('America/Denver');
$db2 = new DbMySQL('localhost', 'housesforsalelist', 'housesforsalelist', '7nhToZ03zraWohG');
if(!$db2->connect()){
header('HTTP/1.0 500 Internal Server Error');
exit;
}
$sql = "SELECT count(*) as houses_count FROM houses WHERE ID not in (select house_id from houses_spintext) and Ownership=1";
$houses_count = $db2->select_row($sql);
echo "HOUSES for UPDATE:".$houses_count['houses_count']."\n";
$processing = 100;
echo $iterations_number = ceil($houses_count['houses_count'] / $processing);
$i=0;
for ($iteration = 0; $iteration < $iterations_number; $iteration++) {
$sql = "SELECT * FROM houses WHERE ID not in (select house_id from houses_spintext) and Ownership=1 LIMIT ".($iteration * $processing).",".$processing;
$houses = $db2->select($sql);
foreach($houses as $key=>$house){
//echo "<pre>";
//print_r($house);
//echo "</pre>";
$sql = "select * from images where AssignID='".$house['ID']."' and Active = 1";
$images = $db2->select_row($sql);
$sql = "select * from houses_types ht inner join types t on t.ID=ht.Type_ID where ht.House_ID='".$house['ID']."'";
$houses_type = $db2->select_row($sql);
if($house['Ownership']==1){
$type = '{Residential property|Residential real estate}';
}else{
$type = '{Commercial property|Commercial real estate}';
}
if($house['Status']==1){
$house['market_status'] = "For Sale";
}else{
$house['market_status'] = "For Rent";
}
if($house['Status']==2&&$house['Ownership']==2){
$house['market_status'] = "For Lease";
}
$agent_info = unserialize($house['AgentsInfo']);
//print_r($agent_info);
if($house['Price']){
$base_text = "<h2>{Property|Realty|Listing|Real Estate|".$houses_type['Name']."} in ".$house['City']." on ".$house['Address']." {facts|info|description|details|data|review}</h2>
<p>{House|Home|Property|Listing|".$houses_type['Name']."} was {recorded|added|listed|placed|proposed} ".$house['market_status']." on www.housesforsalelist.com {from|in} ".date_format(date_create($house['DateAdded']), 'm/d/Y').".";
$base_text .= "The {apartment|home|house} {in the market|bargain|on clearance} can be considered as ".$type.".
{This|Current|Selected} ".$houses_type['Name']." {property|home|house|estate|asset|realty|listing} {for sale|in the market|bargain|on clearance} was updated on the {database|site|web site} on ".date_format(date_create($house['DateUpdated']), 'M d/Y H:i:s').".
The status of the listing is ".$house['market_status']." {hence|therefore|thus} any of the {prospective|future|expected} {clients|customers|buyers|consumers} can {query|inquiry|ask} on this {property|home|house|estate|asset|realty|listing}.
The {value|cost|worth} of the {property|home|house|estate|asset|realty|listing} is $".$house['Price']." as updated on our database.
{You are free|Feel Free|Welcome|You are welcome} to {refer|ask|request} to {further|additional|more} {information|info|details|facts} below in order to {gain|get|achieve|acquire|obtain} {more|additional|extra} {details|particulars|specifys} about the {property|home|house|estate|asset|realty|listing}.
";
if(count($images)==0){
$base_text .="This {listing|property|house|home|realty} doesn't {contains|haves|includes} {pictures|images|pics|photos} assigned to it {and} for {additional|extra|fresh|more|new|other} {pictures|images|pics|photos} you can email or {call|telephone} listing {agent|owner}. ";
}
if(count($images)==1){
$base_text .="This {listing|property|house|home|realty} {contains| haves|includes} a one {picture|image|pic|photo} assigned to it {and} for {additional|extra|fresh|more|new|other} {pictures|images|pics|photos} you can email or {call|telephone} listing {agent|owner}. ";
}
if(count($images)>1){
$base_text .="Current {listing|property|house|home|realty} {contains|haves|includes} ".count($images)." {pictures|images|pics|photos} assigned to it {and} for {additional|extra|fresh|more|new|other} {pictures|images|pics|photos} you can email or {call|telephone} listing {agent|owner}. ";
}
$base_text .="</p>";
}
$base_text .="<h3>{Property|Home|House|Estate|Asset|Realty|Listing} {Geographic|Geo} {Location|Point|Place|Position|Scene}</h3> ";
$base_text .="<p>The {property|home|house|estate|asset|realty|listing} {address|location|placement} {details|particulars|specifys} are: <strong>".$house['Address'].", ".$house['City'].", ".$house['State']." ".$house['Zip'].".</strong>
{More|Full|Complete} {info|details|facts|information} about ".$houses_type['Name']." {Geographic|Geo} {Location|Point|Place|Position|Scene} available below on Google StreetView and Maps.</p> ";
if($house['YearBuilt']){
$base_text .="<h3>Historical {facts|specifics|data|essentials|details|particulars}</h3> ";
$base_text .="<p>The {property|home|house|estate|asset|realty|listing} was built way back in ".$house['YearBuilt'].".</p> ";
}
//$base_text .="</p>";
if($house['Beds']||$house['Baths']||$house['Rooms']){
$base_text .="<h3>{Number|Amount|Quantity} of rooms and Living area {information|info}</h3> ";
$base_text .="<p>";
}
if($house['Rooms']){
$base_text .="The {home|house} will {provide|give} ".$house['Rooms']." {large|big|commodious|great} and spacious rooms for the {residents|habitants|inhabitants|occupants}. ";
}
if($house['Beds']&&$house['Baths']){
$base_text .="This {home|house|property|realty} unit {comes|gets|includes|provides} with {".$house['Beds']."|".convertNumber($house['Beds'])."} bedrooms {and|plus} {".$house['Baths']."|".convertNumber($house['Baths'])."} {bathrooms|toilets}. ";
}
if($house['BuildingSize']&&$house['BuildingSize']!=0){
$base_text .="The total square foot area of the {property|home|house|estate|asset|realty|listing} is ".$house['BuildingSize'].". ";
}
if($house['LivingArea']&&$house['LivingArea']!=0){
$base_text .="The square foot living area of the {property|home|house|estate|asset|realty|listing} is ".$house['LivingArea'].". ";
}
if($house['ParkingAvailable']){
$base_text .="The {listing|property|house|home|realty} {provides|gives} ".$house['ParkingAvailable']." parking service with ".convertNumber($house['ParkingSpaces'])." {space|room|area} for parking {cars|vehicles|autos}. ";
}
if($house['Garage']){
$base_text .="The {listing|property|house|home|realty} {includes|provides|gives} Garage space: ".$house['Garage'].". ";
}
$base_text .="</p>";
$base_ctext = "";
$base_text .="<h3>Contact {information|info|details} of {agent|broker|realtor|real estate agent|property agent}</h3>";
$base_text .='<p class="agent_info">';
if($house['Contact']){
$base_ctext ="If you {are interested in following up|want to follow up} more on this {listing|property|house|home|realty|family unit}, you can {contact|get in touch|meet|communicate} the {broker|agent|realtor|real estate agent} by the following contact phone number: ".$house['Contact'].". ";
}
if(isset($agent_info[0])){
if(($agent_info[0]&&$agent_info[0]['Name'])&&($agent_info[0]['CompanyName']||$house['Contact']||$agent_info[0]['Phone']||$agent_info[0]['Email'])){
$base_ctext ="If you {are interested in following up|want to follow up|know} more on this {listing|property|house|home|realty|family unit}, you can {contact|get in touch|meet|communicate} with ".$agent_info[0]['Name']." by the following contact info: ".$agent_info[0]['Phone']." ".$agent_info[0]['CompanyName'].". ";
}
}
$base_text .="You will surely {find|discover} the all your {queries|questions} are answered by {broker|agent|realtor|real estate agent} {and|plus} they will {assist|help|collaborate} you in {inspecting|reviewing} the {property|home|house|estate|asset|realty|listing} as well as closing the deal if you {wish|want|desire} to proceed.";
$base_text = $base_text." ".$base_ctext."</p>";
$spin_text = spin($base_text);
$sql = "insert ignore into houses_spintext set house_id='".$house['ID']."', spin_text='".mysqli_real_escape_string($db2->getLink(), $spin_text)."'";
echo "insert spin for house:".$house['ID']."\n";
$db2->query($sql);
$base_text="";
$base_ctext="";
}
}
?>