<?php

$modalContent = ''; 
$modalContent .= '<div class="row"><div class="col-xs-12">';

$modalContent .= '<input type="hidden" name="adminType" value="'. $adminType .'" />
				<input type="hidden" name="op" value="'. $op .'" />
				'. $editInpID . '
				<input type="hidden" name="display" value="'. $display .'" />
				<input type="hidden" name="date_added" value="'. $date_added .'" />
				<input type="hidden" name="date_updated" value="'. $date_updated .'" />';

$modalContent .= '<div class="table-responsive">';
$modalContent .= '<table class="adminForm table table-condensed">';
$modalContent .= '<tr>
				<th><br>Name:</th>
				<td><div style="float: left; width: 110px"><label>First</label><br><input type="text" name="firstname" value="'. $firstname .'" style="width: 100px" /></div><div style="float: left; width: 155px"><label>Last</label><br><input type="text" name="lastname" value="'. $lastname .'" style="width: 150px" /></div></td>
				<th><br>Company:</th>
				<td><br><input type="text" name="company" value="'. $company .'" /></td>
			</tr>';		
$modalContent .= '<tr>
				<th>Title:</th>
				<td><input type="text" name="title" value="'. $title .'" /></td>
				<th><br>Address:</th>
				<td rowspan="6">
					<label>Address 1</label><br><input type="text" name="address1" value="'. $address1 .'" /><br>
					<label>Address 2</label><br><input type="text" name="address2" value="'. $address2 .'" /><br>
					<label>PO Box</label><br><input type="text" name="PObox" value="'. $PObox .'" /><br>
					<label>City</label><br><input type="text" name="city" value="'. $city .'" /><br>
					<div style="float: left; width: 75px;"><label>State</label><br><input type="text" name="state" value="'. $state .'" style="width: 50px" /></div>&nbsp;
					<div style="float: left"><label>Zipcode</label><br><input type="text" name="zip" value="'. $zip .'" style="width: 100px" /></div>
				</td>
			</tr>';
$modalContent .= '<tr>				
				<th>Email:</th>
				<td><input type="text" name="email" value="'. $email .'" /></td>
			</tr>';	
$modalContent .= '<tr>				
				<th>Office:</th>
				<td><input type="text" name="phone_office" value="'. $phone_office .'" /></td>
			</tr>';
$modalContent .= '<tr>				
				<th>Mobile:</th>
				<td><input type="text" name="phone_mobile" value="'. $phone_mobile .'" /></td>
			</tr>';
$modalContent .= '<tr>
				<th>Fax:</th>
				<td><input type="text" name="fax" value="'. $fax .'" /></td>
			</tr>';
$modalContent .= '<tr>
				<th>Website:</th>
				<td><input type="text" name="website" value="'. $website .'" /></td>
			</tr>';	
$modalContent .= '<tr>
				<th>Source:</th>
				<td><select name="contact_source">'. $sources .'</select></td>';
				
// Last Contact
if ($last_contact == "0000-00-00") 
	$last_contact = '';
$modalContent .= '	<th>Last Contact:</th>
				<td>
					<input type="text" name="last_contact" id="last_contact" readonly="readonly" value="' . $last_contact . '" class="datepicker dateField" />
				</td>';
$modalContent .= '</tr>';
	
// Date Added
if ($date_added != "0000-00-00")
	$date_added = Date::convert($date_added, 'Y-m-d', 'M d, Y');

$modalContent .= '<tr>
				<th>Added:</th>
				<td>' . $date_added . '</td>
				<th>Last Camp:</th>
				<td><select name="last_contact_campaign">'. $campaigns .'</select></td>
			</tr>';
	
$clientYes = '';
$clientNo = ' checked';  
if ($isClient == 1) {
	$clientYes = ' checked';
	$clientNo = ''; 
}
$modalContent .= '<tr>
				<th>Updated:</th>
				<td>' . $date_updated . '</td>
				<th>Client:</th>
				<td><input type="radio" name="isClient" value="0" class="radioBtn" style="width: 20px;"'. $clientNo .'> No <input type="radio" name="isClient" value="1" class="radioBtn" style="width: 20px; margin-left: 20px"'. $clientYes .'> Yes</td>
			</tr>';
$modalContent .= '<tr>
				<th>&nbsp;</th>
				<td>&nbsp;</td>
				<th>&nbsp;</th>
				<td>';
if ($isClient != 1)
	$modalContent .= '<input type="submit" name="create" value=" Create Client Record" />';
$modalContent .= '</tr>';
	
$modalContent .= '<tr>';
$modalContent .= '<th>Notes</th><td colspan="3"><textarea name="notes" style="width: 90%; height: 100px">'. $notes .'</textarea></td>';
$modalContent .= '</tr>';
					
$modalContent .= '</table>';
$modalContent .= '</div><!-- /table-responsive -->';

$modalContent .= '<p style="text-align: center"><input type="submit" name="submit" value="'. $subBtn .'" /></p>';

$modalContent .= '</div></div><!-- /.row -->';

?>