-
Notifications
You must be signed in to change notification settings - Fork 0
/
users.php
332 lines (132 loc) · 5.56 KB
/
users.php
1
<?phprequire "Utilities/REQUIRE_SETTINGS.php";require "Utilities/URL_MANAGER.php";require "Utilities/User/User.php";require "Utilities/User/UserExt.php";?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title><?php echo "Users" ?></title> <!-- BOOTSTRAP STYLES--> <link href="assets/css/bootstrap.css" rel="stylesheet" /> <!-- FONTAWESOME STYLES--> <link href="assets/css/font-awesome.css" rel="stylesheet" /> <!-- MORRIS CHART STYLES--> <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" /> <!-- CUSTOM STYLES--> <link href="assets/css/custom.css" rel="stylesheet" /> <!-- GOOGLE FONTS--></head><body><div id="wrapper" "><nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0;background: #3F51B5;"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" style="background: #3F51B5;color: #fff;font-size: 22px" href=""><?php echo SYSTEM_NAME ?></a> <h1 style="float: right;color: #fff">Users</h1> </div> <div style="color: white;padding: 15px 50px 5px 50px;float: right;font-size: 16px;"> <a href="Utilities/user/register_user.php" class="btn btn-danger square-btn-adjust">New User</a></div></nav><!-- NAV SIDE --><?phprequire('nav_side.php');?><!-- END NABV SIDE --><div id="page-wrapper" > <div id="page-inner"> <!-- /. ROW --> <div class="row" style="padding: 2%;"> <?php $ids = getAllUsersIds(); $number_of_ids = 0; foreach ($ids as $id) $number_of_ids++; echo "<div class=\"panel panel-default\"> <div class=\"panel-heading\"> $number_of_ids users </div> <div class=\"panel-body\"> <div class=\"table-responsive\"> <table class=\"table table-striped table-bordered table-hover\" id=\"dataTables-example\"> <thead> <tr> <th>ID</th> <th>Display Name</th> <th>Username (login name)</th> <th>Phone Number</th> <th>Date Created</th> <th>Options</th> </tr> </thead> <tbody> "; foreach ($ids as $id) { $user = new User(); if(!$user->create_from_id($id)) continue; echo " <tr class=\"odd gradeX\"> <td>$user->ID</td> <td>$user->display_name</td> <td>$user->user_name</td> <td>$user->phone_number</td> <td>$user->date_created</td> <td> <div class=\"btn-group\"> <button data-toggle=\"dropdown\" class=\"btn btn-success dropdown-toggle\">Options <span class=\"caret\"></span></button> <ul class=\"dropdown-menu\"> <li><a href=''>View</a></li> <li class=\"divider\"></li> <li><a href='#'>Edit</a></li> <li><a href='#' onclick='delete_item($user->ID)'>Delete</a></li> </ul> </div> </td> </tr> "; } echo " </tbody> </table> </div> </div> </div> <!--End Advanced Tables -->"; ?> </div> </div><div id="temp"></div></div><script src="assets/js/jquery-1.10.2.js"></script><!-- BOOTSTRAP SCRIPTS --><script src="assets/js/bootstrap.min.js"></script><!-- METISMENU SCRIPTS --><script src="assets/js/jquery.metisMenu.js"></script><!-- DATA TABLE SCRIPTS --><script src="assets/js/dataTables/jquery.dataTables.js"></script><script src="assets/js/dataTables/dataTables.bootstrap.js"></script><script> $(document).ready(function () { $('#dataTables-example').dataTable(); });</script><!-- CUSTOM SCRIPTS --><script src="assets/js/custom.js"></script><script type="text/javascript"> function delete_item(id) { var table = "users"; $.post('Utilities/FileManager/delete.php',{ t: table, i:id },function (output) { $('#temp').html(output); }); }</script></body></html>