forked from zenphoto/zenphoto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
29 lines (27 loc) · 880 Bytes
/
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
<?php
define('OFFSET_PATH', 0);
if (!$_zp_script = @$_SERVER['SCRIPT_FILENAME']) {
$_zp_script = __FILE__;
}
$_contents = @file_get_contents(dirname($_zp_script) . '/zp-data/zenphoto.cfg.php');
if ($_contents) {
if (strpos($_contents, '<?php') !== false)
$_contents = '?>' . $_contents;
@eval($_contents);
if (@$_zp_conf_vars['site_upgrade_state'] == 'closed') {
if (isset($_zp_conf_vars['special_pages']['page']['rewrite'])) {
$page = $_zp_conf_vars['special_pages']['page']['rewrite'];
} else {
$page = 'page';
}
if (!preg_match('~' . preg_quote($page) . '/setup_set-mod_rewrite\?z=setup$~', $_SERVER['REQUEST_URI'])) {
if (file_exists(dirname($_zp_script) . '/plugins/site_upgrade/closed.php')) {
header('location: plugins/site_upgrade/closed.php');
}
exit();
}
}
}
unset($_contents);
include (dirname(__FILE__) . '/zp-core/index.php');
?>