Thank You

Thank You

Check your email for your estimate!

$sname=$_POST[‘sname’];
$email=$_POST[’email’];
$phone=$_POST[‘phone’];
$address=$_POST[‘address’];
$city=$_POST[‘city’];
$state=$_POST[‘state’];
$zip=$_POST[‘zip’];
$homeage=$_POST[‘homeage’];
$size=$_POST[‘size’];
$roofage=$_POST[‘roofage’];
$bedrooms=$_POST[‘bedrooms’];
$bathrooms=$_POST[‘bathrooms’];
$windows=$_POST[‘windows’];
$source=$_POST[‘source’];
$notes=$_POST[‘notes’];
$value=$_POST[‘value’];
$value=str_replace(“,”, “”, $value);
$value=str_replace(“$”, “”, $value);
$lien=$_POST[‘lien’];
$lienval=$_POST[‘lienval’];
$lien=$lien . ” ” . $lienval;
$time=$_POST[‘time’];
$reason=$_POST[‘reason’];
switch($reason)
{
case 1:
$reason=’Bought New Home’;
break;
case 2:
$reason=’Job Relocation’;
break;
case 3:
$reason=’Death of Owner’;
break;
case 4:
$reason=’Lot rent costs’;
break;
case 5:
$reason=’No Choice’;
break;
}
switch($time)
{
case 1:
$time=’This week’;
break;
case 2:
$time=’1-2 weeks’;
break;
case 3:
$time=’3-4 weeks’;
break;
case 4:
$time=’No rush’;
break;
case 5:
$time=’No Choice’;
break;
}
switch($bathrooms)
{
case 1:
$mbath=’1′;
break;
case 2:
$mbath=’1.5′;
break;
case 3:
$mbath=’2′;
break;
case 4:
$mbath=’3′;
break;
}
switch($source)
{
case 1:
$source=’Craigslist’;
break;
case 2:
$source=’Internet Search’;
break;
case 3:
$source=’Newspaper’;
break;
case 4:
$source=’Mailer’;
break;
case 5:
$source=’Sign’;
break;
case 6:
$source=’Facebook’;
break;
case 7:
$source=’Referral’;
break;
case 8:
$source=’Google +’;
break;
case 9:
$source=’Other’;
break;
}

//home ages
$min=array();
$max=array();
$min[‘1987’]=”-1″;
$max[‘1987’]=2800;
$min[‘1988’]=”-1″;
$max[‘1988’]=2800;
$min[‘1989’]=”-1″;
$max[‘1989’]=2800;
$min[‘1990’]=499;
$max[‘1990’]=4200;
$min[‘1991’]=499;
$max[‘1991’]=4200;
$min[‘1992’]=499;
$max[‘1992’]=4200;
$min[‘1993’]=499;
$max[‘1993’]=4200;
$min[‘1994’]=499;
$max[‘1994’]=4200;
$min[‘1995’]=499;
$max[‘1995’]=4200;
$min[‘1996’]=999;
$max[‘1996’]=5600;
$min[‘1997’]=999;
$max[‘1997’]=5600;
$min[‘1998’]=999;
$max[‘1998’]=5600;
$min[‘1999’]=999;
$max[‘1999’]=5600;
$min[‘2000’]=2999;
$max[‘2000’]=11200;
$min[‘2001’]=2999;
$max[‘2001’]=11200;
$min[‘2002’]=2999;
$max[‘2002’]=12600;
$min[‘2003’]=5999;
$max[‘2003’]=12600;
$min[‘2004’]=5999;
$max[‘2004’]=12600;
$min[‘2005’]=5999;
$max[‘2005’]=12600;
$min[‘2006’]=6999;
$max[‘2006’]=18200;
$min[‘2007’]=6999;
$max[‘2007’]=18200;
$min[‘2008’]=6999;
$max[‘2008’]=18200;
$min[‘2009’]=9980;
$max[‘2009’]=21000;
$min[‘2010’]=9980;
$max[‘2010’]=21000;
$min[‘2011’]=9980;
$max[‘2011’]=21000;
$min[‘2012’]=9980;
$max[‘2012’]=21000;
//roof ages
$roof=array();
$roof[‘1987’]=”-300″;
$roof[‘1988’]=”-300″;
$roof[‘1989’]=”-300″;
$roof[‘1991’]=0;
$roof[‘1992’]=0;
$roof[‘1993’]=0;
$roof[‘1994’]=0;
$roof[‘1995’]=0;
$roof[‘1996’]=150;
$roof[‘1997’]=150;
$roof[‘1998’]=150;
$roof[‘1999’]=150;
$roof[‘2000’]=250;
$roof[‘2001’]=250;
$roof[‘2002’]=250;
$roof[‘2003’]=250;
$roof[‘2004’]=250;
$roof[‘2005’]=350;
$roof[‘2006’]=350;
$roof[‘2007’]=350;
$roof[‘2008’]=350;
$roof[‘2009’]=450;
$roof[‘2010’]=450;
$roof[‘2011’]=450;
$roof[‘2012’]=450;
//other options
$doublewide=2000;
$bath=array();
$bath[‘1’]=0;
$bath[‘2’]=300;
$bath[‘3’]=500;
$bath[‘4’]=1000;
$bed=array();
$bed[‘1′]=’No Buy’;
$bed[‘2’]=0;
$bed[‘3’]=500;
$bed[‘4′]=1500;
//calculations
$minvalue=$min[$homeage];
$maxvalue=$max[$homeage];
if($size==’double’)
{
$minvalue=$minvalue + $doublewide;
$maxvalue=$maxvalue + $doublewide;
}
$minvalue=$minvalue + $roof[$roofage] + $bed[$bedrooms] + $bath[$bathrooms];
$maxvalue=$maxvalue + $roof[$roofage] + $bed[$bedrooms] + $bath[$bathrooms];
$modvalue=$maxvalue-$minvalue;
$modvalue=$modvalue/2;
$modvalue=$minvalue+$modvalue;
if(isset($value))
{
if($value !== 0)
{
if($value < $modvalue)
{
$minvalue=$value – 750;
$maxvalue=$value + 600;
}
}
}
if($minvalue < 0)
{
$minvalue=0;
}
$to = ‘bryce@mobilehomesell.com’;
// $to = ‘kylevan@kylevan.com’;
$subject = ‘Web Lead’;
$message = ”
You have received a new lead!\n
The estimator estimated the value of this home to be between $minvalue and $maxvalue. \n
\n
Here is the information you need to know. \n
Name: $sname \n
Phone: $phone \n
Email: $email \n
Address: $address \n
City: $city \n
State: $state \n
Zip: $zip \n
Lien: $lien \n
Home Age: $homeage \n
Roof Age: $roofage \n
Bedrooms: $bedrooms \n
Bathrooms: $mbath \n
Size: $size \n
Windows: $windows \n
Time: $time \n
Value: $value \n
Reason: $reason \n
Source: $source \n
Notes: $notes \n
“;
$headers = ‘From: leads@mobilehomesell.com’ . “\r\n” .
‘Reply-To: leads@mobilehomesell.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
if(isset($email))
{
mail($to, $subject, $message, $headers);
}
if($bedrooms != ‘1’)
{
$to = $email;
$subject = ‘Your Mobile Home Sell Estimate’;
$message = ”
$sname, \n
Thanks for your interest in working with Manufactured Selling Solutions. \n
We estimate being able to pay between $minvalue and $maxvalue for your home. \n
In some situations we may pay more or less than the estimate given. \n
If you feel the given estimate was a little low, contact us to schedule a walk-through of your home. \n
If you have any questions feel free to reach out to us at (810) 584-5851 or send us an email to bryce@mobilehomesell.com \n
\n
Thank You \n
Bryce”;
$headers = ‘From: bryce@mobilehomesell.com’ . “\r\n” .
‘Reply-To: bryce@mobilehomesell.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
if(isset($email))
{
mail($to, $subject, $message, $headers);
}
}
else
{
$to = $email;
$subject = ‘Your Mobile Home Sell Estimate’;
$message = ”
$sname, \n
Thanks for your interest in working with Mobile Home Sell. \n
Unfortunately we do not purchase one bedroom homes. \n
If you have any questions feel free to reach out to me at (810) 584-5851 or send me an email to bryce@mobilehomesell.com \n
\n
Thank You \n
Bryce”;
$headers = ‘From: bryce@mobilehomesell.com’ . “\r\n” .
‘Reply-To: bryce@mobilehomesell.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
if(isset($email))
{
mail($to, $subject, $message, $headers);
}
}
?>

Pin It on Pinterest

Share This