G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); $empids = $_SESSION['empids']; include("innerpageheader.php"); include("config.php"); $result = $js->query('SELECT * FROM `heads` ORDER BY `name`'); $result->execute(); ?> <section> <div class="content listing-content"> <div class="in-content-wrapper"> <div class="row no-gutters"> </div><!-- end row --> <div class="box"> <div class="row no-gutters"> <div class="col-auto me-auto text-start pe-0"> <div class="add-new"> <a href="add_heads.php">Add New<i class="fas fa-plus"></i></a> </div><!-- End add-new--> </div><!-- End column--> <div class="col text-end"> <div class="tools-btns"> <a href="#"><i class="fas fa-print" data-bs-toggle="tooltip" data-html="true" title="Print"></i></a> <a href="#"><i class="fas fa-file-pdf" data-bs-toggle="tooltip" data-html="true" title="Pdf"></i></a> <a href="#"><i class="fas fa-file-excel" data-bs-toggle="tooltip" data-html="true" title="Excel"></i></a> </div><!-- End tool-btns--> </div><!-- End text-end--> </div><!-- end row --> <div class="row no-gutters"> <div class="col-12 table-responsive"> <table id="example" class="table table-hover responsive listing"> <thead> <tr> <th>Head Name</th> <th>Head Belongs to</th> <th>Manage Subheads</th> <th>Current Subheads</th> <?php if($empids == 'admin') { ?> <th>Edit Head</th> <?php } ?> </tr> </thead> <tbody> <?php while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $headid = $row['headid']; $cname = $row['name']; $htype = $row['headtype']; $resultc = $js->prepare('SELECT * FROM `subheads` WHERE head = :headid '); $resultc->execute(array(':headid' => $headid)); echo "<tr>"; echo "<td>$cname</td>"; echo "<td>$htype</td>"; echo "<td align='center'><a href='add_subheads.php?headid=$headid' class='btn btn-warning btn-circle'><i class='fas fa-plus'></i></td>"; echo "<td>"; $i=1; $cc = $resultc->rowCount(); while($rowc = $resultc->fetch(PDO::FETCH_ASSOC)) { $subid = $rowc['id']; $hid = $rowc['headid']; $subclass = strtoupper($rowc['subname']); if($headid == 'MI9') { if($i == $cc) echo " $subclass "; else echo " $subclass, "; } else { if($i == $cc) echo "<a href='edit_ledgersubheads.php?subid=$subid' >$subclass</a> "; else echo " <a href='edit_ledgersubheads.php?subid=$subid' >$subclass</a>, "; } $i++; } echo "</td>"; if($empids == 'admin' && $id != '9') { /*echo "<td><a href='edit_ledgerheads.php?id=$id' ><i class='fas fa-edit' style='color:#4D4D4D'></i></td>"; */ echo "<td><a href='#' ><i class='fas fa-edit' style='color:#4D4D4D'></i></td>"; } else { echo "<td></td>"; } echo "</tr>"; $htype = ''; } ?> </tbody> </table> </div> </div> </div><!-- end in-content-wrapper --> </div><!-- end listing-content --> </section> <!-- ===========End Innerpage-wrapper============= --> </div><!-- end wrapper --> <!-- Optional JavaScript, Not optional it's need too --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap-5.3.2.min.js"></script> <script src="vendors/datatables/datatables.min.js"></script> <script src="js/customscriptfile.js"></script> <!-- Page Scripts Ends --> <script> $(document).ready(function () { $('#example').DataTable(); }); </script> </body> </html> <?php include('footer.php'); ?>