Location: PHPKode > projects > Radio404 > radio404/htdocs/index.php
<?php
include('../sql.inc');
include('functions.php');

echo '<h1>Radio404 ALPHA TEST</h1><h3>Tune Winamp, XMMS, or your favorite audio client in @ <a href="http://omega.dyndns.ws:8000/listen.pls">http://omega.dyndns.ws:8000/</a></h3>';
echo '<b>Read more about Radio404 <a href="http://42.denetron.net/?projects/radio404">here</a>. This is a sample library for testing purposes.</b><br><br>';
$sql = 'SELECT t.track AS track FROM history h, tracks t WHERE t.id = h.tid ORDER BY h.stamp DESC LIMIT 1 ';
$result = sql_query($sql);

$currentsong = get_track_info($result[0]->track);
$currentsong = $currentsong['artist'] . ' (' . $currentsong['album'] . ') ' . $currentsong['song'];

echo '<b>Currently Playing:</b> ' . $currentsong . '<br /><br />';
echo '<b>Up Next:</b> ' . shell_exec('cat /home/radio404/playlist.lst') . '<hr>';

echo "<a href='newuser.php'>New User?</a><br />Existing user? <a href='login.php'>Login</a>.<br />";
echo "<a href='billboard.php'>Billboard</a> (Top 20 for the past 7 days)<br />";
echo "<a href='lastten.php'>Last ten played tracks</a><br />";
echo "<a href='vote.php'>Vote</a> for tracks (must be logged in)<br />";
echo "<a href='addfavorite.php'>Add tracks as favorites</a><br />";
echo "<a href='find.php'>Search</a> through library (May vote and add results as favorites)<br />";

?>
Return current item: Radio404