version = $version; $this->program = $program; $this->parseQS(); $this->parseFILES(); $this->POST = $this->parseData($_POST); $this->USER = $this->parseData($_SESSION); $this->COOKIE = $this->parseData($_COOKIE); $this->conf = $conf; $this->lang['core'] = $lang; } function parseQS() { $QS = $_SERVER['QUERY_STRING']; $url = explode(URL_SEP, $QS); foreach ( $url as $k => $v ) if ( !ereg("=", $v) ) $this->URL[] = addslashes(trim($v)); if ( $url[0] != "" && count($url) > 0 ) { foreach ( $url as $k => $v ) { $sub = explode('=', $v); if ( isset($sub[1]) ) $this->GET[$sub[0]] = addslashes($sub[1]); } } } function parseFILES() { if ( count($_FILES) >= 1 ) foreach ( $_FILES as $k => $v ) $this->FILES[$k] = $v; } function parseData($data) { $parsed = array(); if ( count($data) >= 1 ) foreach ( $data as $k => $v ) if ( is_array($v) ) $parsed[$k] = $this->parseData($v); else $parsed[$k] = addslashes(ltrim($v)); return $parsed; } function getDebug( $level = 1 ) { global $db, $timer, $page; $debug = ""; if ( $level > 0 ) { $debug .= ''; $debug .= ''; if ( IN_SITE != 3 && method_exists( $db, "show_cache" ) ) $debug .= ''; else $debug .= ''; $debug .= '
Loadtime: {!LoadTime!} sDB Queries: {!DBQueries!}
 

'; } if ( $level > 1 ) { $debug .= "\$bin->URL
".str_replace("\n", "
", print_r($this->URL, true))."

"; $debug .= "\$bin->GET
".str_replace("\n", "
", print_r($this->GET, true))."

"; } if ( $level > 2 ) { $debug .= "\$bin->POST
".str_replace("\n", "
", print_r($this->POST, true))."

"; $debug .= "\$bin->FILES
".str_replace("\n", "
", print_r($this->FILES, true))."

"; $debug .= "\$page->frmData (".$page->frmStatus.")
".str_replace("\n", "
", print_r($page->frmData, true))."

"; } if ( $level > 3 ) { if ( $this->conf['uses_sessions'] ) $debug .= "\$bin->USER
".str_replace("\n", "
", print_r($this->USER, true))."

"; $debug .= "\$bin->COOKIE
".str_replace("\n", "
", print_r($this->COOKIE, true))."

"; } if ( $level > 4 ) { if ( IN_SITE != 3 && $this->conf['uses_database'] ) foreach ( $db as $driver ) if ( method_exists( $driver, "show_cache" ) ) $debug .= "".$driver->show_cache(); } $this->display->output['debug'] = $debug; } } ?>