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')))) {
{
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();
}
}