\r\n"; if ($showform != "no") { echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; $sql = "select * from Years order by year desc"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo " \r\n"; } echo " \r\n"; echo " \r\n"; echo " \r\n"; $sql = "select * from Genres"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo " \r\n"; } echo " \r\n"; echo " \r\n"; echo "
\r\n"; } $search = mysql_real_escape_string($search); $genre = mysql_real_escape_string($genre); if ($search or $year or $genre) { $words = split(' ',$search); foreach($words as $key=>$word) { if($key==0) { $asearchartist = $asearchartist . "("; $asearchtitle = $asearchtitle . "("; $asearchboxset = $asearchboxset . "("; } if($key>0) { $asearchartist = $asearchartist . " and "; $asearchtitle = $asearchtitle . " and "; $asearchboxset = $asearchboxset . " and "; } $asearchartist = $asearchartist . "artist like '%$word%'"; $asearchtitle = $asearchtitle . "title like '%$word%'"; $asearchboxset = $asearchboxset . "boxset like '%$word%'"; } $asearchartist = $asearchartist . ")"; $asearchtitle = $asearchtitle . ")"; $asearchboxset = $asearchboxset . ")"; if ($year) $whereyear = " and year = $year"; if ($genre) $wheregenre = " and genre = '$genre'"; $sql = "select * from MusicIndex where ($asearchartist or ($asearchtitle or $asearchboxset)) $whereyear $wheregenre order by artist, year, boxsetid, boxsetindex, title"; $result = mysql_query($sql); $search_results = mysql_affected_rows() . " search results for $search"; if ($year) $search_results = $search_results . " Year: $year"; if ($genre) $search_results = $search_results . " Genre: $genre"; echo "
" . $search_results . "
\r\n"; echo "\r\n\r\n"; if ($showform == "no") echo "\r\n"; else echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo "
\r\n"; if(mysql_affected_rows() > 0) { echo " \r\n"; } else { echo "
\r\n"; } echo " \r\n"; echo " \r\n"; echo " \r\n"; echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo "
CoverArtistTitleBoxsetBoxset IndexReleasedCountFormatGenrePlaying Time
\r\n"; echo "
\r\n"; echo "
\r\n\r\n"; if ($showform == "no") echo "\r\n"; else echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo "
\r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; while($row = mysql_fetch_assoc($result)) { echo " \r\n"; if($row["year"] != 0) { if(!preg_match_all("/boxset/", $row["link"], $match)) { echo " \r\n"; } else { echo " \r\n"; } } if($row["year"] == 0) echo " \r\n"; if($row["year"] != 0) echo " \r\n"; if($row["year"] == 0) echo " \r\n"; if($row["year"] != 0) { echo " \r\n"; echo " \r\n"; if($row["boxsetindex"] > 1) { echo " \r\n"; } else { echo " \r\n"; } echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; echo " \r\n"; } echo " \r\n"; echo "\r\n"; } echo " \r\n"; echo "
CoverArtistTitleBoxsetBoxset IndexReleasedCountFormatGenrePlaying Time
" . htmlspecialchars($row["artist"], ENT_QUOTES) . "" . htmlspecialchars($row["artist"], ENT_QUOTES) . "" . htmlspecialchars($row["title"], ENT_QUOTES) . "" . htmlspecialchars($row["boxset"], ENT_QUOTES) . "" . ($row["boxsetindex"]-1) . "" . $row["year"] . "" . $row["count"] . "" . htmlspecialchars($row["format"], ENT_QUOTES) . "" . htmlspecialchars($row["genre"], ENT_QUOTES) . "" . $row["playingtime"] . "
\r\n"; echo "
\r\n"; echo "
\r\n\r\n"; } mysql_close($connection); usleep(250000); ?>