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

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

	.sp-container {

		z-index: 1000000;

	}
</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>
			<input type="hidden" id="access_token" name="access_token"  value="">

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

					<div class="form-group">
						<div class="form-group has-feedback has-feedback-left col-lg-4 col-md-6 col-sm-6 col-xs-12">
							<h6 class="no-margin text-semibold multi_lang">اللون</h6>
							
							<input type="text" name="status_color" id="status_color" class="form-control colorpicker multi_lang" data-preferred-format="rgb" placeholder="اللون" >
						</div>

						<div class="form-group has-feedback has-feedback-left col-lg-4 col-md-6 col-sm-6 col-xs-12">
						
								<label class="input-group-addon multi_lang">اسم الحالة</label>
								<input type="text" placeholder="اسم الحالة" class="form-control multi_lang" name="status_name" id="status_name" >
						</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="form-group">
							<div class="form-group has-feedback has-feedback-left col-lg-4 col-md-6 col-sm-6 col-xs-12">
								<h6 class="no-margin text-semibold multi_lang">اللون</h6>
								
								<input type="text" name="edit_status_color" id="edit_status_color" class="form-control colorpicker multi_lang" data-preferred-format="rgb" placeholder="اللون" >
							</div>

							<div class="form-group has-feedback has-feedback-left col-lg-4 col-md-6 col-sm-6 col-xs-12">
							
									<label class="input-group-addon multi_lang">اسم الحالة</label>
									<input type="text" placeholder="اسم الحالة" class="form-control multi_lang" name="edit_status_name" id="edit_status_name" >
							</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>

<div id="print_modal" class="modal fade" >
	<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="print_form" method="post" id="print_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">
						
					<div class="col-sm-12">
						<div class="form-group">
							<div class="col-sm-6">
								<div class="input-group">
									<label class="input-group-addon multi_lang">طباعة حسب الفئة</label>
									<select id="color_id_fk" name="color_id_fk" class="bootstrap-select1" data-live-search="true"  data-width="100%">
										
									</select>
								</div>
							</div>

							

							
						</div>
					</div>
						
				</div>
				<div class="modal-footer">
					<button type="submit" id="print_btn" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang">طباعة</span> <b><i class="icon-printer2"></i></b>
					</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">الغاء</span>
					</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">كود تركيا</th>
				                <th class="multi_lang">اسم الحالة</th>
				                <th class="multi_lang">اللون</th>
				                
				                <th width="20%" class="text-center multi_lang">تغيير الحالة مباشرة</th>
				            </tr>
						</thead>
						<tbody>
							
						</tbody>
						<tfoot>
							<tr>
				                <td>Position</td>
				                <td>Start date</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/status.js?random=<?php echo uniqid(); ?>"></script>