]> git.mxchange.org Git - mailer.git/blobdiff - inc/gen_mediadata.php
Fix for inserted codes while registering of extensions, many rewrites/cleanups:
[mailer.git] / inc / gen_mediadata.php
index 02287536bc04c36de34d38e36b9741eef3d9eaa6..8922660483b0431a3120658c7ed2384c646ee926 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -39,7 +40,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Init variables
 $bsent = '0'; $bclicks = '0'; $bcount = '0';
@@ -85,14 +86,10 @@ updateMediadataEntry(array('total_clicks', 'bonus_clicks') , 'init', $bclicks);
 updateMediadataEntry(array('total_orders', 'bonus_orders') , 'init', $bcount);
 
 // Aquire total used points
-$result = SQL_QUERY('SELECT SUM(`used_points`) AS used_points FROM `{?_MYSQL_PREFIX?}_user_data`', __FILE__, __LINE__);
-list($used) = SQL_FETCHROW($result);
-SQL_FREERESULT($result);
+$used = countSumTotalData('', 'user_data', 'used_points', '');
 
 // ... and total points
-$result = SQL_QUERY('SELECT SUM(`points`) AS points FROM `{?_MYSQL_PREFIX?}_user_points`', __FILE__, __LINE__);
-list($points) = SQL_FETCHROW($result);
-SQL_FREERESULT($result);
+$points = countSumTotalData('', 'user_points', 'points', '');
 
 // Update database
 updateMediadataEntry(array('total_points'), 'init', ($points - $used));