1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00
php-e107/sitedown.php

51 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2008-2015 e107 Inc
2006-12-02 04:36:16 +00:00
| http://e107.org
2009-07-14 05:31:57 +00:00
|
2006-12-02 04:36:16 +00:00
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
+----------------------------------------------------------------------------+
*/
2009-10-24 08:45:43 +00:00
require_once('class2.php');
2009-09-15 15:02:35 +00:00
if (!varset($pref['maintainance_flag']) && !getperms('0')) // Allow main admin to test and view template before going offline.
2006-12-02 04:36:16 +00:00
{
e107::redirect();
2009-10-24 08:45:43 +00:00
exit();
2006-12-02 04:36:16 +00:00
}
2009-10-28 15:38:27 +00:00
header('Content-type: text/html; charset=utf-8');
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600'); // in seconds
2009-10-28 14:14:11 +00:00
2017-01-23 09:41:23 -08:00
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
2009-10-28 14:14:11 +00:00
// require_once(e_CORE.'shortcodes/batch/sitedown_shortcodes.php');
$sitedown_shortcodes= e107::getScBatch('sitedown');
2006-12-02 04:36:16 +00:00
if (!isset($SITEDOWN_TABLE))
2009-10-24 08:45:43 +00:00
{
if (file_exists(THEME.'templates/sitedown_template.php')) //v2.x location.
{
require_once(THEME.'templates/sitedown_template.php');
}
elseif (file_exists(THEME.'sitedown_template.php')) //v1.x location
2006-12-02 04:36:16 +00:00
{
2009-10-24 08:45:43 +00:00
require_once(THEME.'sitedown_template.php');
2006-12-02 04:36:16 +00:00
}
else
{
2013-03-20 22:59:37 -07:00
require_once(e_CORE.'templates/sitedown_template.php');
2006-12-02 04:36:16 +00:00
}
}
echo $tp->parseTemplate($SITEDOWN_TABLE, true, $sitedown_shortcodes);