PHP Classes

File: uploady/admin/users/view.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/admin/users/view.php   Download  
File: uploady/admin/users/view.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change: Fix
Date: 2 months ago
Size: 6,590 bytes


Class file image Download
include_once '../session.php';
<!DOCTYPE html>
<html lang="en">

    <?php include_once '../components/meta.php'; ?>
<title>View users - <?= $st['website_name'] ?></title>
    <?php include_once '../components/css.php'; ?>
<?php $utils->style(
); ?>

<body class="sb-nav-fixed">
    <?php include_once '../components/navbar.php' ?>
<div id="layoutSidenav">
        <?php include_once '../components/sidebar.php'; ?>
<div id="layoutSidenav_content">
                <div class="container-fluid">
                    <h1 class="mt-4">Dashboard</h1>
                    <ol class="breadcrumb mb-4">
                        <li class="breadcrumb-item active">Dashboard</li>
                    <?php if (isset($msg)) : ?>

                        <?php $utils->loadAlerts($msg, "user"); ?>

                    <?php endif; ?>

                    <div class="card mb-4">
                        <div class="card-header">
                            <i class="fas fa-users mr-1"></i>
                            Manager Users
                        <form method="POST" action="<?= $utils->siteUrl('/admin/users/actions/delete.php') ?>">
                            <?= $utils->input('csrf', $_SESSION['csrf']); ?>
<div class="card-body">
                                <div class="table-responsive border pl-2 pb-2 pt-2 pr-2 pb-2 rounded">
                                    <table class="table nowrap table-bordered" width="100%" id="dataTable" cellspacing="0">
                                                    <div class="custom-control custom-checkbox">
                                                        <input type="checkbox" class="custom-control-input" id="select-all" name="select-all">
                                                        <label class="custom-control-label" for="select-all"></label>
                                                <th>Email Address</th>
                                            <?php foreach ($users as $u) : ?>
                                                        <div class="custom-control custom-checkbox">
                                                            <input type="checkbox" class="custom-control-input" id="user_<?= $u->id ?>" name="userid[]" value="<?= $u->id; ?>" <?= ($u->id == $data->id) ? 'disabled' : '' ?> />
                                                            <label class="custom-control-label" for="user_<?= $u->id; ?>" </label>
                                                    <td><?= $u->username; ?>
                                                    <td><?= $u->email; ?></td>
                                                    <td><?= $role->get($u->role)->title ?></td>
                                                    <td><?= $u->is_active ? 'yes' : 'no'; ?></td>
                                                        <a type="button" class="btn btn-primary" href="<?= $utils->siteUrl('/admin/users/edit.php?username=' . $u->username); ?>">
                                                            Edit User
                                            <?php endforeach; ?>
                            <div class="card-footer">
                                <button type="submit" class="btn btn-primary">
                                    Delete Users
                                <a type="button" class="btn btn-primary" href="<?= $utils->siteUrl('/admin/users/new.php'); ?>">
                                    Create User
            <?php include_once '../components/footer.php'; ?>
    <?php include_once '../components/js.php'; ?>
<?php $utils->script(
); ?>
<?php $utils->script(
); ?>
        // Call the dataTables jQuery plugin
        $(document).ready(function() {
                ordering: true,

                select: {
                    style: "multi",
                order: [
                    [1, null]
                columnDefs: [{
                    targets: 0,
                    orderable: false,
                }, ],
        $("#select-all").click(function(event) {
            if (this.checked) {
                $(":checkbox").each(function() {
                    if ($(this).prop('disabled') == false) {
                        this.checked = true;
            } else {
                $(":checkbox").each(function() {
                    this.checked = false;