diff --git a/hwe/c_dipcenter.php b/hwe/c_dipcenter.php index 47754969..948706f3 100644 --- a/hwe/c_dipcenter.php +++ b/hwe/c_dipcenter.php @@ -5,6 +5,13 @@ include "lib.php"; include "func.php"; // $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit +$btn = Util::getReq('btn'); +$msg = Util::getReq('msg'); +$scoutmsg = Util::getReq('scoutmsg'); +$rate = Util::getReq('rate', 'int'); +$bill = Util::getReq('bill', 'int'); +$secretlimit = Util::getReq('secretlimit', 'int'); + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); @@ -34,19 +41,16 @@ if($btn == "국가방침") { $query = "update nation set scoutmsg='$scoutmsg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "세율") { - $rate = (int)$rate; if($rate < 5) { $rate = 5; } if($rate > 30) { $rate = 30; } $query = "update nation set rate='$rate' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "지급율") { - $bill = (int)$bill; if($bill < 20) { $bill = 20; } if($bill > 200) { $bill = 200; } $query = "update nation set bill='$bill' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "기밀권한") { - $secretlimit = (int)$secretlimit; if($secretlimit < 1) { $secretlimit = 1; } if($secretlimit > 99) { $secretlimit = 99; } $query = "update nation set secretlimit='$secretlimit' where nation='{$me['nation']}'"; diff --git a/hwe/c_double.php b/hwe/c_double.php index 9c1c2c48..ba2cbb5b 100644 --- a/hwe/c_double.php +++ b/hwe/c_double.php @@ -4,6 +4,23 @@ namespace sammo; include "lib.php"; include "func.php"; // $turn, $command, $cost, $name, $nationname, $note, $double, $third, $fourth +$turn = Util::getReq('turn', 'array_int'); +$command = Util::getReq('command', 'int', 0); +$cost = Util::getReq('cost', 'int'); +$name = Util::getReq('name'); +$nationname = Util::getReq('nationname', 'string', ''); +$note = Util::getReq('note', 'string', ''); +$double = Util::getReq('double', 'int', 0); +$third = Util::getReq('third', 'int', 0); +$fourth = Util::getReq('fourth', 'int', 0); + +if(!$turn){ + $turn = [0]; +} + +'@phan-var int $double'; +'@phan-var int $third'; +'@phan-var int $fourth'; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); @@ -39,12 +56,11 @@ if($command == 46) { 'makenation'=>$name ], 'owner=%i', $userID); - $count = count($turn); - $query = ['con'=>$db->sqleval('con')]; + $query = []; foreach($turn as $turnIdx){ $query['turn'.$turnIdx] = $comStr; } - $db->upate('general', $query, 'owner=%i', $userID); + $db->update('general', $query, 'owner=%i', $userID); header('Location:index.php'); //통합제의 } elseif($command == 53) { @@ -122,15 +138,12 @@ if($command == 46) { //echo ""; echo 'b_chiefcenter.php';//TODO:debug all and replace } else { - $count = count($turn); - $str = "con=con"; - for($i=0; $i < $count; $i++) { - $str .= ",turn{$turn[$i]}='{$comStr}'"; + $query = []; + foreach($turn as $turnIdx){ + $query['turn'.$turnIdx] = $comStr; } - $query = "update general set {$str} where owner='{$userID}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //echo ""; - echo 'index.php';//TODO:debug all and replace + $db->update('general', $query, 'owner=%i', $userID); + header('Location:index.php'); } diff --git a/hwe/c_tournament.php b/hwe/c_tournament.php index b40b268e..af69bc96 100644 --- a/hwe/c_tournament.php +++ b/hwe/c_tournament.php @@ -4,10 +4,13 @@ namespace sammo; include "lib.php"; include "func.php"; // $btn, $msg - $gen = Util::getReq('gen', 'int'); $sel = Util::getReq('sel', 'int'); +//관리자용 +$auto = Util::getReq('gen', 'int'); +$type = Util::getReq('type', 'int'); + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); diff --git a/hwe/c_troop.php b/hwe/c_troop.php index 052e90b9..0be9c8e5 100644 --- a/hwe/c_troop.php +++ b/hwe/c_troop.php @@ -4,14 +4,17 @@ namespace sammo; include "lib.php"; include "func.php"; // $btn, $name, $troop +$btn = Util::getReq('btn'); +$name = Util::getReq('name'); +$troop = Util::getReq('troop', 'int'); //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -$generalID = $session->$generalID; +$userID = $session::getUserID(); $db = DB::db(); -$me = $db->queryFirstRow('select no,nation,troop from general where no=%i', $generalID); +$me = $db->queryFirstRow('SELECT `no`, nation, troop FROM general WHERE `owner`=%i', $userID); $name = trim($name); $name = addslashes(SQ2DQ($name)); diff --git a/hwe/c_vote.php b/hwe/c_vote.php index 1657f2c7..96ece6e3 100644 --- a/hwe/c_vote.php +++ b/hwe/c_vote.php @@ -4,7 +4,11 @@ namespace sammo; include "lib.php"; include "func.php"; +$btn = Util::getReq('btn'); $sel = Util::getReq('sel', 'int'); +$comment = Util::getReq('comment'); +$title = Util::getReq('title'); +$str = Util::getReq('str'); //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); @@ -38,7 +42,7 @@ else if($btn == "댓글" && $comment != "") { $nation = getNationStaticInfo($me['nation']); if($nation == null) { - $nation['name'] = "재야"; + $nation = ['name' => "재야"]; } if($admin['votecomment'] != "") { $admin['votecomment'] .= "|"; } diff --git a/hwe/d_ally.php b/hwe/d_ally.php index 692e1c69..54cdc82b 100644 --- a/hwe/d_ally.php +++ b/hwe/d_ally.php @@ -3,6 +3,11 @@ namespace sammo; include "lib.php"; include "func.php"; + +$ok = Util::getReq('ok'); +$when = Util::getReq('when', 'int'); +$gen = Util::getReq('gen', 'int'); //XXX: -_-;;;;;;;;;;;; + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); diff --git a/hwe/d_cancel.php b/hwe/d_cancel.php index 344b3a6e..39c17aba 100644 --- a/hwe/d_cancel.php +++ b/hwe/d_cancel.php @@ -3,6 +3,10 @@ namespace sammo; include "lib.php"; include "func.php"; + +$ok = Util::getReq('ok'); +$gen = Util::getReq('gen', 'int'); //XXX: -_-;;;;;;;;;;;; + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); diff --git a/hwe/d_cease.php b/hwe/d_cease.php index 098a5b35..dec79fe8 100644 --- a/hwe/d_cease.php +++ b/hwe/d_cease.php @@ -3,6 +3,10 @@ namespace sammo; include "lib.php"; include "func.php"; + +$ok = Util::getReq('ok'); +$gen = Util::getReq('gen', 'int'); //XXX: -_-;;;;;;;;;;;; + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); diff --git a/hwe/d_merge.php b/hwe/d_merge.php index f1b1db84..00476553 100644 --- a/hwe/d_merge.php +++ b/hwe/d_merge.php @@ -3,6 +3,10 @@ namespace sammo; include "lib.php"; include "func.php"; + +$ok = Util::getReq('ok'); +$gen = Util::getReq('gen', 'int'); //XXX: -_-;;;;;;;;;;;; + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); diff --git a/hwe/d_scout.php b/hwe/d_scout.php index f0bbf68a..c5f4f845 100644 --- a/hwe/d_scout.php +++ b/hwe/d_scout.php @@ -168,7 +168,7 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou pushGenLog($me, $mylog); pushGenLog($you, $youlog); pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']); -pushWorldHistory($history, $admin['year'], $admin['month']); +//pushWorldHistory($history, $admin['year'], $admin['month']); echo ""; diff --git a/hwe/d_surrender.php b/hwe/d_surrender.php index bf63dea5..786815ef 100644 --- a/hwe/d_surrender.php +++ b/hwe/d_surrender.php @@ -3,6 +3,10 @@ namespace sammo; include "lib.php"; include "func.php"; + +$ok = Util::getReq('ok'); +$gen = Util::getReq('gen', 'int'); //XXX: -_-;;;;;;;;;;;; + //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); @@ -65,6 +69,8 @@ for($i=0; $i < $warcount; $i++) { } } +$mylog = []; + if($ok == "수락") { // 서신 보낸 후 멸망 했을때. if($me['level'] < 5) { diff --git a/hwe/func_process.php b/hwe/func_process.php index 3f5406b5..92a35660 100644 --- a/hwe/func_process.php +++ b/hwe/func_process.php @@ -1735,7 +1735,10 @@ function process_31(&$general) { $query = "select spy from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation['spy'] != "") { $cities = explode("|", $nation['spy']); } + if($nation['spy'] != "") + { + $cities = array_map('intval', explode("|", $nation['spy'])); + } $exist = 0; for($i=0; $i < count($cities); $i++) { if(intdiv($cities[$i], 10) == $destination) { diff --git a/hwe/func_tournament.php b/hwe/func_tournament.php index 25a9ac1f..ce8253ba 100644 --- a/hwe/func_tournament.php +++ b/hwe/func_tournament.php @@ -940,12 +940,12 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $damage1 = Util::round($damage1); $damage2 = Util::round($damage2); $log[] = '●> ' - .StringUtil::padStringAlignRight($phase, 2, "0").'合 : ' - .''.StringUtil::padStringAlignRight($energy1, 3, "0").'>' - .'(-'.StringUtil::padStringAlignRight($damage1, 3, "0").')' + .StringUtil::padStringAlignRight((string)$phase, 2, "0").'合 : ' + .''.StringUtil::padStringAlignRight((string)$energy1, 3, "0").'>' + .'(-'.StringUtil::padStringAlignRight((string)$damage1, 3, "0").')' .' vs ' - .'(-'.StringUtil::padStringAlignRight($damage2, 3, "0").')' - .''.StringUtil::padStringAlignRight($energy2, 3, "0").'>'; + .'(-'.StringUtil::padStringAlignRight((string)$damage2, 3, "0").')' + .''.StringUtil::padStringAlignRight((string)$energy2, 3, "0").'>'; if($energy1 <= 0 && $energy2 <= 0) { if($type == 0) { $sel = 2; break; } diff --git a/hwe/j_basic_info.php b/hwe/j_basic_info.php index ee4b8a8b..60a799c1 100644 --- a/hwe/j_basic_info.php +++ b/hwe/j_basic_info.php @@ -16,7 +16,7 @@ if(!$generalInfo){ Json::die($result); } -$result['generalID'] = $generalID; +$result['generalID'] = $generalInfo['no']; $result['myNationID'] = $generalInfo['nation']; $result['isChief'] = ($generalInfo['level'] == 12); diff --git a/hwe/j_get_scenario_map.php b/hwe/j_get_scenario_map.php deleted file mode 100644 index 4c76507f..00000000 --- a/hwe/j_get_scenario_map.php +++ /dev/null @@ -1,23 +0,0 @@ -userGrade < 5){ - Json::die([ - 'result'=>false, - 'reason'=>'충분한 권한을 가지고 있지 않습니다.' - ]); -} - - -if($scenarioIdx === null){ - Json::die([ - 'result'=>false, - 'reason'=>'올바르지 않은 scenarioIdx' - ]); -} - diff --git a/hwe/j_msg_decide_opt.php b/hwe/j_msg_decide_opt.php index 91692232..14fd9826 100644 --- a/hwe/j_msg_decide_opt.php +++ b/hwe/j_msg_decide_opt.php @@ -49,7 +49,7 @@ if (!$result) { ]); } -'@phan-var-force mixed[] $result'; +'@phan-var-force mixed[] $messageInfo'; $msgType = $messageInfo['type']; diff --git a/hwe/j_msgsubmit.php b/hwe/j_msgsubmit.php index 8f6bdd99..b46769dc 100644 --- a/hwe/j_msgsubmit.php +++ b/hwe/j_msgsubmit.php @@ -28,6 +28,8 @@ if(!isset($post['genlist']) || !isset($post['msg'])){ } +'@phan-var mixed[] $post'; + $destMailbox = $post['dest_mailbox']; $msg = $post['msg']; $datetime = new \DateTime(); @@ -68,9 +70,7 @@ if($con >= 2) { ]); } -//SubStrForWidth는 반각은 1, 전각은 2로 측정하는듯 보이나, 대부분 글자수 단위로 카운트 하고 있어 mb_substr로 처리함. -$msg = mb_substr($msg, 0, 99, 'UTF-8'); -$msg = trim($msg); +$msg = StringUtil::cutStringForWidth($msg, 100, ''); if($msg == ''){ Json::die([ @@ -89,7 +89,7 @@ $src = [ // 전체 메세지 if($destMailbox == 9999) { - sendMessage('public', $src, null, $msg, $date); + sendMessage('public', $src, [], $msg, $date); // 국가 메세지 } elseif($destMailbox >= 9000) { @@ -97,7 +97,7 @@ if($destMailbox == 9999) { $real_nation = $me['nation_id']; } else{ - $real_nation = $dest - 9000; + $real_nation = $destMailbox - 9000; } if(!getNationStaticInfo($real_nation)){ @@ -138,8 +138,8 @@ if($destMailbox == 9999) { $dest = [ 'id' => $destMailbox, - 'name' => $dest_user['name'], - 'nation_id' => $dest_user['nation'] + 'name' => $destUser['name'], + 'nation_id' => $destUser['nation'] ]; sendMessage('private', $src, $dest, $msg, $date); diff --git a/hwe/join.php b/hwe/join.php index ce66fc58..7ed98eac 100644 --- a/hwe/join.php +++ b/hwe/join.php @@ -34,148 +34,7 @@ $connect=$db->get(); - + @@ -239,7 +98,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] 전콘 사용 여부 - + 사용 @@ -276,15 +135,15 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] 통솔 - + 무력 - + 지력 - + 능력치 조정 diff --git a/hwe/js/join.js b/hwe/js/join.js new file mode 100644 index 00000000..7bdff956 --- /dev/null +++ b/hwe/js/join.js @@ -0,0 +1,140 @@ + +jQuery(function($){ + + var totalAbil = 150; + var $leader = $('#leader'); + var $power = $('#power'); + var $intel = $('#intel'); + + function abilityRand(){ + var leader = Math.random()*65 + 10; + var power = Math.random()*65 + 10; + var intel = Math.random()*65 + 10; + var rate = leader + power + intel; + + leader = Math.floor(leader / rate * totalAbil); + power = Math.floor(power / rate * totalAbil); + intel = Math.floor(intel / rate * totalAbil); + + + while(leader+power+intel < totalAbil){ + leader+=1; + } + + if(leader > 75 || power > 75 || intel > 75 || leader < 10 || power < 10 || intel < 10){ + return abilityRand(); + } + + $leader.val(leader); + $power.val(power); + $intel.val(intel); + } + + + function abilityLeadpow(){ + var leader = Math.random() * 6; + var power = Math.random() * 6; + var intel = Math.random() * 1; + var rate = leader + power + intel; + + leader = Math.floor(leader / rate * totalAbil); + power = Math.floor(power / rate * totalAbil); + intel = Math.floor(intel / rate * totalAbil); + + while(leader+power+intel < totalAbil){ + power+=1; + } + + if(intel < 10){ + leader -= 10 - intel; + intel = 10; + } + + if(leader > 75){ + power += leader - 75; + leader = 75; + } + + if(power > 75){ + leader += power - 75; + power = 75; + } + + $leader.val(leader); + $power.val(power); + $intel.val(intel); + } + + function abilityLeadint(){ + var leader = Math.random() * 6; + var power = Math.random() * 1; + var intel = Math.random() * 6; + var rate = leader + power + intel; + + leader = Math.floor(leader / rate * totalAbil); + power = Math.floor(power / rate * totalAbil); + intel = Math.floor(intel / rate * totalAbil); + + while(leader+power+intel < totalAbil){ + intel+=1; + } + + if(power < 10){ + leader -= 10 - power; + power = 10; + } + + if(leader > 75){ + intel += leader - 75; + leader = 75; + } + + if(intel > 75){ + leader += intel - 75; + intel = 75; + } + + $leader.val(leader); + $power.val(power); + $intel.val(intel); + } + + function abilityPowint(){ + var leader = Math.random() * 1; + var power = Math.random() * 6; + var intel = Math.random() * 6; + var rate = leader + power + intel; + + leader = Math.floor(leader / rate * totalAbil); + power = Math.floor(power / rate * totalAbil); + intel = Math.floor(intel / rate * totalAbil); + + while(leader+power+intel < totalAbil){ + intel+=1; + } + + if(leader < 10){ + power -= 10 - leader; + leader = 10; + } + + if(power > 75){ + intel += power - 75; + power = 75; + } + + if(intel > 75){ + power += intel - 75; + intel = 75; + } + + $leader.val(leader); + $power.val(power); + $intel.val(intel); + } + + window.abilityRand = abilityRand; + window.abilityLeadpow = abilityLeadpow; + window.abilityLeadint = abilityLeadint; + window.abilityPowint = abilityPowint; + }); \ No newline at end of file diff --git a/hwe/processing.php b/hwe/processing.php index 772c18c5..49fd239f 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -787,7 +787,6 @@ function command_22($turn, $command) { $connect=$db->get(); $userID = Session::getUserID(); - die('비활성화됨');//TODO:등용장 대 디자인 starter("등용"); $query = "select nation from general where owner='{$userID}'"; @@ -1563,38 +1562,47 @@ function command_46($turn, $command) { starter("건국"); - $query = "select maxnation from game limit 1"; - $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); + $maxnation = $db->queryFirstField('SELECT maxnation FROM game LIMIT 1'); - $color = GetNationColors(); + $colorUsed = []; + + foreach(GetNationColors() as $color){ + $colorUsed[$color] = 0; + } + $nationCount = count(getAllNationStaticInfo()); foreach(getAllNationStaticInfo() as $nation){ if($nation['level'] <= 0){ continue; } - $nationcolor[$i] = $nation['color']; - } - $validCount = count($color); - //등록된 색깔 가려내기 - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - for($j=0; $j < $nationcount; $j++) { - if($color[$i] == $nationcolor[$j]) { - $valid[$i] = 0; - $validCount--; - } + + if(isset($nationcolor[$nation['color']])){ + $nationcolor[$nation['color']] = 1; } + else{ + $nationcolor[$nation['color']]++; + } + } + + $colorUsedCnt = 0; + foreach($colorUsed as $color=>$used){ + if($used){ + continue; + } + $colorUsedCnt += 1; + } + //색깔이 다 쓰였으면 그냥 모두 허용 - if($validCount <= 0) { - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; + if($colorUsedCnt === count($colorUsed)){ + foreach(array_keys($colorUsed) as $color){ + $colorUsed[$color] = 0; } } - if($nationcount < $admin['maxnation']) { - echo " + + if($nationCount < $maxnation) { +?> 현재 도시에서 나라를 세웁니다. 중, 소도시에서만 가능합니다. - 법 가 : 금수입↑ 치안↑ 인구↓ 민심↓ @@ -1613,15 +1621,16 @@ function command_46($turn, $command) { 국명 : -색깔 : "; - for($i=0; $i < count($color); $i++) { - if($valid[$i]) { - echo " - 국가명"; - } +색깔 : +$color) { + if($colorUsed[$color] > 0){ + continue; } + echo "국가명"; + } - echo " +?> 성향 : ".getNationType(1)." @@ -1639,17 +1648,15 @@ function command_46($turn, $command) { ".getNationType(13)." -"; + +"; + echo ""; } - echo " -"; + echo ""; } else { - echo " -더 이상 건국은 불가능합니다."; + echo "더 이상 건국은 불가능합니다."; } ender(); } @@ -2761,30 +2768,37 @@ function command_81($turn, $command) { starter("국기변경", 1); - $color = GetNationColors(); + $colorUsed = []; + + foreach(GetNationColors() as $color){ + $colorUsed[$color] = 0; + } - foreach(getAllNationStaticInfo() as $nation){ + foreach(getAllNationStaticInfo() as $nation){ if($nation['level'] <= 0){ continue; } - $nationcolor[$i] = $nation['color']; - } - $validCount = count($color); - //등록된 색깔 가려내기 - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - for($j=0; $j < $nationcount; $j++) { - if($color[$i] == $nationcolor[$j]) { - $valid[$i] = 0; - $validCount--; - } + if(isset($nationcolor[$nation['color']])){ + $nationcolor[$nation['color']] = 1; + } + else{ + $nationcolor[$nation['color']]++; } } + + $colorUsedCnt = 0; + foreach($colorUsed as $color=>$used){ + if($used){ + continue; + } + $colorUsedCnt += 1; + } + //색깔이 다 쓰였으면 그냥 모두 허용 - if($validCount <= 0) { - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; + if($colorUsedCnt === count($colorUsed)){ + foreach(array_keys($colorUsed) as $color){ + $colorUsed[$color] = 0; } } @@ -2792,12 +2806,12 @@ function command_81($turn, $command) { 국기를 변경합니다. 단 1회 가능합니다. 색깔 : "; - for($i=0; $i < count($color); $i++) { - if($valid[$i]) { - echo " - 국가명"; - } - } + foreach(GetNationColors() as $idx=>$color) { + if($colorUsed[$color] > 0){ + continue; + } + echo "국가명"; + } echo " diff --git a/hwe/select_npc.php b/hwe/select_npc.php index 5a3cba51..47937a86 100644 --- a/hwe/select_npc.php +++ b/hwe/select_npc.php @@ -9,7 +9,7 @@ $userID = Session::getUserID(); $rootDB = RootDB::db(); //회원 테이블에서 정보확인 -$member = $rootDB->queryFirstRow('select no,name,picture,grade from MEMBER where no=%i', $userID); MYDB_fetch_array($result); +$member = $rootDB->queryFirstRow('select no,name,picture,grade from MEMBER where no=%i', $userID); if(!$member) { MessageBox("잘못된 접근입니다!!!"); diff --git a/hwe/select_npc_post.php b/hwe/select_npc_post.php index b92e0c8c..a826251f 100644 --- a/hwe/select_npc_post.php +++ b/hwe/select_npc_post.php @@ -122,7 +122,7 @@ pushGeneralHistory($me, "●>{$year}년 {$month}월:{$npc['name']}>의 //pushGenLog($me, $mylog); pushGeneralPublicRecord(["●>{$month}월:{$npc['name']}>의 육체에 {$session->userName}>(이)가 빙의>됩니다!"], $year, $month); -pushAdminLog(["가입 : {$session->userName} // {$id} // ".getenv("REMOTE_ADDR")]); +pushAdminLog(["가입 : {$userID} // {$session->userName} // {$npcID} // ".getenv("REMOTE_ADDR")]); $rootDB->insert('member_log', [ 'member_no' => $userID, @@ -131,13 +131,13 @@ $rootDB->insert('member_log', [ 'action'=>Json::encode([ 'server'=>DB::prefix(), 'type'=>'npc', - 'generalID'=>$me['no'], - 'generalName'=>$me['name'] + 'generalID'=>$npc['no'], + 'generalName'=>$npc['name'] ]) ]); ?> "); diff --git a/i_entrance/j_server_get_admin_status.php b/i_entrance/j_server_get_admin_status.php index 2afb0d14..fa8cde7f 100644 --- a/i_entrance/j_server_get_admin_status.php +++ b/i_entrance/j_server_get_admin_status.php @@ -17,7 +17,7 @@ $result = []; $server = []; -$rootServer = end(AppConf::getList())->getShortName(); +$rootServer = Util::array_last(AppConf::getList())->getShortName(); foreach (AppConf::getList() as $setting) { $serverColor = $setting->getColor(); diff --git a/src/sammo/WebUtil.php b/src/sammo/WebUtil.php index 69bfd602..f784f6c9 100644 --- a/src/sammo/WebUtil.php +++ b/src/sammo/WebUtil.php @@ -28,7 +28,7 @@ class WebUtil } /** - * @return null|mixed|mixed[] + * @return mixed|mixed[] */ public static function parseJsonPost() {