public function __call($name, $arguments) { try { $replaced = 0; $act = str_replace('action_', '', $name, $replaced); if ($replaced == 0) { throw new Exception("Нет такого метода {$name}"); } $act = $this->getName() . "_" . $act; if (class_exists($act)) { $this->table = new $act(); } else { $this->table = new sqltable($act); } if ($this->table == null) { throw new Exception("Не возможно создать такую таблицу {$act}"); } } catch (Exception $e) { return $this->_404("[class=" . get_class($this) . "] : " . $e->getMessage()); } if ($arguments[nooutput]) { return; } if ($this->table->run()) { if (Ajax::isAjaxRequest()) { return $this->table->getOutput(); } $this->setOutputAssigns(); Output::assign('menu', $this->getIndexMenu()); Output::setContent($this->table->getOutput()); return $this->fetch("body_base.tpl"); } }
public function action_help() { if (Ajax::isAjaxRequest()) { return $this->fetch("help.tpl"); } else { CTitle::addSection('Помощь'); $this->setOutputAssigns(); Output::assign('menu', $this->getIndexMenu()); Output::setContent($this->fetch("help.tpl")); return $this->fetch("body_base.tpl"); } }
public function action_blocks() { $_SESSION[customer_id] = ''; $this->table = new orders_blocks(); if ($this->table->run()) { if (Ajax::isAjaxRequest()) { return $this->table->getOutput(); } $this->setOutputAssigns(); Output::assign('menu', $this->getIndexMenu()); Output::setContent($this->table->getOutput()); return $this->fetch("body_base.tpl"); } }
public function __call($name, $arguments) { $arguments[nooutput] = true; parent::__call($name, $arguments); $this->need_yaer_arc = $this->table->model->getNeedArc(); //console::getInstance()->out("lss=".Auth::$lss." ".print_r($_SESSION,true)); if ($this->table->run()) { if (Ajax::isAjaxRequest()) { return $this->table->getOutput(); } $this->setOutputAssigns(); Output::assign('menu', $this->getIndexMenu()); Output::setContent($this->table->getOutput()); return $this->fetch("body_base.tpl"); } }