D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
list_of_companies.php
back
Copy
<?php ob_start(); session_start(); include 'config.php'; $login = $_SESSION['login_email']; if($login == ''){ echo '<script>location.replace("index.php")</script>'; } if(isset($_SESSION["source_id"])){ $source_id = $_SESSION['source_id']; } ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" /> <meta content="Coderthemes" name="author" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Font Awsome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- App favicon --> <link rel="shortcut icon" href="assets/images/favicon.png"> <!-- Pie Chart Css --> <link href="assets/pie charts/style.css" rel="stylesheet" type="text/css" /> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/metismenu.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/style.css" rel="stylesheet" type="text/css" /> <!-- DataTables --> <link href="plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <!-- Responsive datatable examples --> <link href="plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.js"></script> <link href="plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css"> <link href="plugins/jquery-toastr/jquery.toast.min.css" rel="stylesheet" /> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> </head> <body> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include 'top-header.php'; ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include 'left-sidebar.php'; ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="page-title-box"> <h4 class="page-title float-left">Dashboard</h4> <ol class="breadcrumb float-right"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row"> <div class="col-xl-12 col-lg-12"> <div class="card-box"> <h4 class="m-t-0 header-title"><b>List of Companies</b></h4> <p class="text-muted font-14 m-b-20"> <!-- Your awesome text goes here. --> </p> <div class="table-responsive"> <table class="table table-hover m-0 table-actions-bar"> <thead> <tr> <th></th> <th>Name</th> <th>City</th> <th>Phone</th> <th>Email</th> <th>Date</th> <th>Action</th> </tr> </thead> <tbody> <?php $sqlGetCompany = "SELECT * FROM company_details WHERE data_delete = 'no' ORDER BY id DESC"; $stmt = $conn->prepare($sqlGetCompany); $stmt->execute(); $resultGetCompany = $stmt->get_result(); if($resultGetCompany->num_rows > 0){ while( $rowGetCompany = $resultGetCompany->fetch_assoc()){ ?> <tr> <td> <img src="images/<?php echo $rowGetCompany["company_logo"]; ?>" alt="contact-img" title="contact-img" style="height: 30px; width: 70px;" /> </td> <td> <h5 class="m-b-0 m-t-0 font-600"><?php echo $rowGetCompany["company_name"]; ?></h5> </td> <!-- <td> <i class="mdi mdi-clock text-success"></i><?php echo date("d/m/Y", strtotime($rowGetPayment["created_on"])); ?> </td> --> <td> <?php echo $rowGetCompany["city"]; ?> </td> <td> <?php echo $rowGetCompany["phone"]; ?> </td> <td> <?php echo $rowGetCompany["email"]; ?> </td> <td> <?php echo date("d/m/Y", strtotime($rowGetCompany["date"])); ?> </td> <td> <a href="view_company.php?id=<?php echo $rowGetCompany['id'] ?>" class="btn btn-xs btn-info" data-toggle="tooltip" data-placement="top" title="View" data-original-title="View"><i class="fa fa-eye"></i></a> <button type="button" value="<?php echo $rowGetCompany['id'] ?>" class="btn btn-xs btn-danger" data-toggle="tooltip" data-placement="top" title="Suspend" data-original-title="Suspend" onclick="suspendCompany(this)"><i class="fa fa-trash-o"></i></button> </td> </tr> <?php } } ?> </tbody> </table> </div> </div> </div> <!-- end col --> </div> <!--- end row --> </div> <!-- container --> </div> <!-- content --> <?php include 'copyrignt.php' ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/popper.min.js"></script><!-- Popper for Bootstrap --> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/metisMenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <!-- Dashboard init --> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> <!-- Chart Js --> <!-- <script src="assets/pie charts/script.js"></script> --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.js"></script> <!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script> --> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <!-- Required datatable js --> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap4.min.js"></script> <!-- Buttons examples --> <script src="plugins/datatables/dataTables.buttons.min.js"></script> <script src="plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="plugins/datatables/jszip.min.js"></script> <script src="plugins/datatables/pdfmake.min.js"></script> <script src="plugins/datatables/vfs_fonts.js"></script> <script src="plugins/datatables/buttons.html5.min.js"></script> <script src="plugins/datatables/buttons.print.min.js"></script> <script src="plugins/datatables/buttons.colVis.min.js"></script> <!-- Responsive examples --> <script src="plugins/datatables/dataTables.responsive.min.js"></script> <script src="plugins/datatables/responsive.bootstrap4.min.js"></script> <script src="plugins/sweet-alert2/sweetalert2.min.js"></script> <script src="plugins/jquery-toastr/jquery.toast.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ if (localStorage.getItem("SuspendCompany") == "true") { successMessage("Company Successfully suspended."); localStorage.setItem("SuspendCompany", "false"); } }); function suspendCompany(button){ var id = $(button).val(); swal({ title: 'Are you sure?', text: "Do you really want to suspend this company??", type: 'warning', showCancelButton: true, confirmButtonColor: '#4fa7f3', cancelButtonColor: '#d57171', confirmButtonText: "Yes, I'm Sure!" }).then(function () { $.ajax({ url : "PHP/response.php", data : "action=SuspendCompany&id="+id, method : "POST", async : false, success : function(response){ if(response == "SUSPENDED"){ localStorage.setItem("SuspendCompany", "true"); location.reload(); } else{ errorMessage("Company could not be suspended."); } }, error : function(error){ errorMessage("Company could not be suspended."); } }); }); } function errorToast(msg){ $.toast({ heading: 'Error!', text: msg, position: 'top-right', loaderBg: '#bf441d', icon: 'error', hideAfter: 3000, stack: 1 }); } function successMessage(msg){ swal({ title: 'Success!', text: msg, type: 'success', confirmButtonColor: '#4fa7f3' }); } function errorMessage(msg){ swal({ title: 'Error!', text: msg, type: 'error', confirmButtonColor: '#4fa7f3' }); } </script> </body> </html>