<?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>



html {  background: #e1dee6;
}
body {
          margin: 0;
          background: radial-gradient(#3f5d71, #1B3349);
          background-repeat: no-repeat;
          display: grid;
          color:lavender !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 text-warning-400 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 text-warning-400">
				<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-warning-400"></i> <span class="text-warning-400 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-warning-400"></i> <span class="text-warning-400 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;">
         
          <h5 class=" multi_lang" style="font-size: 30px; ">Show Room System</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(4,$permission)){ ?>

              <div class="col-sm-6 col-md-3">
                <a href="index.php?p=category" >
                  <div class="panel panel-body bg-orange-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(5,$permission)){ ?>

              <div class="col-sm-6 col-md-3">
                <a href="index.php?p=product" >
                  <div class="panel panel-body bg-orange-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(2,$permission)){ ?>

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

                      <div class="media-body text-right">
                        <h3 class="no-margin multi_lang">Show Room</h3>
                        <span class="text-uppercase text-size-mini multi_lang">Show Room</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=users" >
                  <div class="panel panel-body bg-orange-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(23,$permission)){ ?>

              <div class="col-sm-6 col-md-3">
                <a href="index.php?p=setting" >
                  <div class="panel panel-body bg-orange-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(27,$permission)){ ?>


              <div class="col-sm-6 col-md-3">
                <a href="index.php?p=languages" >
                  <div class="panel panel-body bg-orange-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">Languages</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(28,$permission)){ ?>


              <div class="col-sm-6 col-md-3">
                <a href="index.php?p=translation" >
                  <div class="panel panel-body bg-orange-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">Translation</h3>
                        <span class="text-uppercase text-size-mini multi_lang">Translation</span>
                      </div>
                    </div>
                  </div>
                </a>
              </div>
              <?php } ?>



              <!-- Production Section -->


              

             



              

             

              <!-- End Production -->





              






              



              
        
							</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>
