]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/other_functions.php
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / libs / other_functions.php
index 4cc7b7cf03d4c07f0fda3c540288e59dc7a969c1..fa5f604897a8160e7e9c31840e2bf3dde2f7af0e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/21/2009 *
- * ===============                              Last change: 10/21/2009 *
+ * Mailer v0.2.1-FINAL                                Start: 10/21/2009 *
+ * ===================                          Last change: 10/21/2009 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : other_functions.php                              *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -44,25 +43,121 @@ if (!defined('__SECURITY')) {
 // Displays all SQL queries with num rows, affected rows and timings
 function displayDebugSqls () {
        // Walk through all SQLs
-       $OUT = ''; $SW = 2; $i = 1;
+       $OUT = ''; $i = 1;
        foreach ($GLOBALS['debug_sqls'] as $content) {
                // Translate/add some data
-               $content['sw']       = $SW;
                $content['i']        = $i;
-               $content['num_rows'] = translateComma($content['num_rows']);
-               $content['affected'] = translateComma($content['affected']);
-               $content['sql_str']  = secureString($content['sql_str']);
                $content['timing']   = translateComma($content['timing'] * 1000);
 
                // Load row template
-               $OUT .= loadTemplate('admin_other_sqls_row', true, $content);
+               $OUT .= loadTemplate('admin_other_sqls_row', TRUE, $content);
 
-               // Switch color
-               $SW = 3 - $SW; $i++;
+               // Count one up
+               $i++;
        } // END - foreach
 
        // Load main template
-       loadTemplate('admin_other_sqls', false, $OUT);
+       $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', TRUE, $OUT);
+}
+
+//-----------------------------------------------------------------------------
+//                Wrapper functions for configuration entries
+//-----------------------------------------------------------------------------
+
+// Getter for 'reject_url' config entry
+function getRejectUrl () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('reject_url');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for max_send
+function getMaxSend () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('max_send');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'check_double_email'
+function getCheckDoubleEmail () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = getConfig('check_double_email');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Checks whether 'check_double_email' is 'Y'
+function isCheckDoubleEmailEnabled () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for activate_xchange
+function getActivateXchange () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('activate_xchange');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for admin_notify
+function getAdminNotify () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('admin_notify');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for display_debug_sqls
+function getDisplayDebugSqls () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('display_debug_sqls');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for min_age
+function getMinAge () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('min_age');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
 }
 
 // [EOF]