Beispiel #1
0
        $GLOBALS["PROGRESS"] = true;
    }
    if ($GLOBALS["VERBOSE"]) {
        ini_set_verbosed();
    }
}
if ($argv[1] == "--build") {
    build();
    die;
}
if ($argv[1] == "--clients") {
    clients();
    die;
}
if ($argv[1] == "--stat") {
    statfile($argv[2]);
    die;
}
if ($argv[1] == "--stop") {
    $GLOBALS["OUTPUT"] = true;
    stop();
    die;
}
function statfile($path)
{
    echo "{$path}\n---------------------------------\n";
    $array = stat($path);
    print_r($array);
    echo filetype($path) . "\n";
    if (!is_file($path)) {
        echo "is_file:false\n";
Beispiel #2
0
if (!isset($_SESSION['user'])) {
    $_SESSION['user'] = 0;
}
$user = $_SESSION['user'];
$allowed_types = $allowed_types_users;
if ($user || $guest_access_allow) {
    header("Content-Type: text/xml");
    switch ($action) {
        case "login":
            login();
            break;
        case "logout":
            logout();
            break;
        case "file":
            statfile();
            break;
        case "reg":
            reg();
            break;
        case "list":
        default:
            listdir();
            break;
    }
} else {
    login();
}
function listdir()
{
    global $users, $user, $skip_files, $allowed_types;