loginGame()->setReadOnly();
$userID = Session::getUserID();
increaseRefresh("메인", 1);
$db = DB::db();
$connect=$db->get();
if (!$userID) {
header('Location:..');
die();
}
$me = $db->queryFirstRow(
'SELECT no,con,turntime,newmsg,newvote,map from general where owner = %i',
$userID
);
//턴 실행.
checkTurn();
//그새 사망이면
if ($me === null) {
$session->logoutGame();
header('Location: ../');
die();
}
if ($me['newmsg'] == 1 || $me['newvote'] == 1) {
$db->update('general', [
'newmsg'=>0,
'newvote'=>0
], 'owner=%i', $userID);
}
$query = "select develcost,online,conlimit,tournament,tnmt_type,turnterm,scenario,scenario_text,extended_general,fiction,npcmode,vote from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select plock from plock limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$plock = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$scenario = $admin['scenario_text'];
?>
메인
=allButton()?>
| 장수 동향 |
개인 기록 |
| =getGeneralPublicRecordRecent(15)?> |
=getGenLogRecent($me['no'], 15)?> |
| 중원 정세 |
| =getWorldHistoryRecent(15)?> |
=allButton()?>=banner()?>