<?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="clientStatus" value="'. $clientStatus .'" />
						<input type="hidden" name="clientLastUpdate" value="'. $clientLastUpdate .'" />
						<input type="hidden" name="page" value="'. $_POST['page'] .'" />
						<input type="hidden" name="section" value="'. $_POST['section'] .'" />';
	
	$modalContent .= '<div class="table-responsive">';
	$modalContent .= '<table class="adminForm table table-condensed">';
	
	$modalContent .= '<tr>
					<th class="col-sm-2">Name:</th>
					<td class="col-sm-4"><input type="text" class="reqired" name="clientName" value="'. $clientName .'" data-rule-required="true" data-msg-required="Please enter a Client Name" /></td>
					<th class="col-sm-2">Abbr:</th>
					<td class="col-sm-4"><input type="text" class="reqired" name="clientAbbr" value="'. $clientAbbr .'" data-rule-required="true" data-msg-required="Please enter a Client Abbreviation" /></td>
				</tr>';		

	$modalContent .= '<tr>
					<th>Contact Name:</th>
					<td><input type="text" name="clientContactName" value="'. $clientContactName .'" /></td>
					<th>Title:</th>
					<td><input type="text" name="clientContactTitle" value="'. $clientContactTitle .'" /></td>
				</tr>';

	$modalContent .= '<tr>				
					<th>Office:</th>
					<td><input type="text" name="clientContactPhone" value="'. $clientContactPhone .'" /></td>
					<th>Mobile:</th>
					<td><input type="text" name="clientContactMobile" value="'. $clientContactMobile .'" /></td>
				</tr>';

	$modalContent .= '<tr>
					<th>Email:</th>
					<td><input type="text" name="clientContactEmail" value="'. $clientContactEmail .'" /></td>
					<th>Website:</th>
					<td><input type="text" name="clientWebsite" value="'. $clientWebsite .'" /></td>
				</tr>';

	$modalContent .= '<tr>
					<th>Street:</th>
					<td><input type="text" name="clientAddressStreet" value="'. $clientAddressStreet .'" /></td>
					<th>Address 2:</th>
					<td><input type="text" name="clientAddress2" value="'. $clientAddress2 .'" /></td>
				</tr>';

	$modalContent .= '<tr>
					<th>City:</th>
					<td><input type="text" name="clientAddressCity" value="'. $clientAddressCity .'" /></td>
					<th>PO Box:</th>
					<td><input type="text" name="clientAddressPO" value="'. $clientAddressPO .'" /></td>
				</tr>';

	$modalContent .= '<tr>
					<th>State:</th>
					<td><input type="text" name="clientState" value="'. $clientState .'" /></td>
					<th>Zipcode:</th>
					<td><input type="text" name="clientAddressZip" value="'. $clientAddressZip .'" /></td>
				</tr>';

	$modalContent .= '<tr>
					<th>Additional Contact:</th>
					<td colspan="3"><textarea name="addContact" style="width: 100%; height: 50px">'. $addContact .'</textarea></td>
				</tr>';

	$modalContent .= '<tr>
					<th>Sub-Client Of:</th>
					<td>'. $clientSubCompany .'</td>
					<th>Client Type:</th>
					<td>'. $clientTypeSelect .'</td>
				</tr>';	
				
	$modalContent .= '<tr>
					<th>Client Support:</th>
					<td colspan="3">'. $clientSupportSelect .'</td>
				</tr>';
	
	$modalContent .= '<tr class="deprecated">
					<th>Hourly Rate:</th>
					<td>&#36;<input type="text" name="rateHourly" value="'. $rateHourly .'" style="width: 50px" readonly />/hour</td>
					<th>Commission Rate:</th>
					<td><input type="text" name="ratePercent" value="'. $ratePercent*100 .'" style="width: 50px" readonly />&#37;</td>
				</tr>';
	
	$modalContent .= '<tr>
					<th>Notes:</th>
					<td colspan="3"><textarea name="clientNotes" style="width: 100%; height: 100px">'. $clientNotes .'</textarea></td>
				</tr>';	
	
	// Client Since
	if ($clientSince == "0000-00-00") 
		$clSince = $today;
	else
		$clSince = $clientSince;	
	
	// Last Update
	if ($row['clientLastUpdate'] != "0000-00-00")
		$clLastUpdate = Date::convert($clientLastUpdate, 'Y-m-d', 'M d, Y');
		
	$modalContent .= '<tr>
					<th>Client Since:</th>
					<td><input type="text" name="clientSince" id="clientSince" class="datepicker" value="' . $clSince . '" /></td>
					<th>Last Updated:</th>
					<td>' . $clLastUpdate . '</td>
				</tr>';				
	$modalContent .= '</table>';
	$modalContent .= '</div><!-- /table-responsive -->';
	
	$modalContent .= '<p style="text-align: center"><input type="submit" class="adminSubmit" name="submit" value="'. $subBtn .'" /></p>';
	$modalContent .= '</div></div><!-- /.row -->';
?>