예제 #1
0
function SaveUserData()
{
    //------------------------- Save User Data -------------------------------
    global $usrid, $usr;
    SaveUser($usrid, $usr);
}
예제 #2
0
<?php

//prevent direct activation
if (!isset($module)) {
    die("403: Not authorized to call this page directly");
}
$GLOBALS["addjs_modules"] .= ",notes-engine.js";
if (!isset($_GET["arg"])) {
    DrawUsersList();
} else {
    switch ($_GET["arg"]) {
        case "new":
            DrawEditUserPage("reserved_new");
            break;
        case "save":
            SaveUser();
            break;
        default:
            $arg = $connection->real_escape_string($_GET["arg"]);
            DrawEditUserPage($arg);
            break;
    }
}
function DrawUsersList()
{
    global $connection, $config;
    echo "<div class='page-header'><h1>Gestione utenti dispense</h1></div>\n";
    echo "<div class='btn-group'>\n        <button type='button' class='btn btn-success' id='addnewuser'><span class='fa fa-plus'></span> Nuovo</button>\n        <button type='button' class='btn btn-default' id='edituser'><span class='fa fa-edit'></span> Modifica</button>\n        <button type='button' class='btn btn-default' id='enableuser'><span class='fa fa-check'></span> Abilita</button>\n        <button type='button' class='btn btn-default' id='disableuser'><span class='fa fa-ban'></span> Disabilita</button>\n        <button type='button' class='btn btn-danger' id='deletemultiuser'><span class='fa fa-remove'></span> Elimina</button>\n    </div>\n    <br><br>\n    <table class='table table-hover'>\n        <thead><tr>\n            <th>Utente</th>\n            <th>Nome completo</th>\n            <th>Stato</th>\n            <th>Email</th>\n            <th>Spazio usato</th>\n            <th>Spazio massimo</th>\n        </tr></thead>";
    $request = "SELECT * FROM teachers_users ORDER BY user ASC";
    $result = $connection->query($request);
    while ($line = $result->fetch_assoc()) {
예제 #3
0
<?php

ob_start();
//these are for the PHP Helper files
include 'headers/databaseConn.php';
include 'helpers.php';
//this is the file that contains all the functions used in AJAX.
if (isset($_POST["no"]) && $_POST["no"] == "1") {
    //this is to save the details of the user coming first time to the MR Connect Portal
    SaveUser($_POST["basic"], $_POST["education"], $_POST["experience"], $_POST["contact"], $_POST["picture"]);
} else {
    if (isset($_GET["no"]) && $_GET["no"] == "2") {
        //this is the function to load the data from the database and show it to the Front end.
        LoadData($_GET["email"], $_GET["id"]);
    } else {
        if (isset($_GET["no"]) && $_GET["no"] == "3") {
            //for saving/updating the interests thing.
            SaveUpdateInterests($_GET["id"], $_GET["email"], $_GET["i1"], $_GET["i2"], $_GET["i3"], $_GET["i4"], $_GET["i5"], $_GET["i6"], $_GET["i7"]);
        } else {
            if (isset($_GET["no"]) && $_GET["no"] == "4") {
                //for getting all the users from the database
                GetAllUsers($_GET["email"]);
            } else {
                if (isset($_GET["no"]) && $_GET["no"] == "5") {
                    //for getting all the users from the database
                    UserExists($_GET["email"], $_GET["id"]);
                } else {
                    if (isset($_GET["no"]) && $_GET["no"] == "6") {
                        //for getting all the users from the database
                        SetCookieID($_GET["email"]);
                    } else {