<?php 
$submit_url = $file_name."?page=view&action=$action"; 
$status_submit_url = $file_name."?page=view&name=$name"; 

?>
<div class="box-header" >
	<form action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
		<div class="col-sm-3">
			<label for="Timesheet Text" class="control-label">Description</label>
			<textarea class="form-control" rows="4" id="timesheet_text" name="timesheet_text" required><?php echo stripslashes($timesheet_text);?></textarea>
		</div>
		<div class="col-sm-3">
				<label for="Consultant" class="control-label">Created By</label>
				<? 
					$admin_ids = "";
					$sql_for_admin = "SELECT * FROM job_admin_mapping WHERE job_id = $job_id";
					$rs_for_admin = mysqli_query($conn,$sql_for_admin);
					if(mysqli_num_rows($rs_for_admin) > 0){
						while($row_for_admin = mysqli_fetch_assoc($rs_for_admin)){
							$admin_ids .= $row_for_admin["admin_id"].",";
						}
						$admin_ids = substr($admin_ids,0,-1);
					}
					Admin::getAdminList("admin_id",$admin_id,"100%",true,"form-control","required",$admin_ids); 
				?>
			</div>
		<div class="col-sm-3">
			<label for="From Time" class="control-label">From Time</label>
			<div class="bootstrap-timepicker">
				<input type="text" class="form-control timepicker" id="from_time" name="from_time" value="<?php echo $from_time;?>">
			</div>
			
			<label for="To Time" class="control-label">To Time</label>
			<div class="bootstrap-timepicker">
				<input type="text" class="form-control timepicker" id="to_time" name="to_time" value="<?php echo $to_time;?>">
			</div>
		</div>
		<div class="col-sm-3">
			<label for="Timesheet Date" class="control-label">Date</label>
			<input type="text" class="form-control datepicker" id="timesheet_date" name="timesheet_date" value="<?php (isset($timesheet_date) && $timesheet_date !="") ? utility::getFormatedDate($timesheet_date) : utility::getFormatedDate(date($config->dateFormat));?>" required>
			
			<label for="Timesheet Time" class="control-label">Time</label>
			<div class="bootstrap-timepicker">
				<input type="text" class="form-control timepicker" id="timesheet_time" name="timesheet_time" value="<?php echo $timesheet_time;?>">
			</div>
		</div>
		<!--<div class="col-sm-3">
			<label for="Job" class="control-label">Job</label>
			<? //$gsi->getEnqQuoteJobList("job_id",$job_id,"100%",false); ?>
		</div>
		<div class="col-sm-3">
			<label for="Consultant" class="control-label">Consultant</label>
			<? //Admin::getAdminList("admin_id",$admin_id,"100%",false); ?>
		</div>-->
		<div style="clear:both;margin-top:23px;"></div>
		<div class="col-sm-3">
			<input type="hidden" id="id" name="id" value="<?php echo $id;?>">
			<input type="hidden" id="job_id" name="job_id" value="<?php echo $job_id;?>">
			<input type="hidden" id="query_string" name="query_string" value="<?php echo $query_string;?>">
			<input type="hidden" id="source" name="source" value="<?php echo $source;?>">
			<button type="submit" name="add_master_data" class="btn btn-primary"><?=$button_value?></button>
		</div>
	</form>
</div>