More usage of GET_URL() than file()
[mailer.git] / inc / modules / admin / what-list_payouts.php
index e266a79928a0efcc91b3de17ce7b67e2599b07e1..c01272ea56698fa3194e75950acfec3696af5628 100644 (file)
  ************************************************************************/
 
 // 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);
 }
+
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
 
 if (!empty($_GET['pid']))
 {
@@ -118,7 +118,7 @@ if (!empty($_GET['pid']))
                                                eval($eval);
 
                                                // Execute transfer
-                                               $ret = @file($URL);
+                                               $ret = GET_URL($URL);
                                        }
                                         else
                                        {
@@ -243,17 +243,14 @@ ORDER BY p.payout_timestamp DESC", __FILE__, __LINE__);
                         else
                        {
                                // Translate status
-                               $evl = "\$status = PAYOUT_STATUS_".strtoupper($status).";";
-                               eval($evl);
+                               $status = constant('PAYOUT_STATUS_'.strtoupper($status).'');
                                $status = "<FONT class=\"admin_failed\">".$status."</FONT>";
                        }
 
                        // Nothing entered must be secured in member/what-payputs.php !
-                       if ($allow == "Y")
-                       {
+                       if ($allow == "Y") {
                                // Banner/Textlink views/clicks request
-                               if (!empty($banner))
-                               {
+                               if (!empty($banner)) {
                                        // Prepare array for the banner
                                        $content = array(
                                                'banner' => $banner,
@@ -263,9 +260,7 @@ ORDER BY p.payout_timestamp DESC", __FILE__, __LINE__);
 
                                        // Load template for the banner
                                        $account = LOAD_TEMPLATE("admin_list_payouts_banner", true, $content);
-                               }
-                                else
-                               {
+                               } else {
                                        // Textlink
                                        $content = array(
                                                'txt_link' => $alt,
@@ -276,9 +271,7 @@ ORDER BY p.payout_timestamp DESC", __FILE__, __LINE__);
 
                                // Admins can addionally test the URL for framekillers
                                $bank = "<A href=\"".FRAMETESTER($url)."\" target=\"_blank\">".CLICK_HERE."</A>";
-                       }
-                        else
-                       {
+                       } else {
                                // e-currency payout request
                                if (empty($account)) $account = "---";
                                if (empty($bank))    $bank    = "---";