include $_SERVER['DOCUMENT_ROOT'].'/_content/multimedia/genre_anime_ova_functions.php'; function nh($value){ if (get_magic_quotes_gpc()) { $value = stripslashes($value);} if (!is_numeric($value)) { $value = mysql_real_escape_string($value); } return $value; } if($_POST['title'] != "Search Anime") { $title = nh($_POST['title']); } if($_POST['hq'] == "") $hq = ""; else $hq = "& (`hq` = '1')"; if($_POST['lq'] == "") $hq = ""; else $lq = "& (`lq` = '1')"; if($_POST['hd'] == "") $hd = ""; else $hd = "& (`hd` = '1')"; if($_POST['eng_lang'] == "") $eng_lang = ""; else $eng_lang = "& (`eng_lang` = '1')"; if($_POST['jpn_lang'] == "") $jpn_lang = ""; else $jpn_lang = "& (`jpn_lang` = '1')"; if($_POST['complete'] == "1") { $complete = "& (`e_online` = `e_total`)"; } else { $complete = ""; } if(!empty($_POST['genre'])) { $genre = $_POST['genre']; foreach($genre as $type) { $type = nh($type); $genre2 .= " & (`genre` LIKE '%$type%')"; } } if(!empty($_POST['content'])) { $content = $_POST['content']; foreach($content as $type) { $type = nh($type); $content2 .= " & (`content` NOT LIKE '%$type%')"; } } if($_POST[order] == "1" || !isset($_POST[order])) { $order = "title ASC"; } if($_POST[order] == "2") { $order = "views DESC"; } if($_POST[order] == "3") { $order = "rating DESC"; } if($_POST[order] == "4") { $order = "type DESC"; } if(empty($User->Id)){ $dont_show = ""; } if(!isset($_POST['genre']) && $_GET[genre] == "action") { $genre = "& (genre REGEXP 'action')"; } if(!isset($_POST['genre']) && $_GET[genre] == "adventure") { $genre = "& (genre REGEXP 'adventure')"; } if(!isset($_POST['genre']) && $_GET[genre] == "comedy") { $genre = "& (genre REGEXP 'comedy')"; } if(!isset($_POST['genre']) && $_GET[genre] == "drama") { $genre = "& (genre REGEXP 'drama')"; } if(!isset($_POST['genre']) && $_GET[genre] == "fantasy") { $genre = "& (genre REGEXP 'fantasy')"; } if(!isset($_POST['genre']) && $_GET[genre] == "horror") { $genre = "& (genre REGEXP 'horror')"; } if(!isset($_POST['genre']) && $_GET[genre] == "romance") { $genre = "& (genre REGEXP 'romance')"; } if(!isset($_POST['genre']) && $_GET[genre] == "fiction") { $genre = "& (genre REGEXP 'fiction')"; } $anime_search = "SELECT * FROM `ac_anime` WHERE (`title` LIKE '%$title%') $genre2 $hq $lq $hd $eng_lang $jpn_lang $content2 $complete $dont_show $letters $genre & (`type` = '2') ORDER BY $order"; $anime_dropbox = "SELECT title, page FROM `ac_anime` WHERE `type` = '2' $dont_show ORDER BY title ASC"; ?>