main.external.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* $Id: main.external.php 3110 2007-06-16 23:10:56Z b4rt $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. // start session
  16. @session_start();
  17. // file-checks
  18. // check for upgrade.php
  19. if (!isset($_SESSION['check']['upgrade'])) {
  20. if (@file_exists("upgrade.php") === true) {
  21. @ob_end_clean();
  22. @header("location: upgrade.php");
  23. exit();
  24. }
  25. }
  26. // check for setup.php
  27. if (!isset($_SESSION['check']['setup'])) {
  28. if (@file_exists("setup.php") === true) {
  29. @ob_end_clean();
  30. @header("location: setup.php");
  31. exit();
  32. }
  33. }
  34. // main.core
  35. require_once('inc/main.core.php');
  36. // load default-language
  37. loadLanguageFile($cfg["default_language"]);
  38. // Check for valid theme
  39. $cfg["default_theme"] = CheckandSetDefaultTheme();
  40. // default-theme
  41. require("themes/".$cfg["default_theme"]."/index.php");
  42. // set admin-var
  43. $cfg['isAdmin'] = false;
  44. // vlib
  45. require_once("inc/lib/vlib/vlibTemplate.php");
  46. ?>