setReadOnly(); $scenarioIdx = Util::getReq('scenarioIdx', 'int', null); $db = DB::db(); increaseRefresh("명예의전당", 1); $scenarioList= []; foreach($db->query('SELECT scenario_name as name, count(scenario) as cnt, scenario from ng_games group by scenario 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); } ?> <?=UniqueConst::$serverName?>: 명예의 전당
명 예 의 전 당
시나리오 검색 :
queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){ $ownerNameList[$ownerID] = $ownerName; } foreach($types as $idx=>[$typeName, $typeValue]) { $hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter); $hallResult = array_map(function($general)use($typeValue, $ownerNameList){ $aux = Json::decode($general['aux']); $general += $aux; if(key_exists($general['owner'], $ownerNameList)){ $general['owner_name'] = $ownerNameList[$general['owner']]; } if(!key_exists('bgColor', $general)){ if(!key_exists('color', $general)){ $general['bgColor'] = GameConst::$basecolor4; } else{ $general['bgColor'] = $general['color']; } } if(!key_exists('fgColor', $general)){ $general['fgColor'] = newColor($general['bgColor']); } if(key_exists('picture', $general)){ $imageTemp = GetImageURL($general['imgsvr']); $general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; } else{ $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; }, $hallResult); echo $templates->render('hallOfFrame', [ 'typeName'=>$typeName, 'generals'=>$hallResult ]); } ?>