forked from geteso/esoBB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
67 lines (56 loc) · 2.07 KB
/
index.php
File metadata and controls
67 lines (56 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* This file is part of the esoBB project, a derivative of esoTalk.
* It has been modified by several contributors. (contact@geteso.org)
* Copyright (C) 2023 esoTalk, esoBB. <https://geteso.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
define("IN_ESO", 1);
/**
* Index page: fires events requires for the page to load and display.
* Initializes controllers and plugins, works out what to display, and
* displays it.
*/
// Basic page initialization.
require "lib/init.php";
// Set up the action controller.
$q1 = strtolower(@$_GET["q1"]);
// If the first address parameter is numeric, assume the conversation controller.
if (is_numeric($q1)) {
$_GET["q4"] = @$_GET["q3"];
$_GET["q3"] = @$_GET["q2"];
$_GET["q2"] = @$_GET["q1"];
$_GET["q1"] = $q1;
}
$eso->action = in_array($q1, $eso->allowedActions) ? $q1 : $eso->action = "home";
// Include and set up the controller corresponding to the chosen action.
require "controllers/$eso->action.controller.php";
$className = str_replace("-", "", $eso->action);
$eso->controller = new $className;
$eso->controller->eso =& $eso;
// Include the custom.php file.
if (file_exists("config/custom.php")) include "config/custom.php";
// Initialize eso.
$eso->init();
// Initialize the controller.
$eso->controller->init();
// Show the page.
header("Content-type: text/html; charset=utf-8");
if (!ob_start("ob_gzhandler")) ob_start();
$eso->render();
ob_flush();
// Clear messages from the session.
$_SESSION["messages"] = array();
?>