/** * Smarty {permissions} block plugin * * Type: block<br> * Name: permissions<br> * Purpose: Set up a permissions block * * @param $params * @param $content * @param \Smarty $smarty * @param $repeat * @return string */ function smarty_block_permissions($params, $content, &$smarty, &$repeat) { if ($content) { global $user, $css_core; if (empty($_GET['recymod'])) { $uilevel = 99; if (expSession::exists("uilevel")) { $uilevel = expSession::get("uilevel"); } if (empty($css_core['admin-global'])) { expCSS::pushToHead(array("corecss" => "admin-global")); } if (isset($uilevel) && $uilevel == UILEVEL_PREVIEW || !$user->isLoggedIn()) { $cntnt = ""; } else { $cntnt = isset($uilevel) && $uilevel == UILEVEL_PREVIEW || !$user->isLoggedIn() ? "" : $content; } return $cntnt; } } }