HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/lib/debug.php
<?php
/**
 * This file has the callback function for the output buffering when debug mode is turned on.
 *
 * @package IWP
 */

/**
 * This is the function that is used for the output buffering callback. If debug mode is on it will output the time taken to load a page.
 * This will also call the ob_gzhandler to output the final data.
 * This function should never be called directly.
 *
 * @param string $data
 * @param unknown_type $mode
 * @return string
 */

function ob_callback_debug($data, $mode)
{
	if(strpos($_SERVER['PHP_SELF'], 'js.php') === false){
		$GLOBALS['end_time'] = microtime_float();
		$str = '';
		if (!eregi("remote\.php",$_SERVER['PHP_SELF'])) {
			if (function_exists('memory_get_usage')) {
				$mem_used = memory_get_usage()/1024/1024;
			} else {
				$mem_used = 0;
			}
			$str = sprintf("\n\n\n".'<br /><div id="debug" style="color: #808080; background-color: #ECECEC;clear:both;padding-top: 2px;"><center>Time taken to generate the page %.4f seconds and performed %d sql queries and used %.4f MB of memory</center></div>'."\n\n\n", ($GLOBALS['end_time'] - $GLOBALS['start_time']), $GLOBALS['DBNumQueries'], $mem_used);
		}
	}
	
	if (function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
		return ob_gzhandler($data . $str, $mode);
	} else {
		return $data;
	}
} // end function ob_callback_debug()