public function aboutusAction() { $this->view->util = true; $this->view->sidenav = $this->view->partial('root/parts/sidenavs/utils.phtml', array('selected' => 'about')); $statement = new FM_Components_Util_AboutUs(array('active' => 1)); $this->view->form = $form = new FM_Forms_Root_AboutUs(array('src' => $statement->getHeader(), 'src2' => $statement->getCarousel())); $form->title->setValue($statement->getTitle()); $form->file->setValue($statement->getHeader()); $form->statement->setValue($statement->getStatement()); $this->view->tiny = true; if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $uploadedData = $form->getValues(); $this->view->tiny = true; if ($uploadedData['file']['name'] != '') { $name = $uploadedData['file']['name'] = '1' . '_' . time() . str_ireplace(array(' ', '_', '-', ','), '', strtolower($uploadedData['file']['name'])); $uploadedData['file']['type'] = 'image'; $fileHandler = new FM_Components_Util_UploadHandler($uploadedData['file']); $folder = $fileHandler->setFolder('auxpage_headers'); if ($fileHandler->move()) { $_POST['medianame'] = $name; list($width, $height, $type, $attr) = getimagesize($_SERVER['DOCUMENT_ROOT'] . $folder . '/' . $name); $_POST['width'] = $width; $_POST['height'] = $height; } } if ($uploadedData['head']['name'] != '') { $name = $uploadedData['head']['name'] = '1' . '_' . time() . str_ireplace(array(' ', '_', '-', ','), '', strtolower($uploadedData['head']['name'])); $uploadedData['head']['type'] = 'image'; $fileHandler = new FM_Components_Util_UploadHandler($uploadedData['head']); $folder = $fileHandler->setFolder('auxpage_headers'); if ($fileHandler->move()) { $_POST['header'] = $name; } } FM_Components_Util_AboutUs::updateStatement(array('active' => 1), $_POST); $this->_redirect('/root/aboutus'); } } }
function aboutusAction() { $statement = new FM_Components_Util_AboutUs(array('active' => '1')); $this->view->layout()->header = $this->view->partial('headers/mission.phtml', array('sel' => 1, 'header' => $statement->getCarousel())); $this->view->headline = $statement->getTitle(); $this->view->statement = htmlspecialchars_decode($statement->getStatement()); $this->view->headerImg = $statement->getHeader(); }