Beispiel #1
0
    if ($file) {
        if (file_exists('sessions/' . $file)) {
            return filemtime('sessions/' . $file);
            // Return file creation time
        }
        return false;
    }
    return false;
}
$getHash = stripslashes($_GET['access']);
$getIP = explode("_", $getHash);
$userIP = $_SERVER['REMOTE_ADDR'];
// IF checkHash returns true then show elfinder
if (checkHash('sessions/', $getHash) and $userIP == $getIP[0]) {
    if (hashFindFile($getHash)) {
        $expires = time() - hashFindFile($getHash);
        if ($expires > 3600) {
            echo 'Session has expired!';
            exit;
        }
    } else {
        echo 'Session not exists!';
        exit;
    }
    echo '<!-- elFinder initialization -->
				<script type="text/javascript" charset="utf-8">
					$().ready(function() {
						var elf = $(\'#elfinder\').elfinder({
							url : \'php/connector.php?access=' . $getHash . '\',
							lang: \'es\',
							resizable: false,
Beispiel #2
0
            return filemtime('sessions/' . $file);
            // Return file creation time
        }
        return false;
    }
    return false;
}
$access = stripslashes($_GET['access']);
$login = stripslashes($_GET['login']);
$action = stripslashes($_GET['action']);
if ($login) {
    require_once 'php/hash.php';
    exit;
}
if ($access) {
    if (hashFindFile($access)) {
        $expires = time() - hashFindFile($access);
        if ($expires > 3600) {
            echo 'Session has expired!';
        } else {
            header("Location: elfinder.php?access={$access}");
        }
    } else {
        echo 'Session not exists!';
    }
    exit;
}
if ($action == 'ping') {
    echo 'OK';
    exit;
}