Пример #1
0
        <li id="li_pass_repeat" <?php 
if ($_SESSION['step_all_2']['user_account'] != 'registration') {
    echo "style=\"display: none;\"";
}
?>
 >
            <label>
                <span id="span_password_rep"></span> <?php 
echo $webgen_user_pass_rep[$language];
?>
                <input type="password" name="user_pass_rep" />
            </label>
        </li>
        
        <li id="li_css_change" <?php 
if ($_SESSION['step_all_2']['user_account'] == 'registration' || !isset($_SESSION['step_all_2']['user_name']) || isUserFree($_SESSION['step_all_2']['user_name'])) {
    echo "style=\"display: none;\"";
}
?>
 >
            <label>
                <span id="span_css_change"></span> <?php 
echo $webgen_css_change[$language];
?>
                <input type="checkbox" id="css_change" name="css_change" <?php 
if (isset($_SESSION['step_all_2']['css_change'])) {
    echo "checked=\"checked\"";
}
?>
 onclick="show_choice()" />
            </label>
Пример #2
0
<?php

if (!isset($dati)) {
    require_once 'utility.php';
}
$datatable = true;
if (isAdminUserAutenticate() && isset($reset) && !isAdmin($dati['database'], $reset)) {
    $password = random(5);
    $name = $dati['database']->get('persone', 'nome', array('id' => $reset));
    $username = str_replace(" ", "", strtolower($name));
    if (strlen($username) > 200) {
        $username = substr($username, 0, 200);
    }
    while (!isUserFree($dati['database'], $username, $reset)) {
        $username .= rand(0, 999);
    }
    $dati['database']->update('persone', array('username' => $username, 'password' => $password, 'email' => '', 'stato' => 0, 'verificata' => 0), array('AND' => array('id' => $reset, 'stato[!]' => 0)));
    echo 'Username: '******' - Password: '******'database']->select('scuole', '*', array('ORDER' => 'id'));
    $accessi = $dati['database']->select('accessi', '*');
    $numero = pieni($accessi, 'id');
    $permessi = $dati['database']->select('permessi', '*', array('ORDER' => 'persona'));
    $studenti = $dati['database']->select('studenti', '*', array('id' => $dati['database']->max('studenti', 'id'), 'ORDER' => 'persona'));
    $classi = $dati['database']->select('classi', '*', array('ORDER' => 'id'));
    $results = $dati['database']->select('persone', '*', array('ORDER' => 'nome'));
    $pageTitle = 'Utenti registrati';
    require_once 'templates/shared/header.php';
    echo '
            <div class="jumbotron green">
                <div class="container text-center">
Пример #3
0
        require_once 'templates/shared/footer.php';
    } else {
        salva();
    }
} else {
    if (isset($_POST["opzione0"])) {
        $studente = $dati['database']->max('studenti', 'id');
        $studenti = $dati['database']->select('studenti', '*', array('id' => $studente - 1, 'ORDER' => 'classe'));
        for ($i = 0; isset($_POST["opzione" . $i]); $i++) {
            if ($_POST["opzione" . $i] == -1) {
                $password = random(5);
                $username = str_replace(" ", "", strtolower($_POST["nome" . $i]));
                if (strlen($username) > 200) {
                    $username = substr($username, 0, 200);
                }
                while (!isUserFree($dati['database'], $username, "")) {
                    $username .= rand(0, 999);
                }
                $user = $dati['database']->insert("persone", array("nome" => $_POST["nome" . $i], "username" => $username, "password" => $password, "email" => "", "stato" => 0));
                $dati['database']->insert("studenti", array("id" => $studente, "classe" => $_POST["classe" . $i], "persona" => $user));
            } else {
                $stud = ricerca($studenti, $_POST["opzione" . $i], "classe");
                if ($stud != -1) {
                    $dati['database']->insert("studenti", array("id" => $studente, "classe" => $_POST["classe" . $i], "persona" => $studenti[$stud]["persona"]));
                }
            }
        }
        salva();
    } else {
        $pageTitle = "Aggiornamento utenti";
        require_once 'templates/shared/header.php';