devilbox/.devilbox/www/htdocs/vendor/phpmyadmin-4.8/setup/index.php

68 lines
1.9 KiB
PHP
Raw Normal View History

2016-10-22 14:57:10 +00:00
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Front controller for setup script
*
* @package PhpMyAdmin-Setup
* @license https://www.gnu.org/licenses/gpl.html GNU GPL 2.0
*/
2018-04-14 09:18:00 +00:00
use PhpMyAdmin\Core;
2016-10-22 14:57:10 +00:00
/**
* Core libraries.
*/
require './lib/common.inc.php';
2018-04-14 09:18:00 +00:00
if (@file_exists(CONFIG_FILE) && ! $cfg['DBG']['demo']) {
Core::fatalError(__('Configuration already exists, setup is disabled!'));
}
2018-04-14 09:18:00 +00:00
$page = Core::isValid($_GET['page'], 'scalar') ? $_GET['page'] : null;
2016-10-22 14:57:10 +00:00
$page = preg_replace('/[^a-z]/', '', $page);
if ($page === '') {
$page = 'index';
}
2018-04-14 09:18:00 +00:00
if (!@file_exists("./setup/frames/$page.inc.php")) {
2016-10-22 14:57:10 +00:00
// it will happen only when entering URL by hand, we don't care for these cases
2018-04-14 09:18:00 +00:00
Core::fatalError(__('Wrong GET file attribute value'));
2016-10-22 14:57:10 +00:00
}
// Handle done action info
2018-04-14 09:18:00 +00:00
$action_done = Core::isValid($_GET['action_done'], 'scalar') ? $_GET['action_done'] : null;
2016-10-22 14:57:10 +00:00
$action_done = preg_replace('/[^a-z_]/', '', $action_done);
2018-04-14 09:18:00 +00:00
Core::noCacheHeader();
2016-10-22 14:57:10 +00:00
?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>phpMyAdmin setup</title>
<link href="../favicon.ico" rel="icon" type="image/x-icon" />
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="styles.css" rel="stylesheet" type="text/css" />
2018-04-14 09:18:00 +00:00
<script type="text/javascript" src="../js/vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../js/vendor/jquery/jquery-ui.min.js">
2016-10-22 14:57:10 +00:00
</script>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="../js/config.js"></script>
<script type="text/javascript" src="scripts.js"></script>
<script type="text/javascript" src="../js/messages.php"></script>
</head>
<body>
<h1><span class="blue">php</span><span class="orange">MyAdmin</span> setup</h1>
<div id="menu">
<?php
require './setup/frames/menu.inc.php';
?>
</div>
<div id="page">
<?php
require "./setup/frames/$page.inc.php";
?>
</div>
</body>
</html>