권한 세팅

This commit is contained in:
2019-01-18 03:01:02 +09:00
parent d26a1f0312
commit edf4508e6b
11 changed files with 65 additions and 35 deletions
+3 -5
View File
@@ -138,7 +138,7 @@ function commandButton() {
$db = DB::db();
$me = $db->queryFirstRow("select no,nation,level,belong from general where owner=%i", $userID);
$nation = $db->queryFirstRow("select nation,level,color,secretlimit from nation where nation=%i",$me['nation'])??[
$nation = $db->queryFirstRow("select permission,penalty,nation,level,color,secretlimit from nation where nation=%i",$me['nation'])??[
'nation'=>0,
'level'=>0,
'secretlimit'=>99,
@@ -150,15 +150,13 @@ function commandButton() {
$templates = new \League\Plates\Engine(__dir__.'/templates');
$showSecret = false;
if($me['level'] >= 2){
$permission = checkSecretPermission($me);
if($permission >= 1){
$showSecret = true;
}
else if($me['level']== 0){
$showSecret = false;
}
else if($me['belong'] >= $nation['secretlimit']){
$showSecret = true;
}
return $templates->render('commandButton', [
'bgColor'=>$bgColor,