"; outputGenreSwitches('atoz'); 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 artists WHERE (removed != 1) && (status != 0) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; $query .= "((name LIKE \"0%\") || (name LIKE \"1%\") || (name LIKE \"2%\") || (name LIKE \"3%\") || (name LIKE \"4%\") || (name LIKE \"5%\") || (name LIKE \"6%\") || (name LIKE \"7%\") || (name LIKE \"8%\") || (name LIKE \"9%\"))"; $res = mysql_query($query); if(mysql_numrows($res) > 0) $letterset .= "#"; foreach ($alphabet as $thisletter) { $query = "SELECT * FROM artists WHERE (removed != 1) && (status != 0) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; $query .= "(name 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, "atoz-$siteGenre.html", $letter); echo "
"; $query = "SELECT * FROM artists WHERE (removed != 1) && (status != 0) &&"; if($genreID != 1) $query .= "(genreID = $genreID) && "; if($letter == "#") $query .= "((name LIKE \"0%\") || (name LIKE \"1%\") || (name LIKE \"2%\") || (name LIKE \"3%\") || (name LIKE \"4%\") || (name LIKE \"5%\") || (name LIKE \"6%\") || (name LIKE \"7%\") || (name LIKE \"8%\") || (name LIKE \"9%\"))"; else $query .= "(name LIKE \"$letter%\")"; $query .= " ORDER BY name"; $res = mysql_query($query); if(mysql_numrows($res) == 0) echo "No results"; else { $i = 0; while($row = mysql_fetch_array($res)) { $notallowed = array("[", "]", "{", "}", ",", "*", "&", "^", "%", "/", "|", ";", ":", "?", "'", "(", ")"); $arname = $row[name]; $arname = str_replace($notallowed, "", $arname); $arname = str_replace(" ", "-", $arname); $paget = $arname; $paget = strtolower($paget); if(($i % 2) == 0) $bgcol = $contrasting_bgcolor_2; else $bgcol = $contrasting_bgcolor_1; echo "
"; echo "
"; if(strlen($row[artistsimg]) > 1) artistImage ($row[id], 70, 70, 1, 1); else echo ""; echo "
"; echo "
"; 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++; } } ?>