명장 일람, 명예의 전당 최종 개선

This commit is contained in:
2018-06-26 02:36:20 +09:00
parent f5f06dbd3e
commit 2fdc8e179e
11 changed files with 222 additions and 72 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ increaseRefresh("명장일람", 1);
<title><?=UniqueConst::$serverName?>: 명장일람</title> <title><?=UniqueConst::$serverName?>: 명장일람</title>
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?> <?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFrame.css')?> <?=WebUtil::printCSS('css/hallOfFame.css')?>
</head> </head>
<body> <body>
@@ -160,7 +160,7 @@ foreach($generals as $general){
$general['rankName'] = $itemName; $general['rankName'] = $itemName;
$general['value'] = $itemCode; $general['value'] = $itemCode;
$itemTypes[$itemIdx][5][$itemCode] = $general; $itemTypes[$itemIdx][5][$itemCode] = $general;
} }
} }
foreach($itemTypes as [$itemNameType, $itemType, $itemFunc, $itemMinCode, $itemMaxCode, $itemOwners]){ foreach($itemTypes as [$itemNameType, $itemType, $itemFunc, $itemMinCode, $itemMaxCode, $itemOwners]){
+77 -30
View File
@@ -5,11 +5,28 @@ include "lib.php";
include "func.php"; include "func.php";
$session = Session::getInstance()->setReadOnly(); $session = Session::getInstance()->setReadOnly();
$scenarioIdx = Util::getReq('scenarioIdx', 'int', null);
$db = DB::db(); $db = DB::db();
$connect=$db->get();
increaseRefresh("명예의전당", 1); increaseRefresh("명예의전당", 1);
$scenarioList= [];
foreach($db->query('SELECT distinct(scenario_name) as name, count(scenario) as cnt, scenario from ng_games order by scenario asc') as $scenarioInfo){
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
}
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
$searchScenarioName = $scenarioList[$scenarioIdx]['name'];
$searchFilter = $db->sqleval('scenario = %i', $scenarioIdx);
}
else{
$searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval(true);
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -19,51 +36,70 @@ increaseRefresh("명예의전당", 1);
<title><?=UniqueConst::$serverName?>: 명예의 전당</title> <title><?=UniqueConst::$serverName?>: 명예의 전당</title>
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?> <?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFrame.css')?> <?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJs('js/hallOfFame.js')?>
</head> </head>
<body> <body>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr> <tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr>
<tr><td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<option value="" <?=$scenarioIdx?"selected='selected'":''?>>* 종합 *</option>
<?php foreach($scenarioList as $info): ?>
<option
value="<?=$info['scenario']?>"
<?=($info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?>
?>
</select>
</td></tr>
</table> </table>
<div style="margin:auto;width=1100px;"> <div style="margin:auto;width=1100px;">
<?php <?php
$types = array( $types = [
"명 성", ["명 성", 'int'],
"계 급", ["계 급", 'int'],
"계 략 성 공", ["계 략 성 공", 'int'],
"전 투 횟 수", ["전 투 횟 수", 'int'],
"승 리", ["승 리", 'int'],
"승 률", ["승 률", 'percent'],
"사 살", ["사 살", 'int'],
"살 상 률", ["살 상 률", 'percent'],
"보 병 숙 련 도", ["보 병 숙 련 도", 'int'],
"궁 병 숙 련 도", ["궁 병 숙 련 도", 'int'],
"기 병 숙 련 도", ["기 병 숙 련 도", 'int'],
"귀 병 숙 련 도", ["귀 병 숙 련 도", 'int'],
"차 병 숙 련 도", ["차 병 숙 련 도", 'int'],
"전 력 전 승 률", ["전 력 전 승 률", 'percent'],
"통 솔 전 승 률", ["통 솔 전 승 률", 'percent'],
"일 기 토 승 률", ["일 기 토 승 률", 'percent'],
"설 전 승 률", ["설 전 승 률", 'percent'],
"베 팅 투 자 액", ["베 팅 투 자 액", 'int'],
"베 팅 당 첨", ["베 팅 당 첨", 'int'],
"베 팅 수 익 금", ["베 팅 수 익 금", 'int'],
"베 팅 수 익 률" ["베 팅 수 익 률", 'percent'],
); ];
$templates = new \League\Plates\Engine('templates'); $templates = new \League\Plates\Engine('templates');
foreach($types as $idx=>$typeName) { foreach($types as $idx=>[$typeName, $typeValue]) {
$hallResult = $db->query('SELECT * FROM ng_hall WHERE server_id = %s AND `type`=%i ORDER BY `value` DESC LIMIT 10', UniqueConst::$serverID, $idx); $hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
$hallResult = array_map(function($general){ $hallResult = array_map(function($general)use($typeValue){
$aux = Json::decode($general['aux']); $aux = Json::decode($general['aux']);
$general += $aux; $general += $aux;
if(!key_exists('color', $general)){ if(!key_exists('color', $general)){
$general['color'] = GameConst::$basecolor4; $general['bgColor'] = GameConst::$basecolor4;
$general['fgColor'] = newColor($general['color']);
} }
if(!key_exists('fgColor', $general)){
$general['fgColor'] = newColor($general['bgColor']);
}
if(key_exists('picture', $general)){ if(key_exists('picture', $general)){
$imageTemp = GetImageURL($general['imgsvr']); $imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; $general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
@@ -71,6 +107,17 @@ foreach($types as $idx=>$typeName) {
else{ else{
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg"; $general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
} }
if(!key_exists('printValue', $general)){
$value = $general['value'];
if($typeValue == 'percent'){
$general['printValue'] = number_format($value*100, 2).'%';
}
else {
$general['printValue'] = number_format($value);
}
}
return $general; return $general;
}, $hallResult); }, $hallResult);
+36
View File
@@ -181,3 +181,39 @@ div.bar_out div.bar_in{
float:left; float:left;
} }
.tooltip{
position: relative;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
@@ -17,7 +17,6 @@
list-style:none; list-style:none;
margin:0; margin:0;
padding:0; padding:0;
overflow:hidden;
box-sizing: border-box; box-sizing: border-box;
margin-top:-1px; margin-top:-1px;
margin-bottom:-1px; margin-bottom:-1px;
@@ -39,6 +38,25 @@
height:128px; height:128px;
} }
.rankView li.has_server {
height:168px;
}
.rankView li.no_value.has_server {
height:146px;
}
.rankView .hall_server{
border-top:1px solid gray;
}
.rankView .tooltip .tooltiptext{
width:220px;
margin-left: -110px;
}
.rankView .no_value .hall_value{ .rankView .no_value .hall_value{
display:none; display:none;
} }
+27 -22
View File
@@ -2056,8 +2056,7 @@ function updateTurntime($no) {
function CheckHall($no) { function CheckHall($no) {
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$types = array( $types = array(
"experience", "experience",
@@ -2085,63 +2084,69 @@ function CheckHall($no) {
$general = $db->queryFirstRow('SELECT name,name2,owner,nation,picture,imgsvr, $general = $db->queryFirstRow('SELECT name,name2,owner,nation,picture,imgsvr,
experience,dedication,warnum,firenum,killnum, experience,dedication,warnum,firenum,killnum,
killnum/warnum*10000 as winrate,killcrew,killcrew/deathcrew*10000 as killrate, killnum/warnum as winrate,killcrew,killcrew/deathcrew as killrate,
dex0,dex10,dex20,dex30,dex40, dex0,dex10,dex20,dex30,dex40,
ttw/(ttw+ttd+ttl)*10000 as ttrate, ttw+ttd+ttl as tt, ttw/(ttw+ttd+ttl) as ttrate, ttw+ttd+ttl as tt,
tlw/(tlw+tld+tll)*10000 as tlrate, tlw+tld+tll as tl, tlw/(tlw+tld+tll) as tlrate, tlw+tld+tll as tl,
tpw/(tpw+tpd+tpl)*10000 as tprate, tpw+tpd+tpl as tp, tpw/(tpw+tpd+tpl) as tprate, tpw+tpd+tpl as tp,
tiw/(tiw+tid+til)*10000 as tirate, tiw+tid+til as ti, tiw/(tiw+tid+til) as tirate, tiw+tid+til as ti,
betgold, betwin, betwingold, betwingold/betgold*10000 as betrate betgold, betwin, betwingold, betwingold/betgold as betrate
from general where no=%i', $no); from general where no=%i', $no);
if(!$general){ if(!$general){
return; return;
} }
$unitedDate = date('Y-m-d H:i:s');
$nation = getNationStaticInfo($general['nation']); $nation = getNationStaticInfo($general['nation']);
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games'); $serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
[$scenarioIdx, $scenarioName, $startTime] = $gameStor->getValuesAsArray(['scenario', 'scenario_text', 'starttime']);
foreach($types as $idx=>$typeName) { foreach($types as $idx=>$typeName) {
//승률,살상률인데 10회 미만 전투시 스킵 //승률,살상률인데 10회 미만 전투시 스킵
if(($k == 5 || $k == 7) && $general['warnum']<10) { continue; } if(($typeName === 'winrate' || $typeName === 'killrate') && $general['warnum']<10) { continue; }
//토너승률인데 50회 미만시 스킵 //토너승률인데 50회 미만시 스킵
if($k == 13 && $general['tt'] < 50) { continue; } if($typeName === 'ttrate' && $general['tt'] < 50) { continue; }
//토너승률인데 50회 미만시 스킵 //토너승률인데 50회 미만시 스킵
if($k == 14 && $general['tl'] < 50) { continue; } if($typeName === 'tlrate' && $general['tl'] < 50) { continue; }
//토너승률인데 50회 미만시 스킵 //토너승률인데 50회 미만시 스킵
if($k == 15 && $general['tp'] < 50) { continue; } if($typeName === 'tprate' && $general['tp'] < 50) { continue; }
//토너승률인데 50회 미만시 스킵 //토너승률인데 50회 미만시 스킵
if($k == 16 && $general['ti'] < 50) { continue; } if($typeName === 'tirate' && $general['ti'] < 50) { continue; }
//수익률인데 1000미만시 스킵 //수익률인데 1000미만시 스킵
if($k == 20 && $general['betgold'] < 1000) { continue; } if($typeName === 'betrate' && $general['betgold'] < 1000) { continue; }
$aux = [ $aux = [
'name'=>$general['name'],
'nationName'=>$nation['name'], 'nationName'=>$nation['name'],
'bgColor'=>$nation['color'], 'bgColor'=>$nation['color'],
'fgColor'=>newColor($nation['color']), 'fgColor'=>newColor($nation['color']),
'picture'=>$general['picture'], 'picture'=>$general['picture'],
'imgsvr'=>$general['imgsvr'], 'imgsvr'=>$general['imgsvr'],
'date'=>date('Y-m-d H:i:s'), 'startTime'=>$startTime,
'unitedTime'=>$unitedDate,
'owner_name'=>$general['name2'], 'owner_name'=>$general['name2'],
'server_id'=>UniqueConst::$serverID, 'serverID'=>UniqueConst::$serverID,
'printValue'=>$general['value'] 'serverIdx'=>$serverCnt,
'serverName'=>UniqueConst::$serverName,
'scenarioName'=>$scenarioName,
]; ];
$jsonAux = Json::encode($aux); $jsonAux = Json::encode($aux);
$db->insertUpdate('ng_hall', [ $db->insertUpdate('ng_hall', [
'server_id'=>UniqueConst::$serverID, 'server_id'=>UniqueConst::$serverID,
'type'=>$idx, 'scenario'=>$scenarioIdx,
'general_no'=>$no, 'general_no'=>$no,
'value'=>$general[$typeName], 'type'=>$idx,
'value'=>$general[$typeName]??0,
'owner'=>$general['owner']??null, 'owner'=>$general['owner']??null,
'serverIdx'=>$serverCnt,
'serverName'=>UniqueConst::$serverName,
'aux'=>$jsonAux 'aux'=>$jsonAux
],[ ],[
'value'=>$general[$typeName], 'value'=>$general[$typeName]??0,
'aux'=>$jsonAux 'aux'=>$jsonAux
]); ]);
} }
+1 -1
View File
@@ -1126,7 +1126,7 @@ function checkEmperior() {
$gameStor->isunited = 2; $gameStor->isunited = 2;
$gameStor->conlimit = $gameStor->conlimit*100; $gameStor->conlimit = $gameStor->conlimit*100;
$query = "select no from general where npc<2 and age>=45"; $query = "select no from general where npc<2 and age>=40";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result); $count = MYDB_num_rows($result);
+28
View File
@@ -127,6 +127,34 @@ function getBatLogRecent(int $no, int $count) {
return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300))); return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300)));
} }
function pushOldNationStop(int $no, int $nationNo){
$logPrefixList = ['batres', 'gen', 'batlog'];
$result = [];
foreach($logPrefixList as $logPrefix){
$path = __dir__."/logs/".UniqueConst::$serverID."/{$logPrefix}{$no}.txt";
if(file_exists($path)){
$fileLen = @filesize($path);
}
else{
$fileLen = 0;
}
$result[$logPrefix] = $fileLen;
}
$baseStopPath = __dir__."/logs/".UniqueConst::$serverID."/stop{$no}.txt";
if(file_exists($baseStopPath)){
$oldValues = Json::decode(file_get_contents($baseStopPath));
}
else{
$oldValues = [];
}
$oldValues[$nationNo] = $result;
file_put_contents($baseStopPath, Json::encode($oldValues, Json::PRETTY));
}
//DB-based //DB-based
function pushNationHistory($nation, $history) { function pushNationHistory($nation, $history) {
if(!$nation || !$nation['nation']){ if(!$nation || !$nation['nation']){
+7
View File
@@ -0,0 +1,7 @@
jQuery(function($){
$('#by_scenario').change(function(){
var scenarioIdx = $(this).val();
$.redirect('a_hallOfFame.php', {scenarioIdx:scenarioIdx}, 'get');
})
//$.redirect("processing.php",{ commandtype: commandtype, turn: turn}, 'post');
});
+11 -8
View File
@@ -1805,13 +1805,16 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
$loseGeneralGold = 0; $loseGeneralGold = 0;
$loseGeneralRice = 0; $loseGeneralRice = 0;
//멸망국 장수들 역사 기록 및 로그 전달 //멸망국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation,npc,gold,rice from general where nation='{$city['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
$josaYi = JosaUtil::pick($losenation['name'], '이'); $josaYi = JosaUtil::pick($losenation['name'], '이');
$genlog = ["<C>●</><D><b>{$losenation['name']}</b></>{$josaYi} <R>멸망</>했습니다."]; $genlog = ["<C>●</><D><b>{$losenation['name']}</b></>{$josaYi} <R>멸망</>했습니다."];
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($result);
// 국가 백업
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $city['nation']);
$oldNationGenerals = $db->query('SELECT * FROM general WHERE nation=%i', $city['nation']);
$oldNation['generals'] = $oldNationGenerals;
foreach($oldNationGenerals as $gen){
$loseGold = intdiv($gen['gold'] * (rand()%30+20), 100); $loseGold = intdiv($gen['gold'] * (rand()%30+20), 100);
$loseRice = intdiv($gen['rice'] * (rand()%30+20), 100); $loseRice = intdiv($gen['rice'] * (rand()%30+20), 100);
@@ -1823,6 +1826,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
pushGenLog($gen, $genlog); pushGenLog($gen, $genlog);
pushGeneralHistory($gen, "<C>●</>{$year}{$month}월:<D><b>{$losenation['name']}</b></>{$josaYi} <R>멸망</>"); pushGeneralHistory($gen, "<C>●</>{$year}{$month}월:<D><b>{$losenation['name']}</b></>{$josaYi} <R>멸망</>");
pushOldNationStop($gen['no'], $city['nation']);
$loseGeneralGold += $loseGold; $loseGeneralGold += $loseGold;
$loseGeneralRice += $loseRice; $loseGeneralRice += $loseRice;
@@ -1833,7 +1837,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
|| $nation['name'] == "왜족") { || $nation['name'] == "왜족") {
//등용장 미발부 //등용장 미발부
} elseif(Util::randBool(0.5)) { } elseif(Util::randBool(0.5)) {
$msg = ScoutMessage::buildScoutMessage($general['no'], $gen['no'], $reason); $msg = ScoutMessage::buildScoutMessage($general['no'], $gen['no']);
if($msg){ if($msg){
$msg->send(true); $msg->send(true);
} }
@@ -1874,6 +1878,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
pushGenLog($gen, $genlog); pushGenLog($gen, $genlog);
} }
//분쟁기록 모두 지움 //분쟁기록 모두 지움
DeleteConflict($city['nation']); DeleteConflict($city['nation']);
// 전 장수 공헌 명성치 깎음 // 전 장수 공헌 명성치 깎음
@@ -1892,8 +1897,6 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
$query = "delete from diplomacy where me='{$city['nation']}' or you='{$city['nation']}'"; $query = "delete from diplomacy where me='{$city['nation']}' or you='{$city['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 국가 백업
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $city['nation']);
$db->insert('ng_old_nations', [ $db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID, 'server_id'=>UniqueConst::$serverID,
'nation'=>$city['nation'], 'nation'=>$city['nation'],
+6 -5
View File
@@ -363,7 +363,7 @@ ENGINE=InnoDB;
## ##
########################################################################### ###########################################################################
CREATE TABLE if not exists `ng_hall` ( CREATE TABLE `ng_hall` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`server_id` CHAR(20) NOT NULL, `server_id` CHAR(20) NOT NULL,
`scenario` INT(11) NOT NULL, `scenario` INT(11) NOT NULL,
@@ -378,7 +378,7 @@ CREATE TABLE if not exists `ng_hall` (
INDEX `server_show` (`server_id`, `type`, `value`), INDEX `server_show` (`server_id`, `type`, `value`),
INDEX `scenario` (`scenario`, `type`, `value`) INDEX `scenario` (`scenario`, `type`, `value`)
) )
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
########################################################################### ###########################################################################
@@ -398,15 +398,16 @@ CREATE TABLE if not exists `ng_games` (
) )
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
CREATE TABLE if not exists `ng_old_nations` ( CREATE TABLE `ng_old_nations` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`server_id` CHAR(20) NOT NULL DEFAULT '0', `server_id` CHAR(20) NOT NULL DEFAULT '0',
`nation` INT(11) NOT NULL DEFAULT '0', `nation` INT(11) NOT NULL DEFAULT '0',
`data` LONGTEXT NOT NULL DEFAULT '0' COMMENT 'json', `data` LONGTEXT NOT NULL DEFAULT '0' COMMENT 'json',
`date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
INDEX `server_id` (`server_id`, `nation`) INDEX `server_id` (`server_id`, `nation`)
) )
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
create table if not exists emperior ( create table if not exists emperior (
no int(6) not null auto_increment, no int(6) not null auto_increment,
@@ -546,7 +547,7 @@ CREATE TABLE if not exists `history` (
PRIMARY KEY (`no`), PRIMARY KEY (`no`),
INDEX `server_id` (`server_id`, `year`, `month`) INDEX `server_id` (`server_id`, `year`, `month`)
) )
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
########################################################################### ###########################################################################
## ##
+8 -3
View File
@@ -1,13 +1,18 @@
<div class="rankView bg0" style="border:1px solid gray;"> <div class="rankView bg0" style="border:1px solid gray;">
<h3 class="rankType bg1"><?=$typeName?></h3> <h3 class="rankType bg1"><?=$typeName?></h3>
<ul> <ul>
<?php foreach($generals as $rank=>$general): ?><li <?=(key_exists("rankName", $general))?"class='no_value'":''?>> <?php foreach($generals as $rank=>$general): ?><li class='<?=(key_exists("rankName", $general))?'no_value':''?> <?=(key_exists("serverName", $general))?'has_server':''?>'>
<div class="hall_rank bg2 with_border"> <div class="hall_rank bg2 with_border">
<?=$general['rankName']??(($rank+1).'위')?> <?=$general['rankName']??(($rank+1).'위')?>
</div> </div>
<div class="hall_img"><img width="64" height="64" src="<?=$general['pictureFullPath']?>"></div> <div class="hall_img"><img width="64" height="64" src="<?=$general['pictureFullPath']?>"></div>
<?php if(key_exists("serverName")): ?> <?php if(key_exists("serverName",$general)): ?>
<div class="hall_server"><?=$general['serverName']?><?=$general['serverIdx']?>기</div> <div class="hall_server tooltip"><?=$general['serverName']?><?=$general['serverIdx']?>기
<span class="tooltiptext">
<?=$general['scenarioName']?><br>
<?=substr($general['startTime'], 0, 10)?> ~ <?=substr($general['unitedTime'], 0, 10)?>
</span>
</div>
<?php endif;?> <?php endif;?>
<div class="hall_nation" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><?=$general['nationName']??'-'?></div> <div class="hall_nation" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><?=$general['nationName']??'-'?></div>
<div class="hall_name" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><p><?=$general['name']??'-'?> <div class="hall_name" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><p><?=$general['name']??'-'?>