Esempio n. 1
0
 public static function renderTabs(array $tabs_arr)
 {
     echo '<ul class="nav nav-tabs">';
     foreach ($tabs_arr as $tab_arr) {
         $classes = '';
         // TODO: код взят из Router::match3() - использовать общую реализацию?
         $url_regexp = '@^' . $tab_arr['MATCH_URL'] . '$@';
         $matches_arr = array();
         $current_url = \OLOG\Router::uri_no_getform();
         if (preg_match($url_regexp, $current_url, $matches_arr)) {
             $classes .= ' active ';
         }
         echo '<li role="presentation" class="' . Sanitize::sanitizeAttrValue($classes) . '"><a href="' . Sanitize::sanitizeUrl($tab_arr['LINK_URL']) . '">' . Sanitize::sanitizeTagContent($tab_arr['TITLE']) . '</a></li>';
     }
     echo '</ul>';
 }
Esempio n. 2
0
 public static function registerRoutes()
 {
     Router::processAction(AuthAdminAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\UsersListAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\UserEditAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\PermissionsListAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\OperatorsListAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\UsersListAjaxAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\OperatorEditAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\GroupsListAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\GroupEditAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\GroupsListAjaxAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\PermissionAddToUserAction::class, 0);
     Router::processAction(\OLOG\Auth\Admin\PermissionAddToOperatorAction::class, 0);
     Router::matchAction(\OLOG\Auth\Pages\LoginAction::class, 0);
     Router::matchAction(\OLOG\Auth\Pages\LogoutAction::class, 0);
 }
Esempio n. 3
0
<?php

require_once '../vendor/autoload.php';
use OLOG\Router;
//\OLOG\ConfWrapper::assignConfig(\CRUDDemo\CrudDemoConfig::get());
\CRUDDemo\CrudDemoConfig::init();
Router::matchAction(\CRUDDemo\DemoMainPageAction::class, 0);
Router::matchAction(\CRUDDemo\DemoNodesListAction::class, 0);
Router::matchAction(\CRUDDemo\DemoNodeEditAction::class, 0);
Router::matchAction(\CRUDDemo\DemoNodeTermsAction::class, 0);
Router::matchAction(\CRUDDemo\DemoTermsListAction::class, 0);
Router::matchAction(\CRUDDemo\DemoTermsTreeAction::class, 0);
Router::matchAction(\CRUDDemo\DemoTermEditAction::class, 0);
Router::matchAction(\CRUDDemo\DemoAjaxTermsListAction::class, 0);
Esempio n. 4
0
<?php

date_default_timezone_set('Europe/Moscow');
require_once '../vendor/autoload.php';
use OLOG\Router;
Router::matchAction(\PHPRouterDemo\DemoMainPageAction::class, 0);
Router::processAction(\PHPRouterDemo\DemoNodeAction::class, 0);
Router::processAction(\PHPRouterDemo\DemoTermAction::class);
Router::processAction(\PHPRouterDemo\DemoMagicAction::class);
Esempio n. 5
0
<?php

require_once '../vendor/autoload.php';
\BTDemo\DemoConfig::init();
\OLOG\Router::matchAction(\BTDemo\DemoAction::class, 0);
Esempio n. 6
0
<?php

require_once '../vendor/autoload.php';
\Config\AuthDemoConfig::init();
//
// Роуты
//
\OLOG\Auth\RegisterRoutes::registerRoutes();
\OLOG\Router::processAction(\PhpAuthDemo\Pages\MainPageAction::class, 0);
//
// Обработка после завершения роутинга
//
// support for local php server (php -S) - tells local server to return static files
/*
if (\OLOG\ConfWrapper::value('return_false_if_no_route', false)) {
    return false;
}
*/