コード例 #1
0
ファイル: ajax.php プロジェクト: JannoEsko/ServerPanel-2
function setPanelName()
{
    $panelname = $_POST['panelName'];
    writeToPanelPreferences("Panelname", 1, $panelname);
    panelNameToSession();
}
コード例 #2
0
ファイル: index.php プロジェクト: JannoEsko/ServerPanel-2
session_start();
if (file_exists("install2") && file_exists("config.php")) {
    die("It seems the install folder deletion failed. You have to delete it manually before you can proceed.");
} else {
    if (!file_exists("config.php")) {
        die(header("Location: install/"));
    }
}
require 'functions.php';
cleaningLady();
if (isset($_SESSION['loggedin'])) {
    getUserStatus($_SESSION['uid']);
}
$error = false;
$_SESSION['panel'] = "";
panelNameToSession();
if (isset($_POST['username']) && isset($_POST['password'])) {
    $id = authenticate($_POST['username'], $_POST['password']);
    if ($id != null && sizeof($id) != 0) {
        $_SESSION['loggedin'] = true;
        $status = intval($id[0]);
        if ($status == 2) {
            $_SESSION['admin'] = true;
        } else {
            if ($status == 3) {
                $_SESSION['superadmin'] = true;
            }
        }
        $_SESSION['name'] = $id[1];
        $_SESSION['uid'] = $id[2];
        setPreferencesToSession();