public function oseditAction() { if ($this->tplVars['lvals']['canEdit'] && $this->_hasParam('id')) { include_once 'os.php'; $id = $this->_getParam('id'); $this->tplVars['lvals']['postRes'] = 2; $os = new Os(); $this->tplVars['os'] = $os->getById($id); if ($this->_request->getPost('ispost')) { $this->to_log(); $this->tplVars['platforms'] = $this->_request->getPost(); if (($this->tplVars['lvals']['postRes'] = $os->update($id, $this->_request->getPost())) > 0) { $this->_redirect('/products/os/'); } } array_push($this->tplVars['page_css'], 'product_edit.css'); array_push($this->tplVars['page_css'], 'livevalidation.css'); array_push($this->tplVars['page_js'], 'livevalidation.js'); $this->tplVars['lvals']['isNewRecord'] = false; $this->tplVars['header']['actions']['names'][] = array('name' => 'platforms', 'menu_name' => 'Platform list'); $this->tplVars['header']['actions']['names'][] = array('name' => 'os', 'menu_name' => 'OS list'); $this->tplVars['header']['actions']['names'][] = array('name' => 'osedit', 'menu_name' => 'OS Edit'); array_push($this->viewIncludes, 'products/osEdit.tpl'); unset($os); } else { $this->_redirect('/products/os/'); } }