Example #1
0
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}/";
    }
}