";
}
function CoreTurnTable() {
return "
";
}
function allButton() {
$npcmode = DB::db()->queryFirstField("select npcmode from game limit 1");
if($npcmode == 1) {
$site = "a_npcList.php";
$call = "빙의일람";
} else {
$site = "a_vote.php";
$call = "설문조사";
}
$templates = new \League\Plates\Engine('templates');
return $templates->render('allButton', [
'call' => $call,
'site' => $site
]);
}
function commandButton() {
$session = Session::getInstance();
$userID = Session::getUserID();
$generalID = $session->generalID;
if($generalID === null){
return '';
}
$db = DB::db();
$me = $db->queryFirstRow("select no,nation,level,belong from general where owner=%i", $userID);
$nation = $db->queryFirstRow("select nation,color,secretlimit from nation where nation=%i",$me['nation']);
if($nation['color'] == "") { $nation['color'] = "#000000"; }
$bgColor = Util::array_get($nation['color'])?:'#000000';
$fgColor = newColor($bgColor);
$templates = new \League\Plates\Engine('templates');
$showSecret = false;
if($me['level'] >= 2){
$showSecret = true;
}
else if($me['level']== 0){
$showSecret = false;
}
else if($me['belong'] >= $nation['secretlimit']){
$showSecret = true;
}
return $templates->render('commandButton', [
'bgColor'=>$bgColor,
'fgColor'=>$fgColor,
'meLevel'=>$me['level'],
'showSecret'=>$showSecret
]);
}
function getMapHtml(){
//NOTE: 필요한가?
$templates = new \League\Plates\Engine('templates');
return $templates->render('map');
}