<?PHP // albumsnav.php

    include("config.php");

    $albums = albums();
    $status = status();

    $numalbums = $albums["ALBUMCOUNT"];
    $numtracks = $status["TRACK_INCLUDE"] + $status["TRACK_EXCLUDE"];

    print_header();
    print_heading("Albums - ($numtracks tracks in $numalbums albums)");

    for ($i=1; $i<$albums["ALBUMCOUNT"]; $i++) {
        $thischar = ucfirst(substr($albums["$i"], 0, 1));
	$index[$thischar] = 1;
    }
    ksort($index, SORT_STRING);
    reset($index);
    echo "<TABLE WIDTH=100%><TR>";
    while (list($char, $xj) = each($index)) {
	echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#$char\">$char</A>";
    }
    echo "</TABLE>";

?>

