Пример #1
0
 public function multilingual($symbol, $lng)
 {
     $model = new default_model('multilingual');
     $row = $model->getByField('multilingual_language', $symbol);
     return $row['multilingual_' . $lng];
 }
Пример #2
0
        $action = $arr[1];
    }
    array_slice($arr, 2);
    unset($_GET['route']);
} else {
    $controller = 'index';
    $action = 'index';
}
$route_parts[0] = $controller;
$route_parts[1] = $action;
registry::set('route_parts', $route_parts);
$class_name = $controller . '_controller';
$common_controller = new common_controller('common_controller', 'index');
if (PROJECT == 'frontend') {
    $model = new default_model('frontend_routes');
    if ($route = $model->getByField('url_key', $route_parts[0])) {
        $class_name = $route['controller'];
        $action = $route['method'];
    }
}
if (!file_exists(CONTROLLER_DIR . $class_name . '.php')) {
    $class_name = 'default_controller';
}
registry::set('controller', $class_name);
$controller = new $class_name($class_name, $action);
if (!$controller->check_auth) {
    $action .= '_na';
}
if (isset($_REQUEST['ajax'])) {
    $ajax_action = $action . '_ajax';
    if (!$_REQUEST['common']) {