<?php header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $J = new JAMBON\Jambon(); switch ($_POST['do']) { case 'newUser': if ($user_id = $edxapp->userExist($_POST['email'])) { echo "alert('This user already exist !');\n"; die("document.location.href='../user/?id={$user_id}';\n"); } $user_id = $edxapp->userCreate($_POST['email']); if ($user_id) { die("document.location.href='../user/?id={$user_id}';\n"); } else { die("alert('error creating user');"); } exit; case 'deleteUser': //print_r($_POST); if ($J->userDelete($_POST['user_id'])) { die("document.location.href='../users/';"); } die("Error deleting user #" . $_POST['user_id']); exit; case 'changePassword': //print_r($_POST); if (strlen($_POST['password']) < 6) { die('alert("Error : Password is too short !");'); }
<?php //jambonbill.org header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $admin = new LTE\AdminLte2(); $J = new JAMBON\Jambon(); $admin->config()->menu = $J->menuleft(); //menu override// echo $admin; // $J = new JAMBON\Jambon(); //$jambon->useronly(); if (!$J->is_superuser()) { print_r($J->user()); die("Hello ?" . $J->user_id()); } $user = $J->auth_user($_GET['id']); if (isset($user['id'])) { echo "<input type=hidden id=user_id value='" . $user['id'] . "'>"; } else { die("Error : no user #" . $_GET['id']); } ?> <section class="content-header"> <h1><i class='fa fa-user'></i> User</h1> </section> <section class="content">
<?php //jambonbill.org header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $J = new JAMBON\Jambon(); $admin = new LTE\AdminLte2(); $admin->config()->menu = $J->menuleft(); //menu override// echo $admin; // if (!$J->user()) { die("Hello?"); } //print_r($J->user()); //$jambon->useronly(); ?> <section class="content-header"> <h1><i class='fa fa-users'></i> Users</h1> </section> <section class="content"> <div class='row'> <div class='col-md-12'> <?php include "box_users.php"; ?> </div>
<?php header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $admin = new LTE\AdminLte2(); $admin->title("Logout"); $admin->config()->menusearch = false; $admin->config()->menu = (object) []; echo $admin->html(); // // Write your logout code here $J = new JAMBON\Jambon(); $J->logout(); // You could also redirect to the login page ?> <section class='content'> <div class="login-box"> <h1>Bye !</h1> <pre>redirecting to the login page...</pre> </div> <script> $(function(){ $("body").toggleClass('sidebar-collapse'); setTimeout("document.location.href='index.php';",1000); }); </script>
<?php header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $J = new JAMBON\Jambon(); switch ($_POST['do']) { case 'newUser': if ($user_id = $J->userExist($_POST['email'])) { echo "alert('This user already exist !');\n"; die("document.location.href='../user/?id={$user_id}';\n"); } $user_id = $J->userCreate($_POST['email']); if ($user_id) { die("document.location.href='../user/?id={$user_id}';\n"); } else { die("alert('error creating user');"); } exit; } die("Error");
<?php //jambonbill.org header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $admin = new LTE\AdminLte2(); $J = new JAMBON\Jambon(); $user = $J->user(); $admin->config()->menu = $J->menuleft(); //menu override// echo $admin; //$jambon->useronly(); ?> <section class="content-header"> <h1><i class='fa fa-home'></i> Home</h1> </section> <section class="content"> <div class='row'> <div class='col-md-4'> <?php include "box_projects.php"; ?> </div> <div class='col-md-4'> <?php include "box_contact.php"; ?>