$yearmonth = $_POST['yearmonth'];
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
$connect = dbConn();
increaseRefresh($connect, "연감", 5);
$query = "select startyear,year,month,conlimit from game where no=1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION[p_id]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]);
if($con >= 2) { printLimitMsg($me[turntime]); exit(); }
$query = "select year,month from history order by no limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$history = MYDB_fetch_array($result);
$s = ($history[year]*12) + $history[month];
$query = "select year,month from history order by no desc limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$history = MYDB_fetch_array($result);
$e = ($history[year]*12) + $history[month];
if(!$yearmonth) {
$year = $admin['year'];
$month = $admin['month'] - 1;
} else {
$year = substr($yearmonth, 0, 3) - 0;
$month = substr($yearmonth, 3, 2) - 0;
if($btn == "◀◀ 이전달") {
$month -= 1;
} elseif($btn == "다음달 ▶▶") {
$month += 1;
}
}
$now = ($year*12) + $month;
if($now < $s) { $now = $s; }
if($now > $e) { $now = $e; }
$year = floor($now / 12);
$month = $now % 12;
if($month <= 0) {
$year -= 1;
$month += 12;
}
if($me[skin] < 1) {
$tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4;
$_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000";
}
?>
연감
require('analytics.php'); ?>
| 중 원 지 도 |
|
|
=$history['nation'];?> |
=$history['power'];?> |
=$history['gen'];?> |
=$history['city'];?> |
| 중 원 정 세 |
|
=$history['log']?>
|
| 장 수 동 향 |
|
=$history['genlog']?>
|
| closeButton(); ?> |
| banner(); ?> |
PrintElapsedTime(); ?>