public function indexAction() { $this->view->one = K_Registry::get('one'); K_Registry::write('h1', $this->view->one['name']); K_Crumbs::add(array('Вакансии', 'taxi-work')); K_Crumbs::add(array($this->view->one['name'], $this->view->one['tree_name'])); $this->render('onevacancy'); }
public function indexAction() { $this->view->one = K_Registry::get('one'); K_Registry::write('h1', $this->view->one['header']); // var_dump($one); K_Crumbs::add(array('Новости', 'taxi-novosti')); K_Crumbs::add(array($this->view->one['tree_title'], $this->view->one['tree_name'])); $next = K_Tree::getNextBro('', $this->view->one); $prev = K_Tree::getPrevBro('', $this->view->one); $this->view->next = $next['tree_name']; $this->view->prev = $prev['tree_name']; $this->render('one'); }
public function indexAction() { K_Crumbs::add(array('Новости', 'taxi-novosti')); // how many records per page $size = 10; $this->view->page = 1; // we get the current page from $_GET if (isset($_GET['page'])) { $this->view->page = (int) $_GET['page']; } $pag_info = K_Paginator::prepear($this->view->page, $size); list($this->view->news, $this->view->countItems) = K_TreeQuery::crt('/news/')->type(array('news'))->limit($pag_info['onPage'], $pag_info['start'])->order(array('news' => 'date'))->go(array('childs' => true, 'count' => true, 'orderby' => 'DESC')); $this->view->pages = ceil($this->view->countItems / $pag_info['onPage']); $this->render('news'); }
public function pageAction() { // var_dump(K_File::rdir(ROOT_PATH.'/www/upload')); // require_once('J:\home\premier.loc\application\api\news_transfer.php'); // die; $link = '/pages'; $this->paramLink = $this->getParam(0); //убираем гет строку $qpos = strpos($this->paramLink, '?'); if ($qpos) { $this->prezentGetParams = true; $this->paramLink = substr($this->paramLink, 0, strpos($this->paramLink, '?')); } if (strpos($this->paramLink, '/uk/') !== false) { $this->paramLink = str_replace('/uk/', '', $this->paramLink); K_Crumbs::add(array('Головна', '/')); $regLang = 'uk'; K_Registry::write('lang', $regLang); $addLangLink = 'uk/'; } else { K_Crumbs::add(array('Главная', '/')); $regLang = 'ru'; K_Registry::write('lang', $regLang); } switch (K_Url::get()->expPath[0]) { case 'taxi-about-us': K_Crumbs::add(array('О компании', 'taxi-about-us')); break; case 'taxi-price': K_Crumbs::add(array('Услуги', 'taxi-price')); break; case 'taxi-contact-us': K_Crumbs::add(array('Контакты', 'taxi-contact-us')); break; case 'peregon-avto': K_Crumbs::add(array('Перегон авто', 'peregon-avto')); break; case 'skorost-i-bezopasnost': K_Crumbs::add(array('Скорость и безопасность', 'skorost-i-bezopasnost')); break; case 'luchshie-tsenyi': K_Crumbs::add(array('Лудшие цены', 'luchshie-tsenyi')); break; case 'perevozka-gruzov': K_Crumbs::add(array('Перевозка грузов', 'perevozka-gruzov')); break; case 'bonusi-i-skidki': K_Crumbs::add(array('Бонусы и скидки', 'bonusi-i-skidki')); break; case 'beznalichnii-raschet': K_Crumbs::add(array('Безналичный расчет', 'beznalichnii-raschet')); break; } $this->view->paramLink = $this->paramLink; $this->paramLink = trim($this->paramLink, '/'); // если страница не найдена добавляем в хедер 404 ошибку if (empty($this->paramLink) || $this->paramLink == "/") { $pageIndex = 'index'; $this->view->onMain = true; } if ($linkRouter = $this->preRouter("/" . $this->paramLink . "/")) { $this->view->page = $page = $this->treePage($linkRouter); } else { $this->view->page = $page = $this->treePage('/pages/' . $addLangLink . $this->paramLink . $pageIndex . '/'); } // строим страницу через treePage, если страница не найдена выводим 404 ошибку if (!$this->view->page) { header("HTTP/1.0 404 Not Found"); $this->treePage("/pages/404/"); } }
/** * clear function. * * @access public * @static * @return void */ public static function clear() { self::$crumbs = array(); }