Moved lists back to same folder as songs.
[songbook.git] / web / displayartist.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6   <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
7   <title>Songbook Artist</title>
8   <link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
9   <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
10   <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
11
12 <?php
13 include_once "songbook.php";
14 $artist = $_REQUEST ["artist"];
15 ?>
16
17 <div class="heading">
18 <a href="/songbook"><img src="/Icons/Home.png" alt="Home"></a>
19   <h1 class="centered">Andrew DeFaria's Songbook</h1>
20
21   <h2 class="centered"><?php echo $artist?></h2>
22 </div>
23
24 <div id="content">
25
26 <?php
27 global $songs;
28
29 $artistsSongs = array();
30
31 debug ("Processing songs");
32
33 foreach ($songs as $song) {
34   debug ("Song: $song");
35   $songArtist = getArtist ($song);
36
37   if ($songArtist == $artist) {
38     array_push ($artistsSongs, $song);
39   } // if
40 } // foreach
41
42 print "<ol>";
43
44 foreach ($artistsSongs as $artistSong) {
45   print "<li><a href=\"webchord.cgi?chordpro=$artistSong\">";
46   print basename ($artistSong, ".pro");
47   print "</a></li>";
48 } // foreach
49 ?>
50
51 </body>
52 </html>