G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php include("header.php"); include("config.php"); $result = $js->query('SELECT * FROM `vehicles` ORDER BY `regno`'); $result->execute(); ?> <!-- Begin Page Content --> <div class="container-fluid"> <!-- Page Heading --> <h1 class="h3 mb-2 text-gray-800">Vehicles</h1> <p class="mb-4">Add Vehicles</p> <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3" align="right"> <div class="my-2"></div> <a href="add_vehicles.php" class="btn btn-secondary btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-arrow-right"></i> </span> <span class="text">Add Vehicles</span> </a> </div> <div class="card-body border-left-secondary"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr style="background-color:#5A6575; color:#fff;"> <th>Brand</th> <th>Vehicle Type</th> <th>Reg No</th> <th>Description</th> <th>Delete</th> </tr> </thead> <!-- <tfoot> --> <!-- <tr> --> <!-- <th>Name</th> --> <!-- <th>Address</th> --> <!-- <th>Location</th> --> <!-- <th>Contact Person</th> --> <!-- <th>Mobile No</th> --> <!-- <th>Email</th> --> <!-- </tr> --> <!-- </tfoot> --> <tbody> <?php while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $brand = $row['brand']; $results = $js->prepare('SELECT * FROM `brands` WHERE brandid = :brand'); $results->execute(array(':brand' => $brand)); while($rows = $results->fetch(PDO::FETCH_ASSOC)) { $brname = $rows['brandname']; } $vtype = $row['vtype']; $results = $js->prepare('SELECT * FROM `vehicle_types` WHERE vtypeid = :vtype'); $results->execute(array(':vtype' => $vtype)); while($rows = $results->fetch(PDO::FETCH_ASSOC)) { $typename = $rows['typename']; } $regno = $row['regno']; $descr = $row['descr']; echo "<tr>"; echo "<td>$brname</td>"; echo "<td>$typename</td>"; echo "<td>$regno</td>"; echo "<td>$descr</td>"; ?> <td><a onclick="return add('<?php echo $id?>')" style='background-color:red; border-color:red;' class='btn btn-primary btn-circle'><i class='fa fa-times'></i></a></td> <?php echo "</tr>"; } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> </div> <!-- End of Main Content --> <?php include("footer.php"); ?> </div> <!-- End of Content Wrapper --> </div> <!-- End of Page Wrapper --> <!-- Scroll to Top Button--> <a class="scroll-to-top rounded" href="#page-top"> <i class="fas fa-angle-up"></i> </a> <!-- Logout Modal--> <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5> <button class="close" type="button" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div> <div class="modal-footer"> <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button> <a class="btn btn-primary" href="login.html">Logout</a> </div> </div> </div> </div> <!-- Bootstrap core JavaScript--> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Custom scripts for all pages--> <script src="js/sb-admin-2.min.js"></script> <!-- Page level plugins --> <script src="vendor/datatables/jquery.dataTables.min.js"></script> <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script> <!-- Page level custom scripts --> <script src="js/demo/datatables-demo.js"></script> <script type="text/javascript"> function add(a) { if(confirm('Are You Sure to Delete')) { window.location.href = "delete_vehicles.php?vehicleid="+ a ; } else { return false; } } </script> </body> </html>