0byt3m1n1
Path:
/
home
/
k74ns2xygros
/
www
/
clientms
/
admin
/
[
Home
]
File: invoices.php
<?php session_start(); error_reporting(0); include('includes/dbconnection.php'); include('includes/function.php'); if (strlen($_SESSION['clientmsaid'] == 0)) { header('location:logout.php'); } else { ?> <!DOCTYPE HTML> <html> <head> <title>Client Management System || Invoice </title> <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS --> <link href="../assets/css/bootstrap.min.css" rel='stylesheet' type='text/css' /> <!-- Custom CSS --> <link href="../assets/css/style.css" rel='stylesheet' type='text/css' /> <!-- Graph CSS --> <link href="../assets/css/font-awesome.css" rel="stylesheet"> <!-- jQuery --> <link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400' rel='stylesheet' type='text/css'> <!-- lined-icons --> <link rel="stylesheet" href="../assets/css/icon-font.min.css" type='text/css' /> <!-- /js --> <script src="../assets/js/jquery-1.10.2.min.js"></script> <!-- //js--> </head> <body> <div class="page-container"> <!--/content-inner--> <div class="left-content"> <div class="inner-content"> <!-- header-starts --> <?php include_once('includes/header.php'); ?> <!-- //header-ends --> <!--outter-wp--> <div class="outter-wp"> <!--sub-heard-part--> <div class="sub-heard-part"> <ol class="breadcrumb m-b-0"> <li><a href="dashboard.php">Home</a></li> <li class="active">Invoice</li> </ol> </div> <!--//sub-heard-part--> <div class="graph-visual tables-main"> <h3 class="inner-tittle two">Invoice </h3> <div class="graph"> <div class="tables"> <table id="datatable-checkbox" class="table table-striped table-bordered bulk_action result_table"> <thead> <tr class="tbl_head"> <th>SN</th> <th>Invoice Id</th> <th>Company Name</th> <th>Contact Name</th> <th>Invoice Date</th> <th>Gen. By</th> <th>Gen. Date</th> <th>Action</th> </tr> </thead> <tbody> <?php $sql = "select distinct tblclient.ContactName,tblclient.CompanyName,tblinvoice.* from tblclient join tblinvoice on tblclient.ID=tblinvoice.Userid order by tblinvoice.ID desc"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $row) { ?> <tr> <th scope="row"><?php echo htmlentities($cnt); ?></th> <td><?php echo htmlentities($row->BillingId); ?></td> <td><?php echo htmlentities($row->CompanyName); ?></td> <td><?php echo htmlentities($row->ContactName); ?></td> <td><?php echo htmlentities($row->InvoiceDate); ?></td> <td><?php echo UserName(htmlentities($row->PostingBy)); ?></td> <td><?php echo convert_datetime(htmlentities($row->PostingDate)); ?></td> <td> <a class="blue" data-toggle="tooltip" data-placement="left" title="Edit This Record" href="view-invoice.php?invoiceid=<?php echo $row->BillingId; ?>" target="_blank"><span class="glyphicon glyphicon-eye-open"></span></a> <a class="red" data-toggle="tooltip" data-placement="left" title="Delete This Record" href="javascript:void(0);" onClick="deleteRecord(<?php echo $row->ID; ?>);return false;"><span class="glyphicon glyphicon-trash"></span></a> </td> </tr> <?php $cnt = $cnt + 1; } } ?> </tbody> </table> </div> </div> </div> <!--//graph-visual--> </div> <!--//outer-wp--> <?php include_once('includes/footer.php'); ?> </div> </div> <!--//content-inner--> <!--/sidebar-menu--> <?php include_once('includes/sidebar.php'); ?> <div class="clearfix"></div> </div> <script> var toggle = true; $(".sidebar-icon").click(function () { if (toggle) { $(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back"); $("#menu span").css({"position": "absolute"}); } else { $(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back"); setTimeout(function () { $("#menu span").css({"position": "relative"}); }, 400); } toggle = !toggle; }); </script> <script type="text/javascript"> // $('#datatable-checkbox').dataTable({ // "columnDefs": [{"orderable": false, "targets": 'no-sort'}], // "scrollY": "50vh", // "scrollCollapse": true, // "scrollX": true, // "autoWidth": false // }); function deleteRecord(id) { // alert(id); $.ajax({ type: 'POST', url: 'delete_invoice.php', data: {'id': id, 'source': 'invoices.php'}, success: function (data) { $('.modal-content').html(data); $('#globalModal').modal(); } }); } </script> <!--js --> <script src="../assets/js/jquery.nicescroll.js"></script> <script src="../assets/js/scripts.js"></script> <!-- Bootstrap Core JavaScript --> <script src="../assets/js/bootstrap.min.js"></script> </body> </html> <?php } ?>