common.php 774 B

1234567891011121314151617181920212223242526
  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)) {
  10. header('location:install.php');
  11. }
  12. global $myUser,$conf,$_,$success;
  13. $_ = array_map('secure_user_vars', array_merge($_POST, $_GET));
  14. $myUser = new User();
  15. $conf = new Configuration();
  16. $conf->getAll();
  17. $page = basename($_SERVER['PHP_SELF']);
  18. if (isset($_SESSION['currentUser'])) {
  19. $myUser =unserialize($_SESSION['currentUser']);
  20. }