<?php
$permission  = explode(',',$_SESSION['permission_id']);
if(!in_array(21,$permission) && !in_array(1,$permission)  ){

?>
<script>
window.location="starter.php";
</script>
<?php
}
?>
<style >
	tfoot {
    display: table-header-group !important;
}
</style>

<div id="add-form-cont" class="panel-collapse collapse panel" aria-expanded="false" style="height: 0px; position: relative; top:-3px; width:98%; margin:0px auto;">
	<div class="panel-body">
		<form class="form-horizontal" method="post" id="add_form" enctype="multipart/form-data">
			<div>

				<div class="col-sm-12">

					<div class="form-group">

						<div class="form-group has-feedback has-feedback-left col-sm-3" >
							<label class="control-label animate multi_lang">Select City</label>
							
							<select name="city_id_fk" id="city_id_fk" class="form-control" data-live-search="true" required="required">
							

							</select>
							<div class="form-control-feedback">
								<i class="icon-office text-muted"></i>
							</div>
						</div>

						<div class="form-group has-feedback has-feedback-left col-sm-3" >
							<label class="control-label animate multi_lang">Select Zone</label>
							
							<select name="zone_id_fk" id="zone_id_fk" class="form-control" data-live-search="true" required="required">
							

							</select>
							<div class="form-control-feedback">
								<i class="icon-office text-muted"></i>
							</div>
						</div>

						<div class="form-group has-feedback has-feedback-left col-sm-3" >
							<label class="control-label animate multi_lang">Select Sub Zone</label>
							
							<select name="sub_zone_id_fk" id="sub_zone_id_fk" class="form-control" data-live-search="true" required="required">
							

							</select>
							<div class="form-control-feedback">
								<i class="icon-office text-muted"></i>
							</div>
						</div>

						<div class="form-group has-feedback has-feedback-left col-sm-3">
							
								
								<label class="control-label multi_lang">اسم الحي</label>
								<input type="text" placeholder=" اسم الحي " class="form-control" name="objname" id="objname" required="required">
								<div class="form-control-feedback">
									<i class="icon-office text-muted"></i>
								</div>
							
						</div>
						


					</div>

					


				</div>
			</div>

			<div class="text-right">
				<button type="submit" id="submit_add_btn" class="btn btn-primary btn-labeled btn-labeled-left ">
					<span class="multi_lang"> حفظ </span><b><i class="icon-floppy-disk"></i></b>
				</button>
				<a href="#add-form-cont" id="add_form_cancel" class="btn btn-labeled btn-labeled-left bg-danger heading-btn " data-toggle="collapse">
					<span class="multi_lang">اغلاق</span>  <b><i class="icon-cross"></i></b>
				</a>
			</div>
		</form>
	</div>
</div>

<div id="edit_form_cont" class="modal fade" style="display: none;">
		<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="edit_form" method="post" id="edit_form" enctype="multipart/form-data">
			

			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="icon-cross"></i></button>
					<h4 class="modal-title multi_lang">تحرير</h4>
				</div>

				<div class="modal-body">
					<input type="hidden" name="itemid" id="edit_objid" value="">
						


					<div class="col-sm-12">
						<div class="form-group">

							<div class=" col-sm-4" >
								<div class="input-group">
									<label class="input-group-addon multi_lang">Select City</label>
									
									<select name="edit_city_id_fk" id="edit_city_id_fk" class="form-control" data-live-search="true" required="required">
									

									</select>
								
								</div>
							</div>

							<div class=" col-sm-4" >
								<div class="input-group">
									<label class="input-group-addon multi_lang">Select Zone</label>
									
									<select name="edit_zone_id_fk" id="edit_zone_id_fk" class="form-control" data-live-search="true" required="required">
									

									</select>
								
								</div>
							</div>

							<div class=" col-sm-4" >
								<div class="input-group">
									<label class="input-group-addon multi_lang">Select Sub Zone</label>
									
									<select name="edit_sub_zone_id_fk" id="edit_sub_zone_id_fk" class="form-control" data-live-search="true" required="required">
									

									</select>
								
								</div>
							</div>

							

							<div class="col-sm-4">
								<div class="input-group">
									<label class="input-group-addon multi_lang"> اسم الحي </label>
									<input type="text" placeholder="اسم الحي" class="form-control multi_lang" name="objname" id="edit_objname" required="required">
								</div>
							</div>

							

						</div>

					

					</div>
						
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang"> حفظ </span> <b><i class="icon-floppy-disk"></i></b>
					</button>
					<button type="button" class="btn btn-warning multi_lang" data-dismiss="modal"> الغاء
					</button>
				</div>
			</div>
		</form>
	</div>
</div>


				<!-- Individual column searching (text inputs) -->
				<div class="panel panel-flat">
					
					<table class="table datatable-column-search-inputs">
						<thead>
							<tr>
				                <th>ID</th>
				                <th class="multi_lang">اسم الحي</th>
				                <th class="multi_lang">No. of Doctors in this Quarter</th>
				                <th class="multi_lang">No. of Pharmacy</th>
				                <th class="multi_lang">No. of Salesman</th>
				                <th class="multi_lang">Sub Zone</th>
				                <th class="multi_lang">Zone</th>
				                <th class="multi_lang">City</th>
				                
				                <th width="10%"  class="text-center multi_lang"> Action </th>
				            </tr>
						</thead>
						<tbody>
							
						</tbody>
						<tfoot>
							<tr>
				                <td>Name</td>
				                <td>Position</td>
				                <td>Start date</td>
				                <td>Salary</td>
				                <td>Salary</td>
				                <td>Salary</td>
				                
				                <td></td>
				                <td></td>
				                <td></td>
				            </tr>
						</tfoot>
					</table>
				</div>
				<!-- /individual column searching (text inputs) -->



<script type="text/javascript" src="controllers/quarter.js?random=<?php echo uniqid(); ?>"></script>