			<?
			$kodereseller = $_SESSION['kode'];
			$query = mysqli_query($conn,"SELECT * FROM mutasi where kode_reseller='$kodereseller' order by kode desc");
                $record = mysqli_fetch_array($query);
                $saldo = $record['saldo_akhir'];

				if ($saldo==0)
{
    $query = mysqli_query($conn,"SELECT * FROM reseller where kode='$kode'");
    $record = mysqli_fetch_array($query);
    $saldo = $record['saldo'];
}

                $saldo =number_format($saldo,0,',','.');
            ?>
			
			<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="navbar-header">
                    <a class="navbar-brand" href="index.php"><? echo $_SESSION['nama'];?></a>
                </div>

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>

                <ul class="nav navbar-nav navbar-left navbar-top-links">
                    <li><a href="index.php"><i class="fa fa-dollar fa-fw"></i> Saldo Rp<?echo $saldo;?></a></li>
                </ul>

                <ul class="nav navbar-right navbar-top-links">
                    
                    <li class="dropdown">
                        <a href="../dasar/logout.php?hal=logout">
                            <i class="fa fa-sign-out"></i> Logout </b>

                        </a>
                        
                    </li>
                </ul>
                <!-- /.navbar-top-links -->

                <div class="navbar-default sidebar" role="navigation">
                    <div class="sidebar-nav navbar-collapse">
                        <ul class="nav" id="side-menu">
                            
                            <li>
                                <a href="index.php" class="<? echo $menu1; ?>"><i class="fa fa-home fa-fw"></i> Home</a>
                            </li>
                            <li>
                                <a href="transaksi.php" class="<? echo $menu2; ?>"><i class="fa fa-edit fa-fw"></i> Transaksi</a>
                            </li>
                            <li>
                                <a href="mutasi.php" class="<? echo $menu3; ?>"><i class="fa fa-line-chart fa-fw"></i> Mutasi</a>
                            </li>
							<li>
                                <a href="deposit.php" class="<? echo $menu4; ?>"><i class="fa fa-money fa-fw"></i> Deposit</a>
                            </li>
							<li>
                                <a href="produk.php" class="<? echo $menu5; ?>"><i class="fa fa-opencart fa-fw"></i> Produk</a>
                            </li>
                            <li>
                                <a href="produk_ppob.php" class="<? echo $menu11; ?>"><i class="fa fa-bank fa-fw"></i> PPOB</a>
                            </li>
							<li>
                                <a href="downline.php" class="<? echo $menu6; ?>"><i class="fa fa-sitemap fa-fw"></i> Downline</a>
                                
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-bar-chart fa-fw"></i> Grafik<span class="fa arrow"></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href="grafik.php" class="<? echo $menu7; ?>">Grafik Transaksi</a>
                                    </li>
                                    <li>
                                        <a href="grafik_deposit.php" class="<? echo $menu8; ?>">Grafik Deposit</a>
                                    </li>
                                     <li>
                                        <a href="grafik_mutasi.php" class="<? echo $menu9; ?>">Grafik Mutasi</a>
                                    </li>
                                </ul>
                                
                            </li>
                            <!--<li>
                                <a href="struk.php" class="<? echo $menu10; ?>"><i class="fa fa-print fa-fw"></i> Cetak Struk</a>
                                
                            </li>-->
                         </ul>
                    </div>
                </div>
            </nav>