common.php 696 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. session_start('hackpoint-session');
  3. mb_internal_encoding('UTF-8');
  4. require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'constant.php');
  5. require_once(__ROOT__.'function.php');
  6. date_default_timezone_set(TIME_ZONE);
  7. set_error_handler('errorToException');
  8. spl_autoload_register('app_autoloader');
  9. if(!file_exists(__ROOT__.DATABASE_PATH)) header('location:install.php');
  10. global $myUser,$conf,$_,$success;
  11. $_ = array_map('secure_user_vars',array_merge($_POST,$_GET));
  12. $myUser = new User();
  13. $conf = new Configuration();
  14. $conf->getAll();
  15. $page = basename($_SERVER['PHP_SELF']);
  16. if(isset($_SESSION['currentUser']))
  17. $myUser =unserialize($_SESSION['currentUser']);
  18. ?>