X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=score%2Fpopularity_ranking.php;h=71cbb8c7e7b780605081ef7faa3d81950e019377;hb=169c9372c50e77fbc2f3c632b34827120f6435b0;hp=d6aaed01350843f09a11a6388048550d76c858cf;hpb=e3b40ec8ac3e42b0468573904dbb3533552a1dbf;p=hengband%2Fweb.git diff --git a/score/popularity_ranking.php b/score/popularity_ranking.php index d6aaed0..71cbb8c 100644 --- a/score/popularity_ranking.php +++ b/score/popularity_ranking.php @@ -6,201 +6,28 @@ ini_set('error_log', 'errors/'.pathinfo(__FILE__, PATHINFO_FILENAME).'.log'); ini_set('zlib.output_compression', 'On'); -require_once "db_common.inc"; - -function print_popularity_table($stat, $id_name, $name) -{ - echo << - - - - -EOM; - - foreach ([ - '計', '男性', '女性', '勝利', '平均スコア', '最大スコア', - ] as $name) { - echo ""; - } - echo "\n"; - echo "\n"; - - foreach ($stat as $k => $s) { - $name_link = "{$s['name']}"; - $average_score = floor($s['average_score']); - echo << - - - - - - - - -EOM; - } - - echo "
$name${name}
$name_link{$s['total_count']}{$s['male_count']}{$s['female_count']}{$s['winner_count']}$average_score{$s['max_score']}
"; - echo ""; -} - -function print_realm_popularity_table($stat, $id_name) -{ - // 魔法領域の統計を職業ごとにグループ分け - $class_ids = array_unique(array_column($stat, "class_id")); - $class_realm_stat_list = array_fill_keys($class_ids, []); - - foreach ($stat as $s) { - $class_realm_stat_list[intval($s["class_id"])][] = $s; - } - - echo "
"; - - // 職業ごとにテーブルを表示 - foreach ($class_realm_stat_list as $class_id => $class_realm_stat) { - if (count($class_realm_stat) <= 1) continue; // 領域固定の職業は飛ばす - - $class_name = $class_realm_stat[0]['class_name']; - - echo << - - -{$class_name} -EOM; - foreach ([ - '計', '男性', '女性', '勝利', '平均スコア', '最大スコア', - ] as $th_name) { - echo "${th_name}"; - } - echo "\n"; - echo "\n"; - - foreach ($class_realm_stat as $realm) { - $name_link = "{$realm['realm_name']}"; - $average_score = floor($realm['average_score']); - echo << -$name_link -{$realm['total_count']} -{$realm['male_count']} -{$realm['female_count']} -{$realm['winner_count']} -$average_score -{$realm['max_score']} - -EOM; - } - - echo ""; - } - echo "
"; -} - -$db = new ScoreDB(); - -$time_start = microtime(true); - -$statistics = $db->get_statistics_tables('total_count'); - -$query_time = microtime(true) - $time_start; -?> - - - - - - - - - - - - - - - 変愚蛮怒 公式WEB スコアランキング 人気のある種族・職業・性格・魔法領域 - - - - -
- -
- tama - tama - tama - tama - 変愚蛮怒 Hengband - tama - tama - tama - tama -
- - - -
- -
- +require_once "web_template.inc"; + +$wt = new WebTemplate(); + +$wt->add_head_contents(''); +$wt->add_head_contents(''); +$wt->add_head_contents( + << + +EOM +); +//$wt->add_head_contents(''); +$wt->set_title("変愚蛮怒 スコアランキング 人気のある種族・職業・性格・魔法領域"); + +$fp = $wt->main_contents_fp(); +fwrite( + $fp, + <<人気のある種族・職業・性格・魔法領域 - - [ 種族 | 職業 | 性格 ] [ 魔法領域1 | 魔法領域2 ] - - - - - - - -
- - - - - - +
+ +EOM +); +$wt->print_page();