public function privacyAction() { $this->view->util = true; $this->view->sidenav = $this->view->partial('root/parts/sidenavs/utils.phtml', array('selected' => 'pri')); $statement = new FM_Components_Util_PrivacyPolicy(array('active' => 1)); $this->view->form = $form = new FM_Forms_Root_PrivacyPolicy(array('src' => $statement->getHeader(), 'src2' => $statement->getCarousel())); //print $statement->getTitle();exit; $form->title->setValue($statement->getTitle()); $form->head->setValue($statement->getCarousel()); $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_PrivacyPolicy::updateStatement(array('active' => 1), $_POST); $this->_redirect('/root/privacy'); } } }
function privacypolicyAction() { $statement = new FM_Components_Util_PrivacyPolicy(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(); }