- history, log 관련 함수들을 일괄 변경

- 접속 장소(conmsg) 장소 제거
This commit is contained in:
2018-04-01 22:43:14 +09:00
parent 97c6904918
commit 4fab99b946
29 changed files with 269 additions and 418 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ switch($btn) {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$log[0] = "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】(을)를 익혔습니다!";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
pushGenLog($general, $log);
}
break;
+1 -6
View File
@@ -92,7 +92,6 @@ echo "
<td align=center width=180>최근로그인</td>
<td align=center width=129>IP</td>
<td align=center width=100>ID</td>
<td align=center width=278>-</td>
</tr>
<tr>
<?php
@@ -103,11 +102,10 @@ $genName = "";
$genDate = "";
$genIP = "";
$genID = "";
$conMsg = "";
for($i=0; $i < $ipCount; $i++) {
$ip = MYDB_fetch_array($result);
$query = "select name,ip,lastconnect,owner,block,conmsg from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
$query = "select name,ip,lastconnect,owner,block from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genResult);
for($k=0; $k < $genCount; $k++) {
@@ -117,20 +115,17 @@ for($i=0; $i < $ipCount; $i++) {
$genDate .= $gen['lastconnect']."<br>";
$genIP .= $gen['ip']."<br>";
$genID .= $gen['owner']."<br>";
$conMsg .= $gen['conmsg']."<br>";
}
$genName .= "<br>";
$genDate .= "<br>";
$genIP .= "<br>";
$genID .= "<br>";
$conMsg .= "<br>";
}
echo "
<td align=right>$genName</td>
<td>$genDate</td>
<td>$genIP</td>
<td>$genID</td>
<td>$conMsg</td>";
?>
</tr>
</table>
+1 -1
View File
@@ -250,7 +250,7 @@ for($i=0; $i < $nationCount; $i++) {
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr><td><?php TrickLog(20); ?></td></tr>
<tr><td><?=getTrickLogRecent(20)?></td></tr>
</table>
<table align=center width=1760 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px; id=bg0>
+4 -4
View File
@@ -105,10 +105,10 @@ for($i=0; $i < $gencount; $i++) {
</tr>
<tr>
<td valign=top>
<?php MyLog($gen, 24); ?>
<?=getGenLogRecent($gen, 24)?>
</td>
<td valign=top>
<?php MyBatLog($gen, 24); ?>
<?=getBatLogRecent($gen, 24)?>
</td>
</tr>
<tr>
@@ -117,10 +117,10 @@ for($i=0; $i < $gencount; $i++) {
</tr>
<tr>
<td valign=top>
<?php MyHistory($connect, $gen); ?>
<?=getGeneralHistoryAll($gen)?>
</td>
<td valign=top>
<?php MyBatRes($gen, 24); ?>
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
</table>
-9
View File
@@ -10,15 +10,6 @@ $query = "select year,month,refresh,maxrefresh,maxonline from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$game = MYDB_fetch_array($result);
$fp = @fopen("logs/_traffic.txt", "r");
@fseek($fp, -1000, SEEK_END);
$file = @fread($fp, 1000);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."<br>"; }
echo $str;
$curonline = getOnlineNum();
for($i=0; $i < 11; $i++) {
$parse = explode("|", $log[count($log)-12+$i]);
+1 -1
View File
@@ -222,7 +222,7 @@ for($i=0; $i < $count; $i++) {
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr><td align=center id=bg2><font size=5>최 근 기 록</font></td></tr>
<tr><td>
<?=AuctionLog(20);?>
<?=getAuctionLogRecent(20);?>
</td></tr>
<tr><td align=center id=bg2><font size=5>도 움 말</font></td></tr>
<tr><td>
+3 -3
View File
@@ -116,7 +116,7 @@ for($i=0; $i < $gencount; $i++) {
<?php generalInfo($connect, $gen); generalInfo2($connect, $gen); ?>
</td>
<td valign=top>
<?php MyHistory($connect, $gen); ?>
<?=getGeneralHistoryAll($gen)?>
</td>
</tr>
<tr>
@@ -125,10 +125,10 @@ for($i=0; $i < $gencount; $i++) {
</tr>
<tr>
<td valign=top>
<?php MyBatLog($gen, 24); ?>
<?=getBatLogRecent($gen, 24)?>
</td>
<td valign=top>
<?php MyBatRes($gen, 24); ?>
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
</table>
+4 -4
View File
@@ -91,10 +91,10 @@ function go(type) {
</tr>
<tr>
<td valign=top>
<?php MyLog($me['no'], 24); ?>
<?=getGenLogRecent($me['no'], 24)?>
</td>
<td valign=top>
<?php MyBatLog($me['no'], 24); ?>
<?=getBatLogRecent($me['no'], 24)?>
</td>
</tr>
<tr>
@@ -103,10 +103,10 @@ function go(type) {
</tr>
<tr>
<td valign=top>
<?php MyHistory($connect, $me['no']); ?>
<?=getGeneralHistoryAll($me['no'])?>
</td>
<td valign=top>
<?php MyBatRes($me['no'], 24); ?>
<?=getBatResRecent($me['no'], 24)?>
</td>
</tr>
</table>
+1 -1
View File
@@ -159,7 +159,7 @@ if($btn == "추방") {
$query = "select year,month from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
pushGenLog($general, $log);
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
+2 -2
View File
@@ -75,8 +75,8 @@ if($ok == "수락") {
$youlog[] = "<C>●</><D><b>{$mynation['name']}</b></>(와)과 <C>$when</>년 불가침에 성공했습니다.";
$mylog[] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 <C>$when</>년 불가침에 합의했습니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 {$when}년 불가침 성공");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 {$when}년 불가침 수락");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 {$when}년 불가침 성공");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 {$when}년 불가침 수락");
//국메로 저장
$msg = "【외교】{$admin['year']}{$admin['month']}월:{$younation['name']}(와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}";
+2 -2
View File
@@ -61,8 +61,8 @@ if($ok == "수락") {
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【파기】</b></><D><b>{$mynation['name']}</b></>(이)가 <D><b>{$younation['name']}</b></>(와)과 불가침을 파기 하였습니다.";
$youlog[] = "<C>●</><D><b>{$mynation['name']}</b></>(와)과 파기에 성공했습니다.";
$mylog[] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 파기에 합의했습니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 파기 성공");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 파기 수락");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 파기 성공");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 파기 수락");
//외교 변경
$query = "update diplomacy set state='2',term='0' where me='{$me['nation']}' and you='{$you['nation']}'";
+2 -2
View File
@@ -61,8 +61,8 @@ if($ok == "수락") {
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【종전】</b></><D><b>{$mynation['name']}</b></>(이)가 <D><b>{$younation['name']}</b></>(와)과 <M>종전 합의</> 하였습니다.";
$youlog[] = "<C>●</><D><b>{$mynation['name']}</b></>(와)과 종전에 성공했습니다.";
$mylog[] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 종전에 합의했습니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 종전 성공");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 종전 수락");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 종전 성공");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 종전 수락");
//외교 변경
$query = "update diplomacy set state='2',term='0' where me='{$mynation['nation']}' and you='{$younation['nation']}'";
+2 -2
View File
@@ -100,8 +100,8 @@ if($ok == "수락") {
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【통합시도】</b></><D><b>{$mynation['name']}</b></>(와)과 <D><b>{$younation['name']}</b></>(이)가 통합을 시도합니다.";
$mylog[] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 통합에 동의했습니다.";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$me['name']}</>(이)가 <D><b>{$younation['name']}</b></>(와)과 <M>통합</>에 동의하였습니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 통합 시도");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 통합 시도");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 통합 시도");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 통합 시도");
//외교 변경
$query = "update diplomacy set state='3',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'";
+2 -2
View File
@@ -33,8 +33,8 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou
$youlog[] = "<C>●</><Y>{$me['name']}</> 등용에 성공했습니다.";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$me['name']}</>(이)가 <D><b>{$nation['name']}</b></>(으)로 <S>망명</>하였습니다.";
$mylog[] = "<C>●</><D>{$nation['name']}</>(으)로 망명하여 수도로 이동합니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</> 등용에 성공");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D>{$nation['name']}</>(으)로 망명");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</> 등용에 성공");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D>{$nation['name']}</>(으)로 망명");
// 임관내역 추가
$me['nations'] .= "{$nation['nation']},";
+2 -2
View File
@@ -90,8 +90,8 @@ if($ok == "수락") {
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【합병시도】</b></><D><b>{$mynation['name']}</b></>(와)과 <D><b>{$younation['name']}</b></>(이)가 합병을 시도합니다.";
$mylog[] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 합병에 동의했습니다.";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$me['name']}</>(이)가 <D><b>{$younation['name']}</b></>(와)과 <M>합병</>에 동의하였습니다.";
addHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 합병 시도");
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 합병 시도");
pushGeneralHistory($you, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 합병 시도");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(와)과 합병 시도");
//외교 변경
$query = "update diplomacy set state='5',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'";
+39 -125
View File
@@ -56,10 +56,9 @@ function getGeneralID($forceExit=false, $countLogin=true){
//로그인으로 처리
//XXX: 'get' 함수인데 update가 들어가있다.
//TODO: 조금더 적절한 형태의 로그인 카운트를 생각해볼 것
$query=$db->query("update general set logcnt=logcnt+1 ,ip = %s_ip,lastconnect=%s_lastConnect,conmsg=%s_conmsg where owner= %s_userID",[
$query=$db->query("update general set logcnt=logcnt+1 ,ip = %s_ip,lastconnect=%s_lastConnect where owner= %s_userID",[
'ip' => getenv("REMOTE_ADDR"),
'lastConnect' => date('Y-m-d H:i:s'),
'conmsg' => Util::array_get($_SESSION['conmsg'], ''),
'userID' => $userID
]);
$_SESSION[$idKey] = $generalID;
@@ -1136,113 +1135,6 @@ function generalInfo2($connect, $no) {
</table>";
}
function getRawLog($path, $count, $line_length){
//TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ
if(!file_exists($path)){
return null;
}
$fp = fopen($path, 'r');
@fseek(fp, -$count * $line_length, SEEK_END);
$data = fread($fp, $count * $line_length);
fclose($fp);
}
function TrickLog($count) {
if(!file_exists("logs/_tricklog.txt")){
return '';
}
$fp = @fopen("logs/_tricklog.txt", "r");
@fseek($fp, -$count*150, SEEK_END);
$file = @fread($fp, $count*150);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."<br>"; }
echo $str;
}
function AuctionLog($count) {
if(!file_exists("logs/_auctionlog.txt")){
return '';
}
$fp = @fopen("logs/_auctionlog.txt", "r");
@fseek($fp, -$count*300, SEEK_END);
$file = @fread($fp, $count*300);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."<br>"; }
echo $str;
}
function MyLog($no, $count) {
if(!file_exists("logs/gen{$no}.txt")){
return '';
}
$fp = @fopen("logs/gen{$no}.txt", "r");
@fseek($fp, -$count*300, SEEK_END);
$file = @fread($fp, $count*300);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) {
$str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."<br>" : "<br>";
}
echo $str;
}
function MyBatRes($no, $count) {
if(!file_exists("logs/batres{$no}.txt")){
return '';
}
$fp = @fopen("logs/batres{$no}.txt", "r");
@fseek($fp, -$count*300, SEEK_END);
$file = @fread($fp, $count*300);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) {
$str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."<br>" : "<br>";
}
echo $str;
}
function MyBatLog($no, $count) {
if(!file_exists("logs/batlog{$no}.txt")){
return '';
}
$fp = @fopen("logs/batlog{$no}.txt", "r");
@fseek($fp, -$count*300, SEEK_END);
$file = @fread($fp, $count*300);
@fclose($fp);
$log = explode("\n",$file);
$str = "";
for($i=0; $i < $count; $i++) {
$str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."<br>" : "<br>";
}
echo $str;
}
function MyHistory($connect, $no) {
$query = "select history from general where no='$no'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
echo ConvertLog($general['history']);
}
function addHistory($me, $history) {
DB::db()->query("update general set history=concat(%s, history) where no=%i",
$history.'<br>', $me['no']);
}
function addNationHistory($nation, $history) {
//FIXME: update 쿼리만으로도 구성 가능해보임.
$nation['history'] = "{$nation['history']}{$history}<br>";
DB::db()->query("update nation set history=concat(%s, history) where nation=%i",
$history.'<br>', $nation['nation']);
}
function adminMsg($connect) {
$query = "select msg from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -1445,10 +1337,19 @@ function increaseRefresh($type="", $cnt=1) {
$date = date('Y_m_d H:i:s');
$date2 = substr($date, 0, 10);
$online = getOnlineNum();
$fp = fopen("logs/_{$date2}_refresh.txt", "a");
$msg = StringUtil::Fill2($date,20," ").StringUtil::Fill2($session->userName,13," ").StringUtil::Fill2($session->generalName,13," ").StringUtil::Fill2($session->ip,16," ").StringUtil::Fill2($type, 10, " ")." 동접자: {$online}";
fwrite($fp, $msg."\n");
fclose($fp);
file_put_contents(
"logs/_{$date2}_refresh.txt",
sprintf(
"%s, %s, %s, %s, %d\n",
$date,
$session->userName,
$session->generalName,
$session->ip,
$type,
$online
),
FILE_APPEND
);
$proxy_headers = array(
'HTTP_VIA',
@@ -1473,9 +1374,17 @@ function increaseRefresh($type="", $cnt=1) {
if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}";
}
if($str != "") {
file_put_contents("logs/_{$date2}_ipcheck.txt",
sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\n",
$_SESSION['userName'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND);
$session = Session::Instance();
file_put_contents(
"logs/_{$date2}_ipcheck.txt",
sprintf(
"%s, %s, %s%s\n",
$session->userName,
$session->generalName,
$_SERVER['REMOTE_ADDR'],
$str
),
FILE_APPEND);
}
}
@@ -1550,7 +1459,12 @@ function tryLock() {
function unlock() {
// 풀림
//NOTE: unlock에는 table lock이 필요없는가?
DB::db()->query("update plock set plock=0");
$db = DB::db();
$db->query("lock tables plock write");
$db->update('plock', [
'plock'=>0
], true);
$db->query("unlock tables");
}
function timeover() {
@@ -1897,7 +1811,7 @@ function addAge($connect) {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$log[0] = "<C>●</>특기 【<b><L>".getGenSpecial($special)."</></b>】(을)를 익혔습니다!";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special)."</></b>】(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special)."</></b>】(을)를 습득");
pushGenLog($general, $log);
}
@@ -1913,7 +1827,7 @@ function addAge($connect) {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$log[0] = "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】(을)를 익혔습니다!";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
pushGenLog($general, $log);
}
}
@@ -2188,7 +2102,7 @@ function updateTurntime($connect, $no) {
$log[0] = "<C>●</>나이가 들어 <R>은퇴</>하고 자손에게 자리를 물려줍니다.";
pushGenLog($general, $log);
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌");
}
$turntime = addTurn($general['turntime'], $admin['turnterm']);
@@ -2337,7 +2251,7 @@ function uniqueItem($connect, $general, $log, $vote=0) {
case 0:
$log[] = "<C>●</><C>".getWeapName($it)."</>(을)를 습득했습니다!";
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
addHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getWeapName($it)."</>(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getWeapName($it)."</>(을)를 습득");
if($vote == 0) {
$history[0] = "<C>●</>{$game['year']}{$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
} elseif($vote == 1) {
@@ -2351,7 +2265,7 @@ function uniqueItem($connect, $general, $log, $vote=0) {
case 1:
$log[] = "<C>●</><C>".getBookName($it)."</>(을)를 습득했습니다!";
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
addHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getBookName($it)."</>(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getBookName($it)."</>(을)를 습득");
if($vote == 0) {
$history[0] = "<C>●</>{$game['year']}{$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
} elseif($vote == 1) {
@@ -2365,7 +2279,7 @@ function uniqueItem($connect, $general, $log, $vote=0) {
case 2:
$log[] = "<C>●</><C>".getHorseName($it)."</>(을)를 습득했습니다!";
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
addHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getHorseName($it)."</>(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getHorseName($it)."</>(을)를 습득");
if($vote == 0) {
$history[0] = "<C>●</>{$game['year']}{$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
} elseif($vote == 1) {
@@ -2379,7 +2293,7 @@ function uniqueItem($connect, $general, $log, $vote=0) {
case 3:
$log[] = "<C>●</><C>".getItemName($it)."</>(을)를 습득했습니다!";
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
addHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getItemName($it)."</>(을)를 습득");
pushGeneralHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<C>".getItemName($it)."</>(을)를 습득");
if($vote == 0) {
$history[0] = "<C>●</>{$game['year']}{$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
} elseif($vote == 1) {
@@ -2612,7 +2526,7 @@ function nextRuler($connect, $general) {
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받았습니다";
pushWorldHistory($history, $admin['year'], $admin['month']);
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
// 장수 삭제 및 부대처리는 checkTurn에서
}
+2 -2
View File
@@ -58,8 +58,8 @@ function acceptScout($messageInfo, $general, $msgResponse){
$youlog[] = "<C>●</><Y>{$myName}</> 등용에 성공했습니다.";
$alllog[] = "<C>●</>{$month}월:<Y>{$myName}</>(이)가 <D><b>{$nationName}</b></>(으)로 <S>망명</>하였습니다.";
$mylog[] = "<C>●</><D>{$nationName}</>(으)로 망명하여 수도로 이동합니다.";
addHistory($you, "<C>●</>{$year}{$month}월:<Y>{$myName}</> 등용에 성공");
addHistory($me, "<C>●</>{$year}{$month}월:<D>{$nationName}</>(으)로 망명");
pushGeneralHistory($you, "<C>●</>{$year}{$month}월:<Y>{$myName}</> 등용에 성공");
pushGeneralHistory($me, "<C>●</>{$year}{$month}월:<D>{$nationName}</>(으)로 망명");
$me['nations'] .= "{$nationID},";
+11 -11
View File
@@ -722,7 +722,7 @@ function checkMerge($connect) {
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
addHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
}
//항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$me['nation']}'";
@@ -732,12 +732,12 @@ function checkMerge($connect) {
for($i=0; $i < $gencount2; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
addHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
}
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【통합】</b></><D><b>{$mynation['name']}</b></>(와)과 <D><b>{$younation['name']}</b></>(이)가 <D><b>{$you['makenation']}</b></>(으)로 통합하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$you['makenation']}</b></>에 혼란이 일고 있습니다.";
addNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
$newGenCount = $gencount + $gencount2;
if($newGenCount < 10) { $newGenCount = 10; }
@@ -835,7 +835,7 @@ function checkSurrender($connect) {
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
addHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></> 합병에 성공");
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></> 합병에 성공");
}
//항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$me['nation']}'";
@@ -845,12 +845,12 @@ function checkSurrender($connect) {
for($i=0; $i < $gencount2; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
addHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>가 <D><b>{$younation['name']}</b></>(으)로 항복");
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>가 <D><b>{$younation['name']}</b></>(으)로 항복");
}
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【투항】</b></><D><b>{$mynation['name']}</b></> (이)가 <D><b>{$younation['name']}</b></>(으)로 항복하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
addNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 합병");
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 합병");
$newGenCount = $gencount + $gencount2;
if($newGenCount < 10) { $newGenCount = 10; }
@@ -955,21 +955,21 @@ function updateNationState($connect) {
switch($nationlevel) {
case 7:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>(을)를 자칭하였습니다.";
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>(을)를 자칭");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>(을)를 자칭");
break;
case 6:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극하였습니다.";
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극");
break;
case 5:
case 4:
case 3:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 임명되었습니다.";
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 임명됨");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 임명됨");
break;
case 2:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 독립하여 <Y>".getNationLevel($nationlevel)."</>로 나섰습니다.";
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>로 나서다");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>로 나서다");
break;
}
@@ -1140,7 +1140,7 @@ function checkEmperior($connect) {
$allcount = MYDB_num_rows($result);
if($count == $allcount) {
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(이)가 전토를 통일");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(이)가 전토를 통일");
$query = "update game set isUnited=2,conlimit=conlimit*100";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+105 -77
View File
@@ -1,111 +1,134 @@
<?php
namespace sammo;
function pushTrickLog($log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/_tricklog.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
}
function pushProcessLog($log) {
$size = count($log);
if($size > 0) {
$date = date('Y_m_d');
$fp = fopen("logs/_{$date}_processlog.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
}
//File-based
function delStepLog() {
$date = date('Y_m_d');
@unlink("logs/_{$date}_steplog.txt");
}
function pushRawFileLog($path, $lines){
if(!$lines){
return;
}
if(is_string($lines)){
$lines = [$lines];
}
$text = join("\n", $lines)."\n";
file_put_contents($path, $text, FILE_APPEND);
}
function getRawFileLogRecent(string $path, int $count, $expectedLineLength=null){
$tail = new FileTail($path);
return $tail->smart($count, $expectedLineLength, true);
}
function getRawFileLogAll(string $path){
if(!file_exists($path)){
return [];
}
return explode("\n", file_get_contents($path));
}
function getFormattedFileLogRecent(string $path, int $count, $expectedLineLength=null){
return array_map(function($text){
return ConvertLog($text);
}, getRawFileLogRecent($path, $count, $expectedLineLength));
}
function getFormattedFileLogAll(string $path){
return array_map(function($text){
return ConvertLog($text);
}, getRawFileLogAll($path));
}
function pushTnmtFightLog(int $group, $log) {
pushRawFileLog("logs/fight{$group}.txt", $log);
}
function getTnmtFightLogAll(int $group) {
return join('<br>',getFormattedFileLogAll("logs/fight{$group}.txt"));
}
function pushTrickLog($log) {
pushRawFileLog("logs/_tricklog.txt", $log);
}
function getTrickLogRecent($count) {
return join('<br>', getFormattedFileLogRecent("logs/_tricklog.txt", $count, 150));
}
function pushProcessLog($log) {
$date = date('Y_m_d');
pushRawFileLog("logs/_{$date}_processlog.txt", $log);
}
function pushStepLog($log) {
$date = date('Y_m_d');
$fp = fopen("logs/_{$date}_steplog.txt", "a");
fwrite($fp, $log."\n");
fclose($fp);
pushRawFileLog("logs/_{$date}_steplog.txt", $log);
}
function pushLockLog($log) {
$size = count($log);
if($size > 0) {
$date = date('Y_m_d');
$fp = fopen("logs/_{$date}_locklog.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
$date = date('Y_m_d');
pushRawFileLog("logs/_{$date}_locklog.txt", $log);
}
function pushAdminLog($log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/_adminlog.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
pushRawFileLog("logs/_adminlog.txt", $log);
}
function pushAuctionLog($log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/_auctionlog.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
pushRawFileLog("logs/_auctionlog.txt", $log);
}
function getAuctionLogRecent(int $count) {
return join('<br>', getFormattedFileLogRecent("logs/_auctionlog.txt", $count, 300));
}
function pushGenLog($general, $log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/gen{$general['no']}.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
$no = Util::toInt($general['no']);
pushRawFileLog("logs/gen{$no}.txt", $log);
}
function getGenLogRecent(int $no, int $count) {
return join('<br>', getFormattedFileLogRecent("logs/gen{$no}.txt", $count, 300));
}
function pushBatRes($general, $log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/batres{$general['no']}.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
$no = Util::toInt($general['no']);
pushRawFileLog("logs/batres{$no}.txt", $log);
}
function getBatResRecent(int $no, int $count) {
return join('<br>', getFormattedFileLogRecent("logs/batres{$no}.txt", $count, 300));
}
function pushBatLog($general, $log) {
$size = count($log);
if($size > 0) {
$fp = fopen("logs/batlog{$general['no']}.txt", "a");
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
$no = Util::toInt($general['no']);
pushRawFileLog("logs/batlog{$no}.txt", $log);
}
function getBatLogRecent(int $no, int $count) {
return join('<br>', getFormattedFileLogRecent("logs/batlog{$no}.txt", $count, 300));
}
//DB-based
function pushNationHistory($nation, $history) {
DB::db()->query("UPDATE nation set history=concat(%s, history) where nation=%i",
$history.'<br>', $nation['nation']);
}
function pushGeneralHistory($me, $history) {
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
$history.'<br>', $me['no']);
}
function getGeneralHistoryAll(int $no) {
$history = DB::db()->queryFirstField('SELECT history FROM general WHERE `no`=%i',$no);
return ConvertLog($history);
}
function pushWorldHistory(array $history, $year=null, $month=null) {
$db = DB::db();
@@ -169,7 +192,12 @@ function getGeneralPublicRecordRecent($count) {
$db = DB::db();
$texts = [];
foreach($db->queryFirstColumn('SELECT `text` from general_public_record order by id desc limit %i', $count) as $text){
foreach(
$db->queryFirstColumn(
'SELECT `text` from general_public_record order by id desc limit %i',
$count
) as $text
){
$texts[] = ConvertLog($text);
}
return join('<br>', $texts);
+37 -37
View File
@@ -412,9 +412,9 @@ function process_52($connect, &$general) {
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>(으)로 금<C>$gold</> 쌀<C>$rice</>을 지원했습니다.";
pushGenLog($gen, $genlog);
}
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(으)로 금<C>$gold</> 쌀<C>$rice</>을 지원");
addNationHistory($mynation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(으)로 금<C>$gold</> 쌀<C>$rice</>을 지원");
addNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(으)로부터 금<C>$gold</> 쌀<C>$rice</>을 지원 받음");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(으)로 금<C>$gold</> 쌀<C>$rice</>을 지원");
pushNationHistory($mynation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>(으)로 금<C>$gold</> 쌀<C>$rice</>을 지원");
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>(으)로부터 금<C>$gold</> 쌀<C>$rice</>을 지원 받음");
//상대국 수뇌부에게 로그 전달
$query = "select no,name,nation from general where nation='$which' and level>='9'";
@@ -660,9 +660,9 @@ function process_62($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$younation['name']}</b></>에 <M>선전 포고</> 하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【선포】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$younation['name']}</b></>에 선전 포고 하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>에 선전 포고");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$younation['name']}</b></>에 선전 포고");
addNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 선전 포고");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>에 선전 포고");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$younation['name']}</b></>에 선전 포고");
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 선전 포고");
//외교 변경
$query = "update diplomacy set state='1',term='24' where me='{$nation['nation']}' and you='{$younation['nation']}'";
@@ -874,8 +874,8 @@ function process_65($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>의 <R>초토화</>를 명령하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【초토화】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>(을)를 <R>초토화</>하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>의 <R>초토화</>를 명령");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>의 <R>초토화</>를 명령");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>의 <R>초토화</>를 명령");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>의 <R>초토화</>를 명령");
//외교제한 24
$amount = round($destcity['pop'] * 0.1);
@@ -971,8 +971,8 @@ function process_66($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(으)로 <R>천도</>를 명령하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<S><b>【천도】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>(으)로 천도하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(으)로 천도 명령");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(으)로 천도 명령");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(으)로 천도 명령");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(으)로 천도 명령");
//수도 변경
$query = "update nation set l{$general['level']}term='0',capital='{$destcity['city']}',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'";
@@ -1056,8 +1056,8 @@ function process_67($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 <C>증축</>하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<C><b>【증축】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>(을)를 증축하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(을)를 증축");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 증축");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(을)를 증축");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 증축");
//물자 감소
$query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'";
@@ -1143,8 +1143,8 @@ function process_68($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 <M>감축</>하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<M><b>【감축】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>(을)를 감축하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(을)를 감축");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 감축");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>(을)를 감축");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>(을)를 감축");
//물자 증가
$query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='{$general['nation']}'";
@@ -1251,8 +1251,8 @@ function process_71($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>필사즉생</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <M>필사즉생</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <M>필사즉생</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<M>필사즉생</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>필사즉생</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<M>필사즉생</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>필사즉생</>(을)를 발동");
//전장수 훈사100
$query = "update general set atmos=100,train=100 where nation='{$general['nation']}'";
@@ -1361,8 +1361,8 @@ function process_72($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>에 <M>백성동원</>(을)를 발동");
//도시 성수 80%
$query = "update city set def=def2*0.8,wall=wall2*0.8 where city='{$destcity['city']}'";
@@ -1486,9 +1486,9 @@ function process_73($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>의 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
addNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국의 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>의 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
pushNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국의 <G><b>{$destcity['name']}</b></>에 <M>수몰</>(을)를 발동");
//도시 성수 80% 감소
$query = "update city set def=def*0.2,wall=wall*0.2 where city='{$destcity['city']}'";
@@ -1603,9 +1603,9 @@ function process_74($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>의 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
addNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국의 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>의 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
pushNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국의 <G><b>{$destcity['name']}</b></>에 <M>허보</>(을)를 발동");
//상대국 도시 전부 검색
$query = "select city from city where nation='{$destcity['nation']}' and supply=1";
@@ -1744,9 +1744,9 @@ function process_75($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동");
addNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>피장파장</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>피장파장</>(을)를 발동");
pushNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>피장파장</>(을)를 발동");
//전략기한+60
$query = "update nation set tricklimit=tricklimit+60 where nation='{$destnation['nation']}'";
@@ -1843,8 +1843,8 @@ function process_76($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>의병모집</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <M>의병모집</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <M>의병모집</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<M>의병모집</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>의병모집</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<M>의병모집</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>의병모집</>(을)를 발동");
$query = "select avg(gennum) as gennum from nation";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -2077,9 +2077,9 @@ function process_77($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동");
addNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>이호경식</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>이호경식</>(을)를 발동");
pushNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>이호경식</>(을)를 발동");
//선포+3개월
if($dip['state'] == 0) {
@@ -2202,9 +2202,9 @@ function process_78($connect, &$general) {
// $alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동하였습니다.";
// $history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동하였습니다.";
$tricklog[count($tricklog)] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【전략】</b></><D><b>{$nation['name']}</b></>(이)가 <D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동");
addNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>급습</>(을)를 발동");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$destnation['name']}</b></>에 <M>급습</>(을)를 발동");
pushNationHistory($destnation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 아국에 <M>급습</>(을)를 발동");
//선포-3개월
$query = "update diplomacy set term=term-3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')";
@@ -2278,8 +2278,8 @@ function process_81($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <font color={$color}><b>국기</b></font>를 변경하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<L><b>【국기변경】</b></><D><b>{$nation['name']}</b></>(이)가 <font color={$color}><b>국기</b></font>를 변경하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<font color={$color}><b>국기</b></font>를 변경");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <font color={$color}><b>국기</b></font>를 변경");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<font color={$color}><b>국기</b></font>를 변경");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <font color={$color}><b>국기</b></font>를 변경");
//국기변경
$query = "update nation set color='$color',can_change_flag=can_change_flag-1 where nation='{$nation['nation']}'";
+17 -17
View File
@@ -126,7 +126,7 @@ function process_25($connect, &$general) {
} else {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에 <S>임관</>했습니다.";
$log[] = "<C>●</>{$admin['month']}월:<D>{$nation['name']}</>에 임관했습니다. <1>$date</>";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>에 임관");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>에 임관");
if($gencount < 10) { $exp = 700; }
else { $exp = 100; }
@@ -254,7 +254,7 @@ function process_29($connect, &$general) {
$log[] = "<C>●</>{$admin['month']}월:<Y>$name</>(이)라는 <C>인재</>를 {$scoutType}하였습니다! <1>$date</>";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <Y>$name</>(이)라는 <C>인재</>를 {$scoutType}하였습니다!";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>$name</>(이)라는 <C>인재</>를 {$scoutType}");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>$name</>(이)라는 <C>인재</>를 {$scoutType}");
$query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='{$general['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -475,7 +475,7 @@ function process_45($connect, &$general) {
if($dipcount1 > 0) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 통합에 반대하며 <D><b>{$nation['name']}</b></>(을)를 <R>떠났</>습니다.";
$log[] = "<C>●</>{$admin['month']}월:통합에 반대하며 <D><b>{$nation['name']}</b></>에서 떠났습니다. <1>$date</>";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:통합에 반대하며 <D><b>{$nation['name']}</b></>(을)를 떠남");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:통합에 반대하며 <D><b>{$nation['name']}</b></>(을)를 떠남");
// 국적 바꾸고 등급 재야로
$query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
@@ -483,7 +483,7 @@ function process_45($connect, &$general) {
} elseif($dipcount2 > 0) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 합병에 반대하며 <D><b>{$nation['name']}</b></>(을)를 <R>떠났</>습니다.";
$log[] = "<C>●</>{$admin['month']}월:합병에 반대하며 <D><b>{$nation['name']}</b></>에서 떠났습니다. <1>$date</>";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:합병에 반대하며 <D><b>{$nation['name']}</b></>(을)를 떠남");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:합병에 반대하며 <D><b>{$nation['name']}</b></>(을)를 떠남");
// 국적 바꾸고 등급 재야로
$query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
@@ -491,7 +491,7 @@ function process_45($connect, &$general) {
} else {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>하야</>했습니다.";
$log[] = "<C>●</>{$admin['month']}월:<D><b>{$nation['name']}</b></>에서 하야했습니다. <1>$date</>";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>에서 하야");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>에서 하야");
// 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소
$query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
@@ -599,8 +599,8 @@ function process_46($connect, &$general) {
$log[] = "<C>●</>{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 건국하였습니다. <1>$date</>";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$city['name']}</b></>에 국가를 건설하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【건국】</b></>".getNationType($type)." <D><b>{$nation['name']}</b></>(이)가 새로이 등장하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 건국");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>(을)를 건국");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 건국");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>(을)를 건국");
$exp = 1000;
$ded = 1000;
@@ -651,7 +651,7 @@ function process_47($connect, &$general) {
} else {
$log[] = "<C>●</>{$admin['month']}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date</>";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 방랑의 길을 떠납니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 버리고 방랑");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 버리고 방랑");
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【방랑】</b></><D><b>{$general['name']}</b></>은(는) <R>방랑</>의 길을 떠납니다.";
@@ -736,9 +736,9 @@ function process_54($connect, &$general) {
$log[] = "<C>●</>{$admin['month']}월:<Y>{$nextruler['name']}</>에게 군주의 자리를 물려줍니다. <1>$date</>";
$youlog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>에게서 군주의 자리를 물려받습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주자리를 <Y>{$nextruler['name']}</>에게 선양");
addHistory($nextruler, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주자리를 물려 받음");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <Y>{$nextruler['name']}</>에게 선양");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주자리를 <Y>{$nextruler['name']}</>에게 선양");
pushGeneralHistory($nextruler, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주자리를 물려 받음");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <Y>{$nextruler['name']}</>에게 선양");
}
pushGenLog($general, $log);
pushGenLog($nextruler, $youlog);
@@ -808,8 +808,8 @@ function process_55($connect, &$general) {
$log[] = "<C>●</>{$admin['month']}월:거병에 성공하였습니다. <1>$date</>";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$city['name']}</b></>에서 거병하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【거병】</b></><D><b>{$general['name']}</b></>(이)가 세력을 결성하였습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$city['name']}</b></>에서 거병");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$city['name']}</b></>에서 거병");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<G><b>{$city['name']}</b></>에서 거병");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$city['name']}</b></>에서 거병");
// 외교테이블 추가
@@ -853,7 +853,7 @@ function process_56($connect, &$general) {
} else {
$log[] = "<C>●</>{$admin['month']}월:세력을 해산했습니다. <1>$date</>";
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 세력을 해산했습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 해산");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>(을)를 해산");
$query = "select no from general where nation='{$general['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -935,9 +935,9 @@ function process_57($connect, &$general) {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <M>모반</>에 성공했습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【모반】</b></><Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 군주 자리를 찬탈했습니다.";
addHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:모반으로 <D><b>{$nation['name']}</b></>의 군주자리를 찬탈");
addHistory($ruler, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$general['name']}</b></>의 모반으로 인해 <D><b>{$nation['name']}</b></>의 군주자리를 박탈당함");
addNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <Y>{$ruler['name']}</>에게서 군주자리를 찬탈");
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:모반으로 <D><b>{$nation['name']}</b></>의 군주자리를 찬탈");
pushGeneralHistory($ruler, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$general['name']}</b></>의 모반으로 인해 <D><b>{$nation['name']}</b></>의 군주자리를 박탈당함");
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$general['name']}</>(이)가 <Y>{$ruler['name']}</>에게서 군주자리를 찬탈");
}
pushGenLog($general, $log);
pushGenLog($ruler, $youlog);
+14 -35
View File
@@ -167,25 +167,6 @@ function printRow($k, $npc, $name, $abil, $game, $win, $draw, $lose, $gd, $gl, $
echo "<tr align=center><td id=bg2>$k</td><td>$name</td><td>$abil</td><td>$game</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
}
function printFightLog($group) {
$fp = @fopen("logs/fight{$group}.txt", "r");
$file = @fread($fp, 3000);
@fclose($fp);
$log = explode("\n", $file);
$str = "";
for($i=0; $i < count($log); $i++) { $str .= ConvertLog($log[$i], 1)."<br>"; }
return substr($str, 0, -4);
}
function pushFightLog($group, $log) {
$fp = fopen("logs/fight{$group}.txt", "w");
$size = count($log);
for($i=0; $i < $size; $i++) {
fwrite($fp, $log[$i]."\n");
}
fclose($fp);
}
function printFighting($tournament, $phase) {
$code = $tournament * 100 + $phase;
if($code == 0) {
@@ -193,7 +174,7 @@ function printFighting($tournament, $phase) {
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "<td>".printFightLog(50)."</td>";
echo "<td>".getTnmtFightLogAll(50)."</td>";
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
@@ -202,28 +183,28 @@ function printFighting($tournament, $phase) {
} elseif($code <= 300) {
echo "<tr valign=top>";
for($i=0; $i < 8; $i++) {
echo "<td>".printFightLog($i)."</td>";
echo "<td>".getTnmtFightLogAll($i)."</td>";
}
echo "</tr>";
} elseif($code < 400) {
} elseif($code <= 500) {
echo "<tr valign=top>";
for($i=10; $i < 18; $i++) {
echo "<td>".printFightLog($i)."</td>";
echo "<td>".getTnmtFightLogAll($i)."</td>";
}
echo "</tr>";
} elseif($code < 700) {
} elseif($code <= 800) {
echo "<tr valign=top>";
for($i=20; $i < 28; $i++) {
echo "<td>".printFightLog($i)."</td>";
echo "<td>".getTnmtFightLogAll($i)."</td>";
}
echo "</tr>";
} elseif($code <= 900) {
echo "<tr valign=top>";
for($i=30; $i < 34; $i++) {
echo "<td>&nbsp;</td>";
echo "<td>".printFightLog($i)."</td>";
echo "<td>".getTnmtFightLogAll($i)."</td>";
}
echo "</tr>";
} elseif($code <= 1000) {
@@ -231,7 +212,7 @@ function printFighting($tournament, $phase) {
for($i=40; $i < 42; $i++) {
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "<td>".printFightLog($i)."</td>";
echo "<td>".getTnmtFightLogAll($i)."</td>";
echo "<td>&nbsp;</td>";
}
echo "</tr>";
@@ -239,13 +220,11 @@ function printFighting($tournament, $phase) {
}
function startTournament($connect, $auto, $type) {
for($i=0; $i < 8; $i++) {
@unlink("logs/fight{$i}.txt");
@unlink("logs/fight1{$i}.txt");
@unlink("logs/fight2{$i}.txt");
@unlink("logs/fight3{$i}.txt");
@unlink("logs/fight4{$i}.txt");
@unlink("logs/fight5{$i}.txt");
for($i=0; $i<50; $i++){
$filepath = "logs/fight{$i}.txt";
if(file_exists($filepath)){
@unlink($filepath);
}
}
switch($auto) {
@@ -639,8 +618,8 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) {
$query = "select no from general where no={$general2['no']}";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gen2 = MYDB_fetch_array($result);
addHistory($gen1, "<C>●</>{$admin['year']}{$admin['month']}월:<C>{$tp}</> 대회에서 우승");
addHistory($gen2, "<C>●</>{$admin['year']}{$admin['month']}월:<C>{$tp}</> 대회에서 준우승");
pushGeneralHistory($gen1, "<C>●</>{$admin['year']}{$admin['month']}월:<C>{$tp}</> 대회에서 우승");
pushGeneralHistory($gen2, "<C>●</>{$admin['year']}{$admin['month']}월:<C>{$tp}</> 대회에서 준우승");
$cost = $admin['develcost'] * 20;
$cost2 = $admin['develcost'] * 12;
@@ -989,5 +968,5 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$log[] = "--------------- 다음경기 ---------------<br><S>☞</> <Y>{$gen1['name']}</> vs <Y>{$gen2['name']}</>";
}
pushFightLog($group, $log);
pushTnmtFightLog($group, $log);
}
+1 -1
View File
@@ -238,7 +238,7 @@ if(Session::getUserGrade() >= 5) {
</tr>
<tr>
<td width=498 ><?php getGeneralPublicRecordRecent(15); ?></td>
<td width=498 ><?php MyLog($me['no'], 15); ?></td>
<td width=498 ><?=getGenLogRecent($me['no'], 15)?></td>
</tr>
<tr><td width=998 colspan=2 align=center id=bg1><b>중원 정세</b></td></tr>
<tr><td width=998 colspan=2><?php getWorldHistoryRecent(15); ?></td></tr>
+2 -2
View File
@@ -239,7 +239,7 @@ if($id_num) {
} else {
$log[0] = "<C>●</>{$admin['month']}월:<G><b>{$cityname['name']}</b></>에서 <Y>{$me['name']}</>(이)라는 호걸이 천하에 이름을 알립니다.";
}
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</>, <G>{$cityname['name']}</>에서 큰 뜻을 품다.");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</>, <G>{$cityname['name']}</>에서 큰 뜻을 품다.");
$mylog[] = "<C>●</>삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^";
$mylog[] = "<C>●</>처음 하시는 경우에는 <D>도움말</>을 참고하시고,";
$mylog[] = "<C>●</>문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~";
@@ -248,7 +248,7 @@ if($id_num) {
$mylog[] = "<C>●</>연령은 <C>$age</>세로 시작합니다.";
if($genius == 1) {
$mylog[] = "<C>●</>축하합니다! 천재로 태어나 처음부터 <C>".getGenSpecial($special2)."</> 특기를 가지게 됩니다!";
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 천재로 탄생.");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 천재로 탄생.");
}
pushGenLog($me, $mylog);
pushGeneralPublicRecord($log, $admin['year'], $admin['month']);
-59
View File
@@ -1,59 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//FIXME: 이 프로세스 전체가 필요없을 수 있다. session 디렉토리를 관리하지 않거나, 자동 로그인을 처리하는 방법을 생각할 것.
$db = DB::db();
$userID = Session::getUserID();
//회원 테이블에서 정보확인
$me= $db->queryFirstRow('select no,name,nation,block,killturn from general where owner= %s', $userID);
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
if(!$me) {
MessageBox("캐릭터가 없습니다!!!");
//TODO:login_process를 rest 형태로 처리
//header ("Location: index.php");
exit(0);
}
switch($me['block']) {
case 1:
MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break;
case 2:
MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다.");
MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break;
case 3:
MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다.");
MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break;
}
$_SESSION[DB::prefix().'p_no'] = Util::toInt($me['no']);
$_SESSION[DB::prefix().'p_name'] = $me['name'];
$_SESSION['p_time'] = time();
$date = date('Y-m-d H:i:s');
//
$query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$date = date('Y_m_d H:i:s');
$date2 = substr($date, 0, 10);
$fp = fopen("logs/_{$date2}_login.txt", "a");
$msg = StringUtil::Fill2($date,20," ").tab2($id,13," ").StringUtil::Fill2($me['name'],13," ").StringUtil::Fill2($_SESSION['p_ip'],16," ");
fwrite($fp, $msg."\n");
fclose($fp);
header ("Location: index.php");
MYDB_close($connect);
+7 -7
View File
@@ -1681,9 +1681,9 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) {
$alllog[] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <G><b>{$city['name']}</b></> 공략에 <S>성공</>했습니다.";
$log[] = "<C>●</><G><b>{$city['name']}</b></> 공략에 <S>성공</>했습니다.";
$history[] = "<C>●</>{$game['year']}{$game['month']}월:<S><b>【지배】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$city['name']}</b></>(을)를 지배했습니다.";
addHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<G><b>{$city['name']}</b></>(을)를 <S>함락</>시킴");
addNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<Y>{$general['name']}</>(이)가 {$destnationName} <G><b>{$city['name']}</b></>(을)를 <S>점령</>");
addNationHistory($destnation, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>에 의해 <G><b>{$city['name']}</b></>(이)가 <span class='ev_highlight'>함락</span>");
pushGeneralHistory($general, "<C>●</>{$game['year']}{$game['month']}월:<G><b>{$city['name']}</b></>(을)를 <S>함락</>시킴");
pushNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<Y>{$general['name']}</>(이)가 {$destnationName} <G><b>{$city['name']}</b></>(을)를 <S>점령</>");
pushNationHistory($destnation, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>에 의해 <G><b>{$city['name']}</b></>(이)가 <span class='ev_highlight'>함락</span>");
$query = "select city from city where nation='{$city['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -1697,7 +1697,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) {
$losenation = MYDB_fetch_array($result);
$history[] = "<C>●</>{$game['year']}{$game['month']}월:<R><b>【멸망】</b></><D><b>{$losenation['name']}</b></>(이)가 멸망하였습니다.";
addNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$losenation['name']}</b></>(을)를 정복");
pushNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$losenation['name']}</b></>(을)를 정복");
$query = "select no from general where nation='{$general['nation']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -1727,7 +1727,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) {
pushGenLog($gen, $genlog);
addHistory($gen, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$losenation['name']}</b></>(이)가 <R>멸망</>");
pushGeneralHistory($gen, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$losenation['name']}</b></>(이)가 <R>멸망</>");
$loseGeneralGold += $loseGold;
$loseGeneralRice += $loseRice;
@@ -1895,8 +1895,8 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) {
$conquerNationArray = MYDB_fetch_array($conquerResult);
$history[] = "<C>●</>{$game['year']}{$game['month']}월:<Y><b>【분쟁협상】</b></><D><b>{$conquerNationArray['name']}</b></>(이)가 영토분쟁에서 우위를 점하여 <G><b>{$city['name']}</b></>(을)를 양도받았습니다.";
addNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<G><b>{$city['name']}</b></>(을)를 <D><b>{$conquerNationArray['name']}</b></>에 <Y>양도</>");
addNationHistory($conquerNationArray, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$nation['name']}</b></>에서 <G><b>{$city['name']}</b></>(을)를 <S>양도</> 받음");
pushNationHistory($nation, "<C>●</>{$game['year']}{$game['month']}월:<G><b>{$city['name']}</b></>(을)를 <D><b>{$conquerNationArray['name']}</b></>에 <Y>양도</>");
pushNationHistory($conquerNationArray, "<C>●</>{$game['year']}{$game['month']}월:<D><b>{$nation['name']}</b></>에서 <G><b>{$city['name']}</b></>(을)를 <S>양도</> 받음");
// 이동X 및 사기 변경
$query = "update general set atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+1 -2
View File
@@ -86,7 +86,6 @@ if($admin['npcmode'] != 1) {
$query = "
update general set
name2='{$member['name']}',
conmsg='',
npc=1,
killturn=6,
mode=2,
@@ -101,7 +100,7 @@ if($admin['npcmode'] != 1) {
$me = MYDB_fetch_array($result);
$log[0] = "<C>●</>{$admin['month']}월:<Y>{$me['name']}</>의 육체에 <Y>{$member['name']}</>(이)가 <S>빙의</>됩니다!";
addHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</>의 육체에 <Y>{$member['name']}</>(이)가 빙의되다.");
pushGeneralHistory($me, "<C>●</>{$admin['year']}{$admin['month']}월:<Y>{$me['name']}</>의 육체에 <Y>{$member['name']}</>(이)가 빙의되다.");
pushGenLog($me, $mylog);
pushGeneralPublicRecord($log, $admin['year'], $admin['month']);
-1
View File
@@ -5,7 +5,6 @@
CREATE TABLE `general` (
`no` INT(11) NOT NULL AUTO_INCREMENT,
`owner` INT(11) NOT NULL DEFAULT '0',
`conmsg` CHAR(255) NOT NULL DEFAULT '',
`npcmsg` CHAR(255) NULL DEFAULT '',
`npcid` INT(5) NULL DEFAULT NULL,
`npc` INT(1) NULL DEFAULT '0',
+5
View File
@@ -222,6 +222,11 @@ class Session {
return $this;
}
$db->update('general', [
'logcnt' => $db->sqleval('logcnt+1'),
'ip' => Util::get_client_ip(true),
'lastConnect' => date('Y-m-d H:i:s')
], 'owner = %i', $userID);
$this->set($serverID.static::GAME_KEY_DATE, $now);
$this->set($serverID.static::GAME_KEY_GENERAL_ID, $generalID);