function init()
 {
     $this->_siteConfig = new FM_Components_SiteConfig();
     if (!stristr($_SERVER['REQUEST_URI'], 'ajax')) {
         $this->view->layout()->payBanner = $this->_siteConfig->usePayBanners() ? FM_Components_Util_PayBanner::getRandom() : false;
         $this->view->layout()->fullBanner = $this->_siteConfig->useFullBanners() ? FM_Components_Util_FullBanner::getRandom() : false;
         $this->view->layout()->background = $this->_siteConfig->getBackground();
     }
     $this->view->layout()->mediakit = FM_Components_Util_MediaKit::getLink();
     if ($this->_getParam('id')) {
         FM_Components_HitCounter::update($this->_getParam('id'));
     }
     if (stristr($_SERVER['REQUEST_URI'], 'admin')) {
         $this->_admin = true;
         $this->view->layout()->admin = $this->_admin;
     }
     if (Zend_Auth::getInstance()->hasIdentity()) {
         $this->view->layout()->name = Zend_Auth::getInstance()->getIdentity();
     }
     $namespace = new Zend_Session_Namespace('client');
     if (isset($namespace->user) && $namespace->user instanceof FM_Components_Member) {
         $this->_user = $namespace->user;
     }
 }
 public function managemediakitAction()
 {
     $this->view->form = $form = new FM_Forms_Root_MediaKit(array('src' => FM_Components_Util_MediaKit::getLink()));
     //$this->view->link = FM_Components_Util_MediaKit::getLink();
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         if ($form->isValid($formData)) {
             $uploadedData = $form->getValues();
         }
         if ($uploadedData['file']['name'] != '') {
             $name = $uploadedData['file']['name'] = '4M' . '_' . time() . str_ireplace(array(' ', '_', '-', ','), '', strtolower($uploadedData['file']['name']));
             $uploadedData['file']['type'] = 'pdf';
             $uploadedData['documentname'] = $name;
             $fileHandler = new FM_Components_Util_UploadHandler($uploadedData['file']);
             $folder = $fileHandler->setFolder('mediakit');
             if ($fileHandler->move()) {
                 FM_Components_Util_MediaKit::insert($uploadedData);
                 $this->_redirect('/root/managemediakit');
             }
         }
     }
 }