<?php
/*
Fretsweb - A Frets on Fire chart server
Copyright (C) 2009 Daan Sprenkels
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Set the error reporting: no notices
error_reporting(E_ALL ^ E_NOTICE);
// Session start needed for $_SESSION['config_file']
session_start();
// If config.php is downloaded
if($_GET['downconf'] == 1)
{
header('Content-type: application/x-php');
header('Content-Disposition: attachment; filename="config.php"');
echo $_SESSION['config_file'];
die();
}
// Send headers for content-type
header('Content-Type: text/html; charset=utf-8');
// Try to create config file
if($file_handle = @fopen("config.php","w"))
{
fwrite($file_handle, $_SESSION['config_file']);
fclose($file_handle);
$config_created = True;
}
?><html>
<head>
<title>Fretsweb</title>
<link rel="stylesheet" href="css.php" type="text/css">
<link rel="icon" href="images/favicon.png">
</head>
<body>
<div id="page">
<div id="content">
<p class="logoContainer">
<img id="logo" src="images/logo.png" alt="Frets on Fire">
</p>
<h1>Fretsweb installation</h1>
<p>Ok, it seems everything went all right. Let's continue! :)</p>
<ol start="3">
<?php
if(!$config_created)
{
?>
<li>
<p>
<a href="<?php echo $_SERVER['PHP_SELF'] ?>?downconf=1">Click here to download config.php</a>
</p>
<p>
Upload it into the root of Fretsweb (the directory which contains charts.php).
</p>
</li>
<?
}
?>
<li>
<p>Go to the <a href="admin">admin panel</a>, login with the admin password. and set every setting that needs to be setted. I recommend starting with the site configuration (at the bottom of the page).<p>
</li>
</ol>
<p>Enjoy Fretsweb!</p>
</div>
<div id="footer">
<div class="menuPane">
FretsWeb 1.2 by Daan Sprenkels<br/>hide@address.com
</div>
</div>
</div>
</body>
</html>