public function before_fetch(ORM $item) { if (isset($_GET['cancel_filter'])) { $this->redirect('/' . Extasy_Url::url_to_route($this->get_index_route())); } return parent::before_fetch($item); }
protected function on_auth_error() { if (!is_null($this->_login_route) and !Auth::instance()->logged_in()) { HTTP::redirect(Extasy_Url::url_to_route($this->_login_route) . '?return=' . $this->request->uri()); } $this->forward_403(); }
public function back($default_route) { $url = $this->_return_location; if (is_null($url)) { $url = Extasy_Url::url_to_route($default_route); } HTTP::redirect($url); }
public static function link_to_route($route_str, $title = NULL, array $attributes = NULL, $protocol = NULL) { if (!isset($attributes['title'])) { $attributes['title'] = $title; $attributes['class'] = 'name'; } return HTML::anchor(Extasy_Url::url_to_route($route_str), $title, $attributes, $protocol); }
public function action_delete() { $item = $this->get_item(); if (!$item->allow_delete()) { $this->forward_403(); } $this->delete_routine($item); $this->redirect('/' . Extasy_Url::url_to_route($this->get_index_route())); }
public function before_fetch(ORM $item) { if (isset($_GET['cancel_filter'])) { $this->redirect('/' . Extasy_Url::url_to_route($this->get_index_route())); } $filter_form = new Form_Filter_Reviews($item); if (isset($_GET['filter'])) { $filter_form->submit(); } $this->template->filter_form = $filter_form; return parent::before_fetch($item); }
public function action_index() { $referer = arr::get($_SERVER, 'HTTP_REFERER'); $referer_parts = explode('/', $referer); foreach ($referer_parts as $part) { $id = intval($part); } $referer_page_type = ORM::factory('Page')->get_page_type($id); if ($referer_page_type) { HTTP::redirect('/' . Extasy_Url::url_to_route('admin-static')); } HTTP::redirect('/' . Extasy_Url::url_to_route('admin-dynamic')); }
public function action_index() { $write_allowed = ACL::is_action_allowed('admin', 'config', 'write'); $this->template->write_allowed = $write_allowed; if (isset($_POST['cancel'])) { $this->redirect('/' . Extasy_Url::url_to_route('admin-config')); } $form = new Form_Config(); if (!$write_allowed) { $form->set_read_only(); } if ($write_allowed and isset($_POST['submit']) and $form->submit()) { $this->redirect('/' . Extasy_Url::url_to_route('admin-config')); } $this->template->form = $form; }
public function action_index() { $this->redirect('/' . Extasy_Url::url_to_route(Kohana::$config->load('extasy.redirect_from_index'))); }
public static function menu_row($id, $name, $route = NULL, $parent = -1) { if (!is_null($route)) { $url = url::base() . Extasy_Url::url_to_route($route); } else { $url = NULL; } $title = $name; return View::factory('cms/menu_row', array('id' => $id, 'name' => $name, 'title' => $title, 'url' => $url, 'parent' => $parent)); }
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ ?> Чтобы сбросить свой пароль, перейдите по следующей ссылке: <?php echo URL::base(FALSE, 'http') . Extasy_Url::url_to_route('admin-auth:reset_password_step_2?code=' . $code);
<?php } ?> </ul> </li> <?php } else { ?> <?php $nameParts = Helpers_Menu::getNameParts($name); ?> <li class="item<?php echo $i; ?> "><a href="/<?php echo Extasy_Url::url_to_route($route); ?> "><?php echo $nameParts['icon']; ?> <span class="hidden-sm text"> <?php echo $nameParts['name']; ?> </span></a></li> <?php } ?> <?php $i++; } ?>
</td> </tr> {% } %} </script> </head> <body> <header class="navbar"> <div class="container"> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".sidebar-nav.nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a id="main-menu-toggle" class="hidden-xs open"><i class="fa fa-bars"></i></a> <a class="navbar-brand col-md-2 col-sm-1 col-xs-2" href="<?php echo '/' . Extasy_Url::url_to_route(Kohana::$config->load('extasy.redirect_from_index')); ?> "><span>Ariol</span></a> <div class="nav-no-collapse header-nav"> <?php if (Auth::instance()->logged_in('admin')) { ?> <ul class="nav navbar-nav pull-right"> <li style="padding: 10px;"> Товаров на сайте: <?php echo ORM::factory('Product')->where('active', '=', 1)->count_all(); ?> </li> <li class="dropdown"> <a class="btn account dropdown-toggle" data-toggle="dropdown"> <div class="user">
public function action_reset_password_step_2() { if ($this->do_reset_password_step_2()) { HTTP::redirect('/' . Extasy_Url::url_to_route('admin-index')); } }