new setup script (Google Summer of Code 2008), work in progress
[phpmyadmin/crack.git] / setup / index.php
blobfe0bc5a767d5e01560f2361e7884702d9ef3f26d
1 <?php
2 /**
3 * Front controller for setup script
5 * @package phpMyAdmin-setup
6 * @author Piotr Przybylski <piotrprz@gmail.com>
7 * @copyright Copyright (c) 2008, Piotr Przybylski <piotrprz@gmail.com>
8 * @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
9 * @version $Id$
12 require './lib/common.inc.php';
14 $page = filter_input(INPUT_GET, 'page');
15 $page = preg_replace('/[^a-z]/', '', $page);
16 if ($page === '') {
17 $page = 'index';
19 if (!file_exists("./setup/frames/$page.inc.php")) {
20 // it will happen only when enterung URL by hand, we don't care for these cases
21 die('Wrong GET file attribute value');
24 // send no-cache headers
25 require './libraries/header_http.inc.php';
27 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
28 <html xmlns="http://www.w3.org/1999/xhtml">
29 <head>
30 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
31 <title>phpMyAdmin <?php echo $_SESSION['PMA_Config']->get('PMA_VERSION'); ?> setup</title>
32 <link href="../favicon.ico" rel="icon" type="image/x-icon" />
33 <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
34 <link href="styles.css" rel="stylesheet" type="text/css" />
35 <script type="text/javascript" src="../js/mootools.js"></script>
36 <script type="text/javascript" src="scripts.js"></script>
37 </head>
38 <body>
39 <h1><span class="blue">php</span><span class="orange">MyAdmin</span> <?php echo $_SESSION['PMA_Config']->get('PMA_VERSION'); ?> setup</h1>
40 <div id="menu">
41 <?php
42 require './setup/frames/menu.inc.php';
44 </div>
45 <div id="page">
46 <?php
47 require "./setup/frames/$page.inc.php";
49 </div>
50 </body>
51 </html>