Exemplo n.º 1
0
<?php

require_once 'app/init.php';
if (!isset($_SESSION['user'])) {
    header('Location: login.php');
}
if (isset($_POST['createUser'])) {
    $User = new User_Admin();
    $User->create();
}
$Token = new Token();
$token = $Token->generate();
?>

<!doctype html>

<html>
    <head>
    
    </head>
    
    <body>
        <?php 
if (isset($_SESSION['alert'])) {
    echo $_SESSION['alert'];
    unset($_SESSION['alert']);
}
include_once 'includes/menu.inc.php';
?>
        
        <a href="#" onclick="passView();">Show/Hide Password</a>
Exemplo n.º 2
0
<?php

require_once 'app/init.php';
if (!isset($_SESSION['user'])) {
    header('Location: login.php');
}
if (isset($_POST['deleteUser'])) {
    $User = new User_Admin();
    if ($_POST['confirm'] == 1) {
        $User->delete();
    } else {
        $_SESSION['alert'] = 'Please confirm that you want to delete before clicking the delete button.';
    }
}
if (isset($_POST['updateRank'])) {
    $User = new User_Admin();
    $User->changeRank();
}
?>

<!doctype html>

<html>
    <head>
    
    </head>
    
    <body>
        <?php 
if (isset($_SESSION['alert'])) {
    echo $_SESSION['alert'];