Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, November 12, 2026

Diff for Metafox/functions.inc.php between version 1.34 and 1.35

version 1.34, 2006/09/14 10:03:38 version 1.35, 2006/09/15 08:28:39
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/functions.inc.php,v 1.33 2006-09-12 16:31:01 nepto Exp $ */  /* $Platon: Metafox/functions.inc.php,v 1.34 2006-09-14 10:03:38 nepto Exp $ */
   
 function ezin_eval($evalcode) /* {{{ */  function ezin_eval($evalcode) /* {{{ */
 {  {
Line 889  function ezin_substitute_basic_propertie
Line 889  function ezin_substitute_basic_propertie
                                 'ezin_date'      => date($ezin_cfg['format_date']),                                  'ezin_date'      => date($ezin_cfg['format_date']),
                                 'ezin_time'      => sprintf('%.2f', Platon::get_mtime() - @$ezin_sys['time']['start']),                                  'ezin_time'      => sprintf('%.2f', Platon::get_mtime() - @$ezin_sys['time']['start']),
   
                                   // Antispam
                                   'ezin_antispam_question' => $ezin_cfg['antispam_question'],
                                   'ezin_antispam_answer'   => $ezin_cfg['antispam_answer'],
   
                                 // Ezin software                                  // Ezin software
                                 'ezin_software_name'        => @$ezin_sys['software']['name'],                                  'ezin_software_name'        => @$ezin_sys['software']['name'],
                                 'ezin_software_version'     => @$ezin_sys['software']['version'],                                  'ezin_software_version'     => @$ezin_sys['software']['version'],
Line 1147  function ezin_cgi_parse() /* {{{ */
Line 1151  function ezin_cgi_parse() /* {{{ */
                         }                          }
   
                         $result = true;                          $result = true;
                           if (stristr($ezin_cfg['antispam_flags'], 'M') != false
                                           && strlen(trim($ezin_cfg['antispam_answer'])) > 0
                                           && strcasecmp(trim($ezin_cfg['antispam_answer']), trim($_REQUEST['ezin_antispam']))) {
                                   $ezin_cgi['message_save_antispam_protection'] = 1;
                                   $result = false;
                           }
                         if (ezin_check_message_flood()) {                          if (ezin_check_message_flood()) {
                                 $ezin_cgi['message_save_flood_protection'] = 1;                                  $ezin_cgi['message_save_flood_protection'] = 1;
                                 $result = false;                                  $result = false;
Line 1233  function ezin_cgi_parse() /* {{{ */
Line 1243  function ezin_cgi_parse() /* {{{ */
                 $ezin_save_feedback = Platon::parse_id_param('ezin_save_feedback', false);                  $ezin_save_feedback = Platon::parse_id_param('ezin_save_feedback', false);
                 $ezin_save_email    = Platon::parse_id_param('ezin_save_email', false);                  $ezin_save_email    = Platon::parse_id_param('ezin_save_email', false);
                 if (! empty($ezin_save_feedback)) { /* {{{ */                  if (! empty($ezin_save_feedback)) { /* {{{ */
                         $data = array();                          if (stristr($ezin_cfg['antispam_flags'], 'F') != false
                         foreach ($_POST + $_GET as $key => $val) {                                          && strlen(trim($ezin_cfg['antispam_answer'])) > 0
                                 if (in_array($key, array('ezin_save_feedback', 'ezin_fragment',                                          && strcasecmp(trim($ezin_cfg['antispam_answer']), trim($_REQUEST['ezin_antispam']))) {
                                                                 'ezin_section_id', 'ezin_section_key'))) {                                  $ezin_cgi['feedback_save_error'] = 1;
                                         continue;                          } else {
                                 }                                  $data = array();
                                 if (preg_match('|^ezin_(.+)$|', $key, $matches)) {                                  foreach ($_POST + $_GET as $key => $val) {
                                         $data[$matches[1]] = stripslashes($val);                                          if (in_array($key, array('ezin_save_feedback', 'ezin_fragment',
                                                                           'ezin_section_id', 'ezin_section_key', 'ezin_antispam'))) {
                                                   continue;
                                           }
                                           if (preg_match('|^ezin_(.+)$|', $key, $matches)) {
                                                   $data[$matches[1]] = stripslashes($val);
                                           }
                                 }                                  }
                         }                                  ezin_feedback_send_notify_email($data);
                         ezin_feedback_send_notify_email($data);                                  if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {
                         if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {                                          $ezin_cgi['feedback_save_ok'] = 1;
                                 $ezin_cgi['feedback_save_ok'] = 1;                                          if ($ezin_cfg['feedback_save_redirect']) {
                                 if ($ezin_cfg['feedback_save_redirect']) {                                                  $request_uri = $_SERVER['REQUEST_URI'];
                                         $request_uri = $_SERVER['REQUEST_URI'];                                                  $location = strpos($request_uri, '?') === false
                                         $location = strpos($request_uri, '?') === false                                                          ? ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang'])
                                                 ? ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang'])                                                          : 'http://'.$_SERVER['HTTP_HOST'].$request_uri;
                                                 : 'http://'.$_SERVER['HTTP_HOST'].$request_uri;                                                  if (strlen(@$_POST['ezin_fragment']) > 0) {
                                         if (strlen(@$_POST['ezin_fragment']) > 0) {                                                          $location .= '#'.$_POST['ezin_fragment'];
                                                 $location .= '#'.$_POST['ezin_fragment'];                                                  }
                                                   Platon::redirect($location);
                                         }                                          }
                                         Platon::redirect($location);                                  } else {
                                           $ezin_cgi['feedback_save_error'] = 1;
                                 }                                  }
                         } else {  
                                 $ezin_cgi['feedback_save_error'] = 1;  
                         }                          }
                 } /* }}} */                  } /* }}} */
                 if (! empty($ezin_save_email)) { /* {{{ */                  if (! empty($ezin_save_email)) { /* {{{ */
                         $email = trim($_REQUEST['ezin_email']);                          if (stristr($ezin_cfg['antispam_flags'], 'N') != false
                         include_once 'Validate.php';                                          && strlen(trim($ezin_cfg['antispam_answer'])) > 0
                         if (Validate::email($email) && ezin_save_email($ezin_cgi['section_id'], $email)) {                                          && strcasecmp(trim($ezin_cfg['antispam_answer']), trim($_REQUEST['ezin_antispam']))) {
                                 $ezin_cgi['email_save_ok'] = 1;  
                         } else {  
                                 $ezin_cgi['email_save_error'] = 1;                                  $ezin_cgi['email_save_error'] = 1;
                           } else {
                                   $email = trim($_REQUEST['ezin_email']);
                                   include_once 'Validate.php';
                                   if (Validate::email($email) && ezin_save_email($ezin_cgi['section_id'], $email)) {
                                           $ezin_cgi['email_save_ok'] = 1;
                                   } else {
                                           $ezin_cgi['email_save_error'] = 1;
                                   }
                         }                          }
                 } /* }}} */                  } /* }}} */
         }          }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top