public function indexAction() { $this->getLayout()->meta_title = $this->translate('Contacts'); $this->getLayout()->meta_description = $this->translate('Contacts'); $request = $this->getRequest(); if (JO_Session::issetKey('msg_success')) { $this->view->is_send = JO_Session::get('msg_success'); JO_Session::clear('msg_success'); } elseif (JO_Session::issetKey('msg_error')) { $this->view->error = JO_Session::get('msg_error'); $this->view->user = JO_Session::get('data'); JO_Session::clear('msg_error'); JO_Session::clear('data'); } $this->view->categories = array(); $categories = Model_Contactscategories::getCategories(); if ($categories) { foreach ($categories as $category) { $this->view->categories[$category['id']] = array('id' => $category['id'], 'name' => $category['name'], 'text' => html_entity_decode($category['text'], ENT_QUOTES, 'utf-8')); } } if (empty($this->view->user['username'])) { $this->view->user['username'] = JO_Session::get('username'); } if (empty($this->view->user['email'])) { $this->view->user['email'] = JO_Session::get('email'); } $this->view->contact_link = WM_Router::create($request->getBaseUrl() . '?controller=contacts&action=send_mail'); $this->view->children = array(); $this->view->children['header_part'] = 'layout/header_part'; $this->view->children['footer_part'] = 'layout/footer_part'; }
public function indexAction() { if ($this->session->get('successfu_edite')) { $this->view->successfu_edite = true; $this->session->clear('successfu_edite'); } $this->view->categories = Model_Contactscategories::getCategories(); }