function __autoload($class) { global $include_paths; if (isset($include_paths[$class]) && file_exists($include_paths[$class])) { require_once $include_paths[$class]; } else { try { rsMapClasses(); } catch (NamespaceConflictException $exc) { if (constant('DEVELOPMENT')) { require_once 'managed_code/namespace_conflict.php'; } else { ob_start(); require_once 'managed_code/namespace_conflict.php'; $data = ob_get_clean(); $handle = microtime(true); file_put_contents('managed_code/conflict_details_' . $handle . '.html'); $msg = 'details in: ' . constant('BASE_DIR') . '/managed_code/conflict_details_' . $handle . '.html'; mail(constant('ADMIN_EMAIL'), 'Namespace conflict', $msg); } exit(1); } if (isset($include_paths[$class]) && file_exists($include_paths[$class])) { require_once $include_paths[$class]; } else { echo 'You need to create a class file for: ' . $class . ' before using it somewhere in your package tree. If you have recently changed the location of this class you need to run Reinitialise'; } } }
<?php /** * An all purpose recovery page * @package rs_core */ require_once 'master.config.php'; require_once 'managed_code/rs_functions.php'; if (constant('DEVELOPMENT')) { rsGetConfig(); session_name(constant('SESSION')); session_start(); exec('find managed_code/cache -type f -print0 | xargs -0 rm -f'); exec('rm -f managed_code/includes.php'); rsMapClasses(); session_destroy(); header('Location: index.php'); } else { header('Location: /'); }