<?php  
require_once 'includes/config.php';
if(!isset($_SESSION['user_logged_in']) && $_SESSION['user_logged_in']!=TRUE )
{
	header('Location:login.php');

}
$getUserDetail=mysqli_fetch_array(mysqli_query($con,"SELECT * FROM users WHERE id=".$_SESSION['user']));
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="../assets/img/favicon.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>
     Trendinfotechs
  </title>
  <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
  <!--     Fonts and icons     -->
  <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
  <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">-->
  <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
  <!-- CSS Files -->
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
  <link href="assets/css/material-dashboard.css?v=2.1.1" rel="stylesheet" />
  
  <!-- CSS Just for demo purpose, don't include it in your project -->
 <!-- <link href="assets/demo/demo.css" rel="stylesheet" />-->
 <style>
 nav, nav .nav-wrapper i, nav a.sidenav-trigger, nav a.sidenav-trigger i {
    height: 60px;
    line-height: 35px;
}
 </style>
   <script src="assets/js/core/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
  <script>
  
  
    function googleTranslateElementInit() {
        new google.translate.TranslateElement({
           pageLanguage: 'en',
			includedLanguages: 'zh-CN,zh-TW,en',
      layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element'
        );

      

        // Native (but only works in browsers that support query selector)
    /*    if(typeof(document.querySelector) == 'function') {
           document.querySelector('.goog-logo-link').setAttribute('style', 'display: none');
            document.querySelector('.goog-te-gadget').setAttribute('style', 'font-size: 0');
        }*/

        
    }
</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

 <script src="https://cdn.ckeditor.com/4.13.1/standard/ckeditor.js"></script>
</head>

<body class="">
  <div class="wrapper ">
    <div class="sidebar" data-color="danger" data-background-color="white" data-image="assets/img/sidebar-1.jpg">
      <!--
        Tip 1: You can change the color of the sidebar using: data-color="purple | azure | green | orange | danger"

        Tip 2: you can also add an image using data-image tag
    -->
      <div class="logo">
        <a href="index.php" class="simple-text logo-normal">
         <img src="assets/img/adminlogo.png" height="60" width="120" >
        </a>
      </div>
      <div class="sidebar-wrapper">
        <ul class="nav">
		 <?php if($_SESSION['role_id']==1) {?>
          <li class="nav-item active  ">
            <a class="nav-link" href="index.php">
              <i class="material-icons">dashboard</i>
              <p>Dashboard </p>
            </a>
          </li>
          <li class="nav-item ">
            <a class="nav-link" href="customers.php">
              <i class="material-icons">person</i>
              <p>User List</p>
            </a>
          </li>
         
          <li class="nav-item ">
            <a class="nav-link" href="merchants.php">
              <i class="material-icons">library_books</i>
              <p>Merchant List</p>
            </a>
          </li>
		 <li class="nav-item ">
            <a class="nav-link" href="instausers.php">
              <i class="material-icons">person</i>
              <p>Insta User</p>
            </a>
          </li>
		  <li class="nav-item ">
            <a class="nav-link" href="ibox.php">
              <i class="material-icons">person</i>
              <p>Ibox to User</p>
            </a>
          </li>
		  
		   <li class="nav-item ">
            <a class="nav-link" href="wallet.php">
              <i class="material-icons">content_paste</i>
              <p>Trend Wallet</p>
            </a>
			<ul class="nav">
			<!--<li class="nav-item "><a class="nav-link" href="integral.php">             
              <p>点 (Points)</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="voucher.php">             
              <p>凭证 (Voucher)</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="cash.php">             
              <p>现金 (Cash)</p>
            </a></li>-->
			<!--<li class="nav-item "><a class="nav-link" href="topup.php">             
              <p>热门历史(Top Ups History)</p>
            </a></li>-->
			<li class="nav-item "><a class="nav-link" href="daily_points.php">             
              <p>Points History</p>
            </a></li>
			<!--<li class="nav-item "><a class="nav-link" href="daily_voucher.php">             
              <p>凭证历史 (Voucher History)</p>
            </a></li>-->
			<li class="nav-item "><a class="nav-link" href="transactions.php">             
              <p>Transactions</p>
            </a></li>

			
			<!--<li class="nav-item "><a class="nav-link" href="daily_points.php">             
              <p>Daily Points Reports</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="daily_voucher.php">             
              <p>每日憑證報告 (Daily Voucher Reports)</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="custom_point_report.php">             
              <p>Custom Points Reports</p>
            </a></li>-->
			<!--<li class="nav-item "><a class="nav-link" href="custom_voucher_report.php">             
              <p>自定義憑證報告 (Custom Voucher Reports)</p>
            </a></li>-->
			</ul>
          </li>
		 <?php }if($_SESSION['role_id']==1){?>
		  <li class="nav-item ">
            <a class="nav-link" href="#">
              <i class="material-icons">library_books</i>
              <p>Shopping Mall</p>
            </a>
			<ul class="nav">
			<li class="nav-item "><a class="nav-link" href="categories.php">             
              <p>Categories</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="products.php">             
              <p>Products</p>
            </a></li>

			<li class="nav-item "><a class="nav-link" href="userproducts.php">             
              <p>Merchant Products</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="orders.php">             
              <p>Orders</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="coupons.php">             
              <p>Coupon</p>
            </a></li>
			</ul>
          </li>
		  <?php }if($_SESSION['role_id']==1){?>
		  <li class="nav-item ">
            <a class="nav-link" href="#">
              <i class="material-icons">library_books</i>
              <p>Trendee Frame</p>
            </a>
			<ul class="nav">
			<li class="nav-item "><a class="nav-link" href="trendiframe.php">             
              <p>Trendy Frame</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="trendyads.php">             
              <p>Trendy Ads</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="folders.php">             
              <p>Add Folders</p>
            </a></li>

			<li class="nav-item "><a class="nav-link" href="jobs.php">             
              <p>Add Jobs</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="malls.php">             
              <p>Add Malls</p>
            </a></li>
			<li class="nav-item "><a class="nav-link" href="imagebyfolder.php">             
              <p>Personal Pic</p>
            </a></li>			</ul>
          </li>
		  <?php }if($_SESSION['role_id']==1){ ?>
		  
         <!--<li class="nav-item ">
            <a class="nav-link" href="add_topup_user.php">
              <i class="material-icons">location_ons</i>
              <p>Topup User</p>
            </a>
          </li>
          <li class="nav-item ">
            <a class="nav-link" href="#">
              <i class="material-icons">location_ons</i>
              <p>Transactions</p>
            </a>
          </li>-->
		  <li class="nav-item ">
            <a class="nav-link" href="notifications.php">
              <i class="material-icons">bubble_chart</i>
              <p>Notifications</p>
            </a>
          </li>
          <li class="nav-item ">
            <a class="nav-link" href="compliants.php">
              <i class="material-icons">bubble_chart</i>
              <p>Compliants</p>
            </a>
          </li>
		  <li class="nav-item  ">
            <a class="nav-link" href="promotions.php">
              <i class="material-icons">unarchive</i>
              <p>Promotions</p>
            </a>
          </li>
		  <li class="nav-item  ">
            <a class="nav-link" href="userpromotions.php">
              <i class="material-icons">unarchive</i>
              <p>Merchant Promotions</p>
            </a>
          </li>
          <li class="nav-item  ">
            <a class="nav-link" href="banners.php">
              <i class="material-icons">unarchive</i>
              <p>Banners</p>
            </a>
          </li>
		  		  <li class="nav-item  ">
            <a class="nav-link" href="userbanners.php">
              <i class="material-icons">unarchive</i>
              <p>Merchant Banners</p>
            </a>
          </li>

		  <li class="nav-item  ">
            <a class="nav-link" href="popupgroups.php">
              <i class="material-icons">unarchive</i>
              <p>Popup Groups</p>
            </a>
          </li>
		   <li class="nav-item  ">
            <a class="nav-link" href="popupimages.php">
              <i class="material-icons">unarchive</i>
              <p>Group Popup Images</p>
            </a>
          </li>
		   <li class="nav-item  ">
            <a class="nav-link" href="smsbanners.php">
              <i class="material-icons">unarchive</i>
              <p>SMS Banners</p>
            </a>
          </li>
		   <li class="nav-item  ">
            <a class="nav-link" href="smsgroups.php">
              <i class="material-icons">unarchive</i>
              <p>SMS Groups</p>
            </a>
          </li>
		  <li class="nav-item  ">
            <a class="nav-link" href="smsbygroup.php">
              <i class="material-icons">unarchive</i>
              <p>SMS By Group</p>
            </a>
          </li>
<li class="nav-item  ">
            <a class="nav-link" href="smsbyuser.php">
              <i class="material-icons">unarchive</i>
              <p>Merchant SMS</p>
            </a>
          </li>
           <li class="nav-item  ">
            <a class="nav-link" href="settings.php?id=1">
              <i class="material-icons">unarchive</i>
              <p>Settings</p>
            </a>
          </li> 
		  <?php } ?>
        </ul>
      </div>
    </div>
	<div class="main-panel">
      <!-- Navbar -->
      <nav class="navbar navbar-expand-lg navbar-transparent navbar-absolute fixed-top ">
        <div class="container-fluid">
          <div class="navbar-wrapper">
            <a class="navbar-brand" href="#pablo">Dashboard </a>
			<!-- <div id="google_translate_element" style="margin-top: 15px;"></div>-->
          </div>
          <button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
            <span class="sr-only">Toggle navigation</span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
          </button>
          <div class="collapse navbar-collapse justify-content-end">
            <form class="navbar-form">
              <div class="input-group no-border">
                <input type="text" value="" class="form-control" placeholder="search...">
                <button type="submit" class="btn btn-white btn-round btn-just-icon">
                  <i class="material-icons">search</i>
                  <div class="ripple-container"></div>
                </button>
              </div>
            </form>
            <!--<ul class="navbar-nav">
              <li class="nav-item">
                <a class="nav-link" href="#pablo">
                  <i class="material-icons">dashboard</i>
                  <p class="d-lg-none d-md-block">
                    Stats
                  </p>
                </a>
              </li>
              <li class="nav-item dropdown">
                <a class="nav-link" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="material-icons">notifications</i>
                  <span class="notification">5</span>
                  <p class="d-lg-none d-md-block">
                    Some Actions
                  </p>
                </a>
                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
                  <a class="dropdown-item" href="#">Mike John responded to your email</a>
                  <a class="dropdown-item" href="#">You have 5 new tasks</a>
                  <a class="dropdown-item" href="#">You're now friend with Andrew</a>
                  <a class="dropdown-item" href="#">Another Notification</a>
                  <a class="dropdown-item" href="#">Another One</a>
                </div>
              </li>
              <li class="nav-item dropdown">
                <a class="nav-link" href="#pablo" id="navbarDropdownProfile" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="material-icons">person</i>
                  <p class="d-lg-none d-md-block">
                    Account
                  </p>
                </a>
                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownProfile">
                  <a class="dropdown-item" href="#">Profile</a>
                  <a class="dropdown-item" href="#">Settings</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="logout.php">Log out</a>
                </div>
              </li>
            </ul>-->
          </div>
        </div>
      </nav>