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

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