From 258d4b28daa220c7bc36771370f1befc5a4bf04a Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 5 Jul 2018 00:05:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=95=EC=A1=B0=20=EC=9D=BC=EB=9E=8C?= =?UTF-8?q?=EC=97=90=20=ED=98=84=EC=9E=AC=20=EA=B5=AD=EA=B0=80=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_emperior.php | 189 ++++++------------------------------ hwe/a_emperior_detail.php | 197 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+), 159 deletions(-) create mode 100644 hwe/a_emperior_detail.php diff --git a/hwe/a_emperior.php b/hwe/a_emperior.php index 7f4b5c3a..9a71e9ed 100644 --- a/hwe/a_emperior.php +++ b/hwe/a_emperior.php @@ -4,13 +4,8 @@ namespace sammo; include "lib.php"; include "func.php"; -$select = Util::getReq('select', 'int', 0); - $db = DB::db(); -$templates = new \League\Plates\Engine('templates'); -$templates->registerFunction('ConvertLog', '\sammo\ConvertLog'); -$templates->registerFunction('newColor', '\sammo\newColor'); increaseRefresh("왕조일람", 1); ?> @@ -35,17 +30,42 @@ increaseRefresh("왕조일람", 1); query('SELECT * FROM emperior ORDER BY `no` DESC') as $emperior){ +$showCurrentNation = true; +foreach($db->query('SELECT * FROM emperior ORDER BY `no` DESC') as $emperior){ + $serverID = $emperior['server_id']??($emperior['serverID']??null); + if($showCurrentNation && $serverID == UniqueConst::$serverID){ + $showCurrentNation = false; + } + if ($showCurrentNation) { + $gameStor = KVStorage::getStorage($db, 'game_env'); + [$year, $month] = $gameStor->getValuesAsArray(['year', 'month']); ?> - +
+ + + +
+ 현재 (月) + + + + +
+ + + +
- + @@ -84,157 +104,8 @@ if ($select == 0) { - - - -
- - -queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select); -$serverID = $emperior['server_id']??($emperior['serverID']??null); - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
국 가 수
(최종 / 최대)
장 수 수
(최종 / 최대)
등 장 국 가
국가별 성향
장 수 성 격
장 수 특 기
; bgcolor= colspan=6> - (月) -
국 력성 향
장 수속 령
총 인 구인 구 율
국 고병 량
황 제 승 상 
위 장 군 사 공 
표 기 장 군 태 위 
거 기 장 군 사 도 
오 호 장 군
건 안 칠 자
장 수 들
(공헌도 순서)
역 사 기 록
- -query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID); - foreach($nations as $nation){ - if(!$nation['nation']??null){ - continue; - } - $nation += Json::decode($nation['data']); - - $nation['typeName'] = getNationType($nation['type']); - $nation['levelName'] = getNationLevel($nation['level']); - if($nation['generals']){ - $generals = $db->query('SELECT `general_no`, `name` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']); - $nation['generalsFull'] = $generals; - } - else{ - $nation['generalsFull'] = []; - } - - if(key_exists('aux', $nation)){ - $nation += $nation['aux']; - } - - echo $templates->render('oldNation', $nation); - } -} -?> - - +
diff --git a/hwe/a_emperior_detail.php b/hwe/a_emperior_detail.php new file mode 100644 index 00000000..df9d6bc4 --- /dev/null +++ b/hwe/a_emperior_detail.php @@ -0,0 +1,197 @@ +registerFunction('ConvertLog', '\sammo\ConvertLog'); +$templates->registerFunction('newColor', '\sammo\newColor'); +increaseRefresh("왕조일람", 1); + +$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select); +$serverID = $emperior['server_id']??($emperior['serverID']??null); + +?> + + + + + + + + +<?=UniqueConst::$serverName?>: 왕조일람 + + + + + + + + + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
국 가 수
(최종 / 최대)
장 수 수
(최종 / 최대)
등 장 국 가
국가별 성향
장 수 성 격
장 수 특 기
; bgcolor= colspan=6> + (月) +
국 력성 향
장 수속 령
총 인 구인 구 율
국 고병 량
황 제 승 상 
위 장 군 사 공 
표 기 장 군 태 위 
거 기 장 군 사 도 
오 호 장 군
건 안 칠 자
장 수 들
(공헌도 순서)
역 사 기 록
+ +query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID); + foreach($nations as $nation){ + if(!$nation['nation']??null){ + continue; + } + $nation += Json::decode($nation['data']); + + $nation['typeName'] = getNationType($nation['type']); + $nation['levelName'] = getNationLevel($nation['level']); + if($nation['generals']){ + $generals = $db->query('SELECT `general_no`, `name` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']); + $nation['generalsFull'] = $generals; + } + else{ + $nation['generalsFull'] = []; + } + + if(key_exists('aux', $nation)){ + $nation += $nation['aux']; + } + + echo $templates->render('oldNation', $nation); + } +} +?> + + + + +
+ + \ No newline at end of file