function toHtml() { $this->_initTemplate(); $formcontroller = new FormController(); for ($i = 0; $i < count($this->_arr_form); $i++) { $formcontroller->form =& $this->_arr_form[$i]; $arr_form = $formcontroller->toTemplate(); $name = $this->_arr_form[$i]->getAttribute('name'); $this->smarty->assign($name, $arr_form); } $controller = new ComponentController($this->_container); $arr_component = $controller->toTemplate(); $this->smarty->assign("component", $arr_component); foreach ($this->_arr_output as $key => $value) { $this->smarty->assign($key, $value); } $this->smarty->display($this->template); }
/** * Execute a task * * @return void */ public function execute() { // Get the task $this->_task = Request::getVar('task', ''); if (empty($this->_task)) { $this->_task = 'home'; $this->registerTask('__default', $this->_task); } parent::execute(); }
/** * Execute a task * * @return void */ public function execute() { // Get the task $this->_task = Request::getVar('task', ''); if (empty($this->_task)) { $this->_task = 'checkout'; $this->registerTask('__default', $this->_task); } $this->user = User::getRoot(); // Check if they're logged in if (User::isGuest()) { $this->login('Please login to continue'); return; } parent::execute(); }
/** * Execute a task * * @return void */ public function execute() { // Get the task $this->_task = Request::getVar('task', ''); parent::execute(); }
$button1->setAttribute('id', 'newbutton'); $button1->setAttribute('value', 'New'); $button1->setAttribute('onclick', "javascript:window.location.href='index.php?op=adduser'"); $button2 =& $form->addElement('submit'); $button2->setAttribute('id', 'deletebutton'); $button2->setAttribute('value', 'Delete'); $button2->setAttribute('class', 'warn'); $button3 =& $form->addElement('backbutton'); $form_op =& $form->addElement('hidden'); $form_op->setAttribute('id', 'op'); $form_op->setAttribute('value', 'deleteuser'); $formcontroller = new FormController($form); $arr_form = $formcontroller->toTemplate(); //print_r($arr_form); $smarty->assign("data", $arr_data); $smarty->assign("form", $arr_form); $container = new ComponentContainer(); $pager =& $container->addElement('pager'); $pager->id = 'pager'; $pager->uri =& $uri; $pager->current_page = $curr_page; $pager->total_pages = $lastpageno; $controller = new ComponentController($container); $arr_component = $controller->toTemplate(); //print_r($arr_component); $smarty->assign("component", $arr_component); $smarty->assign('OOO_APP_WEB_JS', OOO_APP_WEB_JS); $smarty->assign('current_tab', $op); $smarty->assign('page_title', 'Users Admin'); $smarty->assign('maincontent', 'user_list.html'); $smarty->display($view);