From ae183c1c42a570088fb56fd9f62c6cd9a622578f Mon Sep 17 00:00:00 2001 From: Bui Date: Fri, 26 Sep 2014 10:15:17 +0900 Subject: [PATCH] use country names in boards.html --- boards.php | 5 +- inc/countries.php | 254 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 inc/countries.php diff --git a/boards.php b/boards.php index 46bddb38..187384a6 100644 --- a/boards.php +++ b/boards.php @@ -2,6 +2,8 @@ include "inc/functions.php"; include "inc/mod/auth.php"; +include "inc/countries.php"; + $admin = isset($mod["type"]) && $mod["type"]<=30; if (php_sapi_name() == 'fpm-fcgi' && !$admin) { @@ -84,9 +86,10 @@ foreach ($boards as $i => &$board) { $locale_arr = explode('_', $locale); $locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]); $locale_short = str_replace('.utf-8', '', $locale_short); + $country = get_country($locale_short); if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo';} - $img = "\"$locale\""; + $img = "\"$country\""; if ($showboard || $admin) { if (!$showboard) { diff --git a/inc/countries.php b/inc/countries.php new file mode 100644 index 00000000..68b017ac --- /dev/null +++ b/inc/countries.php @@ -0,0 +1,254 @@ +