Ejemplo n.º 1
0
 /**
  * Fügt einen Eintrag hinzu oder liefert das Forumular dazu
  *
  */
 private function _add()
 {
     $gbook_vars = $this->_configvars['Gbook'];
     $this->_initCaptcha();
     if (isset($this->_gpc['POST']['btn_send']) && $this->_gpc['POST']['btn_send'] == 'Senden') {
         /*Formular wurde gesendet */
         /* Formular kontrollieren */
         $answer = array();
         $success = $this->_check_form($answer);
         if ($success == true) {
             /*Eintrag machen*/
             foreach ($answer as $key => $value) {
                 $answer[$key] = stripslashes($value);
             }
             $navigation_id = $this->_smarty->get_template_vars('local_link');
             $answer['time'] = "NOW()";
             $this->_msbox->addEntry($answer);
             $this->_send_feedback($gbook_vars['allright_title'], $gbook_vars['allright_content'], "?nav_id={$navigation_id}", $gbook_vars['allright_link']);
         } else {
             /* Fehler im Formular */
             $this->_send_entryform(false, implode("<br />\n", $answer));
         }
     } else {
         /* Kein Formular abgeschickt */
         //Captcha zurücksetzen
         if (key_exists('captcha_revoke', $this->_gpc['POST'])) {
             $first_form = false;
         } else {
             $first_form = true;
         }
         $this->_send_entryform($first_form);
     }
 }
Ejemplo n.º 2
0
 /**
  * Fügt einen Eintrag hinzu oder liefert das Forumular dazu
  *
  */
 private function _add()
 {
     $gbook_vars = $this->_configvars['Gbook'];
     if (isset($this->_gpc['POST']['btn_send']) && $this->_gpc['POST']['btn_send'] == 'Senden') {
         /*Formular wurde gesendet */
         /* Formular kontrollieren */
         $answer = array();
         $success = $this->_check_form($answer);
         if ($success == true) {
             /*Eintrag machen*/
             $answer['time'] = "NOW()";
             $this->_msbox->addEntry($answer);
             $this->_send_feedback($gbook_vars['allright_title'], $gbook_vars['allright_content'], "?nav_id={$this->_nav_id}", $gbook_vars['allright_link']);
         } else {
             /* Fehler im Formular */
             $this->_send_entryform(false, implode("<br />\n", $answer));
         }
     } else {
         /* Kein Formular abgeschickt */
         $this->_send_entryform(true);
     }
 }