"; echo "
"; outputGenreSwitches('tatoz'); echo "
"; $alphabet = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); $letterset = ""; $query = "SELECT * FROM tracks WHERE (removed != 1) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; $query .= "((title LIKE \"0%\") || (title LIKE \"1%\") || (title LIKE \"2%\") || (title LIKE \"3%\") || (title LIKE \"4%\") || (title LIKE \"5%\") || (title LIKE \"6%\") || (title LIKE \"7%\") || (title LIKE \"8%\") || (title LIKE \"9%\"))"; $res = mysql_query($query); if(mysql_numrows($res) > 0) $letterset .= "#"; foreach ($alphabet as $thisletter) { $query = "SELECT * FROM tracks WHERE (removed != 1) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; $query .= "(title LIKE \"$thisletter%\")"; $res = mysql_query($query); if(mysql_numrows($res) > 0) $letterset .= $thisletter; } if(!isset($letter)) $letter = substr($letterset, 0, 1); if($letter == "num") $letter = "#"; if(strlen($letterset) > 0) outputAlphaSwitches($letterset, "tatoz-$siteGenre.html", $letter); echo "
"; $query = "SELECT * FROM tracks WHERE (removed != 1) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; if($letter == "#") $query .= "((title LIKE \"0%\") || (title LIKE \"1%\") || (title LIKE \"2%\") || (title LIKE \"3%\") || (title LIKE \"4%\") || (title LIKE \"5%\") || (title LIKE \"6%\") || (title LIKE \"7%\") || (title LIKE \"8%\") || (title LIKE \"9%\"))"; else $query .= "(title LIKE \"$letter%\")"; $query .= " ORDER BY title"; $res = mysql_query($query); if(mysql_numrows($res) == 0) echo "No results"; else { $i = 0; while($row = mysql_fetch_array($res)) { if(($i % 2) == 0) { $bgcol = $contrasting_bgcolor_2; $letter = "b"; } else { $bgcol = $contrasting_bgcolor_1; $letter = "a"; } if($genreID == 1) $maxtracknamelen = 55; else $maxtracknamelen = 65; if(strlen($row[title]) > $maxtracknamelen) $thistitle = substr($row[title], 0, $maxtracknamelen)."..."; else $thistitle = $row[title]; if(strlen($row[artist]) > 75) $thisartist = substr($row[artist], 0, 75)."..."; else $thisartist = $row[artist]; $notallowed = array("[", "]", "{", "}", ",", "*", "&", "^", "%", "/", "|", ";", ":", "?", "'", "(", ")"); $arname = $row[artist]; $arname = str_replace($notallowed, "", $arname); $arname = str_replace(" ", "-", $arname); $ttname = $row[title]; $ttname = str_replace($notallowed, "", $ttname); $ttname = str_replace(" ", "-", $ttname); $paget = $ttname."-by-".$arname; $paget = strtolower($paget); echo "
$thistitle"; if($genreID == 1) { $temp = mysql_query("SELECT * FROM genres WHERE id = $row[genreID]"); $thisgenname = mysql_result($temp, 0, name); $thisgenfn = mysql_result($temp, 0, filename_prefix); echo "  ($thisgenname)"; } $notallowed = array("[", "]", "{", "}", ",", "*", "&", "^", "%", "/", "|", ";", ":", "?", "'", "(", ")"); $arname = $row[artist]; $arname = str_replace($notallowed, "", $arname); $arname = str_replace(" ", "-", $arname); $paget = $arname; $paget = strtolower($paget); echo "
by $thisartist
\"preview  \"add
"; /* echo "$row[name]"; if($genreID == 1) { $temp = mysql_query("SELECT * FROM genres WHERE id = $row[genreID]"); $thisgenname = mysql_result($temp, 0, name); $thisgenfn = mysql_result($temp, 0, filename_prefix); echo "  ($thisgenname)"; } if(strlen($row[profiletext]) > 220) $profile = substr($row[profiletext], 0, 220)."..."; else $profile = $row[profiletext]; if(strlen($profile) > 0) $profile .= "  "; echo "

$profilemore"; */ $i++; } } ?>