X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=56d8a184117263c2e6c825eeaa467b27bc550bcb;hp=bfa97b999a9e7d533114e74becb3e1bbf73ceb4d;hb=d960730a8020419ab679935e5d55b5d9692a3d68;hpb=dbef43c3a859518367f9ee0dde8e895ec677af23 diff --git a/inc/functions.php b/inc/functions.php index bfa97b999a..56d8a18411 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -918,6 +918,12 @@ function LOAD_URL($URL, $addUrlData=true) { // Compile out URI codes $URL = COMPILE_CODE($URL); + // Get output buffer + $OUTPUT = ob_get_contents(); + + // Clear it + ob_end_clean(); + // Add some data to URL if cookies are not accepted if (((!defined('__COOKIES')) || (!__COOKIES)) && ($addUrlData)) $URL = ADD_URL_DATA($URL); @@ -1646,8 +1652,10 @@ function ADD_EMAIL_NAV($PAGES, $offset, $show_form, $colspan, $return=false) { // function MXCHANGE_OPEN ($script) { + //* DEBUG */ print("SCRIPT=".$script."
\n"); // Compile the script name $script = COMPILE_CODE($script); + //* DEBUG */ print("SCRIPT=".$script."
\n"); // Use default SERVER_URL by default... ;) So? $url = SERVER_URL; @@ -1664,10 +1672,20 @@ function MXCHANGE_OPEN ($script) { if (ereg("/", $host)) $host = substr($host, 0, strpos($host, "/")); // Generate relative URL - $script = substr($script, (strlen($url) + 7)); + //* DEBUG */ print("SCRIPT=".$script."
\n"); + if (substr(strtolower($script), 0, 7) == "http://") { + // But only if http:// is in front! + $script = substr($script, (strlen($url) + 7)); + } elseif (substr(strtolower($script), 0, 8) == "https://") { + // Does this work?! + $script = substr($script, (strlen($url) + 8)); + } + + //* DEBUG */ print("SCRIPT=".$script."
\n"); if (substr($script, 0, 1) == "/") $script = substr($script, 1); // Open connection + //* DEBUG */ die("SCRIPT=".$script."
\n"); $fp = @fsockopen($host, 80, $errno, $errdesc, 30); if (!$fp) { // Failed! @@ -1790,7 +1808,7 @@ function CREATE_EMAIL_LINK($email, $table="admins") { if ((EXT_IS_ACTIVE("admins")) && ($table == "admins")) { // Create email link for contacting admin in guest area $EMAIL = ADMINS_CREATE_EMAIL_LINK($email); - } elseif ((GET_EXT_VERSION("user") >= "0.3.3") && ($table == "user_data")) { + } elseif ((EXT_IS_ACTIVE("user", true)) && (GET_EXT_VERSION("user") >= "0.3.3") && ($table == "user_data")) { // Create email link for contacting a member within admin area (or later in other areas, too?) $EMAIL = USER_CREATE_EMAIL_LINK($email); } elseif ((EXT_IS_ACTIVE("sponsor")) && ($table == "sponsor_data")) {