<?php
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
if(!isset($_SESSION['is_login']) ){
	header("location: login.php");
?>
<script>
window.location="login.php";
</script>
<?php
}
include('models/translation.class.php');

?>
<!DOCTYPE html>
<html lang="en" dir="<?php echo $DIR; ?>">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Accountant</title>
  <noscript>
      <META HTTP-EQUIV="Refresh" CONTENT="0;URL=java_disabled.html">
  </noscript>
	<!-- Global stylesheets -->
	<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css"> -->
	<link href="assets/<?php echo $CSS; ?>/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
	<link href="assets/<?php echo $CSS; ?>/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="assets/<?php echo $CSS; ?>/core.css" rel="stylesheet" type="text/css">
	<link href="assets/<?php echo $CSS; ?>/components.css" rel="stylesheet" type="text/css">
	<link href="assets/<?php echo $CSS; ?>/colors.css" rel="stylesheet" type="text/css">
	<!-- /global stylesheets -->

	<!-- Core JS files -->
	
	<script type="text/javascript" src="assets/js/core/libraries/jquery.min.js"></script>
	<script type="text/javascript" src="assets/js/core/libraries/bootstrap.min.js"></script>
	
	<!-- /core JS files -->

<style>

h3.no-margin{
  font-size: 15px !important;
}

html {  background: #e1dee6;
}
body {
  background: #e1dee6;
  color:#333;
  padding-top:0px !important;
}

#demo {
  width: 99%;
  margin:10px auto;
  /*border:1px solid red;*/

}

 #demo { text-align: center; }
 #demo ul { display:inline-table; top:50px }
 #demo li { display:inline; }



nav ul {
  /*border:1px solid red;*/
  margin: 0px;
  padding: 0px;
  list-style: none;
  overflow: hidden;
  position: relative;
}
nav ul li {
    float: left;
    /*border-radius: 40px;*/
    margin:2px;
  }
nav ul li i {
    opacity: 0.7;
  }
nav ul li i:hover {
    opacity: 1;
    color:white;
  }

@media (min-width: 768px) {

nav ul li a {
      text-decoration: none;
      color: #FFF;
      display: block;
      width: 200px;
      height: 190px;
      /*background-image: url(css/icons.png); background-repeat: no-repeat;*/
    }




nav ul li a i {
    font-size: 100px !important;
    height: 100px;
    position: relative;
    top: 20px !important;
    color:white;
    width: 100%;
    display: block;
    /*border:1px solid red;*/


}

nav ul li a span {
          font-size: 20px !important;
          font-weight: lighter;
          text-transform: uppercase;
          padding: 0px;
          position: relative;
          top: 25px;
          text-align: center;
          /*border: 1px solid red;*/
        }

   }

@media (max-width: 768px) {

nav ul li a {
      text-decoration: none;
      color: #FFF;
      display: block;
      width: 145px;
      height: 150px;
      /*background-image: url(css/icons.png); background-repeat: no-repeat;*/
    }




nav ul li a i {
    font-size: 70px;
    height: 100px;
    position: relative;
    top: 10px;
    color:white;
    width: 100%;
    display: block;
    /*border:1px solid red;*/


}

nav ul li a span {
          font-size: 20px !important;
          font-weight: lighter;
          text-transform: uppercase;
          padding: 0px;
          position: relative;
          top: 15px;
          text-align: center;
          /*border: 1px solid red;*/
        }

   }

   @media (max-width: 415px) {

nav ul li a {
      text-decoration: none;
      color: #FFF;
      display: block;
      width: 175px;
      height: 180px;
      margin-left: 15px;
      /*background-image: url(css/icons.png); background-repeat: no-repeat;*/
    }




nav ul li a i {
    font-size: 90px !important;
    height: 100px;
    position: relative;
    top: 10px !important;
    color:white;
    width: 100%;
    display: block;
    /*border:1px solid red;*/


}

nav ul li a span {
          font-size: 20px !important;
          font-weight: lighter;
          text-transform: uppercase;
          padding: 0px;
          position: relative;
          top: 15px;
          text-align: center;
          /*border: 1px solid red;*/
        }

   }

.page-title {
    padding: 16px 36px 16px 0;
    
}

html[dir="rtl"] #demo li {
  float: right !important;

}

 #demo li {
  float: left !important;

}

.offline-title {
    font-size: 90px;
}

.error-title {
    color: #fff;
    font-size: 100px;
    line-height: 1;
    margin-top: 0px;
    margin-bottom: 10px;
    font-weight: 600;
  }

  @font-face {
      font-family: "Noto Kufi Arabic";
      src: url(assets/custom_font/NotoKufiArabic-Bold.ttf) format("truetype");
    }

</style>
</head>

<body style=" font-family: 'Noto Kufi Arabic', Times, serif;">



	<!-- Page header -->
	<div class="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4>
					
					<span class="text-semibold multi_lang">الرئيسية</span> 
					<small class="display-block" id="welcome"><span class="multi_lang">مرحبا</span> <?php echo $_SESSION['username']; ?></small>
				</h4>
			</div>

			<div class="heading-elements">
				<div class="heading-btn-group">
					<a href="index.php?p=profile" class="btn btn-link btn-float has-text text-size-small"><i class="icon-cog6 text-indigo-400"></i> <span class="multi_lang">صفحتي الشخصية</span></a>
					<a href="models/logout.php" class="btn btn-link btn-float has-text text-size-small"><i class="icon-switch2 text-indigo-400"></i> <span class="multi_lang">تسجيل الخروج</span></a>
				</div>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Page container -->
	<div class="page-container">

		<!-- Page content -->
		<div class="page-content">

			<!-- Main content -->
			<div class="content-wrapper">

				


				<!-- Dashboard content -->
				
					<div id="demo">
						<!-- <img src="image/sys/starter.jpg" style="height: 160px; "> -->
            <!-- <h1>
              <span class="text-semibold">Accountant System</span>
              <small class="display-block" >KeenTech </small> 
            </h1> -->
            <!-- Error title -->
        <div class="text-center " style="margin-top: -20px;">
          <!-- <h3 class="error-title offline-title multi_lang">ANYA ZEBRA</h3> -->
          <h5 class=" multi_lang" style="font-size: 30px; ">نظام ادارة وحسابات معمل ستائر آنيا زيبرا</h5>
        </div>
        <!-- /error title -->
						<nav style="margin-top: -55px;">

							<ul class='menu'>
							<?php

							 $permission  = explode(',',$_SESSION['permission_id']);
               
               asort($permission);
              
						foreach ($permission as $key ) { }?>

							<?php if($key == 1 || $key==26){	}?>
        
          <?php if(in_array(1,$permission) || in_array(2,$permission) || in_array(26,$permission)|| in_array(25,$permission) || in_array(32,$permission) ){ ?>

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

                <!-- Title with left icon -->
                <div class="panel panel-danger">
                  <div class="panel-heading">
                    <h6 class="panel-title"><span class="multi_lang">التقارير</span></h6>
                  </div>
                  
                  <div class="panel-body">
                    
                    <?php if(in_array(1,$permission) || in_array(26,$permission)){ ?>

          
                        <div class="col-sm-6 col-md-3">
                          <a href="index.php?p=dashboard" >
                            <div class="panel panel-body bg-success-600 has-bg-image">
                              <div class="media no-margin">
                                <div class="media-right media-middle">
                                  <i class="icon-display4 icon-3x opacity-75"></i>
                                </div>

                                <div class="media-body text-right">
                                  <h3 class="no-margin multi_lang">لوحة المراقبة</h3>
                                  <span class="text-uppercase text-size-mini multi_lang">Dashboard</span>
                                </div>
                              </div>
                            </div>
                          </a>
                        </div>
                     
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(2,$permission)){ ?>

                        <div class="col-sm-6 col-md-3">
                          <a href="index.php?p=report" >
                            <div class="panel panel-body bg-success-600 has-bg-image">
                              <div class="media no-margin">
                                <div class="media-right media-middle">
                                  <i class="icon-pie-chart3 icon-3x opacity-75"></i>
                                </div>

                                <div class="media-body text-right">
                                  <h3 class="no-margin multi_lang">التقارير</h3>
                                  <span class="text-uppercase text-size-mini multi_lang">Reports</span>
                                </div>
                              </div>
                            </div>
                          </a>
                        </div>
                    <?php }   ?>

                    <?php if(in_array(1,$permission) || in_array(25,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=capital" >
                          <div class="panel panel-body bg-success-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-safe icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">رأس المال</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Capital</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(32,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=payment_notify" >
                          <div class="panel panel-body bg-success-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-bell3 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">تنبيهات الدفوعات</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Payment Notify</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>
                   


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

          <?php } ?>    
             
          
          <?php if(in_array(1,$permission) || in_array(3,$permission) || in_array(4,$permission) || in_array(15,$permission) || in_array(18,$permission) ){ ?>

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

                <!-- Title with left icon -->
                <div class="panel ">
                  <div class="panel-heading bg-orange-600">
                    <h6 class="panel-title"><span class="multi_lang">المكونات</span></h6>
                  </div>
                  
                  <div class="panel-body">
                    
                    <?php if(in_array(1,$permission) || in_array(3,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=product" >
                          <div class="panel panel-body bg-blue-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-dropbox icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">المواد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Products</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(4,$permission)){ ?>

              
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=category" >
                          <div class="panel panel-body bg-blue-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-tree7 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">الفئات</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Category</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(15,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=items" >
                          <div class="panel panel-body bg-blue-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-basket icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">الاصناف</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Product Class</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(18,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=others" >
                          <div class="panel panel-body bg-blue-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-dice icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">مواد اخرى</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Others</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

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

          <?php } ?> 



          <?php if(in_array(1,$permission) || in_array(5,$permission) || in_array(13,$permission) || in_array(6,$permission) || in_array(22,$permission) || in_array(24,$permission) || in_array(33,$permission)){ ?>

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

                <!-- Title with left icon -->
                <div class="panel panel-success">
                  <div class="panel-heading">
                    <h6 class="panel-title"><span class="multi_lang">المشتريات والمصاريف</span></h6>
                  </div>
                  
                  <div class="panel-body">
                    
                    <?php if(in_array(1,$permission) || in_array(5,$permission)){ ?>

                     <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=purchase" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cart-add2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">المشتريات</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Purchases</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(13,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=stock" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-store icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">المخازن</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Inventory</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(33,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=stock_return" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-reset icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">المواد المسترجعة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Return Products</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(22,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=supplier" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-truck icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">الموردين</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Supplier</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(24,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=supplier_payment" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cart5 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">تسديد الموردين</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Supplier Payments</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(6,$permission)){ ?>
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=expenses" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cash3 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">المصاريف</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Expenses</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=expenses_group" >
                          <div class="panel panel-body bg-danger-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-wallet icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">فئات المصاريف</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Expenses Group</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>


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

          <?php } ?>    
            
              
					
          <?php if(in_array(1,$permission) || in_array(7,$permission) || in_array(8,$permission) || in_array(9,$permission) || in_array(12,$permission) || in_array(27,$permission) || in_array(19,$permission) || in_array(28,$permission) || in_array(16,$permission) || in_array(17,$permission) || in_array(29,$permission) || in_array(30,$permission) || in_array(31,$permission)){ ?>

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

                <!-- Title with left icon -->
                <div class="panel panel-info">
                  <div class="panel-heading">
                    <h6 class="panel-title"><span class="multi_lang">المبيعات</span> </h6>
                  </div>
                  
                  <div class="panel-body">
                    
                    <?php if(in_array(1,$permission) || in_array(7,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=invoice" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-calculator icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">بيع مواد جملة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Raw Material Sell</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                      
                      

                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(9,$permission)){ ?>
                     
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=invoice_curt&typ=0" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-bookmarks icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">بيع ستائر بالجملة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Plural Curtain Sell</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=offer_curt&typ=0" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-file-check2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">عروض ستائر الجملة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Plural Curtain Offer</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                     

                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(19,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=account_statement&typ=0" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-file-stats2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">كشف حساب الجملة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Account Statement</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(12,$permission)){ ?>


                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=customer&typ=0" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-users4 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">زبائن الجملة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Customers</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>
                      
                    <?php if(in_array(1,$permission) || in_array(8,$permission)){ ?>
                     
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=invoice_curt&typ=1" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-bookmark2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">بيع ستائر بالمفرد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Single Curtain Sell</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=offer_curt&typ=1" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-file-check2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">عروض ستائر المفرد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Single Curtain Offer</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>

                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(28,$permission)){ ?>


                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=account_statement&typ=1" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-profile icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">كشف حساب المفرد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Account Statement</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                                      

                    <?php if(in_array(1,$permission) || in_array(27,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=customer&typ=1" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-users2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">زبائن المفرد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Customers</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(16,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=profile_price" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-coins icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">ملفات الاسعار</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Price Profiles</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(17,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=product_price" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-price-tag icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">تعريف اسعار المواد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Products Price</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    

                    <?php if(in_array(1,$permission) || in_array(29,$permission)){ ?>

          
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=capital_withdraw" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-drawer-out icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">القروض والديون</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Capital Withdraw</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(30,$permission)){ ?>

                     <!--  <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=capital_payment" >
                          <div class="panel panel-body bg-pink-800 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-grab icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">تسديد القروض</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Withdraw Payments</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div> -->
                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(30,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=payment_single" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cash icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">دفوعات المفرد</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Payments Singular</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(31,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=payment" >
                          <div class="panel panel-body bg-purple-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cash icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">دفوعات عامة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">General Payments</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>


                    


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

          <?php } ?>    
              

             

              

          <?php if(in_array(1,$permission) || in_array(10,$permission) || in_array(11,$permission) || in_array(20,$permission) || in_array(21,$permission) ){ ?>

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

                <!-- Title with left icon -->
                <div class="panel panel-primary">
                  <div class="panel-heading">
                    <h6 class="panel-title"><span class="multi_lang">الاعدادات</span></h6>
                  </div>
                  
                  <div class="panel-body">
                    
                   
                    <?php if(in_array(1,$permission) || in_array(10,$permission)){ ?>

                   
                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=users" >
                          <div class="panel panel-body bg-grey-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-user-tie icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">الموظفين</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Staff</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    
                    <?php } ?>


                    <?php if(in_array(1,$permission) || in_array(11,$permission)){ ?>


                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=setting" >
                          <div class="panel panel-body bg-grey-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-cog6 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">اعدادات النظام</h3>
                                <span class="text-uppercase text-size-mini multi_lang">System Setting</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>

                    <?php if(in_array(1,$permission) || in_array(4,$permission)){ ?>


                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=backup" >
                          <div class="panel panel-body bg-grey-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-database-export icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">النسخ الاحتياطي</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Backup DataBase</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>
                          
                    <?php if(in_array(1,$permission) || in_array(20,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=languages" >
                          <div class="panel panel-body bg-grey-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-earth icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">اللغات</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Languages</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>



                    <?php if(in_array(1,$permission) || in_array(21,$permission)){ ?>

                      <div class="col-sm-6 col-md-3">
                        <a href="index.php?p=translation" >
                          <div class="panel panel-body bg-grey-600 has-bg-image">
                            <div class="media no-margin">
                              <div class="media-right media-middle">
                                <i class="icon-ampersand2 icon-3x opacity-75"></i>
                              </div>

                              <div class="media-body text-right">
                                <h3 class="no-margin multi_lang">الترجمة</h3>
                                <span class="text-uppercase text-size-mini multi_lang">Translation</span>
                              </div>
                            </div>
                          </div>
                        </a>
                      </div>
                    <?php } ?>


                   

                    

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

          <?php } ?>      

              


              
              
        
							</ul>

						</nav>
					</div>

					
				
				<!-- /dashboard content -->

			</div>
			<!-- /main content -->

		</div>
		<!-- /page content -->

	</div>
	<!-- /page container -->

<footer id="footer" >
         <div class="text-center  clearfix">
            <p> <small><a href="http://www.keentech.co" target="_blank" >KeenTech</a> for IT Services and Solutions
            <br>&copy; <?php echo date("Y"); ?></small> </p>
         </div>
</footer>

<script type="text/javascript">

   $(document).ready(function(){
// alert()

      var colors = ['#ff4444',
                    '#ffbb33',
                    '#00C851',
                    '#33b5e5',
                    '#2BBBAD',
                    '#4285F4',
                    '#aa66cc',
                    '#3F729B',
                    '#CC0000',
                    '#FF8800',
                    '#007E33',
                    '#0099CC',
                    '#00695c',
                    '#0d47a1',
                    '#9933CC',
                    '#2E2E2E',
                    '#4B515D',
                    '#3F729B',
                    '#37474F'];

      $('.menu').each(function(i){
       $(this).find('li').each(function(i){
           //alert(i)
          $(this).css({'background':colors[i]})
        });
      });

$('nav ul li ').mouseenter(function(){
  $(this).find('a').css({'text-decoration':'none','color':'white'})
})

  });


    Auto_Translate();

</script>

</body>
</html>
