]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-email_details.php
Rewrites/fixes for handling config entries in SQLs
[mailer.git] / inc / modules / admin / what-email_details.php
index 8a27a5bfb92d445ed855faab5254dae0b90b32cc..e66c6bb224cb8f239e41a946e8b54ec447fc5f9b 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 *
@@ -64,22 +65,22 @@ ORDER BY timestamp DESC";
 $WHO = getMessage('_ALL');
 $SQL2 = '';
 
-if (isGetRequestElementSet(('mid'))) {
+if (isGetRequestParameterSet(('mid'))) {
        // Only a specific mail shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
        $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
         FROM `{?_MYSQL_PREFIX?}_pool`
-        WHERE `id`='".bigintval(getRequestElement('mid'))."'
+        WHERE `id`='".bigintval(getRequestParameter('mid'))."'
         LIMIT 1";
-       $WHO = getMessage('MAIL_ID').": ".getRequestElement('mid');
-} elseif (isGetRequestElementSet('userid')) {
+       $WHO = getMessage('MAIL_ID').": ".getRequestParameter('mid');
+} elseif (isGetRequestParameterSet('userid')) {
        // All mails by a specific member shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
        $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
 FROM `{?_MYSQL_PREFIX?}_pool`
-WHERE sender='".bigintval(getRequestElement('userid'))."'
+WHERE sender='".bigintval(getRequestParameter('userid'))."'
 ORDER by timestamp DESC";
-       $WHO = getMessage('USER_ID').": ".getRequestElement('userid');
+       $WHO = getMessage('USER_ID').": ".getRequestParameter('userid');
 }
 
 if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
@@ -98,22 +99,22 @@ ORDER BY timestamp DESC";
 $result_normal = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Set offset an current page to default values
-if (!isGetRequestElementSet('page')) setRequestGetElement('page', 1);
+if (!isGetRequestParameterSet('page')) setGetRequestParameter('page', 1);
 
-if (!isGetRequestElementSet('offset')) {
+if (!isGetRequestParameterSet('offset')) {
        if (isConfigEntrySet('mails_page')) {
                // Set config entry
-               setRequestGetElement('offset', getConfig('mails_page'));
+               setGetRequestParameter('offset', getConfig('mails_page'));
        } else {
                // Set default one
-               setRequestGetElement('offset', 10);
+               setGetRequestParameter('offset', 10);
        }
 } // END - if
 
 // Add limitation to SQL string
-if (!isGetRequestElementSet(('mid'))) {
+if (!isGetRequestParameterSet(('mid'))) {
        // Create limitation line
-       $add = " LIMIT ".(bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))).", ".bigintval(getRequestElement('offset'));
+       $add = " LIMIT ".(bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))).", ".bigintval(getRequestParameter('offset'));
 
        // For normal mails
        $sql .= $add;
@@ -152,7 +153,7 @@ if (SQL_NUMROWS($result_list) > 0) {
                $pool['unconfirmed'] = $pool['sent_email'] - $pool['clicks'];
                if ($pool['unconfirmed'] > 0) {
                        // Add link to list_unconfirmed what-file
-                       $pool['unconfirmed'] = "<strong><a href=\"{?URL?}/modules.php?module=admin&amp;what=list_unconfirmed&amp;mid=".$pool['id']."\">".$pool['unconfirmed']."</a></strong>";
+                       $pool['unconfirmed'] = "<strong><a href=\"{%url=modules.php?module=admin&amp;what=list_unconfirmed&amp;mid=" . $pool['id'] . "%}\">" . $pool['unconfirmed'] . "</a></strong>";
                } elseif ($pool['unconfirmed'] < 0) {
                        // Sometimes rarely displayed minus values will be "fixed" to zero
                        $pool['unconfirmed'] = '0';
@@ -208,7 +209,7 @@ if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
                        // Add link?
                        if ($bonus['unconfirmed'] > 0) {
                                // Add link to list_unconfirmed what-file
-                               $bonus['unconfirmed'] = "<strong><a href=\"{?URL?}/modules.php?module=admin&amp;what=list_unconfirmed&amp;bid=".$bonus['id']."\">".$bonus['unconfirmed']."</a></strong>";
+                               $bonus['unconfirmed'] = "<strong><a href=\"{%url=modules.php?module=admin&amp;what=list_unconfirmed&amp;bid=" . $bonus['id'] . "%}\">" . $bonus['unconfirmed'] . "</a></strong>";
                        } // END - if
 
                        // Prepare content