<div id="cart"> <p><a title="logout" name="op" href="../index.php?op=logout">Logout</a></p> </div> <br> </div> </div> <!-- END Header --> <!--Main--> <div class="wrapper1"> <br> <h1>These users are registered in our shop:</h1> <div> <?php include_once '../controller/UserController.php'; $user_controller = new UserController(); $user_controller->listUsers(); ?> <br> </div> <form action="../index.php" method="post"> <input type="submit" class="submit" name="op" value="Back"> </form> </div> </div> <div id="footer-push"></div> <!-- END Wrapper --> <!-- Footer --> <p class="optimize"> Optimized for Firefox! </p> <div id="footer">
switch ($_POST['sec']) { case "create": $controller->createUser($_POST); break; case "update": $controller->updateUser($_POST); break; case "updatemyprofile": $controller->updateMyProfile($_POST); break; } } else { switch ($_GET['sec']) { case "Activate": $controller->__changeStatus($_GET['userId'], 1); $controller->listUsers('ajax'); break; case "Inactivate": $controller->__changeStatus($_GET['userId'], 0); $controller->listUsers('ajax'); break; case "delete": $controller->__deleteUser($_GET['userId']); $controller->listUsers('ajax'); break; case "edit": $controller->editUser($_GET['userId']); break; case "new": $controller->newUser(); break;
case "create": $controller->createUser($_POST); break; case "update": $controller->updateUser($_POST); break; case "updatemyprofile": $controller->updateMyProfile($_POST); break; case "activateall": if (!empty($_POST['ids'])) { foreach ($_POST['ids'] as $id) { $controller->__changeStatus($id, 1); } } $controller->listUsers($_POST); break; case "inactivateall": if (!empty($_POST['ids'])) { foreach ($_POST['ids'] as $id) { $controller->__changeStatus($id, 0); } } $controller->listUsers($_POST); break; case "deleteall": if (!empty($_POST['ids'])) { foreach ($_POST['ids'] as $id) { $controller->__deleteUser($id); } }
<link rel="stylesheet" type="text/css" href="../scripts/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="../scripts/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="../scripts/jscolor/jscolor.js"></script> <title>420PX</title> <?php echo ' <script> $(function() { var availableTags = [' . $user_controller->listUsers() . ' ]; $( "#user-list" ).autocomplete({ source: availableTags }); }); </script>'; ?> </head> <body> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <a class="navbar-brand" href="layout.php">Accueil</a> </div>