/**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // action to execute
     $id = SpoonFilter::getGetValue('id', null, 0);
     // no id's provided
     if (!BackendMailmotorModel::existsCampaign($id)) {
         $this->redirect(BackendModel::createURLForAction('campaigns') . '&error=campaign-does-not-exist');
     } else {
         BackendMailmotorModel::exportStatisticsByCampaignID($id);
     }
     // redirect
     $this->redirect(BackendModel::createURLForAction('groups') . '&report=export-failed');
 }
 /**
  * Execute the action
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if (BackendMailmotorModel::existsCampaign($this->id)) {
         parent::execute();
         $this->getData();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
 /**
  * Gets all data needed for this page
  *
  * @return	void
  */
 private function getData()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if (!BackendMailmotorModel::existsCampaign($this->id)) {
         $this->redirect(BackendModel::createURLForAction('campaigns') . '&error=campaign-does-not-exist');
     }
     // store mailing
     $this->campaign = BackendMailmotorModel::getCampaign($this->id);
     // fetch the statistics
     $this->statistics = BackendMailmotorCMHelper::getStatisticsByCampaignID($this->id, true);
     // no stats found
     if ($this->statistics === false || empty($this->statistics)) {
         $this->redirect(BackendModel::createURLForAction('campaigns') . '&error=no-statistics-loaded');
     }
 }
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if (BackendMailmotorModel::existsCampaign($this->id)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // get all data for the item we want to edit
         $this->getData();
         // load the form
         $this->loadForm();
         // validate the form
         $this->validateForm();
         // parse
         $this->parse();
         // display the page
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }