2 //ini_set('display_errors', 'On');
4 ini_set('log_errors', 'On');
5 ini_set('error_log', 'errors/'.pathinfo(__FILE__, PATHINFO_FILENAME).'.log');
7 ini_set('zlib.output_compression', 'On');
9 require_once "db_common.inc";
10 require_once "web_template.inc";
13 $defines = $db->get_defines();
15 function print_select_form($fp, $id_defines, $form_name)
17 fwrite($fp, "<select name='{$form_name}'>\n");
18 fwrite($fp, "<option value='0' selected>すべて</option>\n");
19 foreach ($id_defines as $num => $name) {
20 if ($num > 0 && strpos($name, '不明') !== 0) {
21 fwrite($fp, "<option value='{$num}'>{$name}</option>\n");
24 fwrite($fp, "</select>\n");
28 $wt = new WebTemplate();
29 $wt->set_title("変愚蛮怒 スコア カスタム検索");
30 $fp = $wt->main_contents_fp();
35 <h2>変愚蛮怒 スコア カスタム検索</h2>
36 <form action="score_ranking.php" method="GET">
42 fwrite($fp, "<label for=\"race_id\">種族:</label>");
43 print_select_form($fp, $defines['race'], 'race_id');
44 fwrite($fp, " <label for=\"class_id\">職業:</label>");
45 print_select_form($fp, $defines['class'], 'class_id');
46 fwrite($fp, " <label for=\"personality_id\">性格:</label>");
47 print_select_form($fp, $defines['personality'], 'personality_id');
49 fwrite($fp, "</p>\n");
52 fwrite($fp, "<label for=\"realm1_id\">領域1:</label>");
53 print_select_form($fp, $defines['realm'], 'realm_id1');
54 fwrite($fp, " <label for=\"realm2_id\">領域2:</label>");
55 print_select_form($fp, $defines['realm'], 'realm_id2');
56 fwrite($fp, "</p>\n");
62 <label for="name">キャラクター名:</label>
63 <input type="text" name="name">
64 <label for="name_match_strict">
65 <input type="radio" name="name_match" value="strict" id="name_match_strict" checked="checked">完全一致
67 <label for="name_match_partial">
68 <input type="radio" name="name_match" value="partial" id="name_match_partial">部分一致
72 <label for="sex">性別:</label>
73 <select name="sex" id="sex">
74 <option value="">すべて</option>
75 <option value="1">男性</option>
76 <option value="0">女性</option>
80 <label for="name">死因:</label>
81 <input type="text" name="killer" placeholder="死因を入力(例:デスソード)">※部分一致のみ、「勝利の後引退」は'ripe'、「勝利の後切腹」は'Seppuku'と入力
84 <label for="sort">ソート順:</label>
85 <select name="sort" id="sort">
86 <option value="socre">スコア順</option>
87 <option value="newcome">新着順</option>
91 <input type="submit" value="検索"></input>