-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
67 lines (47 loc) · 1.2 KB
/
index.php
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
/**
* @author SkyIrc development team <[email protected]>
* @copyright Copyright (c) SkyIrc
* @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License, version 3
* @package PostPone
*/
// Debug?
if(isset($_GET['debug'])) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
}
// Save time of beginning of page loading
$start_time = microtime(true);
/*
* Defines
*/
// Define for denying call of seperate files
define("IN_POSTPONE", true);
// Current version of PostPone
define("VERSION", "0.1-dev");
// Absolute path
$root_path = $_SERVER['DOCUMENT_ROOT'];
// Root URL
$root_url = 'http';
if (!empty($_SERVER["HTTPS"])) {
$root_url .= "s";
}
$root_url .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$root_url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
}
else {
$root_url .= $_SERVER["SERVER_NAME"];
}
// TODO: Make this more elegant
// Subdirectory:
define("SUBDIR", "");
$root_path .= SUBDIR;
$root_url .= SUBDIR;
define("ROOT_URL", $root_url);
define("ROOT_PATH", $root_path);
// Require file for including all includes
require_once ROOT_PATH."/inc/common.inc.php";
// Include template
require($template->get_main_file());
?>