-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.php
More file actions
75 lines (61 loc) · 1.54 KB
/
index.php
File metadata and controls
75 lines (61 loc) · 1.54 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
68
69
70
71
72
73
74
75
<?php
define( 'PMR', true );
include 'config.php';
if ( $_REQUEST['version'] != '' )
{
die( VERSION . '-' . BUILD );
}
if ( $page != 'install' )
{
// Check if constants are defined
$config_fields = array(
'URL', 'LICENSE', 'DB_NAME', 'DB_USERNAME', 'DB_PASSWORD', 'PATH'
);
if ( is_array( $config_fields ) )
{
foreach( $config_fields AS $constant )
{
if ( !defined( $constant ) )
{
header( 'Location: install/' );
exit();
}
}
}
// Check if constants have values
$config_fields = array(
URL, LICENSE, DB_NAME, DB_USERNAME, DB_PASSWORD, PATH
);
if ( is_array( $config_fields ) )
{
foreach( $config_fields AS $constant )
{
if ( $constant == '' )
{
header( 'Location: install/' );
exit();
}
}
}
}
include PATH . '/defaults.php';
// Check the installation folders and ask to remove those if exist
if ( file_exists( PATH . '/install/index.php' ) )
{
die( 'Initialization Error: The /install folder must be removed after you have done the install.' );
}
if ( file_exists( PATH . '/docs/version' ) )
{
die( 'Initialization Error: The /docs folder must be removed after you have done the install or upgrade.' );
}
// Title tag content
$title = $conf['website_name_short'];
// Template header
include PATH . '/templates/' . $cookie_template . '/header.php';
// Include index content
include PATH . '/templates/' . $cookie_template . '/tpl/index.tpl';
// Include cron jobs
include PATH . '/includes/functions/cron.php';
// Template footer
include PATH . '/templates/' . $cookie_template . '/footer.php';
?>