URL in email archive and details now displayed
[mailer.git] / inc / modules / admin / what-email_details.php
index 41dc91d065f72b6303f2902ac952671c37c2dafc..6762cc915fbf0a4b9b06d7c793ff0a38f3ad4954 100644 (file)
@@ -42,8 +42,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -54,9 +53,10 @@ ADD_DESCR("admin", basename(__FILE__));
 // Normal mails ordered by your members
 //              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 data_type IN('ADMIN', 'TEMP', 'NEW', 'ACTIVE')
- ORDER BY timestamp DESC";
+FROM "._MYSQL_PREFIX."_pool
+WHERE data_type IN('ADMIN','TEMP','NEW','ACTIVE')
+ORDER BY timestamp DESC";
+
 $WHO = _ALL;
 $SQL2 = "";
 
@@ -151,8 +151,9 @@ if (SQL_NUMROWS($result_list) > 0) {
                $content['payment']     = GET_PAYMENT($pool['payment_id']);
                $content['category']    = GET_CATEGORY($pool['cat_id']);
                $content['receivers']   = str_replace(";", ", ", $pool['receivers']);
-               $content['type']        = GET_POOL_TYPE($pool['data_type']);
+               $content['type']        = TRANSLATE_POOL_TYPE($pool['data_type']);
                $content['frametester'] = FRAMETESTER($pool['url']);
+               $content['url']         = COMPILE_CODE($pool['url']);
                $content['timestamp']   = MAKE_DATETIME($pool['timestamp'], "0");
 
                // Load row template
@@ -203,7 +204,7 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) {
                        $content['time']        = CREATE_FANCY_TIME($content['time']);
                        $content['category']    = GET_CATEGORY($content['cat_id']);
                        $content['receivers']   = str_replace(";", ", ", $content['receivers']);
-                       $content['type']        = GET_POOL_TYPE($content['data_type']);
+                       $content['type']        = TRANSLATE_POOL_TYPE($content['data_type']);
                        $content['frametester'] = FRAMETESTER($content['url']);
                        $content['timestamp']   = MAKE_DATETIME($content['timestamp'], "0");