Source for file website.php

Documentation is available at website.php

  1. <?
  2. /**
  3. * website.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.  
  16. include_once("_config/config.php");
  17. include_once("system/generator/settings.php");
  18. include_once("system/generator/session.php");
  19. include_once("system/generator/admin.php");
  20. include_once("system/generator/editor.php");
  21. include_once("system/generator/page.php");
  22. include_once("system/generator/lang.php");
  23. if (isAdmin())
  24. {
  25. include_once("system/generator/interface.php");
  26. include_once("system/generator/dialog.php");
  27. }
  28. include_once("system/generator/action.php");
  29.  
  30. if ((!isAdmin()) && (isset($_GET["admin"])) && ($_GET["admin"] != "login"))
  31. {
  32. Header("Location: $site_url");
  33. }
  34. else
  35. {
  36. switch ($page["page_rows"])
  37. {
  38. case 0:
  39. if ((isset($_GET["admin"])) && ($_GET["admin"] == "printstyle"))
  40. {
  41. include("system/admin/".$_GET["admin"]."/index.php");
  42. }
  43. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printpool"))
  44. {
  45. include("system/admin/".$_GET["admin"]."/index.php");
  46. }
  47. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printlink"))
  48. {
  49. include("system/admin/".$_GET["admin"]."/index.php");
  50. }
  51. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printflash"))
  52. {
  53. include("system/admin/".$_GET["admin"]."/index.php");
  54. }
  55. else
  56. {
  57. Header("Location: $site_url");
  58. }
  59. break;
  60. case 1:
  61. checkUrl();
  62. if ((isset($_GET["admin"])) && ($_GET["admin"] == "printstyle"))
  63. {
  64. include("system/admin/".$_GET["admin"]."/index.php");
  65. }
  66. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printpool"))
  67. {
  68. include("system/admin/".$_GET["admin"]."/index.php");
  69. }
  70. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printlink"))
  71. {
  72. include("system/admin/".$_GET["admin"]."/index.php");
  73. }
  74. elseif ((isset($_GET["admin"])) && ($_GET["admin"] == "printflash"))
  75. {
  76. include("system/admin/".$_GET["admin"]."/index.php");
  77. }
  78. elseif (isset($_GET["admin"]))
  79. {
  80. include("system/admin/head.php");
  81. include("system/admin/".$_GET["admin"]."/index.php");
  82. include("system/admin/bottom.php");
  83. }
  84. else
  85. {
  86. if (!isAdmin())
  87. {
  88. update_statistic($page["page_key"],$page["page_count"]);
  89. }
  90. if (isset($_GET["template"]))
  91. {
  92. $template = $_GET["template"];
  93. }
  94. else
  95. {
  96. $template = $page["page_template"];
  97. }
  98. $link = connectDB();
  99. $query = "SELECT template_hide FROM ".$db_praefix."template WHERE template_name = '$template'";
  100. $result = mysql_query($query);
  101. closeDB($link);
  102. $template_info = mysql_fetch_array($result);
  103. if ($template_info["template_hide"] == 0)
  104. {
  105. if (isset($_GET["rss"]))
  106. {
  107. include("system/admin/rss/index.php");
  108. }
  109. else
  110. {
  111. include("templates/_system/head.php");
  112. include("system/admin/menu.php");
  113. include("templates/".$template."/index.php");
  114. include("templates/_system/bottom.php");
  115. }
  116. }
  117. else
  118. {
  119. include("templates/".$template."/index.php");
  120. }
  121. }
  122. break;
  123. }
  124. }
  125.  
  126. if (empty($_GET["export"]))
  127. {
  128. if (SID != '')
  129. {
  130. ob_end_flush();
  131. }
  132. }
  133. ?>

Documentation generated on Tue, 04 Oct 2005 11:13:43 +0200 by phpDocumentor 1.3.0RC3