forked from bbdoc/PoracleWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_mons.php
38 lines (32 loc) · 1.19 KB
/
search_mons.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
include_once "./include/functions.php";
include_once "./config.php";
include_once "./include/defaults.php";
if (isset($scan_dbtype) && $scan_dbtype == "MAD") {
include_once "./include/db_mad.php";
}
if (isset($scan_dbtype) && $scan_dbtype == "RDM") {
include_once "./include/db_rdm.php";
}
$mons=get_all_mons();
if ( $_POST['searchtype'] == "questmon" ) {
$quests_mons=get_quest_mons();
foreach($quests_mons as $key => $pokemon_id) {
unset($mons[$pokemon_id]);
}
}
foreach($mons as $pokemon_id => $pokemon_name_type) {
if ($pokemon_id <= $max_pokemon) {
if ( $_POST['search'] == "ALL" || stripos(stripAccents($pokemon_name_type), stripAccents($_POST['search'])) !== FALSE ) {
$i=$pokemon_id;
$pokemon_name=explode("_", $pokemon_name_type);
$pokemon_name=$pokemon_name[0];
echo "<li>";
echo "<input type='checkbox' name='mon_$i' id='mon_$i' />\n";
echo "<label for='mon_$i'><img loading=lazy src='$uicons_pkmn/pokemon/".$i.".png' style='margin-bottom:10px;' />";
echo "<br>";
echo "<font size=2>".str_pad($i, 3, "0", STR_PAD_LEFT)."<br>".$pokemon_name."</font></label>";
echo "</li>\n";
}
}
}