X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffunctions.php;h=f2806f6b648279ee09bbe01fa3165063fd4b8e6b;hb=7ec9a232162634c199cc28ba050be9b4f8214e7f;hp=d1dffd29b99c1eb04bfb7dfe199127fa17756e00;hpb=2865a2ba42f7be1851708e33a4f3325ecbff0dd1;p=mailer.git diff --git a/inc/functions.php b/inc/functions.php index d1dffd29b9..f2806f6b64 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -163,16 +163,14 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) { // Output the raw HTML code function OUTPUT_RAW ($HTML) { - if ((isBooleanConstantAndTrue('mxchange_installed')) && (basename($_SERVER['PHP_SELF']) != "install.php")) { - // Not in install-mode so strip slashes away - echo stripslashes($HTML); - } else { - // Output directly in install-mode - echo $HTML; - } + // Output stripped HTML code to avoid broken JavaScript code, etc. + echo stripslashes($HTML); - // Flush the output - flush(); + // Flush the output if only _OB_CACHING is not "on" + if (_OB_CACHING != "on") { + // Flush it + flush(); + } } // Add a fatal error message to the queue array @@ -918,6 +916,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 +1650,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 +1670,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!