<?php
include 'include/db.php';
?>
<style>
.disabled {
    pointer-events:none; 
    opacity:0.6;   
}
</style>
<!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- Sidebar user panel -->
          <div class="user-panel">
              <?php
			$is_disabled = FALSE;
			if(isset($_SESSION['login_id']))
			{
    			$slt3="select * from registration where login_session='".$_SESSION['login_id']."'";
    			$qry=mysqli_query($conn,$slt3);
    			if(mysqli_num_rows($qry))
    			{
    				$rw=mysqli_fetch_array($qry);
    				$name=$rw['user_name'];
    				$unique_id=$rw['unique_user_id'];
					if($rw['active_deactive'] !=1)
					{
						$is_disabled = TRUE;
					}
				
    			}
			}
			?>
            <div class="pull-left image">
              <?php
               $slt4="select * from registration where unique_user_id='$unique_id' ";
               $connection=mysqli_query($conn,$slt4);
                  if(mysqli_num_rows($connection)>0)
                  {
                      while($rows2=mysqli_fetch_array($connection))
                      {
                          $result2=$rows2['images'];
                      }
                  }
                  if($result2!='')
                  {
              ?>
                  <img src="<?php echo $result2;?>" class="img-circle" alt="User Image" />
               <?php
                  }
                  else
                  {
                ?>
                    <img src="images/no-user-img.jpg" class="img-circle" alt="User Image" />
               <?php
                  }
               ?>
            </div>
            <div class="pull-left info">
                <p style="text-transform:uppercase"> <?php echo $name;?> </p>
                <p style="font-size: 12px"> <?php echo  $unique_id; ?> </p>
            </div>
          </div>
          <!-- search form -->
         
          <!-- /.search form -->
          <!-- sidebar menu: : style can be found in sidebar.less -->
          
          
        <?php
        if($_SESSION['account_type']=='admin')
        {
        ?>  
        <!---     admin side menu      ---->
          
          <ul class="sidebar-menu">
            <li class="header">MAIN NAVIGATION</li>
            <li class="active treeview">
              <a href="dashboard.php">
                <i class="fa fa-dashboard"></i> <span>Dashboard</span></i>
              </a>
            </li>
            <li class="treeview">
              <a href="#">
                <i class="fa fa-user"></i>
                <span>Memeber</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="list_user.php"><i class="fa fa-circle-o"></i> List User </a></li>  
                <li><a href="tree.php"><i class="fa fa-circle-o"></i> Genealogy tree </a></li>
                 <!--<li><a href="joining_graph_admin.php"><i class="fa fa-circle-o"></i> Member Joining Graph  </a></li>-->
				 <li><a href="kyc_manage.php"><i class="fa fa-circle-o"></i> KYC  </a></li>
                 <li><a href="transaction_pwd.php"><i class="fa fa-circle-o"></i> User credential </a></li>
                <li><a href="user_active_deactive.php"><i class="fa fa-circle-o"></i> active / deactive user </a></li>
              </ul>
            </li>
            <!--<li class="treeview">
              <a href="#">
                <i class="fa fa-money"></i>
                <span>Payout</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="fund_details_by_date.php?id=6"><i class="fa fa-circle-o"></i> List by date </a></li>  
                <li><a href="show_request_payout.php"><i class="fa fa-circle-o"></i> New request </a></li>
                <li><a href="payout_pending.php"><i class="fa fa-circle-o"></i> Pending request </a></li>
                <li><a href="payout_details.php"><i class="fa fa-circle-o"></i> Completed transaction </a></li>
              </ul>
            </li>-->
            <li class="treeview">
              <a href="#">
                <i class="fa fa-gift"></i>
                <span>Package Management</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="add_package.php"><i class="fa fa-circle-o"></i> Add Package </a></li>  
                <li><a href="package_list.php"><i class="fa fa-circle-o"></i> Package List </a></li>
              </ul>
            </li>
            
            <!--<li class="treeview">
              <a href="#">
                <i class="fa fa-cc-visa"></i>
                <span>E-wallet Management</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="fund_details_by_date.php?id=1"><i class="fa fa-circle-o"></i> Fund Transfer Details by Daily or Weekly </a></li>  
                <li><a href="business_wallet_overview.php"><i class="fa fa-circle-o"></i> Business Wallet ñ Overview of E-Wallet </a></li>
                <li><a href="deduct_money.php"><i class="fa fa-circle-o"></i> Deduct Fund from Member </a></li>
              </ul>
            </li>-->
            
             <!--<li class="treeview">
              <a href="#">
                <i class="fa fa-tag"></i>
                <span>Coupon management</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="manage_category.php"><i class="fa fa-circle-o"></i> Manage categories </a></li>  
                <li><a href="generate_coupons.php"><i class="fa fa-circle-o"></i> Ganerate coupons </a></li>
                <li><a href="manage_coupon.php"><i class="fa fa-circle-o"></i> Manage coupons </a></li>
              </ul>
            </li>--->
			 
             <li class="treeview">
              <a href="#">
                <i class="glyphicon glyphicon-lock"></i>
                <span>Wallets</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="wallet.php"><i class="fa fa-circle-o"></i> Wallet </a></li>  
				<li><a href="money_send.php"><i class="fa fa-circle-o"></i> Wallet Transffer </a></li>  
                <!--<li><a href="money_send.php"><i class="fa fa-circle-o"></i> Send money </a></li>-->
                <!--<li><a href="buy_products.php"><i class="fa fa-circle-o"></i> Buy products </a></li>-->
                 <!--<li><a href="add_money.php"><i class="fa fa-circle-o"></i> Add money </a></li>-->
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-amazon" aria-hidden="true"></i>
                <span>Affiliate Marketing</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                 <li><a href="affiliate_manage.php"><i class="fa fa-circle-o"></i> Affiliates Manage </a></li>
              </ul>
            </li>
		    <li class="treeview">
              <a href="https://shop.fairyherbal.in/">
                 <img src="/images/fairy-logo.png" width="20">
				  <!--<i class="fa fa-amazon" aria-hidden="true"></i>-->
                <span>Fairyshopping</span>
              </a>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-cc-visa"></i>
                <span>Payout</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
				 <li><a href="admin_payout_manage.php"><i class="fa fa-circle-o"></i> Payout Manage </a></li>   
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-gift"></i>
                <span>Rewards</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
				 <li><a href="bonus.php"><i class="fa fa-circle-o"></i> Bonus </a></li>
				 <li><a href="rewards.php"><i class="fa fa-circle-o"></i> Reward </a></li>				 
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-file"></i>
                <span>Reports</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
			   <li><a href="product_purchased.php"><i class="fa fa-circle-o"></i> Product Dispatch </a></li>
			    <li><a href="report.php"><i class="fa fa-circle-o"></i> Genealogy report </a></li>
				<li><a href="direct_joining_report.php"><i class="fa fa-circle-o"></i> Direct Joining report </a></li>
                <li><a href="fund_details_by_date.php?id=2"><i class="fa fa-circle-o"></i> Joining Report </a></li>  
                <li><a href="fund_details_by_date.php?id=3"><i class="fa fa-circle-o"></i> Top Earners </a></li>
                <!--<li><a href="fund_details_by_date.php?id=4"><i class="fa fa-circle-o"></i> Commission Report </a></li>-->
                 <!--<li><a href="fund_details_by_date.php?id=5"><i class="fa fa-circle-o"></i> Income details </a></li>-->
              </ul>
            </li>
             <!--<li class="treeview">
              <a href="show_docket_request.php">
                <i class="fa fa-envelope"></i>
                <span>Support tickets</span>
              </a>
            </li>-->
			<li class="treeview">
              <a href="#">
                <i class="fa fa-calculator"></i>
                <span>Plan Settings</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <!--<li><a href="refferal_amount.php"><i class="fa fa-circle-o"></i> Commission Settings </a></li>  -->
                <li><a href="tax_show.php"><i class="fa fa-circle-o"></i> Tax Settings </a></li>
                <li><a href="transaction_fee.php"><i class="fa fa-circle-o"></i> Transaction Fee </a></li>
              </ul>
            </li>
			 <li class="treeview">
              <a href="#">
                <i class="fa fa-file"></i>
                <span>Commission</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
              <li><a href="manage_commission.php"><i class="fa fa-circle-o"></i> Manage Commission </a></li>  
                <!--<li><a href="commission.php"><i class="fa fa-circle-o"></i> Commission List </a></li>  -->
              </ul>
            </li>
            <li class="treeview">
             <a href="#">
                <i class="fa fa-cog"></i>
                <span>Setting</span>
                 <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <!--<li><a href="company_details.php"><i class="fa fa-circle-o"></i> Add details </a></li>  -->
                <li><a href="company_details_edit.php"><i class="fa fa-circle-o"></i>  Site details </a></li>
              </ul>
            </li>
          </ul>
        <?php
        }
        else if($_SESSION['account_type']=='user')
        {
        ?> 
          
        <!---     Manager side menu      ---->
          
          <ul class="sidebar-menu">
            <li class="header">MAIN NAVIGATION</li>
            <li class="active treeview">
              <a href="dashboard.php">
                <i class="fa fa-dashboard"></i> <span>Dashboard</span>
              </a>
            </li>
             <li class="treeview">
              <a href="welcome_letter.php">
                <i class="fa fa-file-text-o"></i> <span>Welcome letter</span>
              </a>
            </li>
            <li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?> ">
              <a href="<?php echo $is_disabled == FALSE ? 'invoice.php' : 'javascript:void(0)' ?>">
                <i class="fa fa-print"></i>
                <span>My Invoice</span>
              </a>
            </li>
            <li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?>">
              <a href="#">
                <i class="fa fa-user"></i>
                <span>Member</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="tree.php"><i class="fa fa-circle-o"></i> Genealogy tree </a></li>  
                <!--<li><a href="joining_graph.php"><i class="fa fa-circle-o"></i> Member Joining Graph  </a></li>-->
              </ul>
            </li>
            <li class="treeview">
              <a href="#">
                <i class="glyphicon glyphicon-lock"></i>
                <span>Wallets</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                 <li class="<?php echo $is_disabled == TRUE ? 'disabled' : '' ?>"><a href="wallet.php"><i class="fa fa-circle-o"></i> Wallet </a></li>   
                <!--<li><a href="money_send.php"><i class="fa fa-circle-o"></i> Send money </a></li>  -->
                <li><a href="buy_products.php"><i class="fa fa-circle-o"></i> Buy products </a></li>  
                <!--<li><a href="add_money.php"><i class="fa fa-circle-o"></i> Add money </a></li> --> 
              </ul>
            </li>
			<li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?>">
              <a href="#">
                <i class="fa fa-amazon" aria-hidden="true"></i>
                <span>Affiliate Marketing</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                 <li><a href="affiliate_manage.php"><i class="fa fa-circle-o"></i> Affiliates Manage </a></li>
              </ul>
            </li>
			<li class="treeview">
              <a href="https://shop.fairyherbal.in/">
                 <img src="/images/fairy-logo.png" width="20">
				  <!--<i class="fa fa-amazon" aria-hidden="true"></i>-->
                <span>Fairyshopping</span>
              </a>
            </li>
			<li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?>">
              <a href="#">
                <i class="fa fa-cc-visa"></i>
                <span>Payout</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                 <li><a href="request_payout.php"><i class="fa fa-circle-o"></i> Payout Request </a></li>   
				 <li><a href="user_payout_details.php"><i class="fa fa-circle-o"></i> Payout Details </a></li>   
              </ul>
            </li>
			<li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?>">
              <a href="#">
                <i class="fa fa-gift"></i>
                <span>Rewards</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
				 <li><a href="bonus.php"><i class="fa fa-circle-o"></i> Bonus </a></li>
				 <li><a href="rewards.php"><i class="fa fa-circle-o"></i> Reward </a></li>				 
              </ul>
            </li>
			<li class="treeview <?php echo $is_disabled == TRUE ? 'disabled' : '' ?>">
              <a href="#">
                <i class="fa fa-file"></i>
                <span>Reports</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
			    <li><a href="product_purchased.php"><i class="fa fa-circle-o"></i> Product Dispatch </a></li>
                <li><a href="report.php"><i class="fa fa-circle-o"></i> Genealogy report </a></li>
				 <li><a href="direct_joining_report.php"><i class="fa fa-circle-o"></i> Direct Joining report </a></li>
              </ul>
            </li>
			
            <!--<li class="treeview">
              <a href="request_payout.php">
                <i class="fa fa-money"></i>
                <span>Request payout</span>
              </a>
            </li>
            <li class="treeview">
              <a href="user_help.php">
                <i class="fa fa-question-circle"></i>
                <span>My support</span>
              </a>
            </li>-->
          </ul>
        <?php
        }
        ?> 
          
          
          
          
        </section>
        <!-- /.sidebar -->
      </aside>
