<html>
<head>
Musique
</head>

<body>
<center>
<?php

$db = sqlite_open("var/zik.db");
#$res = sqlite_query($db, "CREATE TABLE IF NOT EXISTS songs (title VARCHAR(128), downloads INT, path VARCHAR(128))");

$title_array = array();
$file_array = array();

function add_song($title, $filename)
{
  global $file_array;
  global $title_array;

  $title_array[] = $title;
  $file_array[] = $filename;
}

add_song("Race Dream", "Ace/Ace75 - RaceDream.mp3");
add_song("Bug",        "Ace/Ace83 - Bug.mp3");
add_song("Battle(v2)",     "Ace/Ace100b-Battle.mp3");
add_song("Ace90",        "Ace/Ace90.mp3");
add_song("Ace107",       "Ace/Ace107.mp3");
add_song("Ace113-Green", "Ace/Ace113.mp3");
add_song("Seb26", "Ace/Ace - Words of Symmetry (Seb26_7).mp3");
add_song("Seb30", "Ace/Ace - Last Level (Seb30_7).mp3");

#$result = sqlite_query($db, 'SELECT title,downloads FROM songs');
#var_dump(sqlite_fetch_array($result));

printf("<table border=\"1\" width=\"400\" bgcolor=\"CCCCCC\">\n");
foreach($file_array as $i=>$f)
{
  $filename = "$f";
  printf("<!-- Player for '$filename' -->\n");
  printf("<tr valign=\"center\" height=\"64\"><td align=\"center\">\n");
  printf("$title_array[$i]<br>\n");
  printf("<audio src=\"$filename\" > </audio> <br>\n");
  printf("<object type=\"application/x-shockwave-flash\" data=\"dewplayer.swf?mp3=$filename\" width=\"200\" height=\"20\">\n");
  printf("  <param name=\"movie\" value=\"dewplayer.swf?mp3=$filename\" /> \n");
  printf("</object> \n");
  printf("<a href=\"$filename\" > Download</a>\n");
  printf("<br>\n");
  printf("</td></tr>\n");
}
printf("</table>\n");
?>
</center>

</body>

</html>
