Location: PHPKode > projects > Fretsweb > fretsweb-1.2/fretsweb/admin/index.php
<?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/>.
*/

require_once "common.php";

//Login Test
session_start();
if($_SESSION['in'] < 1)
{
	header('location: login.php?need=moderator');
	die();
}

if($_SESSION['in'] == 2)
{
	$admin = true;
}
else
{
	$admin = false;
}

?>
<html>
<head>
<title> FOF Contest Server: Administration Panel </title>
<link href="../css.php" rel="stylesheet" type="text/css" />
<link href="../images/favicon.png" rel="icon">
</head>
<body>
<center>
<h2> Fretsweb Administration Panel</h2>
<h3><a href="login.php">Logout</a></h3>
<h5>
Uploadurl:
<?php
if($_SERVER['HTTPS'] == 'on')
	$protocol = 'https';
else
	$protocol = 'http';
if(dirname(dirname($_SERVER['PHP_SELF'])) == '/')
	$dir = '';
else
	$dir = dirname(dirname($_SERVER['PHP_SELF']));
echo $protocol.'://' . $_SERVER['HTTP_HOST'] . $dir . '/upload.php' ; 
?>
</h5>
<!-- contest status: open/closed -->
<p><b>Contest status</b><br/>
<?php include_once "status.php"; contest_status_print() ?><br/>
<a href="changestatus.php?action=open">Open the contest</a> / <a href="changestatus.php?action=close">Close the contest</a>
<br/>
<a href="timer.php">Set open-close timer</a>
</p>

<!-- song-stuff -->
<p><b>Songs</b><br/>
<a href="addsong.php">Add songs</a><br/>
<a href="delsong.php">Remove songs</a><br/>
<a href="editsong.php">Edit songs</a><br/>
<?php
if($admin)
{
	echo '<a href="addpack.php">Songpacks</a><br/>';
}
?>
<a href="songrequests.php">Song requests</a></p>

<!-- player-stuff -->
<p><b>Players</b><br/>
<a href="addplayer.php">Add players</a><br/>
<a href="delplayer.php">Remove players</a><br/>
<a href="editplayer.php">Edit players</a><br/>
<a href="joinrequests.php">Join requests</a></p>

<?
if($admin)
{
	echo '
<p><b>Logs</b><br/>
<!-- logs -->
<a href="showlog.php">Show logs</a></p>

<!-- DB reset -->
<p><b>Database management</b><br/>
<a href="backuphandle.php">Backup stuff</a><br/>
<a href="init_db.php">Reset the database</a><br/>
<a href="delscores.php">Clear scores</a></p>
	';
}
?>
<p><b>Extra</b><br/>
<?php if($admin) echo '<a href="delforum.php">Reset forum</a><br/>'; ?>
<a href="editforum.php">Edit forum</a><br/>
<a href="newshandle.php">News feed</a></p>

<?php
if($admin)
{
	echo '
<p><b>Configuration</b><br/>
<a href="configure.php">Edit configuration</a><br/>
<a href="adminpasswd.php">Change admin password</a></p>
	';
}
?>
<p><b><a href="..">Click here to go back to the index.</a></p>
</center>
</body>
</html>

Return current item: Fretsweb