blue-twilight/public/loader-required.php
2016-10-27 12:42:44 +01:00

49 lines
1.3 KiB
PHP

<?php
/* START LOADER CHECK */
/* For security reasons, don't allow use of this page if a loader is already installed */
if (function_exists('sg_get_const'))
{
header('Location: index.php');
exit();
}
/* END LOADER CHECK */
/* START PHPINFO REQUEST */
if (isset($_GET['phpinfo']))
{
phpinfo();
exit();
}
/* END PHPINFO REQUEST */
/* START LANGUAGE */
$lang = 'en';
if (isset($_GET['lang']))
{
$lang = trim(strtolower(stripslashes($_GET['lang'])));
}
$langFile = sprintf('%s/raw/lang.%s.php', __DIR__, $lang);
if (!file_exists($langFile))
{
$langFile = sprintf('%s/raw/lang.en.php', __DIR__);
}
$lang = include $langFile;
/* END LANGUAGE */
ob_start();
?>
<h1><?php echo $lang['loader_required_title']; ?></h1>
<p><?php echo $lang['loader_required_p1']; ?></p>
<p><?php echo $lang['loader_required_p2']; ?></p>
<?php $url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]?phpinfo=1"; ?>
<p><b><a href="<?php echo $url; ?>" target="_blank"><?php echo $url ?></a></b></p>
<p style="margin-top: 30px;"><a class="btn btn-primary" href="javascript:window.location.reload();"><?php echo $lang['loader_required_retry']; ?></a></p>
<?php
$content = ob_get_clean();
require sprintf('%s/raw/layout.php', __DIR__);
?>