GeneralPublicRecord 추가
This commit is contained in:
@@ -28,7 +28,7 @@ switch($btn) {
|
|||||||
$lognum = $admin['historyindex'] + 1;
|
$lognum = $admin['historyindex'] + 1;
|
||||||
if($lognum >= 29) { $lognum = 0; }
|
if($lognum >= 29) { $lognum = 0; }
|
||||||
$history[0] = "<R>★</><S>{$log}</>";
|
$history[0] = "<R>★</><S>{$log}</>";
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
break;
|
break;
|
||||||
case "변경1":
|
case "변경1":
|
||||||
$query = "update game set starttime='$starttime'";
|
$query = "update game set starttime='$starttime'";
|
||||||
@@ -101,7 +101,7 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$history[] = "<R>★</>턴시간이 <C>$btn</>으로 변경됩니다.";
|
$history[] = "<R>★</>턴시간이 <C>$btn</>으로 변경됩니다.";
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ $(function(){
|
|||||||
<table align=center width=1200 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1200 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
||||||
<tr height=520>
|
<tr height=520>
|
||||||
<td width=498 valign=top>
|
<td width=498 valign=top>
|
||||||
<?php AllLog(34); ?>
|
<?php getGeneralPublicRecordRecent(34); ?>
|
||||||
</td>
|
</td>
|
||||||
<td width=698>
|
<td width=698>
|
||||||
<?=getMapHtml()?>
|
<?=getMapHtml()?>
|
||||||
@@ -61,7 +61,7 @@ $(function(){
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 valign=top>
|
<td colspan=2 valign=top>
|
||||||
<?php History(34); ?>
|
<?php getWorldHistoryRecent(34); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ if($btn == "추방") {
|
|||||||
addHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
|
addHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
|
||||||
|
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
} elseif($btn == "임명" && $level >= 5 && $level <= 11) {
|
} elseif($btn == "임명" && $level >= 5 && $level <= 11) {
|
||||||
$query = "select l{$level}set,level,chemi from nation where nation='{$me['nation']}'";
|
$query = "select l{$level}set,level,chemi from nation where nation='{$me['nation']}'";
|
||||||
|
|||||||
+2
-2
@@ -113,8 +113,8 @@ if($ok == "수락") {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
//pushAllLog($alllog);
|
//pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
//pushHistory($history, $admin['year'], $admin['month']);
|
//pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -92,8 +92,8 @@ if($ok == "수락") {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -97,8 +97,8 @@ if($ok == "수락") {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -131,8 +131,8 @@ if($ok == "수락") {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -163,8 +163,8 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -121,8 +121,8 @@ if($ok == "수락") {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
echo "<script>location.replace('msglist.php');</script>";
|
echo "<script>location.replace('msglist.php');</script>";
|
||||||
|
|
||||||
|
|||||||
+8
-154
@@ -1136,126 +1136,6 @@ function generalInfo2($connect, $no) {
|
|||||||
</table>";
|
</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function delStepLog() {
|
|
||||||
$date = date('Y_m_d');
|
|
||||||
@unlink("logs/_{$date}_steplog.txt");
|
|
||||||
}
|
|
||||||
|
|
||||||
function pushStepLog($log) {
|
|
||||||
$date = date('Y_m_d');
|
|
||||||
$fp = fopen("logs/_{$date}_steplog.txt", "a");
|
|
||||||
fwrite($fp, $log."\n");
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function pushAllLog($log) {
|
|
||||||
$text = join("\n", $log)."\n";
|
|
||||||
file_put_contents(__dir__.'/logs/_alllog.txt', $text, FILE_APPEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
function pushHistory($history, $year=null, $month=null) {
|
|
||||||
$db = DB::db();
|
|
||||||
if($year === null || $month === null){
|
|
||||||
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
|
||||||
$year = $game['year'];
|
|
||||||
$month = $game['month'];
|
|
||||||
}
|
|
||||||
$request = array_map(function($text) use ($year, $month) {
|
|
||||||
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
|
||||||
}, $history);
|
|
||||||
$db->insert('full_history', $history);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRawLog($path, $count, $line_length){
|
function getRawLog($path, $count, $line_length){
|
||||||
//TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ
|
//TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ
|
||||||
if(!file_exists($path)){
|
if(!file_exists($path)){
|
||||||
@@ -1282,22 +1162,6 @@ function TrickLog($count) {
|
|||||||
echo $str;
|
echo $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AllLog($count) {
|
|
||||||
if(!file_exists("logs/_alllog.txt")){
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
$fp = @fopen("logs/_alllog.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 AuctionLog($count) {
|
function AuctionLog($count) {
|
||||||
if(!file_exists("logs/_auctionlog.txt")){
|
if(!file_exists("logs/_auctionlog.txt")){
|
||||||
return '';
|
return '';
|
||||||
@@ -1312,16 +1176,6 @@ function AuctionLog($count) {
|
|||||||
echo $str;
|
echo $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function History($count) {
|
|
||||||
$db = DB::db();
|
|
||||||
|
|
||||||
$texts = [];
|
|
||||||
foreach($db->queryFirstColumn('SELECT `text` from full_history order by id desc limit %i', $count) as $text){
|
|
||||||
$texts[] = ConvertLog($text);
|
|
||||||
}
|
|
||||||
return join('<br>', $texts);
|
|
||||||
}
|
|
||||||
|
|
||||||
function MyLog($no, $count) {
|
function MyLog($no, $count) {
|
||||||
if(!file_exists("logs/gen{$no}.txt")){
|
if(!file_exists("logs/gen{$no}.txt")){
|
||||||
return '';
|
return '';
|
||||||
@@ -1923,7 +1777,7 @@ function checkTurn($connect) {
|
|||||||
addAge($connect);
|
addAge($connect);
|
||||||
// 새해 알림
|
// 새해 알림
|
||||||
$alllog[] = "<C>◆</>{$admin['month']}월:<C>{$admin['year']}</>년이 되었습니다.";
|
$alllog[] = "<C>◆</>{$admin['month']}월:<C>{$admin['year']}</>년이 되었습니다.";
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
} elseif($admin['month'] == 4) {
|
} elseif($admin['month'] == 4) {
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
||||||
updateQuaterly($connect);
|
updateQuaterly($connect);
|
||||||
@@ -2202,7 +2056,7 @@ function updateTurntime($connect, $no) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>(이)가 <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>(이)가 <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
if($admin['isUnited'] == 0) {
|
if($admin['isUnited'] == 0) {
|
||||||
CheckHall($connect, $no);
|
CheckHall($connect, $no);
|
||||||
@@ -2315,7 +2169,7 @@ function updateTurntime($connect, $no) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2330,7 +2184,7 @@ function updateTurntime($connect, $no) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>은퇴</>하고 그 자손이 유지를 이어받았습니다.";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>은퇴</>하고 그 자손이 유지를 이어받았습니다.";
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
$log[0] = "<C>●</>나이가 들어 <R>은퇴</>하고 자손에게 자리를 물려줍니다.";
|
$log[0] = "<C>●</>나이가 들어 <R>은퇴</>하고 자손에게 자리를 물려줍니다.";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
@@ -2537,8 +2391,8 @@ function uniqueItem($connect, $general, $log, $vote=0) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $log;
|
return $log;
|
||||||
@@ -2692,7 +2546,7 @@ function deleteNation($connect, $general) {
|
|||||||
$query = "delete from diplomacy where me='{$general['nation']}' or you='{$general['nation']}'";
|
$query = "delete from diplomacy where me='{$general['nation']}' or you='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2757,7 +2611,7 @@ function nextRuler($connect, $general) {
|
|||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받았습니다";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받았습니다";
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
addNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
|
addNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
|
||||||
// 장수 삭제 및 부대처리는 checkTurn에서
|
// 장수 삭제 및 부대처리는 checkTurn에서
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ function registerAuction($connect) {
|
|||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<C>".GetStuffName($stuff)."</>(이)가 거래장에 등장했습니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<C>".GetStuffName($stuff)."</>(이)가 거래장에 등장했습니다!";
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>ⓝ암시장상인</>(이)가 <C>".GetStuffName($stuff)."</>(을)를 판다는 소문이 돌고 있습니다!";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>ⓝ암시장상인</>(이)가 <C>".GetStuffName($stuff)."</>(을)를 판다는 소문이 돌고 있습니다!";
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@@ -205,8 +205,8 @@ function processAuction($connect) {
|
|||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
pushGenLog($trader, $traderLog);
|
pushGenLog($trader, $traderLog);
|
||||||
pushGenLog($bidder, $bidderLog);
|
pushGenLog($bidder, $bidderLog);
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ function acceptScout($messageInfo, $general, $msgResponse){
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($alllog, $year, $month);
|
pushWorldHistory($alllog, $year, $month);
|
||||||
|
|
||||||
return [true, 'success'];
|
return [true, 'success'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ function preUpdateMonthly($connect) {
|
|||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【고립】</b></><G><b>{$city['name']}</b></>(이)가 보급이 끊겨 <R>미지배</> 도시가 되었습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【고립】</b></><G><b>{$city['name']}</b></>(이)가 보급이 끊겨 <R>미지배</> 도시가 되었습니다.";
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
//민심30이하 공백지 처리
|
//민심30이하 공백지 처리
|
||||||
$query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'";
|
$query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -608,7 +608,7 @@ group by A.nation
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
//사상자 초기화
|
//사상자 초기화
|
||||||
$query = "update diplomacy set dead=0";
|
$query = "update diplomacy set dead=0";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -781,7 +781,7 @@ function checkMerge($connect) {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
unset($mylog);
|
unset($mylog);
|
||||||
unset($youlog);
|
unset($youlog);
|
||||||
unset($history);
|
unset($history);
|
||||||
@@ -901,7 +901,7 @@ function checkSurrender($connect) {
|
|||||||
|
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushGenLog($you, $youlog);
|
pushGenLog($you, $youlog);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
unset($mylog);
|
unset($mylog);
|
||||||
unset($youlog);
|
unset($youlog);
|
||||||
unset($history);
|
unset($history);
|
||||||
@@ -985,7 +985,7 @@ function updateNationState($connect) {
|
|||||||
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkStatistic($connect) {
|
function checkStatistic($connect) {
|
||||||
@@ -1279,7 +1279,7 @@ function checkEmperior($connect) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>(이)가 전토를 통일하였습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>(이)가 전토를 통일하였습니다.";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
//연감 월결산
|
//연감 월결산
|
||||||
LogHistory();
|
LogHistory();
|
||||||
|
|||||||
+171
-31
@@ -1,13 +1,142 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
function getHistory($year, $month) {
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delStepLog() {
|
||||||
|
$date = date('Y_m_d');
|
||||||
|
@unlink("logs/_{$date}_steplog.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
function pushStepLog($log) {
|
||||||
|
$date = date('Y_m_d');
|
||||||
|
$fp = fopen("logs/_{$date}_steplog.txt", "a");
|
||||||
|
fwrite($fp, $log."\n");
|
||||||
|
fclose($fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function pushWorldHistory(array $history, $year=null, $month=null) {
|
||||||
|
$db = DB::db();
|
||||||
|
if($year === null || $month === null){
|
||||||
|
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
||||||
|
$year = $game['year'];
|
||||||
|
$month = $game['month'];
|
||||||
|
}
|
||||||
|
$request = array_map(function($text) use ($year, $month) {
|
||||||
|
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
||||||
|
}, array_values($history));
|
||||||
|
$db->insert('world_history', $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWorldHistoryRecent(int $count) {
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
$texts = [];
|
||||||
|
foreach($db->queryFirstColumn('SELECT `text` from world_history order by id desc limit %i', $count) as $text){
|
||||||
|
$texts[] = ConvertLog($text);
|
||||||
|
}
|
||||||
|
return join('<br>', $texts);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWorldHistoryWithDate($year, $month) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
$texts = [];
|
$texts = [];
|
||||||
foreach(
|
foreach(
|
||||||
$db->queryFirstColumn(
|
$db->queryFirstColumn(
|
||||||
'SELECT `text` from full_history where year = %i and month = %i order by id desc',
|
'SELECT `text` from world_history where year = %i and month = %i order by id desc',
|
||||||
$year,
|
$year,
|
||||||
$month
|
$month
|
||||||
) as $text
|
) as $text
|
||||||
@@ -22,36 +151,47 @@ function getHistory($year, $month) {
|
|||||||
return join('<br>', $texts);
|
return join('<br>', $texts);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGenHistory($count, $year, $month, $isFirst=0) {
|
|
||||||
$fp = @fopen("logs/_alllog.txt", "r");
|
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
|
||||||
$file = @fread($fp, $count*300);
|
|
||||||
@fclose($fp);
|
|
||||||
$log = explode("\n",$file);
|
|
||||||
|
|
||||||
$str = "";
|
function pushGeneralPublicRecord(array $history, $year=null, $month=null) {
|
||||||
$prefix = "</>{$month}월:";
|
$db = DB::db();
|
||||||
$year -= 1;
|
if($year === null || $month === null){
|
||||||
$prefixYear = "</>{$month}월:<C>{$year}</>";
|
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
||||||
for($i=0; $i < $count; $i++) {
|
$year = $game['year'];
|
||||||
$line = $log[count($log)-2-$i];
|
$month = $game['month'];
|
||||||
if($line == "") {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strpos($line, $prefixYear)) {
|
|
||||||
break;
|
|
||||||
} elseif(strpos($line, $prefix) || $isFirst == 1) {
|
|
||||||
$str = ConvertLog($line).'<br>'.$str;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if($str == "") {
|
$request = array_map(function($text) use ($year, $month) {
|
||||||
$str = "<C>●</>{$month}월: 기록 없음";
|
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
||||||
$str = ConvertLog($str);
|
}, array_values($history));
|
||||||
|
$db->insert('general_public_record', $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
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){
|
||||||
|
$texts[] = ConvertLog($text);
|
||||||
|
}
|
||||||
|
return join('<br>', $texts);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getGeneralPublicRecordWithDate($count, $year, $month, $isFirst=0) {
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
$texts = [];
|
||||||
|
foreach(
|
||||||
|
$db->queryFirstColumn(
|
||||||
|
'SELECT `text` from general_public_record where year = %i and month = %i order by id desc',
|
||||||
|
$year,
|
||||||
|
$month
|
||||||
|
) as $text
|
||||||
|
){
|
||||||
|
$texts[] = ConvertLog($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$texts){
|
||||||
|
return ConvertLog("<C>●</>{$month}월: 기록 없음");
|
||||||
}
|
}
|
||||||
return $str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogHistory($isFirst=0) {
|
function LogHistory($isFirst=0) {
|
||||||
@@ -87,8 +227,8 @@ function LogHistory($isFirst=0) {
|
|||||||
|
|
||||||
$map_json = json_encode($map, JSON_UNESCAPED_UNICODE);
|
$map_json = json_encode($map, JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
$log = getHistory($year, $month);
|
$log = getWorldHistoryWithDate($year, $month);
|
||||||
$genlog = getGenHistory(50, $year, $month, $isFirst);
|
$genlog = getGeneralPublicRecordWithDate(50, $year, $month, $isFirst);
|
||||||
|
|
||||||
$nationStr = "";
|
$nationStr = "";
|
||||||
$powerStr = "";
|
$powerStr = "";
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ function RegGeneral($init,$life,$fiction,$turnterm,$startyear,$year,$gencount,$a
|
|||||||
'bornyear'=>$bornyear,
|
'bornyear'=>$bornyear,
|
||||||
'deadyear'=>$deadyear
|
'deadyear'=>$deadyear
|
||||||
]);
|
]);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetDevelop($connect, $genType, $no, $city, $tech) {
|
function SetDevelop($connect, $genType, $no, $city, $tech) {
|
||||||
|
|||||||
@@ -1426,7 +1426,7 @@ function process_26($connect, &$general) {
|
|||||||
$log = uniqueItem($connect, $general, $log);
|
$log = uniqueItem($connect, $general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1674,7 +1674,7 @@ function process_31($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2128,7 +2128,7 @@ function process_44($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+29
-29
@@ -443,7 +443,7 @@ function process_52($connect, &$general) {
|
|||||||
|
|
||||||
// $log = checkAbility($connect, $general, $log);
|
// $log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -681,8 +681,8 @@ function process_62($connect, &$general) {
|
|||||||
PushMsg(3, $younation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $youmsg);
|
PushMsg(3, $younation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $youmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -899,8 +899,8 @@ function process_65($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,8 +985,8 @@ function process_66($connect, &$general) {
|
|||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1072,8 +1072,8 @@ function process_67($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1171,8 +1171,8 @@ function process_68($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1271,8 +1271,8 @@ function process_71($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -1381,8 +1381,8 @@ function process_72($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -1507,8 +1507,8 @@ function process_73($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -1645,8 +1645,8 @@ function process_74($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -1766,8 +1766,8 @@ function process_75($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -1980,8 +1980,8 @@ function process_76($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -2103,8 +2103,8 @@ function process_77($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -2223,8 +2223,8 @@ function process_78($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushHistory($history, $admin['year'], $admin['month']);
|
// pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
// pushAllLog($alllog);
|
// pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushTrickLog($tricklog);
|
pushTrickLog($tricklog);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
@@ -2292,7 +2292,7 @@ function process_81($connect, &$general) {
|
|||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ function process_25($connect, &$general) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,7 +422,7 @@ function process_29($connect, &$general) {
|
|||||||
$log = uniqueItem($connect, $general, $log);
|
$log = uniqueItem($connect, $general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ function process_45($connect, &$general) {
|
|||||||
$query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='{$nation['chemi']}',gold=gold+'$gold',rice=rice+'$rice' where nation='{$general['nation']}'";
|
$query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='{$nation['chemi']}',gold=gold+'$gold',rice=rice+'$rice' where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,8 +618,8 @@ function process_46($connect, &$general) {
|
|||||||
$log = uniqueItem($connect, $general, $log, 3);
|
$log = uniqueItem($connect, $general, $log, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,11 +676,11 @@ function process_47($connect, &$general) {
|
|||||||
$query = "update diplomacy set state='2',term='0' where me='{$general['nation']}' or you='{$general['nation']}'";
|
$query = "update diplomacy set state='2',term='0' where me='{$general['nation']}' or you='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -742,7 +742,7 @@ function process_54($connect, &$general) {
|
|||||||
}
|
}
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushGenLog($nextruler, $youlog);
|
pushGenLog($nextruler, $youlog);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_55($connect, &$general) {
|
function process_55($connect, &$general) {
|
||||||
@@ -826,8 +826,8 @@ function process_55($connect, &$general) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ function process_56($connect, &$general) {
|
|||||||
|
|
||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -941,6 +941,6 @@ function process_57($connect, &$general) {
|
|||||||
}
|
}
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushGenLog($ruler, $youlog);
|
pushGenLog($ruler, $youlog);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ function process_32($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ function process_33($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ function process_34($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@ function process_35($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,6 +650,6 @@ function process_36($connect, &$general) {
|
|||||||
|
|
||||||
$log = checkAbility($connect, $general, $log);
|
$log = checkAbility($connect, $general, $log);
|
||||||
}
|
}
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ function processSpring($connect) {
|
|||||||
$admin = MYDB_fetch_array($result);
|
$admin = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$history[0] = "<R>★</>{$admin['year']}년 {$admin['month']}월: <S>모두들 즐거운 게임 하고 계신가요? ^^ <Y>삼국일보</> 애독해 주시고, <M>훼접</>은 삼가주세요~</>";
|
$history[0] = "<R>★</>{$admin['year']}년 {$admin['month']}월: <S>모두들 즐거운 게임 하고 계신가요? ^^ <Y>삼국일보</> 애독해 주시고, <M>훼접</>은 삼가주세요~</>";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function processGoldIncome($connect) {
|
function processGoldIncome($connect) {
|
||||||
@@ -109,7 +109,7 @@ function processGoldIncome($connect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<W><b>【지급】</b></>봄이 되어 봉록에 따라 자금이 지급됩니다.";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<W><b>【지급】</b></>봄이 되어 봉록에 따라 자금이 지급됩니다.";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAdminLog($adminLog);
|
pushAdminLog($adminLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ function processRiceIncome($connect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<W><b>【지급】</b></>가을이 되어 봉록에 따라 군량이 지급됩니다.";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<W><b>【지급】</b></>가을이 되어 봉록에 따라 군량이 지급됩니다.";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushAdminLog($adminLog);
|
pushAdminLog($adminLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,5 +676,5 @@ function disaster($connect) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pushHistory($disaster, $admin['year'], $admin['month']);
|
pushWorldHistory($disaster, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ function startTournament($connect, $auto, $type) {
|
|||||||
case 2: $history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>일기토</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>용사</span>들을 모집하고 있습니다!"; break;
|
case 2: $history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>일기토</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>용사</span>들을 모집하고 있습니다!"; break;
|
||||||
case 3: $history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>설전</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>책사</span>들을 모집하고 있습니다!"; break;
|
case 3: $history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>설전</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>책사</span>들을 모집하고 있습니다!"; break;
|
||||||
}
|
}
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillLowGenAll($connect) {
|
function fillLowGenAll($connect) {
|
||||||
@@ -646,7 +646,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) {
|
|||||||
$cost2 = $admin['develcost'] * 12;
|
$cost2 = $admin['develcost'] * 12;
|
||||||
$history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>{$tp}</> 대회에서 <Y>{$general['name']}</>(이)가 <C>우승</>, <Y>{$general2['name']}</>(이)가 <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!";
|
$history[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>{$tp}</> 대회에서 <Y>{$general['name']}</>(이)가 <C>우승</>, <Y>{$general2['name']}</>(이)가 <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!";
|
||||||
$history[1] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$cost}</>, <S>준우승자</>에겐 <C>{$cost2}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!";
|
$history[1] = "<S>◆</>{$admin['year']}년 {$admin['month']}월: <C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$cost}</>, <S>준우승자</>에겐 <C>{$cost2}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
for($i=0; $i < count($genNo); $i++) {
|
for($i=0; $i < count($genNo); $i++) {
|
||||||
$general['no'] = $genNo[$i];
|
$general['no'] = $genNo[$i];
|
||||||
|
|||||||
+2
-2
@@ -237,11 +237,11 @@ if(Session::getUserGrade() >= 5) {
|
|||||||
<td width=498 align=center id=bg1><b>개인 기록</b></td>
|
<td width=498 align=center id=bg1><b>개인 기록</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=498 ><?php AllLog(15); ?></td>
|
<td width=498 ><?php getGeneralPublicRecordRecent(15); ?></td>
|
||||||
<td width=498 ><?php MyLog($me['no'], 15); ?></td>
|
<td width=498 ><?php MyLog($me['no'], 15); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td width=998 colspan=2 align=center id=bg1><b>중원 정세</b></td></tr>
|
<tr><td width=998 colspan=2 align=center id=bg1><b>중원 정세</b></td></tr>
|
||||||
<tr><td width=998 colspan=2><?php History(15); ?></td></tr>
|
<tr><td width=998 colspan=2><?php getWorldHistoryRecent(15); ?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 style=font-size:13px;word-break:break-all; id=bg0>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
+2
-2
@@ -235,7 +235,7 @@ if($id_num) {
|
|||||||
$log[1] = "<C>●</>{$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 <C>천재</>의 등장으로 온 천하가 떠들썩합니다.";
|
$log[1] = "<C>●</>{$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 <C>천재</>의 등장으로 온 천하가 떠들썩합니다.";
|
||||||
|
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【천재】</b></><G><b>{$cityname['name']}</b></>에 천재가 등장했습니다.";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【천재】</b></><G><b>{$cityname['name']}</b></>에 천재가 등장했습니다.";
|
||||||
pushHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
} else {
|
} else {
|
||||||
$log[0] = "<C>●</>{$admin['month']}월:<G><b>{$cityname['name']}</b></>에서 <Y>{$me['name']}</>(이)라는 호걸이 천하에 이름을 알립니다.";
|
$log[0] = "<C>●</>{$admin['month']}월:<G><b>{$cityname['name']}</b></>에서 <Y>{$me['name']}</>(이)라는 호걸이 천하에 이름을 알립니다.";
|
||||||
}
|
}
|
||||||
@@ -251,7 +251,7 @@ if($id_num) {
|
|||||||
addHistory($me, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 천재로 탄생.");
|
addHistory($me, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getGenSpecial($special2)."</> 특기를 가진 천재로 탄생.");
|
||||||
}
|
}
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushAllLog($log);
|
pushGeneralPublicRecord($log, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
$adminLog[0] = "가입 : {$name} // {$me['name']} // {$id} // ".getenv("REMOTE_ADDR");
|
$adminLog[0] = "가입 : {$name} // {$me['name']} // {$id} // ".getenv("REMOTE_ADDR");
|
||||||
pushAdminLog($adminLog);
|
pushAdminLog($adminLog);
|
||||||
|
|||||||
+9
-9
@@ -113,8 +113,8 @@ function processWar($connect, $general, $city) {
|
|||||||
$alllog[] = "<C>●</>{$game['month']}월:병량 부족으로 <G><b>{$city['name']}</b></>의 수비병들이 <R>패퇴</>합니다.";
|
$alllog[] = "<C>●</>{$game['month']}월:병량 부족으로 <G><b>{$city['name']}</b></>의 수비병들이 <R>패퇴</>합니다.";
|
||||||
$history[] = "<C>●</>{$game['year']}년 {$game['month']}월:<M><b>【패퇴】</b></><D><b>{$destnation['name']}</b></>(이)가 병량 부족으로 <G><b>{$city['name']}</b></>(을)를 뺏기고 말았습니다.";
|
$history[] = "<C>●</>{$game['year']}년 {$game['month']}월:<M><b>【패퇴】</b></><D><b>{$destnation['name']}</b></>(이)가 병량 부족으로 <G><b>{$city['name']}</b></>(을)를 뺏기고 말았습니다.";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
unset($log);
|
unset($log);
|
||||||
unset($alllog);
|
unset($alllog);
|
||||||
unset($history);
|
unset($history);
|
||||||
@@ -482,8 +482,8 @@ function processWar($connect, $general, $city) {
|
|||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushBatLog($general, $batlog);
|
pushBatLog($general, $batlog);
|
||||||
pushBatRes($general, $batres);
|
pushBatRes($general, $batres);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
unset($log);
|
unset($log);
|
||||||
unset($batlog);
|
unset($batlog);
|
||||||
unset($batres);
|
unset($batres);
|
||||||
@@ -1495,8 +1495,8 @@ function processWar($connect, $general, $city) {
|
|||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushBatLog($general, $batlog);
|
pushBatLog($general, $batlog);
|
||||||
pushBatRes($general, $batres);
|
pushBatRes($general, $batres);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
|
|
||||||
return $deadAmount;
|
return $deadAmount;
|
||||||
}
|
}
|
||||||
@@ -1607,7 +1607,7 @@ function addConflict($connect, $city, $nationnum, $mykillnum) {
|
|||||||
$nation = getNationStaticInfo($nationnum);
|
$nation = getNationStaticInfo($nationnum);
|
||||||
|
|
||||||
$history[] = "<C>●</>{$game['year']}년 {$game['month']}월:<M><b>【분쟁】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$city['name']}</b></> 공략에 가담하여 분쟁이 발생하고 있습니다.";
|
$history[] = "<C>●</>{$game['year']}년 {$game['month']}월:<M><b>【분쟁】</b></><D><b>{$nation['name']}</b></>(이)가 <G><b>{$city['name']}</b></> 공략에 가담하여 분쟁이 발생하고 있습니다.";
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
}
|
}
|
||||||
|
|
||||||
$nationlist[$i] = $nationnum;
|
$nationlist[$i] = $nationnum;
|
||||||
@@ -1915,7 +1915,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushAllLog($alllog);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushHistory($history);
|
pushWorldHistory($history);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ class Scenario{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
pushHistory($this->history, $env['year'], $env['month']);
|
pushWorldHistory($this->history, $env['year'], $env['month']);
|
||||||
|
|
||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
foreach(getAllNationStaticInfo() as $nation){
|
foreach(getAllNationStaticInfo() as $nation){
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class NPC{
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
if($age == \sammo\GameConst::$adultAge && $month == 1){//FIXME: 14가 어디서 튀어나왔나?
|
if($age == \sammo\GameConst::$adultAge && $month == 1){//FIXME: 14가 어디서 튀어나왔나?
|
||||||
\sammo\pushHistory(["<C>●</>1월:<Y>$name</>(이)가 성인이 되어 <S>등장</>했습니다."], $year, $month);
|
\sammo\pushWorldHistory(["<C>●</>1월:<Y>$name</>(이)가 성인이 되어 <S>등장</>했습니다."], $year, $month);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->ego == null){
|
if($this->ego == null){
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ if($admin['npcmode'] != 1) {
|
|||||||
$log[0] = "<C>●</>{$admin['month']}월:<Y>{$me['name']}</>의 육체에 <Y>{$member['name']}</>(이)가 <S>빙의</>됩니다!";
|
$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']}</>(이)가 빙의되다.");
|
addHistory($me, "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y>{$me['name']}</>의 육체에 <Y>{$member['name']}</>(이)가 빙의되다.");
|
||||||
pushGenLog($me, $mylog);
|
pushGenLog($me, $mylog);
|
||||||
pushAllLog($log);
|
pushGeneralPublicRecord($log, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
$adminLog[0] = "가입 : {$me['name']} // {$id} // ".getenv("REMOTE_ADDR");
|
$adminLog[0] = "가입 : {$me['name']} // {$id} // ".getenv("REMOTE_ADDR");
|
||||||
pushAdminLog($adminLog);
|
pushAdminLog($adminLog);
|
||||||
|
|||||||
+4
-1
@@ -41,4 +41,7 @@ DROP TABLE IF EXISTS history;
|
|||||||
DROP TABLE IF EXISTS event;
|
DROP TABLE IF EXISTS event;
|
||||||
|
|
||||||
# 전체 이벤트 테이블 삭제(연감 대체?)
|
# 전체 이벤트 테이블 삭제(연감 대체?)
|
||||||
DROP TABLE IF EXISTS full_history;
|
DROP TABLE IF EXISTS world_history;
|
||||||
|
|
||||||
|
# 전체 이벤트 테이블 삭제(연감 대체?)
|
||||||
|
DROP TABLE IF EXISTS general_public_record;
|
||||||
+14
-1
@@ -609,7 +609,20 @@ ENGINE=InnoDB;
|
|||||||
|
|
||||||
|
|
||||||
##전체 이벤트 기록 테이블
|
##전체 이벤트 기록 테이블
|
||||||
CREATE TABLE `full_history` (
|
CREATE TABLE `world_history` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`year` INT(4) NOT NULL,
|
||||||
|
`month` INT(2) NOT NULL,
|
||||||
|
`text` TEXT NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `date` (`year`, `month`, `id`)
|
||||||
|
)
|
||||||
|
DEFAULT CHARSET=utf8mb4
|
||||||
|
ENGINE=InnoDB
|
||||||
|
;
|
||||||
|
|
||||||
|
##장수 동향 테이블
|
||||||
|
CREATE TABLE `general_public_record` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`year` INT(4) NOT NULL,
|
`year` INT(4) NOT NULL,
|
||||||
`month` INT(2) NOT NULL,
|
`month` INT(2) NOT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user