// Date in the past header("cache-control: no-transform"); //To prevent 3G carriers from compressing the site, which will break all grids //Delete installation directory after install/upgrade if (is_dir("install") && isset($_GET['delete_install'])) { try { $dir = new EfrontDirectory('install'); $dir->delete(); } catch (Exception $e) { echo "The installation directory could not be deleted. Please delete it manually or your system security is at risk."; } } if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY try { if (isset($_GET['logout']) && $GLOBALS['configuration']['facebook_api_key'] && $GLOBALS['configuration']['facebook_secret'] && EfrontFacebook::userConnected()) { //probably never goes here with new way $path = "../libraries/"; //require_once $path . "external/facebook-platform/php/facebook.php"; require_once $path . "external/facebook/facebook.php"; $facebook = new Facebook(array('appId' => $GLOBALS['configuration']['facebook_api_key'], 'secret' => $GLOBALS['configuration']['facebook_secret'], 'cookie' => true)); $smarty->assign("T_OPEN_FACEBOOK_SESSION", 1); $smarty->assign("T_FACEBOOK_API_KEY", $GLOBALS['configuration']['facebook_api_key']); $smarty->assign("T_FACEBOOK_LOGOUT", 1); } } catch (Exception $e) { handleNormalFlowExceptions($e); } } #cpp#endif if (!$smarty->is_cached('index.tpl', $cacheId) || !$GLOBALS['configuration']['smarty_caching']) {
$smarty->assign("T_CURRENT_USER", $currentUser); } catch (Exception $e) { eF_redirect("index.php?ctg=expired"); exit; } if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY if (isset($_GET['fb_authenticated']) && $_GET['fb_authenticated'] == 1) { if ($GLOBALS['configuration']['facebook_api_key'] && $GLOBALS['configuration']['facebook_secret']) { if (EfrontFacebook::userConnected()) { new EfrontFacebook(); } } } if (isset($_SESSION['facebook_user'])) { EfrontFacebook::setEfUser($_SESSION['facebook_user'], $_SESSION['s_login'], $_SESSION['facebook_details']['name']); } } #cpp#endif if ($GLOBALS['currentTheme']->options['sidebar_interface']) { header("location:professor.php" . ($_SERVER['QUERY_STRING'] ? "?" . $_SERVER['QUERY_STRING'] : '')); //$smarty -> assign("T_SIDEBAR_URL", ""); // set an empty source for horizontal sidebars //$smarty -> assign("T_SIDEFRAME_WIDTH", 0); } $smarty->assign("T_SIDEBAR_MODE", $GLOBALS['currentTheme']->options['sidebar_interface']); if ($GLOBALS['currentTheme']->options['sidebar_width']) { $smarty->assign("T_SIDEFRAME_WIDTH", $GLOBALS['currentTheme']->options['sidebar_width']); } else { $smarty->assign("T_SIDEFRAME_WIDTH", 175); } if (isset($_SESSION['previousSideUrl'])) {
} /* if ($GLOBALS['configuration']['social_modules_activated'] & FB_FUNC_CONNECT) { $smarty -> assign("T_FACEBOOK_API_KEY", $GLOBALS['configuration']['facebook_api_key']); $smarty -> assign("T_OPEN_FACEBOOK_SESSION", "1"); if (!isset($_SESSION['facebook_user'])) { $smarty -> assign("T_PROMPT_FB_CONNECTION", 1); } } */ if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY if ($GLOBALS['configuration']['facebook_api_key'] && $GLOBALS['configuration']['facebook_secret']) { $smarty->assign("T_FACEBOOK_USER", EfrontFacebook::userConnected()); } } #cpp#endif if (unserialize($currentUser->user['additional_accounts'])) { $accounts = unserialize($currentUser->user['additional_accounts']); $queryString = "'" . implode("','", array_values($accounts)) . "'"; $result = eF_getTableData("users", "login, user_type", "login in (" . $queryString . ")"); $smarty->assign("T_BAR_ADDITIONAL_ACCOUNTS", $result); } $smarty->load_filter('output', 'eF_template_formatTimestamp'); $smarty->load_filter('output', 'eF_template_formatLogins'); $loadScripts[] = 'EfrontScripts'; $loadScripts[] = 'print-script'; $loadScripts[] = 'scriptaculous/prototype'; $loadScripts[] = 'scriptaculous/effects';
unserialize($editedUser->user['additional_accounts']) ? $additionalAccounts = unserialize($editedUser->user['additional_accounts']) : ($additionalAccounts = array()); $smarty->assign("T_ADDITIONAL_ACCOUNTS", $additionalAccounts); if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY if ($GLOBALS['configuration']['social_modules_activated'] & FB_FUNC_CONNECT) { $smarty->assign("T_FB_ACCOUNT", EfrontFacebook::getEfToFbUser($currentUser->user['login'])); } } #cpp#endif if (isset($_GET['ajax']) && $_GET['ajax'] == 'additional_accounts') { try { if (isset($_GET['fb_login'])) { if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY EfrontFacebook::deleteEfUser($_GET['fb_login']); } #cpp#endif } else { if (isset($_GET['delete'])) { unset($additionalAccounts[array_search($_GET['login'], $additionalAccounts)]); } else { if ($_GET['login'] == $_SESSION['s_login']) { throw new Exception(_CANNOTMAPSAMEACCOUNT); } if (in_array($_GET['login'], $additionalAccounts)) { throw new Exception(_ADDITIONALACCOUNTALREADYEXISTS); } //handle ldap users try { $newAccount = EfrontUserFactory::factory($_GET['login'], EfrontUser::createPassword($_GET['pwd']));