コード例 #1
0
ファイル: backend.php プロジェクト: seanfbrown/jinzora
function handleUserInit()
{
    global $jzSERVICES, $jzUSER, $jz_language, $node, $skin, $include_path, $css, $image_dir, $my_frontend, $fe, $jz_path, $web_path, $USER_SETTINGS_OVERRIDE;
    writeLogData("messages", "Index: Testing the language file for security and including");
    $USER_SETTINGS_OVERRIDE = array();
    // for use by user agents
    checkUserAgent();
    handleSetLanguage();
    handleSetFrontend();
    writeLogData("messages", "Index: Testing the theme file for security and including");
    handleSetTheme();
    handleJukeboxVars();
    if (!($node === false)) {
        if (!($dir = $jzUSER->getSetting('home_dir')) === false && $jzUSER->getSetting('home_read') === true) {
            if (strpos(strtolower($jz_path), strtolower($dir)) === false) {
                $jz_path = "";
            }
        }
        $node = new jzMediaNode($jz_path);
        if (isset($_GET['depth'])) {
            $node->setNaturalDepth($_GET['depth']);
        } else {
            doNaturalDepth($node);
        }
    }
    // Let's setup our stylesheet and icons
    // Should this be moved to display.php:preHeader()?
    if (stristr($skin, "/")) {
        $css = $include_path . "{$skin}/default.php";
        $image_dir = $web_path . "{$skin}/";
    } else {
        $css = $include_path . "style/{$skin}/default.php";
        $image_dir = $web_path . "style/{$skin}/";
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: seanfbrown/jinzora
    // Are they ok?
    if ($jzUSER->login($_GET['user'], $_GET['pass'], $store_cookie, $prehashed) === false) {
        //echo "login failed";
        //exit();
    }
} else {
    $prehashed = true;
}
$jzSERVICES->loadUserServices();
if (!isset($_POST['action']) || $_POST['action'] != "login") {
    handleUserInit();
    writeLogData("messages", "Index: Including the icons");
    include_once $include_path . "frontend/icons.lib.php";
    writeLogData("messages", "Index: Creating a new frontend object");
} else {
    handleSetFrontend(false);
}
@(include_once $include_path . "lang/{$jz_language}-simple.php");
@(include_once $include_path . "lang/{$jz_language}-extended.php");
writeLogData("messages", "Index: Testing the frontend file for security and including");
@(include_once $include_path . 'frontend/frontends/' . $my_frontend . '/settings.php');
// Now let's see what the user was doing?
if (isset($_GET['action'])) {
    if ($_GET['action'] == "logout") {
        writeLogData("messages", "Index: Logging the user out");
        $jzUSER->logout();
    }
}
if ($jzUSER->getName() == "") {
    $jzUSER->logout();
}