<?

require_once("conn.php");
$user = $_GET['user'];
$markup = 0;
$markup0 = 0;
$area = '';
$level='';
if (empty($user))
{
   $markup = 0;
   $markup0 = 0;
   $area = '';
   $level='';
}
else
{
    $exe = mysqli_query($conn,"SELECT * FROM reseller where kode = '$user'");
    while($record = mysqli_fetch_array($exe)){
        $markup0 = $record['markup'];
        $area = $record['kode_area'];
        $level= $record['kode_level'];
    }
} 

$exel = mysqli_query($conn,"SELECT * FROM level where kode = '$level'");
	while($record = mysqli_fetch_array($exel)){
    $markup = $record['selisih_harga']+$markup0;
    }

?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Produk - Web Report</title>

        <!-- Bootstrap Core CSS -->
        <link href="../css/bootstrap.min.css" rel="stylesheet">

        <!-- MetisMenu CSS -->
        <link href="../css/metisMenu.min.css" rel="stylesheet">

        <!-- DataTables CSS -->
        <link href="../css/dataTables/dataTables.bootstrap.css" rel="stylesheet">

        <!-- DataTables Responsive CSS -->
        <link href="../css/dataTables/dataTables.responsive.css" rel="stylesheet">
 <link rel="icon" href="../favicon.ico" type="image/icon"/>
        <!-- Custom CSS -->
        <link href="../css/startmin.css" rel="stylesheet">

        <!-- Custom Fonts -->
        <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css">

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>

        <div id="wrapper">
			
            

               
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-12">
                        <?
                        if ($area=='H2H')
                        {
                            include 'prod_h2h.php';
                        }
						else
						{
						   
						   include 'prod_rs_android.php';
						}
						?>					
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                
            
            <!-- /#page-wrapper -->

        </div>
        <!-- /#wrapper -->

        <!-- jQuery -->
        <script src="../js/jquery.min.js"></script>

        <!-- Bootstrap Core JavaScript -->
        <script src="../js/bootstrap.min.js"></script>

        <!-- Metis Menu Plugin JavaScript -->
        <script src="../js/metisMenu.min.js"></script>

        <!-- DataTables JavaScript -->
        <script src="../js/dataTables/jquery.dataTables.min.js"></script>
        <script src="../js/dataTables/dataTables.bootstrap.min.js"></script>

        <!-- Custom Theme JavaScript -->
        <script src="../js/startmin.js"></script>

        <!-- Page-Level Demo Scripts - Tables - Use for reference -->
        <script>
            $(document).ready(function() {
                $('#dataTables-example').DataTable({
                        responsive: true
                });
            });
        </script>
   
    </body>
</html>
