Пример #1
0
 /**
  * Kommentarfunktion dieser Klasse
  *
  */
 private function _comment()
 {
     $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, array('title'));
         if ($success == true) {
             /*Eintrag machen*/
             $navigation_id = $this->_smarty->get_template_vars('local_link');
             foreach ($answer as $key => $value) {
                 $answer[$key] = stripslashes($value);
             }
             $answer['time'] = "NOW()";
             $this->_msbox->commentEntry((int) $this->_gpc['GET']['ref_ID'], $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), true);
         }
     } 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, null, true);
     }
 }
 /**
  * Kommentarfunktion dieser Klasse
  *
  */
 private function _comment()
 {
     $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, array('title'));
         if ($success == true) {
             /*Eintrag machen*/
             $answer['time'] = "NOW()";
             $this->_msbox->commentEntry((int) $this->_gpc['GET']['ref_ID'], $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), true);
         }
     } else {
         /* Kein Formular abgeschickt */
         $this->_send_entryform(true, null, true);
     }
 }