printf(__METHOD__ . " invokation not available in cli mode\n");
return;
}
$_COOKIE[$name] = $value;
if ($expire > 0) {
$expire = time() + $expire * 24 * 3600;
}
setcookie($name, $value, $expire, $path, $domain, $secure);
}
printf(__METHOD__ . " invokation not available in cli mode\n");
return;
}
$_COOKIE[$name] = $value;
if ($expire > 0) {
$expire = time() + $expire * 24 * 3600;
}
setcookie($name, $value, $expire, $path, $domain, $secure);
}
return $playerObj;
}
function getSakhalinClubId() {
$id = Phpr::$request->cookie("club-id");
if (!$id) {
$id = Db_DbHelper::scalar("select id from hockey_clubs where name_ru = 'Сахалин' or name_ru like '%Сахалин%'");
Phpr::$response->setCookie("club-id", $id, 1);
}
return $id;
return new LWImageManipulator($imageObj->image_id, $imageObj->image_path);
}
return null;
}
function getNextGame() {
$nowDate = Phpr_DateTime::nowDate();
$sakhalinId = getSakhalinClubId();
return Phpr::$primaryCache->cachedValue("next-game", function () use ($nowDate, $sakhalinId) {
return Db_DbHelper::object("select game.game_date, game.game_time, game.ticket_link,
<? endforeach ?>
</ul>
</div>
*/ ?>
</div>
<div class="banner">
<div class="coming-soon">
<? $nextGame = getNextGame(); ?>
<? if ($nextGame): ?>
<div class="table">
}
if (!file_exists($layoutPath)) {
throw new Phpr_SystemException("The layout file \"{$layoutPath}\" does not exist");
}
/** @noinspection PhpIncludeInspection */
include $layoutPath;
}
<a href="<?= u("team_player", $right->id) ?>"><img src="<?= $image->getPath() ?>" alt=""/></a>
<? endif; ?>
</div>
<? endif; ?>
</div>
</div>
<div id="layout">
<? $this->renderLayout('_top') ?>
<div class="section">
<div class="content">
}
if (!file_exists($layoutPath)) {
throw new Phpr_SystemException("The layout file \"{$layoutPath}\" does not exist");
}
/** @noinspection PhpIncludeInspection */
include $layoutPath;
}
Phpr_View::beginBlock("OutsideBlock");
$this->renderPartial($view, null, false);
Phpr_View::endBlock();
Phpr_View::appendBlock('view', Phpr_View::getBlock('OutsideBlock'));
// Render the layout
$this->renderLayout();
if ($suppressDefault) {
$this->viewData['title'] = $block->title_no_typo; //Phpr::$config->get('ENABLE_TYPOGRAPHIC') ? $block->title : h($block->title);
$this->viewData['block'] = $block;
$this->viewData['body_class'] = Phpr::$config->get('STATICPAGE_CLASS', 'inner');
$this->layout = Phpr::$config->get('STATICPAGE_LAYOUT', 'default');
if ($block->template && is_file(PATH_APP . "/views/application/" . $block->template . ".htm")) {
$this->staticView = $block->template;
}
$this->loadView($this->staticView, false, true);
} else {
if (PHP_SAPI != "cli") {
* Invokes the controller action or event handler and loads corresponding view.
*
* @param string $methodName Specifies a method name to execute.
* @param array $parameters A list of the action parameters.
*/
public function executeAction($methodName, $parameters) {
// Execute the action
call_user_func_array([&$this, $methodName], $parameters);
// Load the view
public function executeAction($methodName, $parameters) {
$this->action_parameters = $parameters;
$post = Phpr::$request->getRequestType() == Phpr_Request::POST; // (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST');
$cacheable = isset($this->cacheableActions[$methodName]) || in_array($methodName, $this->cacheableActions);
if (!Phpr::$cache || !$cacheable) {
parent::executeAction($methodName, $parameters);
return;
}
public function _run($actionName, $parameters) {
if (Phpr::$request->isAjaxRequest()) {
$this->suppressView();
}
// If no event was handled, execute the action requested in URI
if (!$this->dispatchEvents($actionName, $parameters)) {
$this->executeAction($actionName, $parameters);
}
}
* By default this method opens a page provided by the PHP Road.
* You may supply the application 404 page by creating the On404() action in the Application Controller.
*/
public function open404() {
// Try to execute the application controller On404 action.
$controller = Phpr::$classLoader->loadController(self::controllerApplication);
if ($controller != null && $controller->_actionExists(self::actionOn404Action)) {
$controller->_run(self::actionOn404Action, array());
//exit;
} else {
}
if ($action == $controller)
$action = 'index';
if ($obj) {
if ($obj->canCheckAnAction() && !$obj->_actionExists($action)) {
$this->open404();
return;
}
throw new Phpr_SystemException('Класс плагина ' . $className . ' должен реализовывать интерфейс Admin_ICmsPlugin.');
}
new $className($config);
}
if (!isset($Phpr_InitOnly) || !$Phpr_InitOnly) {
Phpr::$response->open(Phpr::$request->getCurrentUri(true));
}
/*
* Include the PHP Road library
*
* You may need to specify a full path to the phproad.php script,
* in case if the PHP Road root directory is not specified in the PHP includes path.
*
*/
include(dirname(__FILE__) . "/phproad/system/phproad.php");
if (Phpr::$request->isDebugRequest()) {