Location: PHPKode > projects > Fretsweb > fretsweb-1.2/fretsweb/songdir/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/>.
*/


// Include the common file
require_once '../admin/common.php';


// Write header
echo "<html>
<head>
<title>Fretsweb - Songs directory</title>
$head_feed
<link href=\"../css.php\" rel=\"stylesheet\" type=\"text/css\" />
<link href=\"../images/favicon.png\" rel=\"icon\">
</head>
<body>
<div id=\"page\">
<div id=\"content\">
<div id=\"time\">" . date('Y-m-d, H:i') . "</div>
<p class=\"logoContainer\">
    <a href=\"charts.php\"><img id=\"logo\" src=\"../images/logo.png\" alt=\"Fretsweb\"></a>
</p>
<h1>Songs directory</h1>";


// Show available files
echo '<ul>';
foreach(scandir('.') as $file)
{
	if(substr($file, -4) != '.zip' || substr($file, -4) != '.rar')
	{
		echo "<li><a href=\"$file\">$file</a></li>";
	}
}
echo '</ul>';


// Write footer
echo "</div>";
include "../admin/pagefooter.php";
echo "
</div>
</body>
</html>";


// Close the database link
mysql_close( $db_link );

?>
Return current item: Fretsweb