File "sub_admin.php"

Full Path: /home/ccipcixf/public_html/hirepro/admin/sub_admin.php
File size: 2.48 KB
MIME-type: text/x-php
Charset: utf-8

<?php
include "menu.php";

$title = "Company A";

?>
<!DOCTYPE html>
<html lang="en" class="light-style layout-menu-fixed" dir="ltr" data-theme="theme-default" data-assets-path="../assets/" data-template="vertical-menu-template-free">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
  <title><?php echo $title ?></title>
  <meta name="description" content="" />
</head>

<body>
  <!-- Content wrapper -->
  <div class="content-wrapper">
    <!-- Content -->

    <div class="container-xxl flex-grow-1 container-p-y">
      <a href="add-sub-admin.php"><button class=" btn btn-primary  float-end mt-3 mb-2" style="background: linear-gradient(#0052D4, #2B32B2 );">ADD SUB-ADMIN</button></a>
      <h4 class="fw-bold py-3 mb-4"><span class="text-muted fw-light"><?php echo $title." " ?>SUB ADMINS</h4>

      <!-- Basic Bootstrap Table -->


      <!-- Striped Rows -->
      <div class="card">
        <div class="table-responsive text-nowrap">
          <?php
          include "config.php";

          $query = "SELECT * FROM `company_a`";
          $result = mysqli_query($conn, $query);

          if (mysqli_num_rows($result) > 0) {
          ?>

            <table class="table table-striped" style="text-align: center;">
              <thead>
                <tr>
                  <th>ID</th>
                  <th>User Name</th>
                  <th>Password</th>
                  <th>Role</th>
                  <th>Remove</th>
                </tr>
              </thead>
              <tbody class="table-border-bottom-0">
                <?php
                while ($row = mysqli_fetch_assoc($result)) {
                ?>
                  <tr>
                    <td class='id'><?php echo $row["id"] ?></td>
                    <td><?php echo $row["username"] ?></td>
                    <td><?php echo $row["password"] ?></td>
                    <td><?php echo $row["role"] ?></td>
                    <td class='delete'><a href='delete-sub-admin.php?id=<?php echo $row["id"] ?>'><i class="bx bx-trash me-1" style="color: #0350d2;"></i></a></td>
                  </tr>
                <?php
                }
                ?>
              </tbody>
            </table>

          <?php
          } else {
            echo "No records found";
          }
          ?>
        </div>
      </div>

      <!--/ Striped Rows -->
      <hr class="my-5" />
    </div>
    <!-- / Content -->
</body>

</html>