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/db.inc.php between version 1.7 and 1.8

version 1.7, 2005/10/22 19:49:30 version 1.8, 2005/11/26 12:37:58
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/db.inc.php,v 1.6 2005/10/02 18:34:49 nepto Exp $ */  /* $Platon: Metafox/db.inc.php,v 1.7 2005/10/22 19:49:30 nepto Exp $ */
   
 /*  /*
  * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002   * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002
Line 1096  function ezin_check_message_flood() /* {
Line 1096  function ezin_check_message_flood() /* {
 } /* }}} */  } /* }}} */
   
 /*  /*
  * FEEDBACK RELATED FUNCTIONS   * FEEDBACK/NEWSLETTER RELATED FUNCTIONS
  */   */
   
 /*  /*
Line 1149  function ezin_save_feedback($section_id,
Line 1149  function ezin_save_feedback($section_id,
   
         return true;          return true;
 } /* }}} */  } /* }}} */
   
   function ezin_save_email($section_id, $email) /* {{{ */
   {
           global $ezin_sys;
           global $ezin_db_handle;
   
           $ip = array();
           foreach (array('REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR') as $key) {
                   isset($_SERVER[$key]) && $ip[] = $_SERVER[$key];
           }
           $ip = stripslashes(join(' / ', $ip));
           $ua = stripslashes($_SERVER['HTTP_USER_AGENT']);
   
           $escape_function = function_exists('mysql_escape_string')
                   ? 'mysql_escape_string'
                   : 'addslashes';
   
           $query = sprintf('INSERT INTO %s (email,id,dt_added,section_id,ip,user_agent)'
                           .' VALUES ("%s",0,SYSDATE(),%d,"%s","%s")',
                           $ezin_sys['db']['tables']['nl_emails'], $escape_function($email),
                           intval($section_id), $escape_function($ip), $escape_function($ua));
           @mysql_query($query, $ezin_db_handle)
                   or ezin_db_error('ezin_save_feedback() [1]');
   
           return true;
   } /* }}} */
   
 /*  /*
  * CACHE RELATED FUNCTIONS   * CACHE RELATED FUNCTIONS

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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