Пример #1
0
/**
 * GET /domain/add
 */
function addDomainForm()
{
    $domains = moulinette('domain list');
    set('domains', $domains);
    set('mainDomain', $_SESSION['mainDomain']);
    set('title', T_('List of domains'));
    return render("listDomains.html.php");
}
Пример #2
0
/**
 * POST /user/add
 */
function addUser()
{
    $_SESSION['first-install'] = false;
    $username = htmlspecialchars($_POST["username"]);
    $password = $_POST["password"];
    $firstname = htmlspecialchars($_POST["firstname"]);
    $lastname = htmlspecialchars($_POST["lastname"]);
    $mail = htmlspecialchars($_POST["mail"]);
    $admin = isset($_POST["isadmin"]);
    if ($_POST["password"] === $_POST["confirm"]) {
        moulinette('user create --username ' . $username . ' --mail ' . $mail . ' --firstname ' . $firstname . ' --lastname ' . $lastname . ' --password ' . $password);
    } else {
        flash('error', T_('Passwords does not match'));
    }
    redirect_to('/user/list');
}