Exemple #1
0
 protected function _getMainSection()
 {
     try {
         $args = array(Sitengine_Env::PARAM_ANCESTORID => $this->_controller->getEntity()->getAncestorId());
         $query = array(Sitengine_Env::PARAM_SESSIONID => Zend_Session::getId());
         $route = $this->_controller->getFrontController()->getRouter()->getRoute(Sitengine_Newsletter_Backend_Front::ROUTE_CAMPAIGNS_ATTACHMENTS_UPLOAD);
         $submitUri = $this->_controller->getRequest()->getBasePath() . '/' . $route->assemble($args, true);
         $submitUri .= Sitengine_Controller_Request_Http::makeNameValueQuery($query);
         #print $submitUri;
         require_once $this->_controller->getEnv()->getContribDir() . '/FlexUpload/class.flexupload.inc.php';
         $flex = new FlexUpload($submitUri);
         $flex->setWidth('100%');
         #$flex->setHeight('100%');
         $flex->setMaxFiles(20);
         $flex->setMaxFileSize(100 * 1024 * 1024);
         $flex->setFileExtensions('*.zip;*.mp3;*.wav;*.gif;*.jpg;*.jpeg;*.pdf;*.doc;*.xls');
         $flex->setPathToSWF($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/');
         $flex->setPathToSWFObject($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/js/');
         $flex->setLocale($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/locale/en.xml');
         return array('flex' => $flex->getHTML());
     } catch (Exception $exception) {
         require_once 'Sitengine/Newsletter/Backend/Campaigns/Attachments/Exception.php';
         throw new Sitengine_Newsletter_Backend_Campaigns_Attachments_Exception('form page error', $exception);
     }
 }
Exemple #2
0
 protected function _getMainSection()
 {
     try {
         $args = array(Sitengine_Env::PARAM_GREATANCESTORID => $this->_controller->getEntity()->getGreatAncestorId(), Sitengine_Env::PARAM_ANCESTORID => $this->_controller->getEntity()->getAncestorId());
         $route = $this->_controller->getFrontController()->getRouter()->getRoute(Sitengine_Proto_Backend_Front::ROUTE_GOODIES_SHOULDIES_COULDIES_UPLOAD);
         $submitUri = $this->_controller->getRequest()->getBasePath() . '/' . $route->assemble($args, true);
         $submitUri .= '?' . Sitengine_Env::PARAM_SESSIONID . '=' . Zend_Session::getId();
         #print $submitUri;
         require_once $this->_controller->getEnv()->getContribDir() . '/FlexUpload/class.flexupload.inc.php';
         $flex = new FlexUpload($submitUri);
         $flex->setWidth('100%');
         #$flex->setHeight('100%');
         $flex->setMaxFiles(20);
         $flex->setMaxFileSize(100 * 1024 * 1024);
         $flex->setFileExtensions('*.zip;*.mp3;*.wav;*.gif;*.jpg;*.jpeg;*.pdf;*.doc;*.xls');
         $flex->setPathToSWF($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/');
         $flex->setPathToSWFObject($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/js/');
         $flex->setLocale($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/locale/en.xml');
         return array('flex' => $flex->getHTML());
     } catch (Exception $exception) {
         require_once 'Sitengine/Proto/Backend/Goodies/Shouldies/Couldies/Exception.php';
         throw new Sitengine_Proto_Backend_Goodies_Shouldies_Couldies_Exception('form page error', $exception);
     }
 }
 protected function _getMainSection()
 {
     try {
         $args = array(Sitengine_Env::PARAM_GREATANCESTORID => $this->_controller->getEntity()->getGreatAncestorSlug(), Sitengine_Env::PARAM_ANCESTORID => $this->_controller->getEntity()->getAncestorId());
         $query = array(Sitengine_Env::PARAM_SESSIONID => Zend_Session::getId());
         $route = $this->_controller->getFrontController()->getRouter()->getRoute(Sitengine_Blog_Frontend_Front::ROUTE_BLOGS_POSTS_FILES_UPLOAD);
         $submitUri = $this->_controller->getRequest()->getBasePath() . '/' . $route->assemble($args, true);
         $submitUri .= Sitengine_Controller_Request_Http::makeNameValueQuery($query);
         require_once $this->_controller->getEnv()->getContribDir() . '/FlexUpload/class.flexupload.inc.php';
         $flex = new FlexUpload($submitUri);
         $flex->setWidth('100%');
         #$flex->setHeight('100%');
         $flex->setMaxFiles(20);
         $flex->setMaxFileSize(15 * 1024 * 1024);
         $type = $this->_controller->getEntity()->getAncestorType();
         if ($type == Sitengine_Blog_Posts_Table::TYPE_GALLERY) {
             $types = '*.gif;*.jpg;*.jpeg';
         } else {
             $types = '*.zip;*.mp3;*.wav;*.gif;*.jpg;*.jpeg;*.pdf;*.doc;*.xls';
         }
         $flex->setFileExtensions($types);
         $flex->setPathToSWF($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/');
         $flex->setPathToSWFObject($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/js/');
         $flex->setLocale($this->_controller->getEnv()->getContribRequestDir() . '/FlexUpload/locale/en.xml');
         return array('flex' => $flex->getHTML());
     } catch (Exception $exception) {
         require_once 'Sitengine/Blog/Frontend/Blogs/Posts/Files/Exception.php';
         throw new Sitengine_Blog_Frontend_Blogs_Posts_Files_Exception('form page error', $exception);
     }
 }