-// Some very important function includes
-foreach (array('config','wrapper','template','inc','stats') as $inc) {
- include($PATH . 'inc/' . $inc . '-functions.php');
-} // END - foreach
-
-// Own functions
-include($PATH.'inc/functions.php');
-
-// Auto-detection... (patched by "Stelzi" aka. profi-concept, thanks again!)
-$URL = 'http://' . detectServerName() . str_replace("\\", '/', dirname($_SERVER['PHP_SELF']));
+// Auto-detection of URL
+$URL = detectServerProtocol() . '://' . detectServerName() . str_replace(chr(92), '/', dirname($_SERVER['PHP_SELF']));