
<?php session_start();
?>

<?php 
if(!isset($_COOKIE['email']))
{
    header("location:login");
}

if (!isset($_SESSION['email']) || isset($_COOKIE['email'])) {
$email=$_COOKIE['email'];
$_SESSION['email']=$_COOKIE['email'];

    $sql = "SELECT * FROM users WHERE email='$email'";

$result=mysqli_query($conn,$sql);

   $row=mysqli_fetch_array($result);

   $_SESSION['status']=$row["status"];
   $_SESSION['fname']=$row["fname"];
     $_SESSION["role"]=$row['role'] ;
      $_SESSION['image']=$row["image"];
      $_SESSION['id']=$row["id"];
}
?>
<?php 
$date=date("F j, Y");
$color_mod='';
     $id_user=$_SESSION['id'];
$sql = "SELECT * FROM usersettings WHERE userid='$id_user' ";
$result=mysqli_query($conn,$sql);
    $row=mysqli_fetch_array($result);
    if (empty($row['id'])) {
        $color_mod=2; 
    }
    else{
        $color_mod=$row['mode']; 
    }


    $sql1 = "SELECT * FROM user_role WHERE userid='$id_user' ";
$result1=mysqli_query($conn,$sql1);
    $row1=mysqli_fetch_array($result1);
$place_order=$row1['dashboard'];
$prepare_order_b=$row1['prepare_order_b'];
$prepare_order_r=$row1['prepare_order_r'];
$m_user=$row1['m_user'];
$m_menu_bar=$row1['m_menu_bar'];
$m_menu_rest=$row1['m_menu_rest'];
$analytics=$row1['analytics'];
$settings=$row1['settings'];
$customer=$row1['customer'];
$order=$row1['order'];
/*$order_bar=$row1['order_bar'];*/
$facility=$row1['facility'];
$user_role=$row1['user_role'];
$inventory=$row1['inventory'];
$view_cash=$row1['view_amount'];
$hotel_m=$row1['hotel_m'];

if ($place_order=='0') {
 $place_order='none' ; 
 $cart_role='none';
}
else{
    $place_order='block';
     $cart_role='block';
}
if ($prepare_order_b=='0') {
    $prepare_order_b='none' ; 
   }
   else{
       $prepare_order_b='';
   }

   if ($prepare_order_r=='0') {
    $prepare_order_r='none' ; 
   }
   else{
     $prepare_order_r='';
   }

   if ($m_user=='0') {
    $m_user='none' ; 
   }
   else{
       $m_user='block';
   }

   if ($m_menu_bar=='0') {
    $m_menu_bar='none' ; 
   }
   else{
       $m_menu_bar='block';
   }


   if ($m_menu_rest=='0') {
    $m_menu_rest='none' ; 
   }
   else{
       $m_menu_rest='block';
   }

   if ($analytics=='0') {
    $analytics='none' ; 
   }
   else{
       $analytics='block';
   }

   if ($settings=='0') {
    $settings='none' ; 
   }
   else{
       $settings='block';
   }

   if ($customer=='0') {
    $customer='none' ; 
   }
   else{
       $customer='block';
   }

   if ($order=='0') {
    $order='none' ; 
   }
   else{
       $order='block';
   }

   if ($facility=='0') {
    $facility='none' ; 
   }
   else{
       $facility='block';
   }

   if ($user_role=='0') {
    $user_role='none' ; 
   
   }
   else{
       $user_role='block';
   }

   if ($inventory=='0') {
    $inventory='none' ; 
   }
   else{
       $inventory='block';
   }

   if ($view_cash=='0') {
    $view_cash='none' ; 
   }
   else{
       $view_cash='block';
   }

   if ($hotel_m=='0') {
    $hotel_m='none' ; 
   }
   else{
       $hotel_m='block';
   }
?>

<?php

$sql="select * from store_details order by id desc";
$result = mysqli_query($conn,$sql)or die( mysqli_error($conn));
while ($row=mysqli_fetch_array($result)) {
 $datas=$row['id'];
   $store_name=$row['name'];
   $c1=$row['first_contact'];
   $c2=$row['second_contact'];
   $store_email=$row['email'];
   $logo=$row['logo'];
   $location=$row['location'];
   $w_H=$row['working_hours'];
   $website=$row['website'];
   $store_image=$row['logo'];

   




}
?>

<head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <!-- Latest compiled and minified CSS -->
       

        <!--Table cdn-->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
     
        <link rel="stylesheet" href="https://cdn.datatables.net/2.0.5/css/dataTables.dataTables.css">
        <link rel="stylesheet" href="https://cdn.datatables.net/buttons/3.0.2/css/buttons.dataTables.css">
    
        <!---Fontawesome CDN-->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <!-- jQuery library -->
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js"></script>
    
        <!-- Popper JS -->
        <script defer src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
    
        <!-- Latest compiled JavaScript -->
     
       
        <link rel="stylesheet" href="css/dash.css">

        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
        <link href='https://fonts.googleapis.com/css?family=Convergence' rel='stylesheet'>


        <!--JS AOS-->
        <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
    
    
          <!-- owl carousel css link -->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
      
       <!-- owl carousel theme.css link -->
       <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css">  
    
       <!-- owl carousel js file -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
    

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>  
          
           <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>  
        <!--video play button cdn-->
          <!-- Icon Font Stylesheet -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">
        <!--graph cdn-->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
        <script src="https://www.gstatic.com/charts/loader.js"></script>
    <!---Fontawesome CDN-->
        <!-- google font--->
        <link rel="preconnect" href="https://fonts.gstatic.com">
        <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
        
       

        <title> <?php echo $page ?></title>
        <link rel="icon" href="logo/<?php echo $store_image ?>" type="image/x-icon">
        
        
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="keywords" content="Restaurant,Food,Lunch">
<meta property="og:image" content="https://gatpros.com/demo/pos/logo/restaurant_management_flier.jpg" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="googlebot" content="translate">
<meta name="description" content="This is an online demo version of a  restaurant management software. 

contact as for free demo version">



<meta property="og:type"               content="article" />
<meta property="og:title"              content=" Restaurant Management Software" />
<meta property="og:description"        content="This is an online demo version of a  restaurant management software. 

contact as for free demo version " />
<meta property="og:image" content="https://gatpros.com/demo/pos/logo/restaurant_management_flier.jpg"/>
        <?php
        $color=1;
        $color=$color_mod;

        if ($color==1) {
            $body_color='black';
            $body_text='antiquewhite';
            $nav_color=' #1D211C';
            $nav_text='antiquewhite';
            $menu_b_color=' #1C0601';
        }
        elseif($color==2){
            $body_color='#EDF2F1FF';
            $body_text='black';
            $nav_color='#982BAD';
            $nav_text='antiquewhite';
            $menu_color='#982BAD';
            $menu_b_color='#044763';
        }
       

        $id_user=$_SESSION['id'];
        $sql = "SELECT * FROM users WHERE id='$id_user' ";
        $result=mysqli_query($conn,$sql);
            $row=mysqli_fetch_array($result);
            $by=$row['fname'];
            $sql2="SELECT * FROM currency ";
$result2 = mysqli_query($conn,$sql2)or die( mysqli_error($conn));
$row2=mysqli_fetch_array($result2) ;
$currency=$row2['curency'];
        ?>
        <style>
            body{
                background-color:<?php echo $body_color ?>;
                color: <?php echo $body_text?>;
                     font-family: 'Convergence'!important;
                
                }
img{
   /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
}
a:hover {
    text-decoration: none;
  }

/* nav bar start */
nav{
    background-color:<?php echo $nav_color;?>;
    overflow: hidden;
   

}

#collapseOne{
    overflow:scroll;
    height:100vh;
}

/* nav bar end */


/*menu start*/

.menu-list{
    background-color:<?php echo $nav_color;?>;
    position: relative;
    padding: 10px;
    color:white !important;
    
}
.menu-list .design{
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: center;

}
.nav,.invoice{
    background-color:<?php echo $nav_color;?>;
}
.menu-list-item a {
color: white !important ;
}

.menu-list-item{
    font-size: 12px;
    margin: 0px;
   
}

   


.btn-order{
   background-color: <?php echo $nav_color;?>;
    border-style: solid;
    color: antiquewhite;
    text-align:center;
   overflow: auto;
   
}

.order-cat{
    overflow: scroll;
    height:100vh;
}

.order-text{font-size: 12px;}
.order-text-order-managment{font-size: 15px;}
.btn-order:hover{

color: antiquewhite;
}


/* search */
.input-group{
    width: 200px;
}
/* categories*/


/*invoice*/

.invoice{

    color: <?php echo  $nav_text ?>
}
.invoice-item{
    margin-bottom: 5px;
    background-color: <?php echo $menu_b_color ?>;
    width: 400px;
   
    border-radius:10px;
   
}
.img-invoice{
    margin: 2px;
}
.img-invoice img{
    width: 100px;
}
.text-invoice{
    width: 400px;
    height: 100%;
    font-size:15px;
}

/*ordes*/
.menu{
    overflow: auto;
    height: 100vh !important;
  margin:0px;
  font-size:15px;
}

/* Min-width */
@media only screen and (max-width: 1200px)  {

    .menu{
  
    height: 100vh !important;
  margin:0px;
} 
}

.menu-cat{
    height: 100%!important;
    overflow: scroll;
}


.menu-analytics{

    font-family: 'Roboto', sans-serif ! important;
}
.menu-items{
    background-color:white; 
    border-radius: 10px;
  padding:10px;
    
    
   margin: 5px;
}

@media (min-width: 600px) {
  .menu-items{
   margin: 0px;
  }
  }

.menu-items-order-managment{
    background-color:<?php echo $nav_color;?>; 
    width: 100%;
    border-radius: 10px;
    margin: 10px;
    color:<?php echo $nav_text;?>;
}

.menu-items:hover{
    background-color:;
  
    cursor: pointer;
}
.menu-dis{
    margin: 0px;
    font-size: 12px;
}

.menu-price{
    margin-right: 90px;

  background-color: rgb(119, 10, 10);
  border-radius: 5px;
  height: 100%;
  padding: 2px;
}

.counter {
  

    display: flex;
   
}
.counter input {
    width: 20px;
   border-radius: 20px;
    border: 0;
    font-size: 20px;
    text-align: center;
    background: #e0e2e5;
    color: #322f2f;
    appearance: none;
    outline: 0;
    margin-bottom: 5px;
}
.counter span {
    display: block;
    font-size: 15px;
    padding: 0 5px;
    cursor: pointer;

    user-select: none;
}

/* payment method*/
.pament-button{
    margin: 20px;
}
.btn-payment{
    color: bisque;
    margin: 5px;
    font-size: 15px;

}
.receipt{
    
    padding:5px;
   font-size:20px;
   
}
.reciept-items{
    display:flex;

}
.reciept-items p{
    font-size: 18px;
}
.reciept-item-list{
    margin-right: 20px;
}
.receipt-list1{
    float: right;

}

.receipt-list1 p{
    text-align-last:left;
}

.receipt-list2 p{
    text-align-last: right;
}


.invoice-quantity input{
width: 2rem;
border-radius: 10px;
appearance: none;
text-align: center;
}

.invoice-quantity{
    margin-bottom: 5px;
}
.invoice-quantity span{
    
    font-size: 20px;
    cursor: pointer;

    user-select: none;
}

/* Order Section */
.menu-oders{
    
    height:400px !important;
    margin: 30px;
}

/* analytics section*/
.daily-report{
    display: flex;
    overflow: auto;
   
}


/* customer feedback*/
.costumer-feedback{
    background-color:<?php echo $nav_color;?>;
    margin-top: 5px;


}
.customer-name{
    margin: 10px;
    font-size: 15px;
}
/*cus massage*/
.cus-massage{
    background-color: <?php echo $nav_color;?>;
    height: 1000px;
    color:antiquewhite;
    margin-top: 10px;
    overflow:scroll;
}
.cus-massage-tittle{
    color: antiquewhite;
}

.cus-massage-head{
    margin: 10px;
    background-color:<?php echo $menu_color;?>;
    color: antiquewhite;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    font-size: 15px;
}
.massage-feedback{
    border-radius: 10px;
    margin: 10px;
    color: antiquewhite;
    background-color:<?php echo $menu_color;?>;
}

.table-customer{
   width: 100% !important;
    overflow: scroll;
}
.table-customer tr:hover{
    cursor: pointer;

}
.table-customer tr{
    text-align: center;
 
}

p{
    margin: 0;
    padding: 0;
}
.cart{
    display:<?php echo $cart_role;?>;
    font-size: 15px;
    
}

table{
    overflow:scroll !important;
}
.inventory_button{
    overflow:scroll !important;
}
.revenue:hover{
    cursor: pointer;
   
}

.first-item{
      background-image: linear-gradient(to right, rgb(25, 100, 8) , rgb(8, 38, 9));
      border-radius: 10px;
    }

    .first-item5{
      background-image: linear-gradient(to right, rgb(81, 0, 57) , rgb(42, 39, 42));
      border-radius: 10px;}
      .first-item4{
      background-image: linear-gradient(to right, rgb(10, 1, 12) , rgb(42, 39, 42));
      border-radius: 10px;
    }
    .first-item6{
      background-image: linear-gradient(to right, rgb(121, 15, 21) , rgb(56, 19, 21));
      border-radius: 10px;
    }
    .first-item2{
      background-image: linear-gradient(to right, rgb(25, 100, 8) , rgb(8, 38, 9));
      border-radius: 10px;
    }
    .first-item3{
      background-image: linear-gradient(to right, rgb(79, 8, 100) , rgb(68, 3, 65));
      border-radius: 10px;
    }
    .chart:hover{
        cursor: pointer !important;
    }
        </style>
    </head>