Example #1
0
 /**
  * [displaySubmit description]
  *
  * @param   [type]  $tpl  [description]
  *
  * @return  [type]        [description]
  */
 function displaySubmit($tpl = null)
 {
     $model = $this->getModel();
     // Save Data
     $this->r_save = $model->saveAd();
     if (JError::isError($this->r_save)) {
         return JError::raiseWarning(500, 'Anzeige konnte nicht gespeichert werden');
     }
     // If chiffre then send email to check address
     $this->r_chiffre = $model->sendEmailCheckEmail();
     if (JError::isError($this->r_chiffre)) {
         return JError::raiseWarning(500, 'EMail zur Kontrolle der Chiffreaddresse konnte nicht versendet werden');
     }
     // Send notify for the new ad
     $this->r_notify = $model->sendNotifyEmail();
     // Overall result
     $this->result = $this->r_save && $this->r_chiffre;
     $this->task = 'submit';
     $this->chiffre = $model->getUserState('chiffre');
     parent::display($tpl);
 }
Example #2
0
 /**
  * [displayError description]
  *
  * @param   [type]  $tpl  [description]
  *
  * @return  [type]        [description]
  */
 function displayError($tpl = null)
 {
     $this->setLayout('fail');
     parent::display($tpl);
     return;
 }
Example #3
0
 /**
  * [displayOutOfRage description]
  *
  * @param   [type]  $tpl  [description]
  *
  * @return  [type]        [description]
  */
 function displayOutOfRage($tpl = null)
 {
     $this->setLayout('outofrage');
     parent::display($tpl);
 }