Source for file index.php

Documentation is available at index.php

  1. <?
  2. /**
  3. * index.php
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (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. * @author Stephan Raabe
  14. */
  15. session_start();
  16. include("_config/config.php");
  17. include("system/generator/database.php");
  18. $link = connectDB();
  19. $query1 = "SELECT page_path FROM ".$db_praefix."page WHERE page_parent = 0";
  20. $result1 = mysql_query($query1);
  21. $homepage = mysql_fetch_array($result1) or die("<script language='Javascript'>location.href='installation/index.php';</script>");
  22. $home_path = $homepage["page_path"];
  23. $query2 = "SELECT site_home,site_static FROM ".$db_praefix."settings";
  24. $result2 = mysql_query($query2);
  25. $settings = mysql_fetch_array($result2);
  26. $site_home = $settings["site_home"];
  27. $site_static = $settings["site_static"];
  28. $query3 = "SELECT page_key FROM ".$db_praefix."page WHERE page_path = '$site_home'";
  29. $result3 = mysql_query($query3);
  30. if (mysql_num_rows($result3) > 0)
  31. {
  32. $home_path = $site_home;
  33. }
  34. closeDB($link);
  35. if (($site_static == "") || ((isset($_SESSION["account_group"]) && ($_SESSION["account_group"] > 1))))
  36. {
  37. Header("Location: website.php");
  38. }
  39. else
  40. {
  41. Header("Location: $site_static");
  42. }
  43. ?>

Documentation generated on Tue, 16 Aug 2005 17:32:20 +0200 by phpDocumentor 1.3.0RC3