<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ID Activator History Table</title>
    <!-- Include any necessary CSS files -->
</head>

<body>
    <?php include 'include/header.php'; ?>
    <?php include 'include/aside.php'; ?>
    <?php include 'include/connection.php'; ?>

    <div class="page-wrapper">
        <div class="page-content">
            <!-- Breadcrumb -->
            <div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
                <div class="breadcrumb-title pe-3">Tables</div>
                <div class="ps-3">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb mb-0 p-0">
                            <li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a></li>
                            <li class="breadcrumb-item active" aria-current="page">ID Activator History Table</li>
                        </ol>
                    </nav>
                </div>
                <div class="ms-auto">
                    <div class="btn-group">
                        <button type="button" class="btn btn-primary" fdprocessedid="gu22z">Settings</button>
                        <button type="button" class="btn btn-primary split-bg-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" fdprocessedid="pknui">
                            <span class="visually-hidden">Toggle Dropdown</span>
                        </button>
                        <div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-end">
                            <a class="dropdown-item" href="javascript:;">Action</a>
                            <a class="dropdown-item" href="javascript:;">Another action</a>
                            <a class="dropdown-item" href="javascript:;">Something else here</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="javascript:;">Separated link</a>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Breadcrumb -->
            <h6 class="mb-0 text-uppercase">ID Activator History Table</h6>
            <hr>
            <div class="card">
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="example" class="table table-striped table-bordered dataTable" style="width: 100%;" role="grid" aria-describedby="example_info">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>user_id</th>
                                    <th>Full Name</th>
                                    <th>Email ID</th>
                                    <th>Phone no</th>
                                    <th>Gender</th>
                                    <th>Company Name</th>
                                    <th>Company Address</th>
                                    <th>Blocking Status</th>
                                    <th>Wallet balance</th>
                                    <th>password</th>
                                    <th>date</th>
                                   

                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                $sql = "SELECT * FROM `users`";
                                $result = $link->query($sql);
                                
                                if ($result) {
                                    if ($result->num_rows > 0) {
                                        // output data of each row
                                        while ($row = $result->fetch_assoc()) {
                                            $user_id=$row['user_id'];
                                           
                                   
                                            
                                            
                                ?>
                                                <tr role="row" class="odd">
                                                    <td class="sorting_1"><?php echo $row['id'] ?></td>

                                                    <td>
                                                        <?php echo $row['user_id'] ?>
                                                        
                                                    </td>
                                                      
                                                    <td><?php echo $row['full_name'] ?></td>
                                                    <td><?php echo $row['email_id'] ?></td>
                                       
                                                    <td>
                                                    <?php echo $row['mobile_no']
                                                    ?>
                                                    </td>
                                                    <td><?php echo $row['gender'] ?></td>
                                                    <td>
                                                        <?php echo $row['company_name'] ?>
                                                    </td>
                                                    <td><?php echo $row['company_address'] ?></td>
                                                    <td>
                                                        <?php echo $row['blocking_status'] ?>
                                                    </td>
                                                    <td>
                                                        <?php echo $row['wallet_balance'] ?>
                                                    </td>
                                                    <td>
                                                <?php echo $row['password'] ?></td>
                                                    <td><?php echo $row['date_of_joining'] ?></td>
                                                    <td>
                                                    
                                                </tr>
                                        <?php
                                        }
                                    } else {
                                        echo "<tr><td colspan='5'>0 results</td></tr>";
                                    }
                                } else {
                                    echo "<tr><td colspan='5'>Error: " . $link->error . "</td></tr>";
                                }
                                ?>
                            </tbody>

                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php include 'include/footer.php'; ?>

    <!-- Include any necessary JavaScript files -->
</body>

</html>
