prepare('SELECT * FROM lander_client WHERE clientID = ?');
$search->execute(array($id));
if($search){
$client = $search->fetch(PDO::FETCH_OBJ);
if(!empty($client)){
$name_parts = array();
$first = htmlentities($client->fname, ENT_COMPAT, 'UTF-8');
if($first){ $name_parts[] = $first; }
$last = htmlentities($client->lname, ENT_COMPAT, 'UTF-8');
if($last){ $name_parts[] = $last; }
$name = implode(' ', $name_parts);
$address_parts = array();
$address = htmlentities($client->address, ENT_COMPAT, 'UTF-8');
if($address){ $address_parts[] = $address.'
'; }
$city = htmlentities($client->city, ENT_COMPAT, 'UTF-8');
if($city){ $address_parts[] = $city.','; }
$state = htmlentities($client->state, ENT_COMPAT, 'UTF-8');
if($state){ $address_parts[] = $state.','; }
$country = htmlentities($client->country, ENT_COMPAT, 'UTF-8');
if($country){ $address_parts[] = $country; }
$address = implode(' ', $address_parts);
$type = client_type($client->type);
$box_folder = htmlentities($client->box_folder, ENT_COMPAT, 'UTF-8');
$notes = htmlentities($client->notes, ENT_COMPAT, 'UTF-8');
$loans = '';
$content .= <<
Name
$name
Address
$address
EOT;
if($box_folder){
$content .= <<
Client Type
$type
Box & Folder
$box_folder
EOT;
}
if($notes){
$content .= <<
Notes
$notes
EOT;
}
$content .= <<
Loan Number
$loan_number
County
$county, $state
Acres
$acres ($size_category)
Loan Amount
$amount
Date Issued
$issued
Box & Folder
$loan_box_folder
Date Foreclosed
$foreclosed
RE Number
$renumber
RE box & folder
$rebox_folder