Translated using Weblate (Serbian (latin))
[phpmyadmin.git] / setup / index.php
blob22978b754712ff372c654d0b945255888a23a3eb
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Front controller for setup script
6 * @package PhpMyAdmin-Setup
7 * @license https://www.gnu.org/licenses/gpl.html GNU GPL 2.0
8 */
10 use PhpMyAdmin\Core;
12 /**
13 * Core libraries.
15 require './lib/common.inc.php';
17 if (@file_exists(CONFIG_FILE) && ! $cfg['DBG']['demo']) {
18 Core::fatalError(__('Configuration already exists, setup is disabled!'));
21 $page = Core::isValid($_GET['page'], 'scalar') ? $_GET['page'] : null;
22 $page = preg_replace('/[^a-z]/', '', $page);
23 if ($page === '') {
24 $page = 'index';
26 if (!@file_exists("./setup/frames/$page.inc.php")) {
27 // it will happen only when entering URL by hand, we don't care for these cases
28 Core::fatalError(__('Wrong GET file attribute value'));
31 // Handle done action info
32 $action_done = Core::isValid($_GET['action_done'], 'scalar') ? $_GET['action_done'] : null;
33 $action_done = preg_replace('/[^a-z_]/', '', $action_done);
35 Core::noCacheHeader();
38 <!DOCTYPE HTML>
39 <html xmlns="http://www.w3.org/1999/xhtml">
40 <head>
41 <meta charset="utf-8" />
42 <title>phpMyAdmin setup</title>
43 <link href="../favicon.ico" rel="icon" type="image/x-icon" />
44 <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
45 <link href="styles.css" rel="stylesheet" type="text/css" />
46 <script type="text/javascript" src="../js/vendor/jquery/jquery.min.js"></script>
47 <script type="text/javascript" src="../js/vendor/jquery/jquery-ui.min.js">
48 </script>
49 <script type="text/javascript" src="ajax.js"></script>
50 <script type="text/javascript" src="../js/config.js"></script>
51 <script type="text/javascript" src="scripts.js"></script>
52 <script type="text/javascript" src="../js/messages.php"></script>
53 </head>
54 <body>
55 <h1><span class="blue">php</span><span class="orange">MyAdmin</span> setup</h1>
56 <div id="menu">
57 <?php
58 require './setup/frames/menu.inc.php';
60 </div>
61 <div id="page">
62 <?php
63 require "./setup/frames/$page.inc.php";
65 </div>
66 </body>
67 </html>