loginGame();
$connect = dbConn();
increaseRefresh("메인", 1);
checkTurn($connect);
$db = DB::db();
if(!$session->userID){
header('Location:..');
die();
}
$me = $db->queryFirstRow('SELECT no,con,turntime,newmsg,newvote,map from general where owner = %i', $userID);
//그새 사망이면
if($me === null) {
$session->loginGame();
header('Location: ../');
die();
}
$session->setReadOnly();
if($me['newmsg'] == 1 && $me['newvote'] == 1) {
$query = "update general set newmsg=0,newvote=0 where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($me['newmsg'] == 1) {
$query = "update general set newmsg=0 where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($me['newvote'] == 1) {
$query = "update general set newvote=0 where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
$query = "select develcost,online,conlimit,tournament,tnmt_type,turnterm,scenario,scenario_text,extend,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'];
?>
메인