GIF89a
<?php include("session.php"); include("connect.php"); include("libs.php"); include("page_content.php"); include("user_profile.php"); include("menu_links.php"); include("subCals/total_users.php"); ?> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="editor/ed.js"></script> <!--<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=hmj5wmc3u49zbs29zpa584l5kaml1l4wvmt6o9k9u0k3uzci"></script> <script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script> <script>tinymce.init({ selector:'textarea' });</script> --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title><?php echo $page_title4; ?></title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <!-- Bootstrap 3.3.7 --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- Theme style --> <link rel="stylesheet" href="css/AdminLTE.css"> <link rel="stylesheet" href="css/all-skins.min.css"> <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script> <script src="https://kit.fontawesome.com/67adbbaee5.js" crossorigin="anonymous"></script> <link rel="stylesheet" href="css/bootstrap-tagsinput.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <link rel="stylesheet" href="ckeditor/sample/css/samples.css"> <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css"> <link rel="stylesheet" href="ckeditor/sample/css/samples.css"> <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css"> <script src="ckeditor/ckeditor.js"></script> <script src="ckeditor/sample/js/sample.js"></script> <script type="text/javascript" src="js/checkMobb.js"></script> <script type="text/javascript" src="js/searchMe.js"></script> <script type="text/javascript" src="js/deleteData.js"></script> <script src="js/hideForm.js"></script> </head> <body class="hold-transition skin-blue sidebar-mini"> <div class="wrapper"> <header class="main-header"> <!-- Logo --> <a href="index.php" class="logo" style="background-color:<?php echo $header_color_light; ?> !important"> <!-- mini logo for sidebar mini 50x50 pixels --> <span class="logo-mini"><?php echo $page_title4; ?></span> <!-- logo for regular state and mobile devices --> <span class="logo-lg" style="background-color:<?php echo $header_color_light; ?> !important"><?php echo $logo; ?></span> </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" style="background-color:<?php echo $header_color; ?> !important"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"> <span class="sr-only">Toggle navigation</span> </a> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <span class="hidden-xs"><?php echo $user_name; ?><i class="fa fa-caret-down"></i></span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header"> <!-- <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"> --> <p> <?php echo getUser($conn,$_COOKIE["sr"]); ?> </p> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-right"> <a href="logout.php?page=index" class="btn btn-default btn-flat">Sign out</a> </div> </li> </ul> </li> <!-- Control Sidebar Toggle Button --> </ul> </div> </nav> </header> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu" data-widget="tree"> <li class="header">MAIN NAVIGATION</li> <?php include("menus.php"); ?> </ul> </section> <!-- /.sidebar --> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Dashboard <small><?php echo $page_title4; ?></small> </h1> <ol class="breadcrumb"> <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Dashboard</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- Small boxes (Stat box) --> <div class="row"> <div class="col-md-1 col-sm-1 col-xs-1"> </div> <div class="col-md-10 col-sm-10 col-xs-10"> </div> <div class="col-md-12 col-sm-6 col-xs-12"> <input type="date" max="<?php echo date('Y-m-d'); ?>" id="date" name="date" title="Select start date"> <input type="date" max="<?php echo date('Y-m-d'); ?>" id="end_date" name="end_date" title="Select date"> <select id="uname"> <option value="">Select customer</option> <?php $sqlU="SELECT * FROM `records`"; $rsU=mysqli_query($conn,$sqlU); while($rowU=mysqli_fetch_array($rsU)){ ?> <option value="<?php echo $rowU['uname']; ?>"><?php echo $rowU['uname']; ?></option> <?php } ?> </select> <select id="typee"> <option value="">Select bird</option> <option value="Live Bird">Live Bird</option> </select> <button onclick="searchMe('ledger.php')">Search</button> <div class="table"> <div class="table-responsive" style="height:800px; overflow:scroll"> <table class="table no-margin"> <thead> <tr> <th>Sr</th> <th>Name <br>Mobile No</th> <th>Type</th> <th>Debit</th> <th>Credit</th> <th>Weight</th> <th>Status</th> <th>Report</th> </tr> </thead> <tbody> <?php $SR=0; if($_GET['uname']=="") { $sqlT="SELECT DISTINCT uname FROM `records` ORDER BY `sr` DESC"; } else { $sqlT="SELECT DISTINCT uname FROM `records` WHERE `uname`='".$_GET['uname']."' ORDER BY `sr` DESC"; } $rsT=mysqli_query($conn,$sqlT); while($rowT=mysqli_fetch_array($rsT)) { $SR=$SR+1; $sqlU="SELECT * FROM `records` WHERE `uname`='".$rowT['uname']."'"; $rsU=mysqli_query($conn,$sqlU); $rowU=mysqli_fetch_assoc($rsU); if($_GET['type']=="") { $totalDebit=totalDebit($conn,$rowU["type"],$rowU['uname'],$_GET['date'],$_GET['end_date']); $totalDebitWeight=totalDebitWeight($conn,$rowU["type"],$rowU['uname'],$_GET['date'],$_GET['end_date']); $totalDebitPaid=totalDebitPaid($conn,$rowU["type"],$rowU['uname'],$_GET['date'],$_GET['end_date']); $totalCredit=totalCredit($conn,$rowU["type"],$rowU['uname'],$_GET['date'],$_GET['end_date']); } else { $totalDebit=totalDebit($conn,$_GET["type"],$_GET['uname'],$_GET['date'],$_GET['end_date']); $totalDebitPaid=totalDebitPaid($conn,$_GET["type"],$_GET['uname'],$_GET['date'],$_GET['end_date']); $totalDebitWeight=totalDebitWeight($conn,$_GET["type"],$_GET['uname'],$_GET['date'],$_GET['end_date']); $totalCredit=totalCredit($conn,$_GET["type"],$_GET['uname'],$_GET['date'],$_GET['end_date']); } $totalCredit=$totalCredit+$totalDebitPaid; $left=$totalDebit-$totalCredit; ?><tr> <td><?php echo $SR; ?></td> <td><?php echo $rowU["uname"]; ?><br><?php echo $rowT['mobb']; ?></td> <td><?php echo $rowU["type"]; ?></td> <td style="color: red"><?php echo "Rs.".$totalDebit; ?></td> <td style="color: green"><?php echo "Rs.".$totalCredit; ?> </td> <td style="color: green"><?php echo $totalDebitWeight." KG"; ?> </td> <td><?php echo showLeft($left); ?> </td> <td> <!-- <a href="debitR.php?uname=<?php echo $rowT['uname']; ?>&date=<?php echo $_GET['date']; ?>&end_date=<?php echo $_GET['end_date']; ?>&type=<?php echo $rowU["type"]; ?>"><button class="btn btn-danger">Debit</button></a> <a href="creditR.php?uname=<?php echo $rowT['uname']; ?>&date=<?php echo $_GET['date']; ?>&end_date=<?php echo $_GET['end_date']; ?>&type=<?php echo $rowU["type"]; ?>"><button class="btn btn-success">Credit</button></a> --> <a href="reciept.php?uname=<?php echo $rowT['uname']; ?>&date=<?php echo $_GET['date']; ?>&end_date=<?php echo $_GET['end_date']; ?>&type=<?php echo $rowU["type"]; ?>"><img src="icons/printer.png" style="height: 25p; width: 25px;"></a></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.row --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <footer class="main-footer"> <div class="pull-right hidden-xs"> <b><span class="logo-lg" style="margin-bottom:10px"> <?php echo $logo; ?></span></b> </div> <strong><?php echo $copywite; ?></strong> All rights reserved. </footer> </div> <!-- ./wrapper --> <!-- jQuery 3 --> <script src="js/jquery.min.js"></script> <!-- Bootstrap 3.3.7 --> <script src="js/bootstrap.min.js"></script> <!-- AdminLTE App --> <script src="js/adminlte.min.js"></script> <script src="js/bootstrap-tagsinput.min.js"></script> <!-- AdminLTE dashboard demo (This is only for demo purposes) --> <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> </body> </html> <?php function getUser($conn,$sr) { $sqlUser="SELECT * FROM `admin_user` WHERE `sr`='".$sr."'"; $rsUser=mysqli_query($conn,$sqlUser); $rowUser=mysqli_fetch_assoc($rsUser); $user_name=$rowUser["user_name"]; return $user_name; } ?>