Beispiel #1
0
if ($_SESSION['s_message']) {
    $message .= urldecode($_SESSION['s_message']);
    $message_type = $_SESSION['s_message_type'];
    unset($_SESSION['s_message']);
    unset($_SESSION['s_message_type']);
}
$smarty->assign("T_MESSAGE", $message);
$smarty->assign("T_MESSAGE_TYPE", $message_type);
$smarty->assign("T_SEARCH_MESSAGE", $search_message);
$smarty->assign("T_CONFIGURATION", $configuration);
//Assign global configuration values to smarty
$smarty->assign("T_CURRENT_USER", $currentUser);
$smarty->assign("T_CURRENT_LESSON", isset($currentLesson) ? $currentLesson : false);
if (isset($currentLesson)) {
    $directions = new EfrontDirectionsTree();
    $categoryPath = $directions->getPathToNode($currentLesson->lesson["directions_ID"]);
    //$categoryPath = $paths[$currentLesson->lesson["directions_ID"]];
    //pr($categoryPath);exit;
    //$categoryPath = str_replace("&rarr", "&raquo", $categoryPath);
    $smarty->assign("T_CURRENT_CATEGORY_PATH", $categoryPath);
    if ($currentLesson->lesson['course_only'] == 1 && $_SESSION['s_courses_ID']) {
        $currentCourse = new EfrontCourse($_SESSION['s_courses_ID']);
        $smarty->assign("T_CURRENT_COURSE_NAME", htmlspecialchars($currentCourse->course['name'], ENT_QUOTES));
        $smarty->assign("T_CURRENT_COURSE_ID", $currentCourse->course['id']);
    }
}
if (G_VERSIONTYPE != 'community') {
    #cpp#ifndef COMMUNITY
    if ($GLOBALS['configuration']['facebook_api_key'] && $GLOBALS['configuration']['facebook_secret']) {
        $smarty->assign("T_FACEBOOK_USER", EfrontFacebook::userConnected());
    }