<?php

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

$modalContent .= '<input type="hidden" name="op" value="'. $op .'" />
			<input type="hidden" name="adminType" value="'. $adminType .'" />';
$modalContent .= '<table class="adminForm table table-condensed">';
$modalContent .= '<tr>
				<th>Project Name:</th>
				<td colspan="3">'. $projectName .'</td>
			</tr>';		
$modalContent .= '<tr>
				<th>Client:</th>
				<td>'. $projectClient .'</td>
				<th>Status:</th>
				<td>'. $projectStatus .'</td>
			</tr>';	
$modalContent .= '<tr>
				<th>Description:</th>
				<td colspan="4">'. $projectDesc .'</td>
			</tr>';	
$modalContent .= '<tr>
				<th>Start Date:</th>
				<td>' . Date::convert($projectStart, 'Y-m-d', 'M d, Y') . '</td>
				<th>Target Completion:</th>
				<td>' . Date::convert($projectTargetComp, 'Y-m-d', 'M d, Y') . '</td>
			</tr>';
$modalContent .= '<tr>
				<th>Time Estimate:</th>
				<td>' . $projectTimeEstimate . ' hours</td>
				<th>Billable Time to Date:</th>
				<td>' . $hoursBillable . ' hours</td>
			</tr>';
$modalContent .= '<tr>
				<th>&nbsp;</th>
				<td>&nbsp;</td>
				<th>Total Time to Date:</th>
				<td>' . $hoursTotal . ' hours</td>
			</tr>';
$modalContent .= '<tr>
				<th>Hourly Rate:</th>
				<td>&#36;' . number_format($projectRate,2,'.','') .'/hour</td>
				<th>Cost to Date:</th>
				<td>&#36;' . number_format(($hoursBillable*$projectRate),2,'.','') .'</td>
			</tr>';
$modalContent .= '<tr>
				<th>Support Plan:</th>
				<td colspan="3">' . $supportPlan .'</td>
			</tr>';
$modalContent .= '</table>';
$modalContent .= '</div><!-- /table-responsive -->';

$projectHead = '<tr>
					<th class="align-left">Date</th>
					<th class="align-left">Hours</th>
					<th class="align-left">Task</th>
					<th class="align-left" colspan="5">Description</th>
				</tr>'; 

$modalContent .= '<h2>Project Time</h2>';
$modalContent .= '<div class="table-responsive">'; 
$modalContent .= '<table class="paymentInfo table table-striped table-condensed" cellspacing="0">';

$taskID = ''; 					
if (empty($tasks))
	$tasks = '<a href="?adminType=projectTask&adminAct=edit&editID=' . $projectID . '" class="mgmtBtn auto small">Add Tasks</a>'; 
else 
	$tasks = '<select name="taskID" class="taskSelect">'. $tasks .'</select>';

$modalContent .= '<tr class="newPayment">
				<td>
					<input type="hidden" name="timeID" value="" />
					<input type="hidden" name="projectID" value="'. $projectID .'" />
					<label>Date</label><br>
					<input type="text" name="timeDate" id="timeDate" readonly="readonly" class="dateField datepicker" />
					<p style="padding-top: 10px; text-align: center"><input type="checkbox" name="billable" value="1" /> Billable</p>
				</td>
				<td>
					<label>Hours</label><br>
					<input type="number" pattern="^\d+(\.|\,)\d{2}$" step="0.25" name="timeAmount" placeholder="0.00" class="timeField" />
				</td>
				<td>
					<label>Task</label><br>
					'. $tasks .'
				</td>
				<td colspan="6">
					<label>Description</label><br>
					<textarea name="timeDesc" style="width: 98%; height: 5em;"></textarea>
				</td>
			</tr>';
$modalContent .= '<tr><td colspan="9"><p style="text-align: center"><input type="submit" name="submit" value="'. $subBtn .'" /></p></td></tr>';
$modalContent .= $projectHead;
$modalContent .= $timeInfo;
$modalContent .= '</table>';
$modalContent .= '</div><!-- /table-responsive -->';

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

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

?>