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

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

	<div class="row">
				
				
		<div class="col-sm-6 col-md-12">
			<div class="panel panel-body">
				<div class="media no-margin">
					<div class="media-body">
						
						<div class="col-sm-4">
							
						
							
							<select name="year_filter" id="year_filter" class="form-control col-sm-3" data-live-search="true">
								<option class="multi_lang" value="">تحديد السنة</option>
								<option class="multi_lang" value="2015">2015</option>
								<option class="multi_lang" value="2016">2016</option>
								<option class="multi_lang" value="2017">2017</option>
								<option class="multi_lang" value="2018">2018</option>
								<option class="multi_lang" value="2019">2019</option>
								<option class="multi_lang" value="2020">2020</option>
								<option class="multi_lang" value="2021">2021</option>
								<option class="multi_lang" value="2022">2022</option>
								<option class="multi_lang" value="2023">2023</option>
								<option class="multi_lang" value="2024">2024</option>
								<option class="multi_lang" value="2025">2025</option>
								<option class="multi_lang" value="2026">2026</option>
								<option class="multi_lang" value="2027">2027</option>
								<option class="multi_lang" value="2028">2028</option>
								<option class="multi_lang" value="2029">2029</option>
								<option class="multi_lang" value="2030">2030</option>
								
							</select>

						</div>

						<div class="col-sm-4">
							
						
							
							<select name="month_filter" id="month_filter" class="form-control col-sm-3" data-live-search="true">
								
								<option value="" >تحديد الشهر</option>
								<option value="1" >كانون الثاني</option>
								<option value="2" >شباط</option>
								<option value="3" >اذار</option>
								<option value="4" >نيسان</option>
								<option value="5" >ايار</option>
								<option value="6" >حزيران</option>
								<option value="7" >تموز</option>
								<option value="8" >اب</option>
								<option value="9" >ايلول</option>
								<option value="10" >تشرين الاول</option>
								<option value="11" >تشرين الثاني</option>
								<option value="12" >كانون الاول</option>
								
							</select>

						</div>

						<div class="col-sm-4">
							
						
							
							<select name="day_filter" id="day_filter" class="form-control col-sm-3" data-live-search="true">
								
								<option value="" selected="selected">تحديد اليوم</option>
								<option value="1" >يوم 1</option>
								<option value="2" >يوم 2</option>
								<option value="3" >يوم 3</option>
								<option value="4" >يوم 4</option>
								<option value="5" >يوم 5</option>
								<option value="6" >يوم 6</option>
								<option value="7" >يوم 7</option>
								<option value="8" >يوم 8</option>
								<option value="9" >يوم 9</option>
								<option value="10" >يوم 10</option>
								<option value="11" >يوم 11</option>
								<option value="12" >يوم 12</option>
								<option value="13" >يوم 13</option>
								<option value="14" >يوم 14</option>
								<option value="15" >يوم 15</option>
								<option value="16" >يوم 16</option>
								<option value="17" >يوم 17</option>
								<option value="18" >يوم 18</option>
								<option value="19" >يوم 19</option>
								<option value="20" >يوم 20</option>
								<option value="21" >يوم 21</option>
								<option value="22" >يوم 22</option>
								<option value="23" >يوم 23</option>
								<option value="24" >يوم 24</option>
								<option value="25" >يوم 25</option>
								<option value="26" >يوم 26</option>
								<option value="27" >يوم 27</option>
								<option value="28" >يوم 28</option>
								<option value="29" >يوم 29</option>
								<option value="30" >يوم 30</option>
								<option value="31" >يوم 31</option>
								
							</select>

						</div>
						
						<div class="col-sm-4" style="margin-top: 10px;">

							

							<button id="filter_btn" type="button" class="btn bg-teal-400 btn-labeled btn-block"><b><i class="icon-filter4"> </i></b> <span id="inv_filter">تطبيق الفلتر</span> </button>
							
						</div>

						

						<div class="col-sm-4" style="margin-top: 10px;">

							

							<a href="index.php?p=expenses_group"  class="btn bg-pink-400 btn-labeled btn-block"><b><i class="icon-close2"> </i></b> <span id="inv_filter">ازالة الفلتر</span> </a>
							
						</div>

						



					</div>

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

		

		
		
	</div>

	<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="col-sm-6">
								<div class="input-group">
									<label class="input-group-addon multi_lang"> اسم المجموعة </label>
									<input type="text" placeholder=" اسم المجموعة " class="form-control multi_lang" name="objname" id="objname" required="required">
								</div>
							</div>
							<div class="col-sm-6">
								<div class="input-group">
									<label class="input-group-addon multi_lang"> الوصف </label>
									<input type="text" placeholder=" الوصف " class="form-control multi_lang" name="group_description" id="group_description" >
								</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>


								<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>
												<input type="text" placeholder="اسم المجموعة" class="form-control multi_lang" name="edit_objname" id="edit_objname" required="required">
											</div>
										</div>

										<div class="col-sm-6">
											<div class="input-group">
												<label class="input-group-addon multi_lang"> الوصف </label>
												<input type="text" placeholder="الوصف " class="form-control multi_lang" name="edit_group_description" id="edit_group_description" >
											</div>
										</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" 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  class="text-center multi_lang"> العمليات </th>
				            </tr>
						</thead>
						<tbody>
							
						</tbody>
						<tfoot>
							<tr>
				                <td>Name</td>
				                <td>Position</td>
				                
				                <td>Salary</td>
				                
				                <td></td>
				            </tr>
						</tfoot>
					</table>
				</div>
				<!-- /individual column searching (text inputs) -->



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