From: Roland Häder Date: Sat, 2 Feb 2008 13:05:53 +0000 (+0000) Subject: final fix for banner loader X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=51f046e37bef87c687a5c10504802803bd521189;p=mailer.git final fix for banner loader --- diff --git a/0.2.1/inc/functions.php b/0.2.1/inc/functions.php index e3bbf34043..58b69a2fd9 100644 --- a/0.2.1/inc/functions.php +++ b/0.2.1/inc/functions.php @@ -992,12 +992,12 @@ function MAKE_TIME($H, $M, $S, $stamp) return mktime($H, $M, $S, $MONTH, $DAY, $YEAR); } // -function LOAD_URL($URL) { +function LOAD_URL($URL, $addUrlData=true) { // Compile out URI codes $URL = COMPILE_CODE($URL); // Add some data to URL if cookies are not accepted - if ((!defined('__COOKIES')) || (!__COOKIES)) $URL = ADD_URL_DATA($URL); + if ((!defined('__COOKIES')) || (!__COOKIES) && ($addUrlData)) $URL = ADD_URL_DATA($URL); // Probe for bot from search engine if ((eregi("spider", getenv('HTTP_USER_AGENT'))) || (eregi("bot", getenv('HTTP_USER_AGENT'))) || (eregi("spider", getenv('HTTP_USER_AGENT')))) { @@ -1997,23 +1997,28 @@ function ADD_URL_DATA($URL) { global $_GET, $CONFIG; $ADD = ""; + + // Determine URL binder + $BIND = "?"; + if (strpos($URL, "?") !== false) $BIND = "&"; + if ((!defined('__COOKIES')) || ((!__COOKIES))) { // Cookies are not accepted if ((!empty($_GET['refid'])) && (strpos($URL, "refid=") == 0)) { // Cookie found in URL - $ADD .= "&refid=".bigintval($_GET['refid']); + $ADD .= $BIND."refid=".bigintval($_GET['refid']); } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['def_refid'] > 0)) { // Not found! So let's set default here - $ADD .= "&refid=".$CONFIG['def_refid']; + $ADD .= $BIND."refid=".$CONFIG['def_refid']; } // Add session ID if ((!empty($_GET['PHPSESSID'])) && (strpos($URL, "PHPSESSID=") == 0)) { // Add session from URL - $ADD .= "&PHPSESSID=".SQL_ESCAPE(strip_tags($_GET['PHPSESSID'])); + $ADD .= $BIND."PHPSESSID=".SQL_ESCAPE(strip_tags($_GET['PHPSESSID'])); } else { // Add current session - $ADD .= "&PHPSESSID=".session_id(); + $ADD .= $BIND."PHPSESSID=".session_id(); } } diff --git a/0.2.1/view.php b/0.2.1/view.php index 66eff3c559..f454e64d4d 100644 --- a/0.2.1/view.php +++ b/0.2.1/view.php @@ -59,7 +59,7 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b $type = substr($url, -3); header ("Content-Type: image/".$type); - LOAD_URL($url); + LOAD_URL($url, false); } else { // Free memory SQL_FREERESULT($result);