示例#1
0
 public static function validateAccess($controller = DEFAULT_CONTROLLER, $action = null)
 {
     $controller = Language::controller($controller, Language::ENGLISH, true);
     if (!empty(self::$_list[Session::getUserAccess()][$controller])) {
         $action = Language::action($action, Language::ENGLISH, true);
         if (empty($action) || in_array($action, self::$_list[Session::getUserAccess()][$controller])) {
             return true;
         }
     }
     return false;
 }
示例#2
0
<?php

$logged_in = Session::isLoggedIn();
$user = Session::getUser();
$access = Session::getUserAccess();
$language = Session::get(Cookie::LANGUAGE);
$controller = Language::controller(Session::get(Cookie::CONTROLLER), $language, true);
$action = Language::action(Session::get(Cookie::ACTION), $language, true);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title><?php 
echo Language::gettext('website-header') . ' - ' . Language::gettext('website-sub-header') . ' :: ' . ucwords(Language::controller($controller)) . ' - ' . ucwords(str_replace('-', ' ', Language::action($action)));
?>
</title>
	<meta name="keywords" content="<?php 
echo Language::gettext('meta-keywords', array($controller, $action));
?>
" />
	<meta name="description" content="<?php 
echo Language::gettext('meta-description', array($controller, $action));
?>
" />
	<?php 
foreach ($this->head_css as $css) {
    if (!empty($css['browser'])) {
        echo '<link rel="stylesheet" type="text/css" href="' . CSS . $this->browser . '/' . $css['file'] . '.css"/>';
    } else {