Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a556877a17 | ||
|
|
bcbd6dc4db | ||
|
|
41f7ad8d75 | ||
|
|
258d4b28da | ||
|
|
31e900c422 | ||
|
|
7b1a76871a | ||
|
|
c6f3e7672f | ||
|
|
540c31903c | ||
|
|
3e5262d7a3 | ||
|
|
2b36ffef45 | ||
|
|
4c25d2275c | ||
|
|
6c66fcdfc3 | ||
|
|
aaa972d767 | ||
|
|
45c8538426 | ||
|
|
95702724a9 | ||
|
|
98c4d3853c | ||
|
|
7c91143f39 | ||
|
|
56e6f57568 | ||
|
|
ccab456679 | ||
|
|
5af000ca43 | ||
|
|
354c8f04ae | ||
|
|
3fbd336b45 | ||
|
|
3c0b86a322 | ||
|
|
fca4b69d5a | ||
|
|
ce62072761 | ||
|
|
93dd7a8478 | ||
|
|
02fb84a312 | ||
|
|
f3e68989e5 | ||
|
|
468050a9ce | ||
|
|
f37a602da3 | ||
|
|
2979691d7e | ||
|
|
72920a0432 | ||
|
|
e81075ef04 | ||
|
|
df1a99d877 | ||
|
|
10e825dc9f | ||
|
|
07ba7933fb | ||
|
|
3059eac0fd | ||
|
|
aa33aa6d4f | ||
|
|
0a1cdeeaa3 | ||
|
|
e4bef47b7e | ||
|
|
f551f994b5 | ||
|
|
4b7a3af691 | ||
|
|
6f88a80118 | ||
|
|
e03715ee46 | ||
|
|
aafe6d8863 | ||
|
|
47005483cd | ||
|
|
378075955a | ||
|
|
2059797904 | ||
|
|
8c711242a9 | ||
|
|
481894c89b | ||
|
|
ba53275322 | ||
|
|
cfe2b4c1bd | ||
|
|
60e83f8324 | ||
|
|
ceac040d82 | ||
|
|
89d400c81a | ||
|
|
4cf7bca399 | ||
|
|
761441622e | ||
|
|
1b814abf0b | ||
|
|
62a2147e33 | ||
|
|
246dff9c87 | ||
|
|
50494beb27 | ||
|
|
ce3b3ebfd8 | ||
|
|
213090c32e | ||
|
|
adb8668197 | ||
|
|
0023677003 | ||
|
|
0b19a37ad4 | ||
|
|
9f34ae5d28 | ||
|
|
6f07b5cf08 | ||
|
|
0f39431157 | ||
|
|
bc1a470e64 | ||
|
|
09e24f5684 | ||
|
|
2f27ea4c8a | ||
|
|
d09aba70b7 |
@@ -89,4 +89,78 @@ input.with_skin:disabled {
|
|||||||
|
|
||||||
caption.section_title {
|
caption.section_title {
|
||||||
caption-side:top;
|
caption-side:top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.samButton{
|
||||||
|
float:left;
|
||||||
|
display:block;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
text-decoration: none;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.samButton.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButtonOuter{
|
||||||
|
display: table;
|
||||||
|
border: outset 2px white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight:bold;
|
||||||
|
padding: 1px 6px;
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#000000;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButtonOuter:active{
|
||||||
|
border: inset 2px white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.samButtonInner{
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samToolbarButton > .samButtonOuter{
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#225500;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samToolbarButton2 > .samButtonOuter{
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#225500;
|
||||||
|
color:magenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton > .samButtonOuter{
|
||||||
|
width:111px;
|
||||||
|
height:30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter{
|
||||||
|
background-color:transparent !important;
|
||||||
|
color:gray !important;
|
||||||
|
border-color:transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
|
||||||
|
content:'【'
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
|
||||||
|
content:'】'
|
||||||
}
|
}
|
||||||
|
After Width: | Height: | Size: 341 B |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
@@ -8,9 +8,10 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>설치</title>
|
<title>설치</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ if($session->userGrade < 4) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -38,7 +40,9 @@ $plock = MYDB_fetch_array($result);
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>삼국지 모의전투 HiDCHe</title>
|
<title>삼국지 모의전투 HiDCHe</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -34,7 +36,9 @@ $admin = getAdmin();
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>게임관리</title>
|
<title>게임관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -32,7 +34,9 @@ $db = DB::db();
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>회원관리</title>
|
<title>회원관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -35,7 +37,9 @@ $conlimit = $gameStor->conlimit;
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>멀티관리</title>
|
<title>멀티관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -53,12 +57,7 @@ $conlimit = $gameStor->conlimit;
|
|||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
||||||
|
|
||||||
$query = "select no,name,npc,block from general where ip!='' order by npc,ip";
|
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -51,7 +53,9 @@ $sel2[$type2] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>일제정보</title>
|
<title>일제정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -42,7 +44,9 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>접속정보</title>
|
<title>접속정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ if($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -49,7 +51,9 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>로그정보</title>
|
<title>로그정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ if ($session->userGrade < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -45,7 +47,9 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>외교정보</title>
|
<title>외교정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -1140,7 +1140,9 @@ switch($dex240) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>전투시뮬레이션</title>
|
<title>전투시뮬레이션</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ increaseRefresh("명장일람", 1);
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1136" />
|
||||||
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
@@ -67,22 +69,83 @@ $types = [
|
|||||||
}],
|
}],
|
||||||
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }],
|
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }],
|
||||||
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }],
|
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }],
|
||||||
["승 률", "percent", function($v){$v['value'] = $v['killnum'] / max(1, $v['warnum']); return $v; }],
|
["승 률", "percent", function($v){
|
||||||
|
if($v['warnum'] < 10){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['killnum'] / max(1, $v['warnum']);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }],
|
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }],
|
||||||
["살 상 률", "percent", function($v){$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']); return $v; }],
|
["살 상 률", "percent", function($v){
|
||||||
|
if($v['warnum'] < 10){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex0']; return $v; }],
|
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex0']; return $v; }],
|
||||||
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex10']; return $v; }],
|
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex10']; return $v; }],
|
||||||
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex20']; return $v; }],
|
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex20']; return $v; }],
|
||||||
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex30']; return $v; }],
|
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex30']; return $v; }],
|
||||||
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex40']; return $v; }],
|
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex40']; return $v; }],
|
||||||
["전 력 전 승 률", "percent", function($v){$v['value'] = $v['ttw']/max(1, $v['ttw']+$v['ttd']+$v['ttl']); return $v; }],
|
["전 력 전 승 률", "percent", function($v){
|
||||||
["통 솔 전 승 률", "percent", function($v){$v['value'] = $v['tlw']/max(1, $v['tlw']+$v['tld']+$v['tll']); return $v; }],
|
$totalCnt = $v['ttw']+$v['ttd']+$v['ttl'];
|
||||||
["일 기 토 승 률", "percent", function($v){$v['value'] = $v['tpw']/max(1, $v['tpw']+$v['tpd']+$v['tpl']); return $v; }],
|
if($totalCnt < 50){
|
||||||
["설 전 승 률", "percent", function($v){$v['value'] = $v['ttw']/max(1, $v['tiw']+$v['tid']+$v['til']); return $v; }],
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['ttw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["통 솔 전 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tlw']+$v['tld']+$v['tll'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tlw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["일 기 토 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tpw']+$v['tpd']+$v['tpl'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tpw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["설 전 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tiw']+$v['tid']+$v['til'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tiw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
|
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
|
||||||
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }],
|
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }],
|
||||||
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }],
|
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }],
|
||||||
["베 팅 수 익 률", "percent", function($v){$v['value'] = $v['betwingold']/max(1, $v['betgold']); return $v; }],
|
["베 팅 수 익 률", "percent", function($v){
|
||||||
|
if($v['betgold'] < 1000){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['betwingold']/max(1, $v['betgold']);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
];
|
];
|
||||||
|
|
||||||
$generals = array_map(function($general) use($nationColor, $nationName) {
|
$generals = array_map(function($general) use($nationColor, $nationName) {
|
||||||
@@ -112,10 +175,15 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
|
|||||||
$templates = new \League\Plates\Engine('templates');
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
|
||||||
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||||
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc){
|
$validCnt = 0;
|
||||||
|
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt){
|
||||||
$general = ($typeFunc)($general);
|
$general = ($typeFunc)($general);
|
||||||
$value = $general['value'];
|
$value = $general['value'];
|
||||||
|
|
||||||
|
if($value > 0){
|
||||||
|
$validCnt+=1;
|
||||||
|
}
|
||||||
|
|
||||||
if($typeValue == 'percent'){
|
if($typeValue == 'percent'){
|
||||||
$general['printValue'] = number_format($value*100, 2).'%';
|
$general['printValue'] = number_format($value*100, 2).'%';
|
||||||
}
|
}
|
||||||
@@ -127,12 +195,13 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
|||||||
|
|
||||||
usort($typeGenerals, function($lhs, $rhs){
|
usort($typeGenerals, function($lhs, $rhs){
|
||||||
//내림차순
|
//내림차순
|
||||||
return -($lhs['value'] - $rhs['value']);
|
return -($lhs['value'] <=> $rhs['value']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
echo $templates->render('hallOfFrame', [
|
echo $templates->render('hallOfFrame', [
|
||||||
'typeName'=>$typeName,
|
'typeName'=>$typeName,
|
||||||
'generals'=>array_slice($typeGenerals, 0, 10, true)
|
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -4,20 +4,17 @@ namespace sammo;
|
|||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$select = Util::getReq('select', 'int', 0);
|
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
increaseRefresh("왕조일람", 2);
|
increaseRefresh("왕조일람", 1);
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
@@ -27,180 +24,95 @@ increaseRefresh("왕조일람", 2);
|
|||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class="tb_layout bg0">
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
<tr><td>역 대 왕 조<br>
|
<tr><td>역 대 왕 조<br>
|
||||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
<button onclick=window.close()>창 닫기</button><br>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($select == 0) {
|
$showCurrentNation = true;
|
||||||
$query = "select * from emperior order by no desc";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$empcount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for ($i=0; $i < $empcount; $i++) {
|
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
|
||||||
$emperior = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
if($emperiors){
|
||||||
<form action=a_emperior.php method=post>
|
$serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null);
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
if($serverID == UniqueConst::$serverID){
|
||||||
|
$showCurrentNation = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($showCurrentNation) {
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:#333333;" align=center colspan=8>
|
||||||
|
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
|
||||||
|
|
||||||
|
<a href="a_emperior_detail.php"><button>자세히</button></a>
|
||||||
|
|
||||||
|
<a href="a_history.php"><button>역사 보기</button></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($emperiors as $emperior){
|
||||||
|
$serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor=skyblue align=center colspan=8>
|
<td bgcolor=skyblue align=center colspan=8>
|
||||||
<font size=5>{$emperior['phase']}</font>
|
<font size=5><?=$emperior['phase']?></font>
|
||||||
<input type=submit value='자세히'>
|
|
||||||
<input type=hidden name=select value='{$emperior['no']}'>
|
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button>자세히</button></a>
|
||||||
|
|
||||||
|
<?php if($emperior['server_id']): ?>
|
||||||
|
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button>역사 보기</button></a>
|
||||||
|
<?php endif ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=8>
|
<td align=center style=color:".newColor($emperior['color'])."; bgcolor=<?=$emperior['color']?> colspan=8>
|
||||||
<font size=5>{$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)</font>
|
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 align=center width=80>국 력</td>
|
<td id=bg1 align=center width=80>국 력</td>
|
||||||
<td align=center width=170>{$emperior['power']}</td>
|
<td align=center width=170><?=$emperior['power']?></td>
|
||||||
<td id=bg1 align=center width=80>장 수</td>
|
<td id=bg1 align=center width=80>장 수</td>
|
||||||
<td align=center width=170>{$emperior['gennum']}</td>
|
<td align=center width=170><?=$emperior['gennum']?></td>
|
||||||
<td id=bg1 align=center width=80>속 령</td>
|
<td id=bg1 align=center width=80>속 령</td>
|
||||||
<td align=center width=170>{$emperior['citynum']}</td>
|
<td align=center width=170><?=$emperior['citynum']?></td>
|
||||||
<td id=bg1 align=center width=80>성 향</td>
|
<td id=bg1 align=center width=80>성 향</td>
|
||||||
<td align=center width=170>{$emperior['type']}</td>
|
<td align=center width=170><?=$emperior['type']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 align=center>황 제</td>
|
<td id=bg1 align=center>황 제</td>
|
||||||
<td align=center>{$emperior['l12name']}</td>
|
<td align=center><?=$emperior['l12name']?></td>
|
||||||
<td id=bg1 align=center>승 상</td>
|
<td id=bg1 align=center>승 상</td>
|
||||||
<td align=center>{$emperior['l11name']}</td>
|
<td align=center><?=$emperior['l11name']?></td>
|
||||||
<td id=bg1 align=center>위 장 군</td>
|
<td id=bg1 align=center>위 장 군</td>
|
||||||
<td align=center>{$emperior['l10name']}</td>
|
<td align=center><?=$emperior['l10name']?></td>
|
||||||
<td id=bg1 align=center>사 공</td>
|
<td id=bg1 align=center>사 공</td>
|
||||||
<td align=center>{$emperior['l9name']}</td>
|
<td align=center><?=$emperior['l9name']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$query = "select * from emperior where no='$select'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$emperior = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
|
||||||
<tr>
|
<?php
|
||||||
<td bgcolor=skyblue align=center colspan=6>
|
|
||||||
<font size=5>{$emperior['phase']}</font>
|
|
||||||
<input type=submit value='전체보기'>
|
|
||||||
<input type=hidden name=select value='0'>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['nation_count']}</td>
|
|
||||||
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['gen_count']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>등 장 국 가</td>
|
|
||||||
<td colspan=5>{$emperior['nation_name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>국가별 성향</td>
|
|
||||||
<td colspan=5>{$emperior['nation_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 성 격</td>
|
|
||||||
<td colspan=5>{$emperior['personal_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 특 기</td>
|
|
||||||
<td colspan=5>{$emperior['special_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=6>
|
|
||||||
<font size=5>{$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 width=98 align=center>국 력</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['power']}</td>
|
|
||||||
<td id=bg1 width=98 align=center>성 향</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['type']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 width=98 align=center>장 수</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['gennum']}</td>
|
|
||||||
<td id=bg1 width=98 align=center>속 령</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['citynum']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>총 인 구</td>
|
|
||||||
<td align=center colspan=2>{$emperior['pop']}</td>
|
|
||||||
<td id=bg1 align=center>인 구 율</td>
|
|
||||||
<td align=center colspan=2>{$emperior['poprate']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>국 고</td>
|
|
||||||
<td align=center colspan=2>{$emperior['gold']}</td>
|
|
||||||
<td id=bg1 align=center>병 량</td>
|
|
||||||
<td align=center colspan=2>{$emperior['rice']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>황 제</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l12name']}</td>
|
|
||||||
<td id=bg1 align=center>승 상</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l11name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>위 장 군</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l10name']}</td>
|
|
||||||
<td id=bg1 align=center>사 공</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l9name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>표 기 장 군</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l8name']}</td>
|
|
||||||
<td id=bg1 align=center>태 위</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l7name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>거 기 장 군</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l6name']}</td>
|
|
||||||
<td id=bg1 align=center>사 도</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l5name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>오 호 장 군</td>
|
|
||||||
<td colspan=5>{$emperior['tiger']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>건 안 칠 자</td>
|
|
||||||
<td colspan=5>{$emperior['eagle']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
|
|
||||||
<td colspan=5>{$emperior['gen']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>역 사 기 록</td>
|
|
||||||
<td colspan=5>".ConvertLog($emperior['history'], 1)."</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@@ -17,7 +17,9 @@ increaseRefresh("왕조일람", 2);
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
$select = Util::getReq('select', 'int', 0);
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
$templates->registerFunction('ConvertLog', '\sammo\ConvertLog');
|
||||||
|
$templates->registerFunction('newColor', '\sammo\newColor');
|
||||||
|
increaseRefresh("왕조일람", 1);
|
||||||
|
|
||||||
|
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select);
|
||||||
|
$serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
|
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
|
||||||
|
<button onclick=window.close()>창 닫기</button>
|
||||||
|
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($emperior):
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor=skyblue align=center colspan=6>
|
||||||
|
<font size=5><?=$emperior['phase']?></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['nation_count']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['gen_count']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>등 장 국 가</td>
|
||||||
|
<td colspan=5><?=$emperior['nation_name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>국가별 성향</td>
|
||||||
|
<td colspan=5><?=$emperior['nation_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 성 격</td>
|
||||||
|
<td colspan=5><?=$emperior['personal_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 특 기</td>
|
||||||
|
<td colspan=5><?=$emperior['special_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center style=color:<?=newColor($emperior['color'])?>; bgcolor=<?=$emperior['color']?> colspan=6>
|
||||||
|
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>국 력</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['power']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>성 향</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['type']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>장 수</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['gennum']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>속 령</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['citynum']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>총 인 구</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['pop']?></td>
|
||||||
|
<td id=bg1 align=center>인 구 율</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['poprate']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>국 고</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['gold']?></td>
|
||||||
|
<td id=bg1 align=center>병 량</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['rice']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>황 제</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l12name']?></td>
|
||||||
|
<td id=bg1 align=center>승 상</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l11name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>위 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l10name']?></td>
|
||||||
|
<td id=bg1 align=center>사 공</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l9name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>표 기 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l8name']?></td>
|
||||||
|
<td id=bg1 align=center>태 위</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l7name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>거 기 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l6name']?></td>
|
||||||
|
<td id=bg1 align=center>사 도</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l5name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>오 호 장 군</td>
|
||||||
|
<td colspan=5><?=$emperior['tiger']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>건 안 칠 자</td>
|
||||||
|
<td colspan=5><?=$emperior['eagle']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
|
||||||
|
<td colspan=5><?=$emperior['gen']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>역 사 기 록</td>
|
||||||
|
<td colspan=5><?=ConvertLog($emperior['history'], 1)?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
$showServers = $serverID || (!$emperior);
|
||||||
|
|
||||||
|
if(!$serverID){
|
||||||
|
$serverID = UniqueConst::$serverID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($showServers){
|
||||||
|
$nations = $db->query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID);
|
||||||
|
foreach($nations as $nation){
|
||||||
|
if(!$nation['nation']??null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$nation += Json::decode($nation['data']);
|
||||||
|
|
||||||
|
$nation['typeName'] = getNationType($nation['type']);
|
||||||
|
$nation['levelName'] = getNationLevel($nation['level']);
|
||||||
|
if($nation['generals']){
|
||||||
|
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']);
|
||||||
|
|
||||||
|
if(count($generals) != $nation['generals'] && $serverID == UniqueConst::$serverID){
|
||||||
|
$liveGenerals = $nation['generals'];
|
||||||
|
foreach($generals as $general){
|
||||||
|
if(in_array($general['general_no'], $nation['generals'])){
|
||||||
|
unset($nation['generals'][$general['general_no']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
|
||||||
|
$nation['generalsFull'] = array_merge($liveGenerals, $generals);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$nation['generalsFull'] = $generals;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$nation['generalsFull'] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
|
||||||
|
$nation += Json::decode($nation['aux']);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $templates->render('oldNation', $nation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
|
<tr><td><?=banner()?></td></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -37,11 +37,13 @@ if ($type <= 0 || $type > 15) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $db = DB::db();
|
|||||||
increaseRefresh("명예의전당", 1);
|
increaseRefresh("명예의전당", 1);
|
||||||
|
|
||||||
$scenarioList= [];
|
$scenarioList= [];
|
||||||
foreach($db->query('SELECT distinct(scenario_name) as name, count(scenario) as cnt, scenario from ng_games order by scenario asc') as $scenarioInfo){
|
foreach($db->query('SELECT scenario_name as name, count(scenario) as cnt, scenario from ng_games group by scenario order by scenario asc') as $scenarioInfo){
|
||||||
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
|
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,12 +32,14 @@ else{
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1136" />
|
||||||
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||||
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -92,10 +94,15 @@ foreach($types as $idx=>[$typeName, $typeValue]) {
|
|||||||
$hallResult = array_map(function($general)use($typeValue){
|
$hallResult = array_map(function($general)use($typeValue){
|
||||||
$aux = Json::decode($general['aux']);
|
$aux = Json::decode($general['aux']);
|
||||||
$general += $aux;
|
$general += $aux;
|
||||||
if(!key_exists('color', $general)){
|
if(!key_exists('bgColor', $general)){
|
||||||
$general['bgColor'] = GameConst::$basecolor4;
|
if(!key_exists('color', $general)){
|
||||||
|
$general['bgColor'] = GameConst::$basecolor4;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$general['bgColor'] = $general['color'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!key_exists('fgColor', $general)){
|
if(!key_exists('fgColor', $general)){
|
||||||
$general['fgColor'] = newColor($general['bgColor']);
|
$general['fgColor'] = newColor($general['bgColor']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ include "lib.php";
|
|||||||
include "func.php";
|
include "func.php";
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getReq('btn');
|
||||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||||
|
$serverID = Util::getReq('serverID', 'string', null);
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
@@ -16,7 +17,13 @@ $db = DB::db();
|
|||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("연감", 2);
|
if(!$serverID){
|
||||||
|
$serverID = UniqueConst::$serverID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($serverID === UniqueConst::$serverID){
|
||||||
|
increaseRefresh("연감", 1);
|
||||||
|
}
|
||||||
|
|
||||||
$admin = $gameStor->getValues(['startyear','year','month']);
|
$admin = $gameStor->getValues(['startyear','year','month']);
|
||||||
|
|
||||||
@@ -30,14 +37,20 @@ if ($con >= 2) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', UniqueConst::$serverID);
|
|
||||||
|
|
||||||
|
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
|
||||||
$s = $s_year * 12 + $s_month;
|
$s = $s_year * 12 + $s_month;
|
||||||
|
|
||||||
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', UniqueConst::$serverID);
|
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
|
||||||
$e = $e_year * 12 + $e_month;
|
$e = $e_year * 12 + $e_month;
|
||||||
|
|
||||||
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
||||||
if (!$yearmonth) {
|
if($serverID !== UniqueConst::$serverID && !$yearmonth){
|
||||||
|
$year = $s_year;
|
||||||
|
$month = $s_month;
|
||||||
|
}
|
||||||
|
else if (!$yearmonth) {
|
||||||
$year = $admin['year'];
|
$year = $admin['year'];
|
||||||
$month = $admin['month'] - 1;
|
$month = $admin['month'] - 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -71,9 +84,11 @@ if ($month <= 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 연감</title>
|
<title><?=UniqueConst::$serverName?>: 연감</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/base_map.js')?>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
@@ -94,7 +109,7 @@ if ($month <= 0) {
|
|||||||
<input type=submit name=btn value="◀◀ 이전달">
|
<input type=submit name=btn value="◀◀ 이전달">
|
||||||
<select name=yearmonth size=1>
|
<select name=yearmonth size=1>
|
||||||
<?php
|
<?php
|
||||||
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month DESC', UniqueConst::$serverID);
|
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC', $serverID);
|
||||||
foreach($dates as [$hYear, $hMonth]){
|
foreach($dates as [$hYear, $hMonth]){
|
||||||
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
|
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
|
||||||
if ($hYear == $year && $hMonth == $month) {
|
if ($hYear == $year && $hMonth == $month) {
|
||||||
@@ -106,7 +121,7 @@ foreach($dates as [$hYear, $hMonth]){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', UniqueConst::$serverID, $year, $month);
|
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='조회하기'>
|
<input type=submit name=btn value='조회하기'>
|
||||||
@@ -144,7 +159,7 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist
|
|||||||
</table>
|
</table>
|
||||||
<script>
|
<script>
|
||||||
reloadWorldMap({
|
reloadWorldMap({
|
||||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>',
|
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||||
showMe:false,
|
showMe:false,
|
||||||
neutralView:true
|
neutralView:true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,10 +24,14 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/base_map.js')?>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ if ($admin['maxonline'] < $curonline) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
|
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ $vote = $admin['vote']?:['-'];
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 설문조사</title>
|
<title><?=UniqueConst::$serverName?>: 설문조사</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ if ($msg2 == "") {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 거래장</title>
|
<title><?=UniqueConst::$serverName?>: 거래장</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ $sel[$type] = "selected";
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 감찰부</title>
|
<title><?=UniqueConst::$serverName?>: 감찰부</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ if($str3){
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 베팅장</title>
|
<title><?=UniqueConst::$serverName?>: 베팅장</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ if($me['level'] < 5) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 기밀실</title>
|
<title><?=UniqueConst::$serverName?>: 기밀실</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ for($i= $lv - 1; $i>=5; $i--){
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ $templates = new \League\Plates\Engine('templates');
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 도시정보</title>
|
<title><?=UniqueConst::$serverName?>: 도시정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ if ($me['level'] >= 5) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -75,8 +75,9 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/base_map.js')?>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
|
|||||||
@@ -50,11 +50,13 @@ $sel[$type] = "selected";
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -97,24 +99,28 @@ switch ($type) {
|
|||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$gencount = MYDB_num_rows($genresult);
|
$gencount = MYDB_num_rows($genresult);
|
||||||
|
|
||||||
echo"
|
?>
|
||||||
<table align=center class='tb_layout bg0'>
|
<table align=center id='general_list' class='tb_layout bg0'>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=98 align=center id=bg1>이 름</td>
|
<td width=98 align=center class=bg1>이 름</td>
|
||||||
<td width=98 align=center id=bg1>통무지</td>
|
<td width=98 align=center class=bg1>통무지</td>
|
||||||
<td width=98 align=center id=bg1>부 대</td>
|
<td width=98 align=center class=bg1>부 대</td>
|
||||||
<td width=58 align=center id=bg1>자 금</td>
|
<td width=58 align=center class=bg1>자 금</td>
|
||||||
<td width=58 align=center id=bg1>군 량</td>
|
<td width=58 align=center class=bg1>군 량</td>
|
||||||
<td width=48 align=center id=bg1>도시</td>
|
<td width=48 align=center class=bg1>도시</td>
|
||||||
<td width=28 align=center id=bg1>守</td>
|
<td width=28 align=center class=bg1>守</td>
|
||||||
<td width=58 align=center id=bg1>병 종</td>
|
<td width=58 align=center class=bg1>병 종</td>
|
||||||
<td width=68 align=center id=bg1>병 사</td>
|
<td width=68 align=center class=bg1>병 사</td>
|
||||||
<td width=48 align=center id=bg1>훈련</td>
|
<td width=48 align=center class=bg1>훈련</td>
|
||||||
<td width=48 align=center id=bg1>사기</td>
|
<td width=48 align=center class=bg1>사기</td>
|
||||||
<td width=148 align=center id=bg1>명 령</td>
|
<td width=148 align=center class=bg1>명 령</td>
|
||||||
<td width=58 align=center id=bg1>삭턴</td>
|
<td width=58 align=center class=bg1>삭턴</td>
|
||||||
<td width=58 align=center id=bg1>턴</td>
|
<td width=58 align=center class=bg1>턴</td>
|
||||||
</tr>";
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
for ($j=0; $j < $gencount; $j++) {
|
for ($j=0; $j < $gencount; $j++) {
|
||||||
$general = MYDB_fetch_array($genresult);
|
$general = MYDB_fetch_array($genresult);
|
||||||
$city = CityConst::byID($general['city'])->name;
|
$city = CityConst::byID($general['city'])->name;
|
||||||
@@ -162,24 +168,24 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>$name<br>Lv ".getExpLevel($general['experience'])."</td>
|
<td class='i_name' align=center><span class='t_name'>$name</span><br>Lv <span class='t_explevel'>".getExpLevel($general['experience'])."</span></td>
|
||||||
<td align=center>{$leader}∥{$power}∥{$intel}</td>
|
<td class='i_stat' align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||||
<td align=center>$troop</td>
|
<td class='i_troop' align=center>$troop</td>
|
||||||
<td align=center>{$general['gold']}</td>
|
<td class='i_gold' align=center>{$general['gold']}</td>
|
||||||
<td align=center>{$general['rice']}</td>
|
<td class='i_rice' align=center>{$general['rice']}</td>
|
||||||
<td align=center>$city</td>
|
<td class='i_city' align=center>$city</td>
|
||||||
<td align=center>$mode</td>
|
<td align=center>$mode</td>
|
||||||
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
<td class='i_crewtype' align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||||
<td align=center>{$general['crew']}</td>
|
<td class='i_crew' align=center>{$general['crew']}</td>
|
||||||
<td align=center>{$general['train']}</td>
|
<td class='i_train' align=center>{$general['train']}</td>
|
||||||
<td align=center>{$general['atmos']}</td>";
|
<td class='i_atmos' align=center>{$general['atmos']}</td>";
|
||||||
if ($general['npc'] >= 2) {
|
if ($general['npc'] >= 2) {
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td class='i_action'>
|
||||||
<font size=3>NPC 장수";
|
<font size=3>NPC 장수";
|
||||||
} else {
|
} else {
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td class='i_action'>
|
||||||
<font size=1>";
|
<font size=1>";
|
||||||
$turn = getTurn($general, 1, 0);
|
$turn = getTurn($general, 1, 0);
|
||||||
|
|
||||||
@@ -194,10 +200,11 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
<td align=center>{$general['killturn']}</td>
|
<td align=center>{$general['killturn']}</td>
|
||||||
<td align=center>".substr($general['turntime'], 14, 5)."</td>
|
<td class='i_turntime' align=center>".substr($general['turntime'], 14, 5)."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ if($meLevel == 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -36,10 +36,16 @@ $sel = [$type => "selected"];
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력도시</title>
|
<title><?=UniqueConst::$serverName?>: 세력도시</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.expand_city.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -188,11 +194,11 @@ for ($j=0; $j < $citycount; $j++) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0 anchor'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
<div id="helper_genlist" style="display:none;"></div>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ $sel = [$type => "selected"];
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ if($me['level'] == 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 내정보</title>
|
<title><?=UniqueConst::$serverName?>: 내정보</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ $me = MYDB_fetch_array($result);
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 회의실</title>
|
<title><?=UniqueConst::$serverName?>: 회의실</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ increaseRefresh("국법", 1);
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 국법</title>
|
<title><?=UniqueConst::$serverName?>: 국법</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 토너먼트</title>
|
<title><?=UniqueConst::$serverName?>: 토너먼트</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
@@ -400,7 +402,7 @@ for($i=0;$i<16;$i+=1){
|
|||||||
}
|
}
|
||||||
$bet = [];
|
$bet = [];
|
||||||
for ($i=0; $i < 16; $i++) {
|
for ($i=0; $i < 16; $i++) {
|
||||||
if($betting['bet'] == 0){
|
if($betting["bet{$i}"] == 0){
|
||||||
$bet[$i] = '∞';
|
$bet[$i] = '∞';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,14 @@ $troopcount = MYDB_num_rows($result);
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -36,7 +40,8 @@ $troopcount = MYDB_num_rows($result);
|
|||||||
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<form name=form1 method=post action=c_troop.php>
|
<form name=form1 method=post action=c_troop.php>
|
||||||
<table class='tb_layout bg0'>
|
<table id="troop_list" class='tb_layout bg0'>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 class='bg1 center'>선 택</td>
|
<td width=64 class='bg1 center'>선 택</td>
|
||||||
<td width=130 class='bg1 center'>부 대 정 보</td>
|
<td width=130 class='bg1 center'>부 대 정 보</td>
|
||||||
@@ -44,6 +49,8 @@ $troopcount = MYDB_num_rows($result);
|
|||||||
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
||||||
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for($i=0; $i < $troopcount; $i++) {
|
for($i=0; $i < $troopcount; $i++) {
|
||||||
$troop = MYDB_fetch_array($result);
|
$troop = MYDB_fetch_array($result);
|
||||||
@@ -122,7 +129,8 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
<tr><td colspan=5>";
|
<tr><td colspan=5>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo "</tbody>
|
||||||
|
<tfoot>";
|
||||||
if ($troopcount == 0) {
|
if ($troopcount == 0) {
|
||||||
}
|
}
|
||||||
else if($me['troop'] == 0) {
|
else if($me['troop'] == 0) {
|
||||||
@@ -135,6 +143,7 @@ else if($me['troop'] == 0) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<br>";
|
<br>";
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ $db = DB::db();
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>커맨드리스트</title>
|
<title>커맨드리스트</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
/* font-boostring Block */
|
||||||
|
html * {max-height:1000000px;}
|
||||||
|
|
||||||
|
|
||||||
html, body{
|
html, body{
|
||||||
background-color:black;
|
background-color:black;
|
||||||
color:white;
|
color:white;
|
||||||
line-height:1.3;
|
line-height:1.3;
|
||||||
|
font-family:'맑은 고딕';
|
||||||
|
font-size:13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table { font-family:'맑은 고딕'; }
|
table { font-family:'맑은 고딕'; }
|
||||||
|
|||||||
@@ -1910,13 +1910,22 @@ function updateTurntime($no) {
|
|||||||
if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) {
|
if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) {
|
||||||
$general['killturn'] = ($general['deadyear'] - $admin['year']) * 12;
|
$general['killturn'] = ($general['deadyear'] - $admin['year']) * 12;
|
||||||
$general['npc'] = $general['npc_org'];
|
$general['npc'] = $general['npc_org'];
|
||||||
$query = "update general set owner=-1,npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->update('general', [
|
||||||
|
'owner'=>-1,
|
||||||
|
'npc'=>$general['npc_org'],
|
||||||
|
'killturn'=>$general['killturn'],
|
||||||
|
'mode'=>2,
|
||||||
|
'name2'=>null
|
||||||
|
], 'no=%i',$no);
|
||||||
|
|
||||||
$josaYi = JosaUtil::pick($general['name2'], '이');
|
$josaYi = JosaUtil::pick($general['name2'], '이');
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>{$josaYi} <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>{$josaYi} <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
storeOldGeneral($general['no'], $admin['year'], $admin['month']);
|
||||||
|
|
||||||
// 군주였으면 유지 이음
|
// 군주였으면 유지 이음
|
||||||
if($general['level'] == 12) {
|
if($general['level'] == 12) {
|
||||||
nextRuler($general);
|
nextRuler($general);
|
||||||
@@ -2120,6 +2129,10 @@ function CheckHall($no) {
|
|||||||
//수익률인데 1000미만시 스킵
|
//수익률인데 1000미만시 스킵
|
||||||
if($typeName === 'betrate' && $general['betgold'] < 1000) { continue; }
|
if($typeName === 'betrate' && $general['betgold'] < 1000) { continue; }
|
||||||
|
|
||||||
|
if($general[$typeName]<=0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$aux = [
|
$aux = [
|
||||||
'name'=>$general['name'],
|
'name'=>$general['name'],
|
||||||
'nationName'=>$nation['name'],
|
'nationName'=>$nation['name'],
|
||||||
@@ -2439,6 +2452,11 @@ function deleteNation($general) {
|
|||||||
$josaUn = JosaUtil::pick($nation['name'], '은');
|
$josaUn = JosaUtil::pick($nation['name'], '은');
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【멸망】</b></><D><b>{$nation['name']}</b></>{$josaUn} <R>멸망</>했습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【멸망】</b></><D><b>{$nation['name']}</b></>{$josaUn} <R>멸망</>했습니다.";
|
||||||
|
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $general['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $general['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
// 전 장수 재야로 // 전 장수 소속 무소속으로
|
// 전 장수 재야로 // 전 장수 소속 무소속으로
|
||||||
$query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'";
|
$query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -2449,6 +2467,13 @@ function deleteNation($general) {
|
|||||||
$query = "delete from troop where nation='{$general['nation']}'";
|
$query = "delete from troop where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 국가 삭제
|
// 국가 삭제
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$general['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$general['nation']}'";
|
$query = "delete from nation where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 외교 삭제
|
// 외교 삭제
|
||||||
|
|||||||
@@ -747,8 +747,9 @@ function command_Other($turn, $commandtype) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<script>
|
<script>
|
||||||
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -791,7 +791,10 @@ function getItemCost($weap) : int {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function ConvertLog(string $str, $type=1) : string {
|
function ConvertLog(?string $str, $type=1) : string {
|
||||||
|
if(!$str){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
//TODO: 이 함수는 없애야 한다. CSS로 대신하자
|
//TODO: 이 함수는 없애야 한다. CSS로 대신하자
|
||||||
if($type > 0) {
|
if($type > 0) {
|
||||||
$str = str_replace("<1>", "<font size=1>", $str);
|
$str = str_replace("<1>", "<font size=1>", $str);
|
||||||
|
|||||||
@@ -427,6 +427,15 @@ function postUpdateMonthly() {
|
|||||||
|
|
||||||
$history = [];
|
$history = [];
|
||||||
|
|
||||||
|
//도시 수 측정
|
||||||
|
$cityNations = [];
|
||||||
|
foreach($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $cityNation]){
|
||||||
|
if(!key_exists($cityNation, $cityNations)){
|
||||||
|
$cityNations[$cityNation] = [];
|
||||||
|
}
|
||||||
|
$cityNations[$cityNation][] = $cityName;
|
||||||
|
}
|
||||||
|
|
||||||
//각 국가 전월 장수수 대비 당월 장수수로 단합도 산정
|
//각 국가 전월 장수수 대비 당월 장수수로 단합도 산정
|
||||||
//각 국가 장수수를 구하고 국력 산정
|
//각 국가 장수수를 구하고 국력 산정
|
||||||
// $query = "select nation,gennum from nation where level>0";
|
// $query = "select nation,gennum from nation where level>0";
|
||||||
@@ -438,34 +447,33 @@ function postUpdateMonthly() {
|
|||||||
// 접속률
|
// 접속률
|
||||||
// 숙련도
|
// 숙련도
|
||||||
// 명성,공헌
|
// 명성,공헌
|
||||||
$query = "
|
$nations = $db->query('SELECT
|
||||||
select
|
A.nation,
|
||||||
A.nation,
|
A.gennum, A.gennum2, A.chemi, A.aux,
|
||||||
A.gennum, A.gennum2, A.chemi,
|
round((
|
||||||
round((
|
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
||||||
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
+A.tech
|
||||||
+A.tech
|
+if(A.level=0,0,(
|
||||||
+if(A.level=0,0,(
|
select round(
|
||||||
select round(
|
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100
|
||||||
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100
|
) from city where nation=A.nation and supply=1
|
||||||
) from city where nation=A.nation and supply=1
|
))
|
||||||
))
|
+(select sum(leader+power+intel) from general where nation=A.nation)
|
||||||
+(select sum(leader+power+intel) from general where nation=A.nation)
|
+(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation)
|
||||||
+(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation)
|
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
|
||||||
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
|
+(select round(avg(connect)) from general where nation=A.nation)
|
||||||
+(select round(avg(connect)) from general where nation=A.nation)
|
)/10)
|
||||||
)/10)
|
as power,
|
||||||
as power
|
(select sum(crew) from general where nation=A.nation) as totalCrew
|
||||||
from nation A
|
from nation A
|
||||||
group by A.nation
|
group by A.nation');
|
||||||
";
|
foreach($nations as $nation) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$nationCount = MYDB_num_rows($result);
|
|
||||||
$genNum = [];
|
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
|
||||||
$nation = MYDB_fetch_array($result);
|
|
||||||
$genNum[$nation['nation']] = $nation['gennum'];
|
$genNum[$nation['nation']] = $nation['gennum'];
|
||||||
|
|
||||||
|
$aux = Json::decode($nation['aux']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($nation['gennum'] > $nation['gennum2']) {
|
if($nation['gennum'] > $nation['gennum2']) {
|
||||||
// 장수가 증가했을때
|
// 장수가 증가했을때
|
||||||
$nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100);
|
$nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100);
|
||||||
@@ -479,9 +487,21 @@ group by A.nation
|
|||||||
if($nation['chemi'] > 100) { $nation['chemi'] = 100; }
|
if($nation['chemi'] > 100) { $nation['chemi'] = 100; }
|
||||||
|
|
||||||
//약간의 랜덤치 부여 (95% ~ 105%)
|
//약간의 랜덤치 부여 (95% ~ 105%)
|
||||||
|
|
||||||
$nation['power'] = Util::round($nation['power'] * (rand()%101 + 950) / 1000);
|
$nation['power'] = Util::round($nation['power'] * (rand()%101 + 950) / 1000);
|
||||||
$query = "update nation set power='{$nation['power']}',gennum2='{$nation['gennum']}',chemi='{$nation['chemi']}' where nation='{$nation['nation']}'";
|
$aux['maxPower'] = max($aux['maxPower']??0, $nation['power']);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$aux['maxCrew'] = max($aux['maxCrew']??0, Util::toInt($nation['totalCrew']));
|
||||||
|
|
||||||
|
if(count($cityNations[$nation['nation']]??[]) > count($aux['maxCities']??[])){
|
||||||
|
$aux['maxCities'] = $cityNations[$nation['nation']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->update('nation', [
|
||||||
|
'power'=>$nation['power'],
|
||||||
|
'gennum2'=>$nation['gennum'],
|
||||||
|
'chemi'=>$nation['chemi'],
|
||||||
|
'aux'=>Json::encode($aux)
|
||||||
|
], 'nation=%i', $nation['nation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 전쟁기한 세팅
|
// 전쟁기한 세팅
|
||||||
@@ -685,10 +705,23 @@ function checkMerge() {
|
|||||||
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
||||||
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
||||||
$newTech = Util::round($newTotalTech / $newGenCount);
|
$newTech = Util::round($newTotalTech / $newGenCount);
|
||||||
|
|
||||||
|
// 국가 백업
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
// 자금 통합, 외교제한 5년, 기술유지
|
// 자금 통합, 외교제한 5년, 기술유지
|
||||||
$query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'";
|
$query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
//국가 삭제
|
//국가 삭제
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$me['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$me['nation']}'";
|
$query = "delete from nation where nation='{$me['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 아국 모든 도시들 상대국 소속으로
|
// 아국 모든 도시들 상대국 소속으로
|
||||||
@@ -804,6 +837,12 @@ function checkSurrender() {
|
|||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
|
||||||
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} 합병");
|
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} 합병");
|
||||||
|
|
||||||
|
// 국가 백업
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
$newGenCount = $gencount + $gencount2;
|
$newGenCount = $gencount + $gencount2;
|
||||||
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
||||||
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
||||||
@@ -818,6 +857,13 @@ function checkSurrender() {
|
|||||||
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
|
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
//국가 삭제
|
//국가 삭제
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$me['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$me['nation']}'";
|
$query = "delete from nation where nation='{$me['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 군주가 있는 위치 구함
|
// 군주가 있는 위치 구함
|
||||||
@@ -943,53 +989,79 @@ function updateNationState() {
|
|||||||
function checkStatistic() {
|
function checkStatistic() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$admin = $gameStor->getValues(['year', 'month']);
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
|
|
||||||
$nationHists = [];
|
$nationHists = [];
|
||||||
$specialHists = [];
|
$specialHists = [];
|
||||||
$personalHists = [];
|
$personalHists = [];
|
||||||
$specialHists2 = [0];
|
$specialHists2 = [];
|
||||||
|
$crewtypeHists = [];
|
||||||
|
|
||||||
$etc = '';
|
$etc = '';
|
||||||
|
|
||||||
$query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general";
|
$auxData = [
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'generals'=>[],
|
||||||
$general = MYDB_fetch_array($result);
|
'nations'=>[],
|
||||||
$general['avggold'] = Util::round($general['avggold']);
|
];
|
||||||
$general['avgrice'] = Util::round($general['avgrice']);
|
|
||||||
$general['avgdex'] = Util::round($general['avgdex']);
|
|
||||||
$general['avgexpded'] = Util::round($general['avgexpded']);
|
|
||||||
$etc .= "평균 금/쌀 ({$general['avggold']}/{$general['avgrice']}), 평균/최고 숙련({$general['avgdex']}/{$general['maxdex']}), 평균/최고 경험공헌({$general['avgexpded']}/{$general['maxexpded']}), ";
|
|
||||||
|
|
||||||
$query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0";
|
$avgGeneral = $db->queryFirstRow(
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex,
|
||||||
$nation = MYDB_fetch_array($result);
|
max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
|
||||||
$nation['avgtech'] = Util::round($nation['avgtech']);
|
FROM general'
|
||||||
$nation['avgpower'] = Util::round($nation['avgpower']);
|
);
|
||||||
$etc .= "최저/평균/최고 기술({$nation['mintech']}/{$nation['avgtech']}/{$nation['maxtech']}), ";
|
$auxData['generals']['avg'] = $avgGeneral;
|
||||||
$etc .= "최저/평균/최고 국력({$nation['minpower']}/{$nation['avgpower']}/{$nation['maxpower']}), ";
|
|
||||||
|
$avgGeneral['avggold'] = Util::round($avgGeneral['avggold']);
|
||||||
|
$avgGeneral['avgrice'] = Util::round($avgGeneral['avgrice']);
|
||||||
|
$avgGeneral['avgdex'] = Util::round($avgGeneral['avgdex']);
|
||||||
|
$avgGeneral['avgexpded'] = Util::round($avgGeneral['avgexpded']);
|
||||||
|
$etc .= "평균 금/쌀 ({$avgGeneral['avggold']}/{$avgGeneral['avgrice']}), 평균/최고 숙련({$avgGeneral['avgdex']}/{$avgGeneral['maxdex']}), 평균/최고 경험공헌({$avgGeneral['avgexpded']}/{$avgGeneral['maxexpded']}), ";
|
||||||
|
|
||||||
|
$avgNation = $db->queryFirstRow(
|
||||||
|
'SELECT min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech,
|
||||||
|
min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0');
|
||||||
|
$auxData['nations']['avg'] = $avgNation;
|
||||||
|
|
||||||
|
$avgNation['avgtech'] = Util::round($avgNation['avgtech']);
|
||||||
|
$avgNation['avgpower'] = Util::round($avgNation['avgpower']);
|
||||||
|
$etc .= "최저/평균/최고 기술({$avgNation['mintech']}/{$avgNation['avgtech']}/{$avgNation['maxtech']}), ";
|
||||||
|
$etc .= "최저/평균/최고 국력({$avgNation['minpower']}/{$avgNation['avgpower']}/{$avgNation['maxpower']}), ";
|
||||||
|
|
||||||
$nationName = '';
|
$nationName = '';
|
||||||
$power_hist = '';
|
$powerHist = '';
|
||||||
|
|
||||||
$query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice from nation where level>0 order by power desc";
|
$nations = Util::convertArrayToDict(
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query(
|
||||||
$nationCount = MYDB_num_rows($result);
|
'SELECT nation,name,type,power,gennum,gold+rice as goldrice from nation where level>0 order by power desc', 'nation'
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
),
|
||||||
$nation = MYDB_fetch_array($result);
|
'nation'
|
||||||
|
);
|
||||||
|
$nationCount = count($nations);
|
||||||
|
|
||||||
$query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'";
|
$nationGeneralInfos = Util::convertArrayToDict(
|
||||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query(
|
||||||
$general = MYDB_fetch_array($result2);
|
'SELECT nation, sum(leader+power+intel) as abil,sum(gold+rice) as goldrice,
|
||||||
|
sum(dex0+dex10+dex20+dex30) as dex,sum(experience+dedication) as expded
|
||||||
|
from general GROUP BY nation'
|
||||||
|
),
|
||||||
|
'nation'
|
||||||
|
);
|
||||||
|
|
||||||
$query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'";
|
$nationCityInfos = Util::convertArrayToDict(
|
||||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query('SELECT nation, count(*) as cnt, sum(pop) as pop,sum(pop2) as pop2 from city GROUP BY nation'),
|
||||||
$city = MYDB_fetch_array($result2);
|
'nation'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach($nations as $nationNo=>&$nation) {
|
||||||
|
$general = $nationGeneralInfos[$nationNo];
|
||||||
|
$city = $nationCityInfos[$nationNo];
|
||||||
|
|
||||||
|
$nation['generalInfo'] = $general;
|
||||||
|
$nation['cityInfo'] = $city;
|
||||||
|
|
||||||
$nationName .= $nation['name'].'('.getNationType($nation['type']).'), ';
|
$nationName .= $nation['name'].'('.getNationType($nation['type']).'), ';
|
||||||
$power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), ";
|
$powerHist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), ";
|
||||||
|
|
||||||
if(!isset($nationHists[$nation['type']])){
|
if(!isset($nationHists[$nation['type']])){
|
||||||
$nationHists[$nation['type']] = 0;
|
$nationHists[$nation['type']] = 0;
|
||||||
@@ -997,26 +1069,21 @@ function checkStatistic() {
|
|||||||
$nationHists[$nation['type']]++;
|
$nationHists[$nation['type']]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$auxData['nations']['all'] = $nations;
|
||||||
|
|
||||||
$nationHist = '';
|
$nationHist = '';
|
||||||
for($i=1; $i <= 13; $i++) {
|
for($i=1; $i <= 13; $i++) {
|
||||||
if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; }
|
if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; }
|
||||||
$nationHist .= getNationType($i)."({$nationHists[$i]}), ";
|
$nationHist .= getNationType($i)."({$nationHists[$i]}), ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select no from general where npc <= 1";
|
$generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general');
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$genCount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
$query = "select no from general where npc > 1";
|
$genCount = 0;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$npcCount = 0;
|
||||||
$npcCount = MYDB_num_rows($result);
|
$generalCount = count($generals);
|
||||||
|
|
||||||
$query = "select personal,special,special2 from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$generalCount = MYDB_num_rows($result);
|
|
||||||
for($i=0; $i < $generalCount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
|
foreach($generals as $general) {
|
||||||
if(!isset($personalHists[$general['personal']])){
|
if(!isset($personalHists[$general['personal']])){
|
||||||
$personalHists[$general['personal']] = 0;
|
$personalHists[$general['personal']] = 0;
|
||||||
}
|
}
|
||||||
@@ -1029,70 +1096,112 @@ function checkStatistic() {
|
|||||||
$specialHists2[$general['special2']] = 0;
|
$specialHists2[$general['special2']] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($general['npc'] < 2){
|
||||||
|
$genCount+=1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$npcCount+=1;
|
||||||
|
}
|
||||||
|
|
||||||
$personalHists[$general['personal']]++;
|
$personalHists[$general['personal']]++;
|
||||||
$specialHists[$general['special']]++;
|
$specialHists[$general['special']]++;
|
||||||
$specialHists2[$general['special2']]++;
|
$specialHists2[$general['special2']]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach($db->queryAllLists(
|
||||||
|
'SELECT crewtype, count(crewtype) AS cnt FROM general WHERE crew>=100 OR deathnum>0 GROUP BY crewtype'
|
||||||
|
) as [$crewtype, $cnt]
|
||||||
|
){
|
||||||
|
$crewtypeHists[$crewtype] = $cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
$auxData['generals']['hists'] = [
|
||||||
|
'personal' => $personalHists,
|
||||||
|
'special' => $specialHists,
|
||||||
|
'special2' => $specialHists2,
|
||||||
|
'crewtype' => $crewtypeHists,
|
||||||
|
'userCnt' => $genCount,
|
||||||
|
'npcCnt' => $npcCount,
|
||||||
|
];
|
||||||
|
|
||||||
$generalCountStr = "{$generalCount}({$genCount}+{$npcCount})";
|
$generalCountStr = "{$generalCount}({$genCount}+{$npcCount})";
|
||||||
|
|
||||||
$personalHist = '';
|
$personalHistStr = join(', ', array_map(function($histPair){
|
||||||
for($i=0; $i < 11; $i++) {
|
[$histKey, $cnt] = $histPair;
|
||||||
if(!Util::array_get($personalHists[$i])) { $personalHists[$i] = '-'; }
|
return getGenChar($histKey).'('.$cnt.')';
|
||||||
$personalHist .= getGenChar($i)."({$personalHists[$i]}), ";
|
}, Util::convertDictToArray($personalHists)));
|
||||||
}
|
|
||||||
$specialHist = '';
|
|
||||||
for($i=0; $i < 40; $i++) {
|
|
||||||
$call = getGenSpecial($i);
|
|
||||||
if($call) {
|
|
||||||
if(!Util::array_get($specialHists[$i])) { $specialHists[$i] = '-'; }
|
|
||||||
|
|
||||||
$specialHist .= $call."({$specialHists[$i]}), ";
|
$specialHistsStr = join(', ', array_map(function($histPair){
|
||||||
}
|
[$histKey, $cnt] = $histPair;
|
||||||
}
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
$specialHist .= '// ';
|
}, Util::convertDictToArray($specialHists)));
|
||||||
$specialHist .= "-({$specialHists2[0]}), ";
|
|
||||||
for($i=40; $i < 80; $i++) {
|
|
||||||
$call = getGenSpecial($i);
|
|
||||||
if($call) {
|
|
||||||
if(!Util::array_get($specialHists2[$i])) { $specialHists2[$i] = '-'; }
|
|
||||||
|
|
||||||
$specialHist .= $call."({$specialHists2[$i]}), ";
|
$specialHists2Str = join(', ', array_map(function($histPair){
|
||||||
}
|
[$histKey, $cnt] = $histPair;
|
||||||
}
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
|
}, Util::convertDictToArray($specialHists2)));
|
||||||
|
|
||||||
$crewtype = '';
|
$specialHistsAllStr = "$specialHistsStr // $specialHists2Str";
|
||||||
$types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43);
|
|
||||||
$count = count($types);
|
$crewtypeHistsStr = join(', ', array_map(function($histPair){
|
||||||
foreach(GameUnitConst::all() as $unit){
|
[$histKey, $cnt] = $histPair;
|
||||||
$userCnt = DB::db()->queryFirstField(
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
"SELECT count(*) as type from general where crewtype=%i and crew>=100",
|
}, Util::convertDictToArray($crewtypeHists)));
|
||||||
$unit->id
|
|
||||||
|
$db->insert('statistic', [
|
||||||
|
'year'=>$admin['year'],
|
||||||
|
'month'=>$admin['month'],
|
||||||
|
'nation_count'=>$nationCount,
|
||||||
|
'nation_name'=>$nationName,
|
||||||
|
'nation_hist'=>$nationHist,
|
||||||
|
'gen_count'=>$generalCountStr,
|
||||||
|
'personal_hist'=>$personalHistStr,
|
||||||
|
'special_hist'=>$specialHistsAllStr,
|
||||||
|
'power_hist'=>$powerHist,
|
||||||
|
'crewtype'=>$crewtypeHistsStr,
|
||||||
|
'etc'=>$etc,
|
||||||
|
'aux'=>Json::encode($auxData)
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function convForOldGeneral(array $general, int $year, int $month){
|
||||||
|
return [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'general_no'=>$general['no'],
|
||||||
|
'owner'=>$general['owner'],
|
||||||
|
'name'=>$general['name'],
|
||||||
|
'last_yearmonth'=>$year*100+$month,
|
||||||
|
'turntime'=>$general['turntime'],
|
||||||
|
'data'=>Json::encode($general)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeOldGeneral(int $no, int $year, int $month){
|
||||||
|
$db = DB::db();
|
||||||
|
$general = $db->queryFirstRow('SELECT * FROM general WHERE `no` = %i', $no);
|
||||||
|
if(!$general){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$data = convForOldGeneral($general, $year, $month);
|
||||||
|
$db->insertUpdate(
|
||||||
|
'ng_old_generals',
|
||||||
|
$data,
|
||||||
|
$data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeOldGenerals(int $nation, int $year, int $month){
|
||||||
|
$db = DB::db();
|
||||||
|
foreach($db->query('SELECT * FROM general WHERE nation = %i',$nation) as $general){
|
||||||
|
$data = convForOldGeneral($general, $year, $month);
|
||||||
|
$db->insertUpdate(
|
||||||
|
'ng_old_generals',
|
||||||
|
$data,
|
||||||
|
$data
|
||||||
);
|
);
|
||||||
$crewtype .= "{$unit->name}({$userCnt}), ";
|
|
||||||
}
|
}
|
||||||
for($i=0; $i < $count; $i++) {
|
|
||||||
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$query = "
|
|
||||||
insert into statistic (
|
|
||||||
year, month,
|
|
||||||
nation_count, nation_name, nation_hist,
|
|
||||||
gen_count, personal_hist, special_hist, power_hist,
|
|
||||||
crewtype, etc
|
|
||||||
) values (
|
|
||||||
'{$admin['year']}', '{$admin['month']}',
|
|
||||||
'$nationCount', '$nationName', '$nationHist',
|
|
||||||
'$generalCountStr', '$personalHist', '$specialHist', '$power_hist',
|
|
||||||
'$crewtype', '$etc'
|
|
||||||
)";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkEmperior() {
|
function checkEmperior() {
|
||||||
@@ -1106,183 +1215,219 @@ function checkEmperior() {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$count = MYDB_num_rows($result);
|
$count = MYDB_num_rows($result);
|
||||||
|
|
||||||
if($count == 1 && $admin['isunited'] == 0) {
|
if ($count != 1 || $admin['isunited'] != 0) {
|
||||||
$nation = MYDB_fetch_array($result);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$query = "select city from city where nation='{$nation['nation']}'";
|
$nation = MYDB_fetch_array($result);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
$query = "select city from city";
|
$count = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nation['nation']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
if(!$count){
|
||||||
$allcount = MYDB_num_rows($result);
|
return;
|
||||||
|
}
|
||||||
|
$allcount = $db->queryFirstField('SELECT count(city) FROM city');
|
||||||
|
|
||||||
if($count == $allcount) {
|
if ($count != $allcount) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$josaYi = JosaUtil::pick($nation['name'], '이');
|
checkStatistic();
|
||||||
|
|
||||||
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일");
|
$josaYi = JosaUtil::pick($nation['name'], '이');
|
||||||
|
|
||||||
$gameStor->isunited = 2;
|
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일");
|
||||||
$gameStor->conlimit = $gameStor->conlimit*100;
|
|
||||||
|
|
||||||
$query = "select no from general where npc<2 and age>=40";
|
$gameStor->isunited = 2;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->conlimit = $gameStor->conlimit*100;
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $count; $i++) {
|
$query = "select no from general where npc<2 and age>=40";
|
||||||
$general = MYDB_fetch_array($result);
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
CheckHall($general['no']);
|
$count = MYDB_num_rows($result);
|
||||||
}
|
|
||||||
|
|
||||||
$query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'";
|
for($i=0; $i < $count; $i++) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$general = MYDB_fetch_array($result);
|
||||||
$nation = MYDB_fetch_array($result);
|
CheckHall($general['no']);
|
||||||
|
}
|
||||||
|
|
||||||
$query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
$query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'";
|
||||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$city = MYDB_fetch_array($cityresult);
|
$nation = MYDB_fetch_array($result);
|
||||||
$pop = "{$city['totalpop']} / {$city['maxpop']}";
|
|
||||||
$poprate = round($city['totalpop']/$city['maxpop']*100, 2);
|
|
||||||
$poprate .= " %";
|
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'";
|
$query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level12 = MYDB_fetch_array($genresult);
|
$city = MYDB_fetch_array($cityresult);
|
||||||
|
$pop = "{$city['totalpop']} / {$city['maxpop']}";
|
||||||
|
$poprate = round($city['totalpop']/$city['maxpop']*100, 2);
|
||||||
|
$poprate .= " %";
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='11'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level11 = MYDB_fetch_array($genresult);
|
$level12 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='10'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='11'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level10 = MYDB_fetch_array($genresult);
|
$level11 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='9'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='10'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level9 = MYDB_fetch_array($genresult);
|
$level10 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='8'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='9'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level8 = MYDB_fetch_array($genresult);
|
$level9 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='7'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='8'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level7 = MYDB_fetch_array($genresult);
|
$level8 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='6'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='7'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level6 = MYDB_fetch_array($genresult);
|
$level7 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='5'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='6'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level5 = MYDB_fetch_array($genresult);
|
$level6 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='5'";
|
||||||
$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$tigernum = MYDB_num_rows($tigerresult);
|
$level5 = MYDB_fetch_array($genresult);
|
||||||
$tigerstr = '';
|
|
||||||
for($i=0; $i < $tigernum; $i++) {
|
|
||||||
$tiger = MYDB_fetch_array($tigerresult);
|
|
||||||
if($tiger['killnum'] > 0) {
|
|
||||||
$tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
|
||||||
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
|
||||||
$eaglenum = MYDB_num_rows($eagleresult);
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
$eaglestr = '';
|
|
||||||
for($i=0; $i < $eaglenum; $i++) {
|
|
||||||
$eagle = MYDB_fetch_array($eagleresult);
|
|
||||||
if($eagle['firenum'] > 0) {
|
|
||||||
$eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$log = ["<C>●</>{$admin['year']}년 {$admin['month']}월: <D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군
|
||||||
|
$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc";
|
$tigernum = MYDB_num_rows($tigerresult);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$tigerstr = '';
|
||||||
$gencount = MYDB_num_rows($result);
|
for($i=0; $i < $tigernum; $i++) {
|
||||||
$gen = '';
|
$tiger = MYDB_fetch_array($tigerresult);
|
||||||
for($i=0; $i < $gencount; $i++) {
|
if($tiger['killnum'] > 0) {
|
||||||
$general = MYDB_fetch_array($result);
|
$tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, ";
|
||||||
$gen .= "{$general['name']}, ";
|
|
||||||
|
|
||||||
pushGenLog($general, $log);
|
|
||||||
}
|
|
||||||
|
|
||||||
$nation['type'] = getNationType($nation['type']);
|
|
||||||
|
|
||||||
$query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$stat = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select count(*) as cnt from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$statNC = "1 / {$stat['nc']}";
|
|
||||||
$statGC = "{$gencount['cnt']} / {$stat['gc']}";
|
|
||||||
|
|
||||||
$query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$statNation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$statGeneral = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$nationHistory = DB::db()->queryFirstField('SELECT `history` FROM `nation` WHERE `nation` = %i', $nation['nation']);
|
|
||||||
|
|
||||||
$db->insert('emperior', [
|
|
||||||
'phase'=>'-',
|
|
||||||
'nation_count'=>$statNC,
|
|
||||||
'nation_name'=>$statNation['nation_name'],
|
|
||||||
'nation_hist'=>$statNation['nation_hist'],
|
|
||||||
'gen_count'=>$statGC,
|
|
||||||
'personal_hist'=>$statGeneral['personal_hist'],
|
|
||||||
'special_hist'=>$statGeneral['special_hist'],
|
|
||||||
'name'=>$nation['name'],
|
|
||||||
'type'=>$nation['type'],
|
|
||||||
'color'=>$nation['color'],
|
|
||||||
'year'=>$admin['year'],
|
|
||||||
'month'=>$admin['month'],
|
|
||||||
'power'=>$nation['power'],
|
|
||||||
'gennum'=>$nation['gennum'],
|
|
||||||
'citynum'=>$allcount,
|
|
||||||
'pop'=>$pop,
|
|
||||||
'poprate'=>$poprate,
|
|
||||||
'gold'=>$nation['gold'],
|
|
||||||
'rice'=>$nation['rice'],
|
|
||||||
'l12name'=>$level12['name'],
|
|
||||||
'l12pic'=>$level12['picture'],
|
|
||||||
'l11name'=>$level11['name'],
|
|
||||||
'l11pic'=>$level11['picture'],
|
|
||||||
'l10name'=>$level10['name'],
|
|
||||||
'l10pic'=>$level10['picture'],
|
|
||||||
'l9name'=>$level9['name'],
|
|
||||||
'l9pic'=>$level9['picture'],
|
|
||||||
'l8name'=>$level8['name'],
|
|
||||||
'l8pic'=>$level8['picture'],
|
|
||||||
'l7name'=>$level7['name'],
|
|
||||||
'l7pic'=>$level7['picture'],
|
|
||||||
'l6name'=>$level6['name'],
|
|
||||||
'l6pic'=>$level6['picture'],
|
|
||||||
'l5name'=>$level5['name'],
|
|
||||||
'l5pic'=>$level5['picture'],
|
|
||||||
'tiger'=>$tigerstr,
|
|
||||||
'eagle'=>$eaglestr,
|
|
||||||
'gen'=>$gen,
|
|
||||||
'history'=>$nationHistory
|
|
||||||
]);
|
|
||||||
|
|
||||||
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
|
||||||
|
|
||||||
//연감 월결산
|
|
||||||
LogHistory();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
|
||||||
|
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$eaglenum = MYDB_num_rows($eagleresult);
|
||||||
|
$eaglestr = '';
|
||||||
|
for($i=0; $i < $eaglenum; $i++) {
|
||||||
|
$eagle = MYDB_fetch_array($eagleresult);
|
||||||
|
if($eagle['firenum'] > 0) {
|
||||||
|
$eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$log = ["<C>●</>{$admin['year']}년 {$admin['month']}월: <D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
||||||
|
|
||||||
|
$query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$gencount = MYDB_num_rows($result);
|
||||||
|
$gen = '';
|
||||||
|
for($i=0; $i < $gencount; $i++) {
|
||||||
|
$general = MYDB_fetch_array($result);
|
||||||
|
$gen .= "{$general['name']}, ";
|
||||||
|
|
||||||
|
pushGenLog($general, $log);
|
||||||
|
}
|
||||||
|
|
||||||
|
$nation['type'] = getNationType($nation['type']);
|
||||||
|
|
||||||
|
$query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$stat = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$query = "select count(*) as cnt from general";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$gencount = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$statNC = "1 / {$stat['nc']}";
|
||||||
|
$statGC = "{$gencount['cnt']} / {$stat['gc']}";
|
||||||
|
|
||||||
|
$query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$statNation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$query = "select gen_count,personal_hist,special_hist,aux from statistic order by no desc limit 0,1";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$statGeneral = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
|
||||||
|
$oldNation['generals'] = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
|
storeOldGenerals(0, $admin['year'], $admin['month']);
|
||||||
|
storeOldGenerals($nation['nation'], $admin['year'], $admin['month']);
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$nation['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
|
$noNationGeneral = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=0');
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>0,
|
||||||
|
'data'=>Json::encode([
|
||||||
|
'nation'=>0,
|
||||||
|
'name'=>'재야',
|
||||||
|
'generals'=>$noNationGeneral
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
|
||||||
|
$nationHistory = DB::db()->queryFirstField('SELECT `history` FROM `nation` WHERE `nation` = %i', $nation['nation']);
|
||||||
|
|
||||||
|
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
|
||||||
|
$serverName = UniqueConst::$serverName;
|
||||||
|
|
||||||
|
$db->insert('emperior', [
|
||||||
|
'phase'=>$serverName.$serverCnt.'기',
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation_count'=>$statNC,
|
||||||
|
'nation_name'=>$statNation['nation_name'],
|
||||||
|
'nation_hist'=>$statNation['nation_hist'],
|
||||||
|
'gen_count'=>$statGC,
|
||||||
|
'personal_hist'=>$statGeneral['personal_hist'],
|
||||||
|
'special_hist'=>$statGeneral['special_hist'],
|
||||||
|
'name'=>$nation['name'],
|
||||||
|
'type'=>$nation['type'],
|
||||||
|
'color'=>$nation['color'],
|
||||||
|
'year'=>$admin['year'],
|
||||||
|
'month'=>$admin['month'],
|
||||||
|
'power'=>$nation['power'],
|
||||||
|
'gennum'=>$nation['gennum'],
|
||||||
|
'citynum'=>$allcount,
|
||||||
|
'pop'=>$pop,
|
||||||
|
'poprate'=>$poprate,
|
||||||
|
'gold'=>$nation['gold'],
|
||||||
|
'rice'=>$nation['rice'],
|
||||||
|
'l12name'=>$level12['name'],
|
||||||
|
'l12pic'=>$level12['picture'],
|
||||||
|
'l11name'=>$level11['name'],
|
||||||
|
'l11pic'=>$level11['picture'],
|
||||||
|
'l10name'=>$level10['name'],
|
||||||
|
'l10pic'=>$level10['picture'],
|
||||||
|
'l9name'=>$level9['name'],
|
||||||
|
'l9pic'=>$level9['picture'],
|
||||||
|
'l8name'=>$level8['name'],
|
||||||
|
'l8pic'=>$level8['picture'],
|
||||||
|
'l7name'=>$level7['name'],
|
||||||
|
'l7pic'=>$level7['picture'],
|
||||||
|
'l6name'=>$level6['name'],
|
||||||
|
'l6pic'=>$level6['picture'],
|
||||||
|
'l5name'=>$level5['name'],
|
||||||
|
'l5pic'=>$level5['picture'],
|
||||||
|
'tiger'=>$tigerstr,
|
||||||
|
'eagle'=>$eaglestr,
|
||||||
|
'gen'=>$gen,
|
||||||
|
'history'=>$nationHistory,
|
||||||
|
'aux'=>$statGeneral['aux']
|
||||||
|
]);
|
||||||
|
|
||||||
|
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
||||||
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
|
//연감 월결산
|
||||||
|
LogHistory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,10 @@ function pushOldNationStop(int $no, int $nationNo){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//DB-based
|
//DB-based
|
||||||
function pushNationHistory($nation, $history) {
|
function pushNationHistory($nation, ?string $history) {
|
||||||
|
if(!$history){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!$nation || !$nation['nation']){
|
if(!$nation || !$nation['nation']){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -164,7 +167,10 @@ function pushNationHistory($nation, $history) {
|
|||||||
$history.'<br>', $nation['nation']);
|
$history.'<br>', $nation['nation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushGeneralHistory($me, $history) {
|
function pushGeneralHistory($me, ?string $history) {
|
||||||
|
if(!$history){
|
||||||
|
return;
|
||||||
|
}
|
||||||
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
|
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
|
||||||
$history.'<br>', $me['no']);
|
$history.'<br>', $me['no']);
|
||||||
}
|
}
|
||||||
@@ -174,7 +180,7 @@ function getGeneralHistoryAll(int $no) {
|
|||||||
return ConvertLog($history);
|
return ConvertLog($history);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushWorldHistory(array $history, $year=null, $month=null) {
|
function pushWorldHistory(?array $history, $year=null, $month=null) {
|
||||||
if(!$history){
|
if(!$history){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -221,7 +227,7 @@ function getWorldHistoryWithDate($year, $month) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function pushGeneralPublicRecord(array $history, $year=null, $month=null) {
|
function pushGeneralPublicRecord(?array $history, $year=null, $month=null) {
|
||||||
if(!$history){
|
if(!$history){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ function printLimitMsg($turntime) {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>접속제한</title>
|
<title>접속제한</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
$isWarUser = true;
|
$isWarUser = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(Util::randF(0.2)){
|
if(Util::randBool(0.2)){
|
||||||
$isWarUser = false;
|
$isWarUser = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1206,7 +1206,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
$score *= 4;
|
$score *= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Util::randF(0.3) && $frontImportantCitiesID){
|
if(Util::randBool(0.3) && $frontImportantCitiesID){
|
||||||
$targetCityID = Util::choiceRandom($frontImportantCitiesID);
|
$targetCityID = Util::choiceRandom($frontImportantCitiesID);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -1262,7 +1262,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
if($targetCity['pop'] < 33000 + $nationGeneral['leader']){
|
if($targetCity['pop'] < 33000 + $nationGeneral['leader']){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Util::randF($targetCity['pop'] / $targetCity['pop2'])) {
|
if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1305,8 +1305,11 @@ function Promotion($nation, $level) {
|
|||||||
$query = "update general set level=1 where level<11 and level>4 and nation='$nation'";
|
$query = "update general set level=1 where level<11 and level>4 and nation='$nation'";
|
||||||
MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),"");
|
||||||
|
|
||||||
|
$maxBelong = $db->queryFirstField('SELECT max(belong) FROM `general` WHERE nation=%i', $nation);
|
||||||
|
$maxBelong = min($maxBelong - 1, 3);
|
||||||
|
|
||||||
//유저 후보 선택
|
//유저 후보 선택
|
||||||
$query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='{$admin['killturn']}' order by rand() limit 0,1";
|
$query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=$maxBelong and killturn>='{$admin['killturn']}' order by rand() limit 0,1";
|
||||||
$result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),"");
|
||||||
$userCandidate = MYDB_fetch_array($result);
|
$userCandidate = MYDB_fetch_array($result);
|
||||||
// 유저수뇌 안함
|
// 유저수뇌 안함
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ $color = "cyan";
|
|||||||
<title><?=UniqueConst::$serverName?>: 메인</title>
|
<title><?=UniqueConst::$serverName?>: 메인</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ if($session->userGrade < 5 && !$allowReset){
|
|||||||
<title>설치</title>
|
<title>설치</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ if($session->userGrade == 5){
|
|||||||
<title>설치</title>
|
<title>설치</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ include "func.php";
|
|||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
if (!$db->queryFirstField("SHOW TABLES LIKE 'reserved_open'")) {
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'affected'=>0,
|
||||||
|
'status'=>'no_reserved_table'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
$reserved = $db->queryFirstRow('SELECT `date`, options FROM reserved_open ORDER BY `date` ASC LIMIT 1');
|
$reserved = $db->queryFirstRow('SELECT `date`, options FROM reserved_open ORDER BY `date` ASC LIMIT 1');
|
||||||
|
|
||||||
if(!$reserved){
|
if(!$reserved){
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ $defaultPost = [
|
|||||||
'neutralView' => false,
|
'neutralView' => false,
|
||||||
'showMe' => true
|
'showMe' => true
|
||||||
];
|
];
|
||||||
$post = WebUtil::parseJsonPost() + $defaultPost;
|
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||||
|
|
||||||
if(!$session->isGameLoggedIn()){
|
if(!$session->isGameLoggedIn()){
|
||||||
$post['neutralView'] = true;
|
$post['neutralView'] = true;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ include "func.php";
|
|||||||
|
|
||||||
$year = Util::getReq('year', 'int');
|
$year = Util::getReq('year', 'int');
|
||||||
$month = Util::getReq('month', 'int');
|
$month = Util::getReq('month', 'int');
|
||||||
$serverID = Util::getReq('server_id', 'string', null);
|
$serverID = Util::getReq('serverID', 'string', null);
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ if (!$generalID) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$jsonPost = WebUtil::parseJsonPost();
|
$jsonPost = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||||
|
|
||||||
$msgID = Util::toInt($jsonPost['msgID']??null);
|
$msgID = Util::toInt($jsonPost['msgID']??null);
|
||||||
$msgResponse = $jsonPost['response']??null;
|
$msgResponse = $jsonPost['response']??null;
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ include('func.php');
|
|||||||
$session = Session::requireGameLogin([])->setReadOnly();
|
$session = Session::requireGameLogin([])->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$jsonPost = WebUtil::parseJsonPost();
|
$reqSequence = Util::getReq('sequence', 'int', 0);
|
||||||
$reqSequence = (int)Util::array_get($jsonPost['sequence'], 0);
|
|
||||||
|
|
||||||
|
|
||||||
list($generalID, $nationID, $generalName) = DB::db()->queryFirstList(
|
list($generalID, $nationID, $generalName) = DB::db()->queryFirstList(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace sammo;
|
|||||||
include 'lib.php';
|
include 'lib.php';
|
||||||
include 'func.php';
|
include 'func.php';
|
||||||
|
|
||||||
$post = WebUtil::parseJsonPost();
|
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||||
'@phan-var mixed[] $post';
|
'@phan-var mixed[] $post';
|
||||||
|
|
||||||
$v = new Validator($post);
|
$v = new Validator($post);
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ $connect=$db->get();
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: 장수생성</title>
|
<title><?=UniqueConst::$serverName?>: 장수생성</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<script>
|
<script>
|
||||||
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
||||||
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
||||||
@@ -39,7 +41,7 @@ var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
|||||||
</script>
|
</script>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/join.js')?>
|
<?=WebUtil::printJS('js/join.js')?>
|
||||||
|
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ $rootDB->insert('member_log', [
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n튜토리얼을 꼭 읽어보세요!');
|
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n위키와 팁/강좌 게시판을 꼭 읽어보세요!');
|
||||||
</script>
|
</script>
|
||||||
<script>location.replace('./');</script>
|
<script>location.replace('./');</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,908 @@
|
|||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var cityList = {};
|
||||||
|
var userList = {};
|
||||||
|
|
||||||
|
var cityGroupOrder = ['하북','중원','서북','서촉','남중','초','오월','동이'];
|
||||||
|
var city규모 = {특:1,대:2,중:3,소:4,이:5,진:6,관:7,수:8};
|
||||||
|
window.cityList = cityList;
|
||||||
|
window.userList = userList;
|
||||||
|
|
||||||
|
var basicPath = document.location.pathname;
|
||||||
|
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var mergeSort = function(arr,cmpFunc){
|
||||||
|
|
||||||
|
if(typeof cmpFunc == "undefined"){
|
||||||
|
cmpFunc = function(a,b){
|
||||||
|
if(a<b) return -1;
|
||||||
|
if(a>b) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var merge = function(left,right){
|
||||||
|
var retVal=[];
|
||||||
|
|
||||||
|
var leftIdx=0;
|
||||||
|
var rightIdx=0;
|
||||||
|
|
||||||
|
while(leftIdx<left.length && rightIdx<right.length){
|
||||||
|
var cmpVal = cmpFunc(left[leftIdx],right[rightIdx]);
|
||||||
|
|
||||||
|
if(cmpVal<=0){
|
||||||
|
retVal.push(left[leftIdx]);
|
||||||
|
leftIdx++;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
retVal.push(right[rightIdx]);
|
||||||
|
rightIdx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retVal = retVal.concat(left.slice(leftIdx)).concat(right.slice(rightIdx))
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
};
|
||||||
|
|
||||||
|
var _mergeSort = function(arr){
|
||||||
|
if(arr.length<2){
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
var middle = Math.floor(arr.length/2);
|
||||||
|
|
||||||
|
var left = arr.slice(0,middle);
|
||||||
|
var right = arr.slice(middle);
|
||||||
|
|
||||||
|
return merge(_mergeSort(left),_mergeSort(right));
|
||||||
|
};
|
||||||
|
|
||||||
|
return _mergeSort(arr);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
window.mergeSort = mergeSort;
|
||||||
|
|
||||||
|
var extDutyWindow = function(userInfo){
|
||||||
|
window.currUser = userInfo;
|
||||||
|
//도시 순서 재구성
|
||||||
|
var subCityGroupList = {};
|
||||||
|
var subCityList = {};
|
||||||
|
|
||||||
|
var tmpOldVal = 0;
|
||||||
|
|
||||||
|
//var callCity = function(num){console.log('city no.'+num+' is clicked!')};
|
||||||
|
|
||||||
|
if($('#ext_win').length==0){
|
||||||
|
|
||||||
|
var $win = $('<div id="ext_win" style="padding:0;" title="관직 임명"><table style="padding:0;margin:0;" cellspacing="0" cellpadding="0" border="0"><tr><td width="700px" style="padding:0;"><iframe id="in_frame" src="map.php?type=1&graphic=1" width="700" height="520" frameborder="0" marginwidth="0" marginheight="0" topmargin="0" scrolling="no"></iframe></td>'+
|
||||||
|
'<td width="305px" style="padding:0;vertical-align:top;height:520px;"><div style="height:520px;width:305px;overflow-y:scroll;overflow-x:hidden;">'+
|
||||||
|
'<table id="inner_table"><thead><tr><th width="35">도시</th><th width="85">태수</th><th width="85">군사</th><th width="85">시중</th></tr></thead><tbody class="content">'+
|
||||||
|
'</tbody></table></div></td></tr></table>'+
|
||||||
|
'<form name="form1" id="fake_form"><span id="user_name"></span> : <select name="double" id="city_select"></select>'+
|
||||||
|
'<div id="duty_radio" style="display:inline;">'+
|
||||||
|
'<input type="radio" id="duty_type1" value="4" name="duty_radio"><label for="duty_type1">태수</label>'+
|
||||||
|
'<input type="radio" id="duty_type2" value="3" name="duty_radio"><label for="duty_type2">군사</label>'+
|
||||||
|
'<input type="radio" id="duty_type3" value="2" name="duty_radio"><label for="duty_type3">시중</label>'+
|
||||||
|
'</div></form></div>');
|
||||||
|
$win.hide();
|
||||||
|
|
||||||
|
$win.css('font-size','9pt');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#fake_form').css('display','inline');
|
||||||
|
$('body').append($win);
|
||||||
|
|
||||||
|
$('#inner_table').attr('border','1').attr('cellspacing',"0").attr('cellpadding',"0")
|
||||||
|
.attr('bordercolordark',"gray").attr('bordercolorlight',"black").attr('align','center')
|
||||||
|
.css('font-size','13px').css('width','290px');
|
||||||
|
|
||||||
|
$('#inner_table thead tr');
|
||||||
|
|
||||||
|
$('#fake_form').submit(function(){
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#in_frame').load(function(){
|
||||||
|
$('#in_frame').contents().find('div').click(function(){$('#city_select').change();});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#duty_radio").buttonset();
|
||||||
|
|
||||||
|
var $city_select = $('#city_select');
|
||||||
|
$city_select.css('color','white').css('background-color','black');
|
||||||
|
|
||||||
|
|
||||||
|
$city_select.change(function(event){
|
||||||
|
if($city_select.val()==null){
|
||||||
|
$city_select.val(tmpOldVal);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($city_select.val() == tmpOldVal){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpOldVal = $city_select.val();
|
||||||
|
//console.log(tmpOldVal);
|
||||||
|
var newInfo = subCityList[tmpOldVal];
|
||||||
|
var cityInfo = newInfo.city;
|
||||||
|
|
||||||
|
var p태수 = cityInfo.p태수 && currUser.p태수;
|
||||||
|
var p군사 = cityInfo.p군사 && currUser.p군사;
|
||||||
|
var p시중 = cityInfo.p시중 && currUser.p시중;
|
||||||
|
|
||||||
|
//console.log(p태수,p군사,p시중);
|
||||||
|
|
||||||
|
$('#duty_type1').button({disabled:!p태수});
|
||||||
|
$('#duty_type2').button({disabled:!p군사});
|
||||||
|
$('#duty_type3').button({disabled:!p시중});
|
||||||
|
|
||||||
|
var $태수 = cityInfo.$태수;
|
||||||
|
var $군사 = cityInfo.$군사;
|
||||||
|
var $시중 = cityInfo.$시중;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$win.dialog({
|
||||||
|
autoOpen:false,
|
||||||
|
width:1005,
|
||||||
|
height:680,
|
||||||
|
buttons:{
|
||||||
|
"임명":function(){
|
||||||
|
//console.log("임명!");
|
||||||
|
|
||||||
|
var $checked = $('#duty_radio :radio:checked');
|
||||||
|
|
||||||
|
if($checked.length==0 || $checked.attr('disabled')=='disabled'){
|
||||||
|
alert('직책을 선택해주세요!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var type = $checked.attr('value');
|
||||||
|
var text = $checked.next().text();
|
||||||
|
var userVal = currUser.val;
|
||||||
|
var userName = currUser.name;
|
||||||
|
var cityVal = $city_select.val();
|
||||||
|
|
||||||
|
var cityInfo = subCityList[cityVal].city;
|
||||||
|
|
||||||
|
$.post(basicPath+'c_myBossInfo.php',{
|
||||||
|
citylist:cityVal,
|
||||||
|
genlist:userVal,
|
||||||
|
level:type,
|
||||||
|
btn:'임명'
|
||||||
|
},function(rawData){
|
||||||
|
|
||||||
|
cityInfo['p'+text]=false;
|
||||||
|
var $target = cityInfo.users.find('.mode_'+type);
|
||||||
|
$target.prop('disabled',true);
|
||||||
|
$target.css('background','transparent');
|
||||||
|
$target.css('border','0');
|
||||||
|
$target.css('color','');
|
||||||
|
|
||||||
|
cityInfo['$'+text].html(userName);
|
||||||
|
|
||||||
|
$win.dialog("close");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
"닫기":function(){
|
||||||
|
$win.dialog("close");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//console.log($win.parent());
|
||||||
|
$win.parent().css('font-size','10pt');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#ext_win').dialog("close").dialog( "option", "position", { my: "center top", at: "center bottom", of: userInfo.$user} );
|
||||||
|
|
||||||
|
var $innerContent = $('#inner_table .content');
|
||||||
|
$innerContent.html('');
|
||||||
|
$("#user_name").html(userInfo.name+'['+userInfo.city+']');
|
||||||
|
|
||||||
|
$('#city_select').html('');
|
||||||
|
|
||||||
|
$.each(cityList,function(idx,cityInfo){
|
||||||
|
var 지역 = cityInfo.지역;
|
||||||
|
|
||||||
|
var p태수 = cityInfo.p태수 && currUser.p태수;
|
||||||
|
var p군사 = cityInfo.p군사 && currUser.p군사;
|
||||||
|
var p시중 = cityInfo.p시중 && currUser.p시중;
|
||||||
|
|
||||||
|
var newInfo = {
|
||||||
|
지역 : 지역,
|
||||||
|
규모 : cityInfo.규모,
|
||||||
|
이름 : cityInfo.이름,
|
||||||
|
val : cityInfo.val,
|
||||||
|
city : cityInfo,
|
||||||
|
p태수 : p태수,
|
||||||
|
p군사 : p군사,
|
||||||
|
p시중 : p시중
|
||||||
|
};
|
||||||
|
|
||||||
|
//console.log(newInfo);
|
||||||
|
|
||||||
|
if(p태수 || p군사 || p시중){
|
||||||
|
if(typeof subCityGroupList[지역] == 'undefined'){
|
||||||
|
subCityGroupList[지역] = [];
|
||||||
|
}
|
||||||
|
subCityGroupList[지역].push(newInfo);
|
||||||
|
subCityList[cityInfo.val] = newInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(cityGroupOrder,function(idx,groupName){
|
||||||
|
if(typeof subCityGroupList[groupName] == 'undefined'){
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var subList = subCityGroupList[groupName];
|
||||||
|
|
||||||
|
var $group = $('<tr><td colspan="4" style="color:skyblue;">【 '+groupName+' 】</td></tr>');
|
||||||
|
$innerContent.append($group);
|
||||||
|
|
||||||
|
subList.sort(function(a,b){
|
||||||
|
|
||||||
|
var cmp규모 = city규모[a.규모] - city규모[b.규모];
|
||||||
|
if(cmp규모 != 0) return cmp규모;
|
||||||
|
|
||||||
|
return a.이름.localeCompare(b.이름);
|
||||||
|
});
|
||||||
|
var $optgroup = $('<optgroup label=" 【 '+groupName+' 】 " style="color:skyblue;"></optgroup>');
|
||||||
|
|
||||||
|
$.each(subList,function(idx,newInfo){
|
||||||
|
$optgroup.append('<option value="'+newInfo.val+'" style="color:white;">'+newInfo.이름+'</option>');
|
||||||
|
|
||||||
|
var cityInfo = newInfo.city;
|
||||||
|
var $city = $('<tr><td>'+newInfo.이름+'</td></tr>');
|
||||||
|
|
||||||
|
var $태수 = cityInfo.$태수.clone();
|
||||||
|
$city.append($태수);
|
||||||
|
if(!newInfo.p태수){
|
||||||
|
$태수.css('color','red');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$태수.click(function(){
|
||||||
|
$('#duty_radio :radio:eq(0)').attr('checked','checked');
|
||||||
|
$('#duty_radio :radio').button('refresh');
|
||||||
|
}).css('cursor','pointer');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var $군사 = cityInfo.$군사.clone();
|
||||||
|
$city.append($군사);
|
||||||
|
if(!newInfo.p군사)$군사.css('color','red');
|
||||||
|
else{
|
||||||
|
$군사.click(function(){
|
||||||
|
$('#duty_radio :radio:eq(1)').attr('checked','checked');
|
||||||
|
$('#duty_radio :radio').button('refresh');
|
||||||
|
}).css('cursor','pointer');
|
||||||
|
}
|
||||||
|
|
||||||
|
var $시중 = cityInfo.$시중.clone();
|
||||||
|
$city.append($시중);
|
||||||
|
if(!newInfo.p시중)$시중.css('color','red');
|
||||||
|
else{
|
||||||
|
$시중.click(function(){
|
||||||
|
$('#duty_radio :radio:eq(2)').attr('checked','checked');
|
||||||
|
$('#duty_radio :radio').button('refresh');
|
||||||
|
}).css('cursor','pointer');
|
||||||
|
}
|
||||||
|
|
||||||
|
$innerContent.append($city);
|
||||||
|
$city.click(function(){
|
||||||
|
$('#city_select').val(newInfo.val).change();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#city_select').append($optgroup);
|
||||||
|
});
|
||||||
|
|
||||||
|
tmpOldVal = $('#city_select').val();
|
||||||
|
$('#city_select').change();
|
||||||
|
$('#ext_win').dialog("open");
|
||||||
|
};
|
||||||
|
|
||||||
|
var loadDuty = function(){
|
||||||
|
|
||||||
|
try{
|
||||||
|
$('.for_duty').remove();
|
||||||
|
$.get(basicPath+'b_myBossInfo.php',function(rawData){
|
||||||
|
$html = $(rawData);
|
||||||
|
//window.$html = $html;
|
||||||
|
|
||||||
|
var cnt =0;
|
||||||
|
var $tmpTable = null;
|
||||||
|
$html.each(function(idx){
|
||||||
|
if(this.tagName == "TABLE"){
|
||||||
|
cnt+=1;
|
||||||
|
if(cnt==5){
|
||||||
|
$tmpTable = $(this);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$selects = $tmpTable.find("select");
|
||||||
|
if($selects.length == 0){
|
||||||
|
alert("수뇌가 아닙니다!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var setUserAvailable = function($userList,typeName){
|
||||||
|
$userList.each(function(idx){
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
var val = $this.val();
|
||||||
|
var name = $.trim($this.text());
|
||||||
|
|
||||||
|
for(var i=name.length-1;i>0;i--){
|
||||||
|
if(name[i]=='【'){
|
||||||
|
name = $.trim(name.substr(0,i));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(val == '0'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof userList[name] != 'undefined'){
|
||||||
|
userList[name].val = val;
|
||||||
|
userList[name][typeName] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var setCityAvailiable = function($cityList,typeName){
|
||||||
|
$cityList.each(function(idx){
|
||||||
|
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
var val = $.trim($this.val());
|
||||||
|
var name = $.trim($this.text());
|
||||||
|
|
||||||
|
cityList[name].val = val;
|
||||||
|
cityList[name][typeName] = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$.each(cityList,function(idx,cityInfo){
|
||||||
|
cityInfo.p태수=false;
|
||||||
|
cityInfo.p군사=false;
|
||||||
|
cityInfo.p시중=false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(userList,function(idx,userInfo){
|
||||||
|
userInfo.p태수=false;
|
||||||
|
userInfo.p군사=false;
|
||||||
|
userInfo.p시중=false;
|
||||||
|
});
|
||||||
|
|
||||||
|
setUserAvailable($selects.eq(1).find("option"),"p태수");
|
||||||
|
setUserAvailable($selects.eq(3).find("option"),"p군사");
|
||||||
|
setUserAvailable($selects.eq(5).find("option"),"p시중");
|
||||||
|
|
||||||
|
setCityAvailiable($selects.eq(0).find("option"),"p태수");
|
||||||
|
setCityAvailiable($selects.eq(2).find("option"),"p군사");
|
||||||
|
setCityAvailiable($selects.eq(4).find("option"),"p시중");
|
||||||
|
|
||||||
|
|
||||||
|
$.each(cityList,function(idx,cityInfo){
|
||||||
|
|
||||||
|
//console.log(cityInfo.users.children());
|
||||||
|
|
||||||
|
cityInfo.users.children().each(function(idx){
|
||||||
|
//console.log(this);
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
var username = $this.data('username');
|
||||||
|
|
||||||
|
var userInfo = userList[username];
|
||||||
|
if(!userInfo){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(userInfo.val == '-1'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$name = $this.find('.nameplate');
|
||||||
|
|
||||||
|
$name.append('<br class="for_duty">');
|
||||||
|
|
||||||
|
|
||||||
|
var addBtn=function($name,cityInfo,userInfo,type,text,warn){
|
||||||
|
|
||||||
|
var enabled = cityInfo['p'+text]&&userInfo['p'+text];
|
||||||
|
var cityVal = cityInfo.val;
|
||||||
|
var $btn = $('<button>'+text.substr(0,1)+'</button>');
|
||||||
|
$btn.addClass('mode_'+type);
|
||||||
|
$btn.addClass('for_duty');
|
||||||
|
|
||||||
|
if(!enabled){
|
||||||
|
$btn.prop('disabled',true);
|
||||||
|
$btn.css('background','transparent');
|
||||||
|
$btn.css('border','0');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(userInfo.is수뇌){
|
||||||
|
$btn.css('color','red');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$btn.css('padding','1px 4px');
|
||||||
|
$btn.css('margin','0');
|
||||||
|
|
||||||
|
$btn.click(function(){
|
||||||
|
if(userInfo.is수뇌){
|
||||||
|
if(!confirm('수뇌입니다. 임명할까요?')){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post(basicPath+'c_myBossInfo.php',{
|
||||||
|
citylist:cityVal,
|
||||||
|
genlist:userInfo.val,
|
||||||
|
level:type,
|
||||||
|
btn:'임명'
|
||||||
|
},function(rawData){
|
||||||
|
|
||||||
|
cityInfo['p'+text]=false;
|
||||||
|
var $target = cityInfo.users.find('.mode_'+type);
|
||||||
|
$target.prop('disabled',true);
|
||||||
|
$target.css('background','transparent');
|
||||||
|
$target.css('border','0');
|
||||||
|
$target.css('color','');
|
||||||
|
|
||||||
|
cityInfo['$'+text].html(userInfo.name);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//console.log($btn);
|
||||||
|
$name.append($btn);
|
||||||
|
};
|
||||||
|
|
||||||
|
addBtn($name,cityInfo,userInfo,4,'태수');
|
||||||
|
addBtn($name,cityInfo,userInfo,3,'군사');
|
||||||
|
addBtn($name,cityInfo,userInfo,2,'시중');
|
||||||
|
|
||||||
|
//특수 버튼!
|
||||||
|
if(userInfo.p태수||userInfo.p군사||userInfo.p시중){
|
||||||
|
var $btn = $('<button>...</button>');
|
||||||
|
$btn.addClass('for_duty');
|
||||||
|
if(userInfo.is수뇌){
|
||||||
|
$btn.css('color','red');
|
||||||
|
}
|
||||||
|
$btn.css('padding','1px 4px');
|
||||||
|
$btn.css('margin','0');
|
||||||
|
|
||||||
|
$btn.click(function(){
|
||||||
|
if(userInfo.is수뇌){
|
||||||
|
if(!confirm('수뇌입니다. 임명할까요?')){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extDutyWindow(userInfo);
|
||||||
|
});
|
||||||
|
|
||||||
|
$btn.css('border','solid 1px Chocolate').css('background-color','#400000').css('margin-left','4px');
|
||||||
|
$btn.css('line-hight','20px').css('color','GhostWhite').css('padding','2px 2px').css('height','18px').css('line-height','8px');
|
||||||
|
|
||||||
|
//$name.append($btn);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(a){
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
var loadUser = function(){
|
||||||
|
$.each(cityList,function(idx,val){
|
||||||
|
if(typeof val.users == "undefined"){
|
||||||
|
val.obj.append('<tr><td colspan="12"><table align="center" class="tb_layout cityUser bg0">'+
|
||||||
|
'<thead><tr>'+
|
||||||
|
'<td width="100" align="center" class="bg1">이 름</td><td width="100" align="center" class="bg1">통무지</td><td width="100" align="center" class="bg1">부 대</td><td width="60" align="center" class="bg1">자 금</td>'+
|
||||||
|
'<td width="60" align="center" class="bg1">군 량</td><td width="30" align="center" class="bg1">守</td><td width="60" align="center" class="bg1">병 종</td>'+
|
||||||
|
'<td width="60" align="center" class="bg1">병 사</td><td width="50" align="center" class="bg1">훈련</td><td width="50" align="center" class="bg1">사기</td><td width="150" align="center" class="bg1">명 령</td>'+
|
||||||
|
'<td width="60" align="center" class="bg1">삭턴</td><td width="60" align="center" class="bg1">턴</td>'+
|
||||||
|
'</tr></thead>'+
|
||||||
|
'<tbody class="cityUserBody"></tbody></table></td></tr>');
|
||||||
|
|
||||||
|
val.users = val.obj.find(".cityUserBody");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
val.users.html("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$.get(basicPath+'b_genList.php',function(rawData){
|
||||||
|
var cnt =0;
|
||||||
|
|
||||||
|
var $helper = $('#helper_genlist');
|
||||||
|
$helper.html('').append($.parseHTML(rawData));
|
||||||
|
|
||||||
|
var tmpUsers = $('#general_list tbody tr');
|
||||||
|
|
||||||
|
tmpUsers.each(function(idx){
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
var $city = $this.children('.i_city');
|
||||||
|
$city.remove();
|
||||||
|
var cityName = $.trim($city.text());
|
||||||
|
|
||||||
|
var $name = $this.children('.i_name');
|
||||||
|
$name.addClass('nameplate');
|
||||||
|
|
||||||
|
var name = $name.find('.t_name').html();
|
||||||
|
|
||||||
|
var $work = $this.children('.i_action');
|
||||||
|
|
||||||
|
var cityInfo = cityList[cityName];
|
||||||
|
if(typeof cityInfo == 'undefined'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(cityInfo.warn주민)$work.html($work.html().split('정착 장려').join('<span style="color:yellow;">정착 장려</span>'));
|
||||||
|
if(cityInfo.warn농업)$work.html($work.html().split('농지 개간').join('<span style="color:yellow;">농지 개간</span>'));
|
||||||
|
if(cityInfo.warn상업)$work.html($work.html().split('상업 투자').join('<span style="color:yellow;">상업 투자</span>'));
|
||||||
|
if(cityInfo.warn치안)$work.html($work.html().split('치안 강화').join('<span style="color:yellow;">치안 강화</span>'));
|
||||||
|
if(cityInfo.warn수비)$work.html($work.html().split('수비 강화').join('<span style="color:yellow;">수비 강화</span>'));
|
||||||
|
if(cityInfo.warn성벽)$work.html($work.html().split('성벽 보수').join('<span style="color:yellow;">성벽 보수</span>'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var $stat = $this.children('.i_stat');
|
||||||
|
var stat = $stat.text();
|
||||||
|
|
||||||
|
var is수뇌 = stat.indexOf('+')>=0;
|
||||||
|
|
||||||
|
$this.data('username',name);
|
||||||
|
|
||||||
|
if(cityList[cityName].$태수.text() == name){
|
||||||
|
cityList[cityName].$태수.css('color','lightgreen');
|
||||||
|
}
|
||||||
|
if(cityList[cityName].$군사.text() == name){
|
||||||
|
cityList[cityName].$군사.css('color','lightgreen');
|
||||||
|
}
|
||||||
|
if(cityList[cityName].$시중.text() == name){
|
||||||
|
cityList[cityName].$시중.css('color','lightgreen');
|
||||||
|
}
|
||||||
|
|
||||||
|
userList[name]={
|
||||||
|
$city:cityInfo,
|
||||||
|
city:cityName,
|
||||||
|
$user:$this,
|
||||||
|
name:name,
|
||||||
|
val:'-1',
|
||||||
|
p태수:false,
|
||||||
|
p군사:false,
|
||||||
|
p시중:false,
|
||||||
|
is수뇌:is수뇌
|
||||||
|
};
|
||||||
|
|
||||||
|
if(cityList[cityName]){
|
||||||
|
cityList[cityName].users.append($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if($("#loadDutyBtn").length == 0){
|
||||||
|
|
||||||
|
var $onBossList = $('<button id="loadDutyBtn">인사부 연동</button>');
|
||||||
|
$onBossList.click(function(){
|
||||||
|
loadDuty();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('form').append($onBossList);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#by_users').show();
|
||||||
|
};
|
||||||
|
|
||||||
|
var mainFunc = function(){
|
||||||
|
//대상 추출
|
||||||
|
window.cityList = {};
|
||||||
|
window.userList = {};
|
||||||
|
|
||||||
|
$("form").each(function(){
|
||||||
|
var $this = $(this);
|
||||||
|
$this.attr('name','p'+$this.attr('name'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$("table").each(function(idx,val){
|
||||||
|
$this = $(this);
|
||||||
|
|
||||||
|
|
||||||
|
if($this.attr('class')=='tb_layout bg2'){
|
||||||
|
$this.addClass('cityInfo');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.$tmpTable = $this;
|
||||||
|
var cityInfo = {};
|
||||||
|
|
||||||
|
//이름 추출
|
||||||
|
{
|
||||||
|
|
||||||
|
var titleText = $this.find('tr:eq(0)>td:eq(0)').text();
|
||||||
|
var loc0 = titleText.indexOf("【");
|
||||||
|
var loc1 = titleText.indexOf("|");
|
||||||
|
var loc2 = titleText.indexOf("】");
|
||||||
|
|
||||||
|
var cityLoc = $.trim(titleText.substring(loc0+1,loc1));
|
||||||
|
var citySize = $.trim(titleText.substring(loc1+1,loc2));
|
||||||
|
var cityName = $.trim(titleText.substring(loc2+1));
|
||||||
|
|
||||||
|
cityName = cityName.replace("[","");
|
||||||
|
cityName = cityName.replace("]","");
|
||||||
|
|
||||||
|
$this.data('cityname',cityName);
|
||||||
|
|
||||||
|
cityInfo.지역 = cityLoc;
|
||||||
|
cityInfo.규모 = citySize;
|
||||||
|
cityInfo.이름 = cityName;
|
||||||
|
|
||||||
|
cityInfo.val = '-1';
|
||||||
|
|
||||||
|
cityInfo.p태수 = false;
|
||||||
|
cityInfo.p군사 = false;
|
||||||
|
cityInfo.p시중 = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//주민, 농상치성수
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
var $baseTr = $this.find('tr:eq(1)');
|
||||||
|
cityInfo.$주민 = $baseTr.find('td:eq(1)');
|
||||||
|
cityInfo.$농업 = $baseTr.find('td:eq(3)');
|
||||||
|
cityInfo.$상업 = $baseTr.find('td:eq(5)');
|
||||||
|
cityInfo.$치안 = $baseTr.find('td:eq(7)');
|
||||||
|
cityInfo.$수비 = $baseTr.find('td:eq(9)');
|
||||||
|
cityInfo.$성벽 = $baseTr.find('td:eq(11)');
|
||||||
|
|
||||||
|
var tmpVal;
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$주민.text().split('/');
|
||||||
|
cityInfo.주민 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max주민 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$농업.text().split('/');
|
||||||
|
cityInfo.농업 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max농업 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$상업.text().split('/');
|
||||||
|
cityInfo.상업 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max상업 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$치안.text().split('/');
|
||||||
|
cityInfo.치안 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max치안 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$수비.text().split('/');
|
||||||
|
cityInfo.수비 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max수비 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
tmpVal = cityInfo.$성벽.text().split('/');
|
||||||
|
cityInfo.성벽 = parseInt(tmpVal[0]);
|
||||||
|
cityInfo.max성벽 = parseInt(tmpVal[1]);
|
||||||
|
|
||||||
|
if (cityInfo.주민>cityInfo.max주민*0.9){ cityInfo.$주민.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.주민>cityInfo.max주민*0.7){ cityInfo.$주민.css('color','yellow');}
|
||||||
|
else { cityInfo.$주민.css('color','orangered');}
|
||||||
|
|
||||||
|
if (cityInfo.농업>cityInfo.max농업*0.8){ cityInfo.$농업.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.농업>cityInfo.max농업*0.4){ cityInfo.$농업.css('color','yellow');}
|
||||||
|
else { cityInfo.$농업.css('color','orangered');}
|
||||||
|
|
||||||
|
if (cityInfo.상업>cityInfo.max상업*0.8){ cityInfo.$상업.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.상업>cityInfo.max상업*0.4){ cityInfo.$상업.css('color','yellow');}
|
||||||
|
else { cityInfo.$상업.css('color','orangered');}
|
||||||
|
|
||||||
|
if (cityInfo.치안>cityInfo.max치안*0.8){ cityInfo.$치안.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.치안>cityInfo.max치안*0.4){ cityInfo.$치안.css('color','yellow');}
|
||||||
|
else { cityInfo.$치안.css('color','orangered');}
|
||||||
|
|
||||||
|
if (cityInfo.수비>cityInfo.max수비*0.6){ cityInfo.$수비.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.수비>cityInfo.max수비*0.3){ cityInfo.$수비.css('color','yellow');}
|
||||||
|
else { cityInfo.$수비.css('color','orangered');}
|
||||||
|
|
||||||
|
if (cityInfo.성벽>cityInfo.max성벽*0.6){ cityInfo.$성벽.css('color','lightgreen');}
|
||||||
|
else if (cityInfo.성벽>cityInfo.max성벽*0.3){ cityInfo.$성벽.css('color','yellow');}
|
||||||
|
else { cityInfo.$성벽.css('color','orangered');}
|
||||||
|
|
||||||
|
|
||||||
|
cityInfo.remain주민 = cityInfo.주민-cityInfo.max주민;
|
||||||
|
cityInfo.remain농업 = cityInfo.농업-cityInfo.max농업;
|
||||||
|
cityInfo.remain상업 = cityInfo.상업-cityInfo.max상업;
|
||||||
|
cityInfo.remain치안 = cityInfo.치안-cityInfo.max치안;
|
||||||
|
cityInfo.remain수비 = cityInfo.수비-cityInfo.max수비;
|
||||||
|
cityInfo.remain성벽 = cityInfo.성벽-cityInfo.max성벽;
|
||||||
|
|
||||||
|
cityInfo.warn주민 = false;
|
||||||
|
cityInfo.warn농업 = false;
|
||||||
|
cityInfo.warn상업 = false;
|
||||||
|
cityInfo.warn치안 = false;
|
||||||
|
cityInfo.warn수비 = false;
|
||||||
|
cityInfo.warn성벽 = false;
|
||||||
|
|
||||||
|
if(cityInfo.remain주민 > -10*2000) cityInfo.warn주민 = true;
|
||||||
|
if(cityInfo.주민 > 0.92*cityInfo.max주민) cityInfo.warn주민 = true;
|
||||||
|
if(cityInfo.remain농업 > -10*100) cityInfo.warn농업 = true;
|
||||||
|
if(cityInfo.remain상업 > -10*100) cityInfo.warn상업 = true;
|
||||||
|
if(cityInfo.remain치안 > -10*100) cityInfo.warn치안 = true;
|
||||||
|
if(cityInfo.remain수비 > -10*70) cityInfo.warn수비 = true;
|
||||||
|
if(cityInfo.remain성벽 > -10*70) cityInfo.warn성벽 = true;
|
||||||
|
|
||||||
|
if(cityInfo.warn농업) cityInfo.$농업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain농업+']</span>');
|
||||||
|
if(cityInfo.warn상업) cityInfo.$상업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain상업+']</span>');
|
||||||
|
if(cityInfo.warn치안) cityInfo.$치안.append('<span class="remain" style="color:yellow;">['+cityInfo.remain치안+']</span>');
|
||||||
|
if(cityInfo.warn수비) cityInfo.$수비.append('<span class="remain" style="color:yellow;">['+cityInfo.remain수비+']</span>');
|
||||||
|
if(cityInfo.warn성벽) cityInfo.$성벽.append('<span class="remain" style="color:yellow;">['+cityInfo.remain성벽+']</span>');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//태수,군사,시중
|
||||||
|
{
|
||||||
|
var $baseTr = $this.find('tr:eq(2)');
|
||||||
|
cityInfo.$태수 = $baseTr.find('td:eq(7)');
|
||||||
|
cityInfo.$군사 = $baseTr.find('td:eq(9)');
|
||||||
|
cityInfo.$시중 = $baseTr.find('td:eq(11)');
|
||||||
|
}
|
||||||
|
|
||||||
|
//기타
|
||||||
|
{
|
||||||
|
|
||||||
|
cityInfo.userCnt = $this.find('tr:eq(3) td:eq(1)').text().split(',').length -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
cityInfo.obj = $this;
|
||||||
|
cityList[cityInfo.이름] = cityInfo;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var $onGenList = $('<button>암행부 연동</button>');
|
||||||
|
$onGenList.click(function(){
|
||||||
|
loadUser();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$('form').append($onGenList);
|
||||||
|
|
||||||
|
|
||||||
|
$('table:eq(0) tr:last').after('<tr><td id="sort_more"></td></tr>');
|
||||||
|
|
||||||
|
|
||||||
|
$sort_more = $('#sort_more');
|
||||||
|
$sort_more.html('재 정렬 순서 :');
|
||||||
|
|
||||||
|
var sortIt = function(callback){
|
||||||
|
var arCity = [];
|
||||||
|
$('.cityInfo').each(function(){
|
||||||
|
var $this = $(this);
|
||||||
|
var cityName = $this.data('cityname');
|
||||||
|
|
||||||
|
var cityInfo = cityList[cityName];
|
||||||
|
arCity.push(cityInfo);
|
||||||
|
});
|
||||||
|
|
||||||
|
arCity = mergeSort(arCity,callback);
|
||||||
|
//console.log(arCity);
|
||||||
|
|
||||||
|
var $anchor = $('.anchor');
|
||||||
|
//console.log($anchor);
|
||||||
|
|
||||||
|
$('body > br').remove();
|
||||||
|
|
||||||
|
$('.cityInfo').detach();
|
||||||
|
|
||||||
|
$.each(arCity,function(idx,val){
|
||||||
|
$anchor.before('<br>');
|
||||||
|
$anchor.before(val.obj);
|
||||||
|
});
|
||||||
|
$anchor.before('<br>');
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var $btn;
|
||||||
|
|
||||||
|
$btn = $('<button>도시명</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.이름.localeCompare(b.이름);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>인구율</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return 1.0*a.주민/a.max주민 - 1.0*b.주민/b.max주민;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 주민</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain주민 - b.remain주민;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 농업</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain농업 - b.remain농업;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 상업</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain상업 - b.remain상업;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 치안</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain치안 - b.remain치안;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 수비</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain수비 - b.remain수비;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>남은 성벽</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return a.remain성벽 - b.remain성벽;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
|
||||||
|
$btn = $('<button>배치 장수 수</button>').click(function(){
|
||||||
|
sortIt(function(a,b){
|
||||||
|
return b.userCnt - a.userCnt;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$sort_more.append($btn);
|
||||||
|
};
|
||||||
|
|
||||||
|
mainFunc();
|
||||||
|
});
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
$(function(){
|
||||||
|
|
||||||
|
var basicPath = document.location.pathname;
|
||||||
|
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||||
|
var headTbl = $('table:eq(0)');
|
||||||
|
var $userFrame;
|
||||||
|
|
||||||
|
var 국가테이블= $('table:gt(0):lt(-2)');
|
||||||
|
|
||||||
|
var getUserType = function(통,무,지){
|
||||||
|
var 총 = 통+무+지;
|
||||||
|
|
||||||
|
if(통 < 총*0.2) {
|
||||||
|
return "무지";
|
||||||
|
}else if(무 < 총*0.2) {
|
||||||
|
return "지";
|
||||||
|
}else if(지 < 총*0.2) {
|
||||||
|
return "무";
|
||||||
|
}else{
|
||||||
|
return "만능";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function formatScore(x) {
|
||||||
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
}
|
||||||
|
|
||||||
|
var runAnalysis = function(){
|
||||||
|
var $content = $('#on_mover .content');
|
||||||
|
$.get(basicPath+'a_genList.php',function(rawData){
|
||||||
|
try{
|
||||||
|
var $html = $(rawData);
|
||||||
|
|
||||||
|
var $장수일람 = {};
|
||||||
|
|
||||||
|
var 국가별 = {};
|
||||||
|
var cnt =0;
|
||||||
|
$html.each(function(idx){
|
||||||
|
|
||||||
|
if(this.tagName == "TABLE"){
|
||||||
|
cnt+=1;
|
||||||
|
if(cnt==2){
|
||||||
|
$장수일람 = $(this);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$장수일람.find('tr:gt(0)').each(function(){
|
||||||
|
var 장수 = {};
|
||||||
|
$this = $(this);
|
||||||
|
$tds = $this.find('td');
|
||||||
|
|
||||||
|
var 장수명 = $.trim($tds.eq(1).text());
|
||||||
|
var 국가 = $.trim($tds.eq(6).text());
|
||||||
|
|
||||||
|
장수.html = $this.clone();
|
||||||
|
장수.장수명 = 장수명;
|
||||||
|
장수.국가 = 국가;
|
||||||
|
장수.벌점 = parseInt($tds.eq(-1).text());
|
||||||
|
장수.통 = parseInt($tds.eq(10).text().split('+')[0]);
|
||||||
|
장수.무 = parseInt($tds.eq(11).text().split('+')[0]);
|
||||||
|
장수.지 = parseInt($tds.eq(12).text().split('+')[0]);
|
||||||
|
장수.삭턴 = parseInt($tds.eq(-2).text());
|
||||||
|
장수.종류 = getUserType(장수.통, 장수.무, 장수.지);
|
||||||
|
장수.의병 = 장수명[0]=="ⓜ" || 장수명[0]=="ⓖ";
|
||||||
|
if(!(국가 in 국가별)){
|
||||||
|
국가별[국가] = {};
|
||||||
|
국가별[국가].무 = [];
|
||||||
|
국가별[국가].지 = [];
|
||||||
|
국가별[국가].충차 = [];
|
||||||
|
국가별[국가].무지 = [];
|
||||||
|
국가별[국가].만능 = [];
|
||||||
|
//국가별[국가].의병 = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//if(장수.의병) 국가별[국가].의병.push(장수);
|
||||||
|
국가별[국가][장수.종류].push(장수);
|
||||||
|
|
||||||
|
장수.html.hide();
|
||||||
|
$content.append(장수.html);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
국가테이블.each(function(idx){
|
||||||
|
var $this = $(this);
|
||||||
|
var $tbl = $this;
|
||||||
|
var $td = $this.find('td:last');
|
||||||
|
var name = $.trim($this.find('td:first').text());
|
||||||
|
name = name.substr(2,name.length-4);
|
||||||
|
|
||||||
|
var 국가정보 = 국가별[name];
|
||||||
|
|
||||||
|
var total = 0;
|
||||||
|
var 전투유저장수 = 0;
|
||||||
|
var 삭턴장수 = 0;
|
||||||
|
var 통솔합 = 0;
|
||||||
|
$td.html('<p class="sum" style="margin:0;font-weight:bold;color:yellow;text-align:center"></p>');
|
||||||
|
$td.css('text-indent','-5.8em').css('padding-left','5.8em');
|
||||||
|
for(var 종류명 in 국가정보){
|
||||||
|
|
||||||
|
var $p = $("<p></p>").css('margin','0');
|
||||||
|
|
||||||
|
var 테이블 = 국가정보[종류명];
|
||||||
|
|
||||||
|
if(테이블.length == 0)continue;
|
||||||
|
|
||||||
|
테이블.sort(function(좌, 우){
|
||||||
|
if(우.벌점 == 좌.벌점){
|
||||||
|
return 좌.장수명 > 우.장수명 ? 1 : 0;
|
||||||
|
}
|
||||||
|
return 우.벌점 - 좌.벌점
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var text = " "+종류명;
|
||||||
|
text = text.substr(text.length-2);
|
||||||
|
$p.append(text+'장(');
|
||||||
|
|
||||||
|
text = ""+테이블.length;
|
||||||
|
|
||||||
|
$p.append(text + ')');
|
||||||
|
if(text.length<3){
|
||||||
|
$p.append("<span style='display:inline-block;width:"+(3-text.length)/2+"em;'> </span>");
|
||||||
|
}
|
||||||
|
$p.append(': ');
|
||||||
|
|
||||||
|
total += 테이블.length;
|
||||||
|
|
||||||
|
$.each(테이블,function(idx,val){
|
||||||
|
|
||||||
|
var 종능 = val.통 + val.무 + val.지;
|
||||||
|
if(종류명 == '무' || 종류명 == '지' || 종류명 == '충차'){
|
||||||
|
if(val.삭턴 >= 80 && !val.의병){
|
||||||
|
전투유저장수+=1;
|
||||||
|
|
||||||
|
if(종능 > 150) 통솔합 += val.통;
|
||||||
|
else if(종능/0.75 >= 150)통솔합 += parseInt(val.통/0.75);
|
||||||
|
else if(종능/0.55 >= 150)통솔합 += parseInt(val.통/0.55);
|
||||||
|
else if(종능/0.35 >= 150)통솔합 += parseInt(val.통/0.35);
|
||||||
|
else if(종능/0.15 >= 150)통솔합 += parseInt(val.통/0.15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var $obj = $('<span></span>');
|
||||||
|
var $obj2 = $('<span></span>');
|
||||||
|
$obj.html(val.장수명);
|
||||||
|
|
||||||
|
if(!val.의병 && val.삭턴 < 80){
|
||||||
|
$obj.css('text-decoration','line-through');
|
||||||
|
삭턴장수+=1;
|
||||||
|
}
|
||||||
|
if(val.의병){
|
||||||
|
$obj.css('color','cyan');
|
||||||
|
}
|
||||||
|
if(val.벌점 >= 1500) $obj.css('color','yellow');
|
||||||
|
else if(val.벌점 >= 200) $obj.css('color','lightgreen');
|
||||||
|
|
||||||
|
$obj2.append($obj);
|
||||||
|
if(idx < 테이블.length-1){
|
||||||
|
$obj2.append(', ');
|
||||||
|
}
|
||||||
|
$p.append($obj2);
|
||||||
|
$obj2.hover(function(){
|
||||||
|
var top = $tbl.offset().top + $tbl.outerHeight() + 3;
|
||||||
|
$userFrame.css('top',top);
|
||||||
|
val.html.show();
|
||||||
|
$userFrame.show();
|
||||||
|
console.log('올림!'+val.장수명);
|
||||||
|
},function(){
|
||||||
|
$userFrame.hide();
|
||||||
|
val.html.hide();
|
||||||
|
console.log('내림!'+val.장수명);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
$td.append($p);
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = "* 총("+total+"), 전투장("+전투유저장수+", 약 "+formatScore(통솔합*100)+"명), 삭턴장("+삭턴장수+") *";
|
||||||
|
$tbl.find('.sum').html(result);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch(err){
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$userFrame = $('<div id="on_mover" style="position:absolute;">'+
|
||||||
|
'<table class="tb_layout bg0" style="width:100%;"><thead><tr>'+
|
||||||
|
'<td width="64" align="center" class="bg1">얼 굴</td>'+
|
||||||
|
'<td width="100" align="center" class="bg1">이 름</td>'+
|
||||||
|
'<td width="50" align="center" class="bg1">연령</td>'+
|
||||||
|
'<td width="50" align="center" class="bg1">성격</td>'+
|
||||||
|
'<td width="90" align="center" class="bg1">특기</td>'+
|
||||||
|
'<td width="50" align="center" class="bg1">레 벨</td>'+
|
||||||
|
'<td width="100" align="center" class="bg1">국 가</td>'+
|
||||||
|
'<td width="60" align="center" class="bg1">명 성</td>'+
|
||||||
|
'<td width="60" align="center" class="bg1">계 급</td>'+
|
||||||
|
'<td width="80" align="center" class="bg1">관 직</td>'+
|
||||||
|
'<td width="45" align="center" class="bg1">통솔</td>'+
|
||||||
|
'<td width="45" align="center" class="bg1">무력</td>'+
|
||||||
|
'<td width="45" align="center" class="bg1">지력</td>'+
|
||||||
|
'<td width="45" align="center" class="bg1">삭턴</td>'+
|
||||||
|
'<td width="84" align="center" class="bg1">벌점</td>'+
|
||||||
|
'</tr></thead><tbody class="content"></tbody></table></div>');
|
||||||
|
$userFrame.find('thead td');
|
||||||
|
$userFrame.css('width','1000px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-500px');
|
||||||
|
$userFrame.css('box-shadow','0px 0px 7px 3px rgba(255,255,255,50)');
|
||||||
|
$userFrame.hide();
|
||||||
|
|
||||||
|
$('body').append($userFrame);
|
||||||
|
|
||||||
|
var $frame = $('table:eq(0) td:eq(0)');
|
||||||
|
$frame.find('br:last').remove();
|
||||||
|
|
||||||
|
var $btn = $('<input type="button" value="장수 일람 연동">');
|
||||||
|
$btn.click(function(){
|
||||||
|
runAnalysis();
|
||||||
|
$btn.prop("disabled",true);
|
||||||
|
var $tr0 = $('table:eq(0) tr:eq(0)');
|
||||||
|
$tr0.append('<td><strong>*벌점 순 정렬*</strong><br><span style="color:yellow">벌점 1500점 이상</span>, <span style="color:lightgreen">벌점 200점 이상</span>, '+
|
||||||
|
'<span style="text-decoration:line-through">삭턴 장</span>, <span style="color:cyan">ⓝ장</span>'+'<br><strong>전투장 :</strong> 무장 + 지장 + 충차장 - 삭턴자(무,지,충) </td>');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$frame.append($btn);
|
||||||
|
});
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
$(function(){
|
||||||
|
|
||||||
|
var userList = {};
|
||||||
|
var groupList = {};
|
||||||
|
var tGroup = [];
|
||||||
|
var basicPath = document.location.pathname;
|
||||||
|
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||||
|
|
||||||
|
var $userFrame;
|
||||||
|
|
||||||
|
window.groupList = groupList;
|
||||||
|
window.userList = userList;
|
||||||
|
|
||||||
|
var aGroup = {};
|
||||||
|
|
||||||
|
$('#troop_list tbody > tr').each(function(idx){
|
||||||
|
var $this = $(this);
|
||||||
|
//console.log(this);
|
||||||
|
//console.log($this);
|
||||||
|
if(idx%3 == 0){
|
||||||
|
aGroup = {
|
||||||
|
turn : '77:77',
|
||||||
|
turnTime : 5555,
|
||||||
|
부대장 : '에러-집합장없음',
|
||||||
|
부대명 : '에러-부대명없음',
|
||||||
|
srclist : [],
|
||||||
|
도시 : '없지롱',
|
||||||
|
list: [],
|
||||||
|
trs:[]
|
||||||
|
};
|
||||||
|
|
||||||
|
aGroup.trs.push($this);
|
||||||
|
var $children = $this.children();
|
||||||
|
var names = $.trim($children.eq(1).text()).split('【');
|
||||||
|
var 부대명 = $.trim(names[0]);
|
||||||
|
var 도시 = $.trim(names[1].substr(0,names[1].length-1));
|
||||||
|
|
||||||
|
aGroup.도시 = 도시;
|
||||||
|
aGroup.부대명 = 부대명;
|
||||||
|
|
||||||
|
aGroup.obj = $this;
|
||||||
|
aGroup.$users = $children.eq(3);
|
||||||
|
|
||||||
|
var lists = $.trim($children.eq(3).text()).split(', ');
|
||||||
|
lists.pop();
|
||||||
|
aGroup.srcList = lists;
|
||||||
|
}
|
||||||
|
else if(idx%3 == 1){
|
||||||
|
aGroup.trs.push($this);
|
||||||
|
var turnBase = $this.children().eq(0).text().split('】')[1];
|
||||||
|
//console.log(turnBase);
|
||||||
|
var userName = $this.children().eq(1).text();
|
||||||
|
|
||||||
|
var turn = turnBase;
|
||||||
|
|
||||||
|
var turnMS = turnBase.split(':');
|
||||||
|
var turnM = parseInt(turnMS[0]);
|
||||||
|
var turnS = parseInt(turnMS[1]);
|
||||||
|
var turnTime = turnM*60+turnS;
|
||||||
|
|
||||||
|
aGroup.turn = turn;
|
||||||
|
aGroup.turnTime = turnTime;
|
||||||
|
aGroup.부대장 = userName;
|
||||||
|
aGroup.obj2 = $this;
|
||||||
|
|
||||||
|
groupList[aGroup.부대명] = aGroup;
|
||||||
|
tGroup.push(aGroup);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if($this.find('input').length==0){
|
||||||
|
$this.detach();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(tGroup,function(idx,val){
|
||||||
|
console.log(val);
|
||||||
|
for(var i=0;i<val.trs.length;i++){
|
||||||
|
val.trs[i].detach();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tGroup.sort(function(lhs,rhs){
|
||||||
|
return lhs.turnTime-rhs.turnTime;
|
||||||
|
});
|
||||||
|
|
||||||
|
var $last = $('table:eq(1) tr:eq(-1)');
|
||||||
|
var $tbody = $('table:eq(1) tbody');
|
||||||
|
$last.detach();
|
||||||
|
console.log($last);
|
||||||
|
$.each(tGroup,function(idx,val){
|
||||||
|
for(var i=0;i<val.trs.length;i++){
|
||||||
|
$tbody.append(val.trs[i]);
|
||||||
|
}
|
||||||
|
$tbody.append('<tr><td colspan="5"></td></tr>');
|
||||||
|
});
|
||||||
|
$tbody.find('tr:eq(-1)').detach();
|
||||||
|
$tbody.append($last);
|
||||||
|
|
||||||
|
var runAnalysis = function(){
|
||||||
|
$.each(groupList,function(idx,val){
|
||||||
|
val.list = [];
|
||||||
|
});
|
||||||
|
userList = [];
|
||||||
|
var $content = $('#on_mover .content');
|
||||||
|
$content.html('');
|
||||||
|
$.get(basicPath+'b_genList.php',function(rawData){
|
||||||
|
|
||||||
|
try{
|
||||||
|
$html = $(rawData);
|
||||||
|
var cnt =0;
|
||||||
|
|
||||||
|
var tmpUsers = {};
|
||||||
|
$html.each(function(idx){
|
||||||
|
if(this.tagName == "TABLE"){
|
||||||
|
cnt+=1;
|
||||||
|
if(cnt==2){
|
||||||
|
tmpUsers = $(this);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tmpUsers.find("tbody > tr").each(function(idx){
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
|
||||||
|
var $부대 = $this.children('.i_troop');
|
||||||
|
|
||||||
|
var 부대 = $.trim($부대.text());
|
||||||
|
|
||||||
|
if(부대 == '-'){
|
||||||
|
//부대 안탔음!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$부대.remove();
|
||||||
|
|
||||||
|
var $name = $this.children('.i_name');
|
||||||
|
$name.addClass('nameplate');
|
||||||
|
|
||||||
|
var name = $name.find('.t_name').text();
|
||||||
|
|
||||||
|
var $도시 = $this.children('.i_city');
|
||||||
|
var 도시 = $.trim($도시.text());
|
||||||
|
|
||||||
|
var $턴 = $this.children('.i_action');
|
||||||
|
//console.log($턴);
|
||||||
|
var 턴0 = $턴.text().split(':');
|
||||||
|
var 턴 = parseInt(턴0[0])*60 + parseInt(턴0[1]);
|
||||||
|
|
||||||
|
var userInfo = {
|
||||||
|
이름 : name,
|
||||||
|
부대 : 부대,
|
||||||
|
도시 : 도시,
|
||||||
|
턴 : 턴,
|
||||||
|
obj : $this
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
groupList[부대].list.push(userInfo);
|
||||||
|
userList[name] = userInfo;
|
||||||
|
$this.hide();
|
||||||
|
$content.append($this);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$.each(groupList,function(부대명,aGroup){
|
||||||
|
aGroup.$users.html('');
|
||||||
|
|
||||||
|
$.each(aGroup.list,function(idx,userInfo){
|
||||||
|
var $user = $('<span><span class="name"></span><span class="other"></span></span>');
|
||||||
|
var $userName = $user.children('.name');
|
||||||
|
if(userInfo.이름 == aGroup.부대장){
|
||||||
|
$userName.html('*'+userInfo.이름+'*');
|
||||||
|
$userName.css('color','lightgreen');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$userName.html(userInfo.이름);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(userInfo.도시 != aGroup.도시){
|
||||||
|
$userName.css('color','red');
|
||||||
|
$user.children('.other').html('【'+userInfo.도시+'】');
|
||||||
|
}
|
||||||
|
|
||||||
|
$user.hover(function(){
|
||||||
|
var top = aGroup.obj2.offset().top + aGroup.obj2.outerHeight();
|
||||||
|
$userFrame.css('top',top);
|
||||||
|
userInfo.obj.show();
|
||||||
|
$userFrame.show();
|
||||||
|
console.log('올림!'+userInfo.이름);
|
||||||
|
},function(){
|
||||||
|
$userFrame.hide();
|
||||||
|
userInfo.obj.hide();
|
||||||
|
console.log('내림!'+userInfo.이름);
|
||||||
|
});
|
||||||
|
|
||||||
|
$user.append(', ');
|
||||||
|
aGroup.$users.append($user);
|
||||||
|
});
|
||||||
|
|
||||||
|
aGroup.$users.append('('+aGroup.list.length+'명)');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch(err){
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var $frame = $('table:eq(0) td:eq(0)');
|
||||||
|
$frame.find('br:last').remove();
|
||||||
|
|
||||||
|
var $btn = $('<input type="button" value="암행부 연동">');
|
||||||
|
$btn.click(function(){
|
||||||
|
runAnalysis();
|
||||||
|
});
|
||||||
|
|
||||||
|
$frame.append($btn);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$userFrame = $('<div id="on_mover" style="position:absolute;">'+
|
||||||
|
'<table class="tb_layout bg0" style="width:100%;"><thead><tr>'+
|
||||||
|
'<td width="98" align="center" class="bg1">이 름</td>'+
|
||||||
|
'<td width="98" align="center" class="bg1"">통무지</td>'+
|
||||||
|
'<td width="58" align="center" class="bg1">자 금</td>'+
|
||||||
|
'<td width="58" align="center" class="bg1">군 량</td>'+
|
||||||
|
'<td width="48" align="center" class="bg1">도시</td>'+
|
||||||
|
'<td width="28" align="center" class="bg1">守</td>'+
|
||||||
|
'<td width="58" align="center" class="bg1">병 종</td>'+
|
||||||
|
'<td width="68" align="center" class="bg1">병 사</td>'+
|
||||||
|
'<td width="48" align="center" class="bg1">훈련</td>'+
|
||||||
|
'<td width="48" align="center" class="bg1">사기</td>'+
|
||||||
|
'<td width="148" align="center" class="bg1">명 령</td>'+
|
||||||
|
'<td width="58" align="center" class="bg1">삭턴</td>'+
|
||||||
|
'<td width="58" align="center" class="bg1">턴</td>'+
|
||||||
|
'</tr></thead><tbody class="content"></tbody></table></div>');
|
||||||
|
$userFrame.find('thead td');
|
||||||
|
$userFrame.css('width','900px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-450px');
|
||||||
|
$userFrame.hide();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('body').append($userFrame);
|
||||||
|
|
||||||
|
});
|
||||||
@@ -439,14 +439,15 @@ function reloadWorldMap(option){
|
|||||||
url: option.targetJson,
|
url: option.targetJson,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
data: {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
neutralView:option.neutralView,
|
neutralView:option.neutralView,
|
||||||
year:option.year,
|
year:option.year,
|
||||||
month:option.month,
|
month:option.month,
|
||||||
showMe:option.showMe,
|
showMe:option.showMe,
|
||||||
aux:option.aux
|
aux:option.aux
|
||||||
})
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
deferred
|
deferred
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ function responseMessage(msgID, response){
|
|||||||
url: 'j_msg_decide_opt.php',
|
url: 'j_msg_decide_opt.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
data: {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
msgID:msgID,
|
msgID:msgID,
|
||||||
response:response
|
response:response
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}).then(refreshMsg);
|
}).then(refreshMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,10 +55,9 @@ function fetchMsg(){
|
|||||||
url: 'j_msg_get_recent.php',
|
url: 'j_msg_get_recent.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
data: {
|
||||||
data: JSON.stringify({
|
|
||||||
sequence:sequence
|
sequence:sequence
|
||||||
})
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,11 +373,12 @@ function activateMessageForm(){
|
|||||||
url:'j_msg_submit.php',
|
url:'j_msg_submit.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
data: {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
mailbox:parseInt(targetMailbox),
|
mailbox:parseInt(targetMailbox),
|
||||||
text:text
|
text:text
|
||||||
})
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -404,10 +405,6 @@ jQuery(function($){
|
|||||||
url:'j_basic_info.php',
|
url:'j_basic_info.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
|
||||||
data: JSON.stringify({
|
|
||||||
|
|
||||||
})
|
|
||||||
}).then(registerGlobal);
|
}).then(registerGlobal);
|
||||||
|
|
||||||
//sender_list.json 은 서버측에선 캐시 가능한 데이터임.
|
//sender_list.json 은 서버측에선 캐시 가능한 데이터임.
|
||||||
@@ -415,10 +412,6 @@ jQuery(function($){
|
|||||||
url: 'j_msg_contact_list.php',
|
url: 'j_msg_contact_list.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
contentType: 'application/json',
|
|
||||||
data: JSON.stringify({
|
|
||||||
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var MessageList = fetchMsg();
|
var MessageList = fetchMsg();
|
||||||
|
|||||||
@@ -146,9 +146,9 @@ function processWar($general, $city) {
|
|||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushGeneralPublicRecord($alllog, $year, $month);
|
pushGeneralPublicRecord($alllog, $year, $month);
|
||||||
pushWorldHistory($history);
|
pushWorldHistory($history);
|
||||||
unset($log);
|
$log = [];
|
||||||
unset($alllog);
|
$alllog = [];
|
||||||
unset($history);
|
$history= [];
|
||||||
|
|
||||||
//패퇴시 병량보충
|
//패퇴시 병량보충
|
||||||
$destnation['rice'] += 500;
|
$destnation['rice'] += 500;
|
||||||
@@ -602,14 +602,14 @@ function processWar($general, $city) {
|
|||||||
//특기보정 : 저격(수극), 활무기저격
|
//특기보정 : 저격(수극), 활무기저격
|
||||||
$snipe = false;
|
$snipe = false;
|
||||||
$snipeItem = false;
|
$snipeItem = false;
|
||||||
if(!$snipe && $general['special2'] == 70 && Util::randF(1/3)){
|
if(!$snipe && $general['special2'] == 70 && Util::randBool(1/3)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && in_array($general['weap'], [10, 14, 18, 22]) && Util::randF(1/5)){
|
if(!$snipe && in_array($general['weap'], [10, 14, 18, 22]) && Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && $general['item'] == 2){
|
if(!$snipe && $general['item'] == 2){
|
||||||
if(Util::randF(1/5)){
|
if(Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
$snipeItem = true;
|
$snipeItem = true;
|
||||||
}
|
}
|
||||||
@@ -642,14 +642,14 @@ function processWar($general, $city) {
|
|||||||
//특기보정 : 저격(수극), 활무기저격
|
//특기보정 : 저격(수극), 활무기저격
|
||||||
$snipe = false;
|
$snipe = false;
|
||||||
$snipeItem = false;
|
$snipeItem = false;
|
||||||
if(!$snipe && $oppose['special2'] == 70 && Util::randF(1/3)){
|
if(!$snipe && $oppose['special2'] == 70 && Util::randBool(1/3)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && in_array($oppose['weap'], [10, 14, 18, 22]) && Util::randF(1/5)){
|
if(!$snipe && in_array($oppose['weap'], [10, 14, 18, 22]) && Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && $oppose['item'] == 2){
|
if(!$snipe && $oppose['item'] == 2){
|
||||||
if(Util::randF(1/5)){
|
if(Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
$snipeItem = true;
|
$snipeItem = true;
|
||||||
}
|
}
|
||||||
@@ -1464,10 +1464,10 @@ function processWar($general, $city) {
|
|||||||
pushGenLog($oppose, $opplog);
|
pushGenLog($oppose, $opplog);
|
||||||
pushBatLog($oppose, $oppbatlog);
|
pushBatLog($oppose, $oppbatlog);
|
||||||
pushBatRes($oppose, $oppbatres);
|
pushBatRes($oppose, $oppbatres);
|
||||||
unset($oppose);
|
$oppose = null;
|
||||||
unset($opplog);
|
$opplog = [];
|
||||||
unset($oppbatlog);
|
$oppbatlog = [];
|
||||||
unset($oppbatres);
|
$oppbatres = [];
|
||||||
// 공격 장수 병사 소진이나 쌀 소진시 실패 처리
|
// 공격 장수 병사 소진이나 쌀 소진시 실패 처리
|
||||||
} elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) {
|
} elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) {
|
||||||
if($myRice <= Util::round($general['crew']/100)) {
|
if($myRice <= Util::round($general['crew']/100)) {
|
||||||
@@ -1512,21 +1512,21 @@ function processWar($general, $city) {
|
|||||||
pushGenLog($oppose, $opplog);
|
pushGenLog($oppose, $opplog);
|
||||||
pushBatLog($oppose, $oppbatlog);
|
pushBatLog($oppose, $oppbatlog);
|
||||||
pushBatRes($oppose, $oppbatres);
|
pushBatRes($oppose, $oppbatres);
|
||||||
unset($opplog);
|
$opplog = [];
|
||||||
unset($oppbatlog);
|
$oppbatlog = [];
|
||||||
unset($oppbatres);
|
$oppbatres = [];
|
||||||
// $josaYi = JosaUtil::pick($general['name'], '이');
|
// $josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
// $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
// $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||||
// $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
// $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// 무승부일때 로그 남김
|
// 무승부일때 로그 남김
|
||||||
pushGenLog($oppose, $opplog);
|
pushGenLog($oppose, $opplog);
|
||||||
pushBatLog($oppose, $oppbatlog);
|
pushBatLog($oppose, $oppbatlog);
|
||||||
pushBatRes($oppose, $oppbatres);
|
pushBatRes($oppose, $oppbatres);
|
||||||
unset($opplog);
|
$opplog = [];
|
||||||
unset($oppbatlog);
|
$oppbatlog = [];
|
||||||
unset($oppbatres);
|
$oppbatres = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1812,7 +1812,11 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
|
|||||||
// 국가 백업
|
// 국가 백업
|
||||||
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $city['nation']);
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $city['nation']);
|
||||||
$oldNationGenerals = $db->query('SELECT * FROM general WHERE nation=%i', $city['nation']);
|
$oldNationGenerals = $db->query('SELECT * FROM general WHERE nation=%i', $city['nation']);
|
||||||
$oldNation['generals'] = $oldNationGenerals;
|
$oldNation['generals'] = array_map(function($gen){
|
||||||
|
//다른 코드와는 다르게 공용으로 쓰므로 남겨둠
|
||||||
|
return $gen['no'];
|
||||||
|
}, $oldNationGenerals);
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
foreach($oldNationGenerals as $gen){
|
foreach($oldNationGenerals as $gen){
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ function starter($name, $type=0) {
|
|||||||
<title><?=$name?></title>
|
<title><?=$name?></title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/base_map.js')?>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
@@ -973,7 +974,7 @@ function command_25($turn, $command) {
|
|||||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||||
$count = MYDB_num_rows($result);
|
$count = MYDB_num_rows($result);
|
||||||
|
|
||||||
$nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation ORDER BY rand()');
|
$nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg,gennum FROM nation ORDER BY rand()');
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
국가에 임관합니다.<br>
|
국가에 임관합니다.<br>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ class ResetHelper{
|
|||||||
'reason'=>'logs, data 디렉토리를 생성할 권한이 없습니다.'
|
'reason'=>'logs, data 디렉토리를 생성할 권한이 없습니다.'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
mkdir($servRoot.'/logs', 0644);
|
mkdir($servRoot.'/logs', 0755);
|
||||||
mkdir($servRoot.'/data', 0644);
|
mkdir($servRoot.'/data', 0755);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_writable($servRoot.'/logs')){
|
if(!is_writable($servRoot.'/logs')){
|
||||||
@@ -57,8 +57,8 @@ class ResetHelper{
|
|||||||
|
|
||||||
$serverID = DB::prefix().'_'.date("ymd").'_'.Util::randomStr(4);
|
$serverID = DB::prefix().'_'.date("ymd").'_'.Util::randomStr(4);
|
||||||
|
|
||||||
mkdir($servRoot.'/logs/'.$serverID, 0644);
|
mkdir($servRoot.'/logs/'.$serverID, 0755);
|
||||||
mkdir($servRoot.'/data/'.$serverID, 0644);
|
mkdir($servRoot.'/data/'.$serverID, 0755);
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
$servRoot.'/d_setting/UniqueConst.orig.php',
|
$servRoot.'/d_setting/UniqueConst.orig.php',
|
||||||
@@ -213,6 +213,7 @@ class ResetHelper{
|
|||||||
'date'=>$turntime,
|
'date'=>$turntime,
|
||||||
'winner_nation'=>null,
|
'winner_nation'=>null,
|
||||||
'scenario'=>$scenario,
|
'scenario'=>$scenario,
|
||||||
|
'scenario_name'=>$scenarioObj->getTitle(),
|
||||||
'env'=>Json::encode($env)
|
'env'=>Json::encode($env)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?=UniqueConst::$serverName?>: NPC빙의</title>
|
<title><?=UniqueConst::$serverName?>: NPC빙의</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('../css/config.css')?>
|
<?=WebUtil::printCSS('../css/config.css')?>
|
||||||
@@ -32,7 +34,7 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation
|
|||||||
<?=WebUtil::printCSS('css/select_npc.css')?>
|
<?=WebUtil::printCSS('css/select_npc.css')?>
|
||||||
|
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?=WebUtil::printJS('../js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/select_npc.js')?>
|
<?=WebUtil::printJS('js/select_npc.js')?>
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,14 @@ DROP TABLE IF EXISTS world_history;
|
|||||||
DROP TABLE IF EXISTS general_public_record;
|
DROP TABLE IF EXISTS general_public_record;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS reserved_open;
|
DROP TABLE IF EXISTS reserved_open;
|
||||||
|
CREATE TABLE `reserved_open` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`options` TEXT NULL DEFAULT NULL,
|
||||||
|
`date` DATETIME NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `date` (`date`)
|
||||||
|
)
|
||||||
|
DEFAULT CHARSET=utf8mb4
|
||||||
|
ENGINE=MyISAM;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS select_npc_token;
|
DROP TABLE IF EXISTS select_npc_token;
|
||||||
@@ -165,114 +165,275 @@ ENGINE=MyISAM;
|
|||||||
## 국가 테이블
|
## 국가 테이블
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
create table nation (
|
CREATE TABLE `nation` (
|
||||||
nation int(6) not null auto_increment,
|
`nation` INT(6) NOT NULL AUTO_INCREMENT,
|
||||||
`name` CHAR(64) NOT NULL COLLATE 'utf8mb4_bin',
|
`name` CHAR(64) NOT NULL COLLATE 'utf8mb4_bin',
|
||||||
color char(10) not null, can_change_flag int(1) default 1,
|
`color` CHAR(10) NOT NULL,
|
||||||
onlinegen varchar(1024) default '',
|
`can_change_flag` INT(1) NULL DEFAULT '1',
|
||||||
msg text default '',
|
`onlinegen` VARCHAR(1024) NULL DEFAULT '',
|
||||||
capital int(1) default 0, capset int(1) default 0,
|
`msg` TEXT NULL DEFAULT '',
|
||||||
gennum int(3) default 1,
|
`capital` INT(1) NULL DEFAULT '0',
|
||||||
gennum2 int(3) default 1,
|
`capset` INT(1) NULL DEFAULT '0',
|
||||||
chemi int(3) default 0,
|
`gennum` INT(3) NULL DEFAULT '1',
|
||||||
gold int(8) default 0,
|
`gennum2` INT(3) NULL DEFAULT '1',
|
||||||
rice int(8) default 0,
|
`chemi` INT(3) NULL DEFAULT '0',
|
||||||
bill int(3) default 0,
|
`gold` INT(8) NULL DEFAULT '0',
|
||||||
rate int(3) default 0,
|
`rice` INT(8) NULL DEFAULT '0',
|
||||||
rate_tmp int(3) default 0,
|
`bill` INT(3) NULL DEFAULT '0',
|
||||||
secretlimit int(2) default 3,
|
`rate` INT(3) NULL DEFAULT '0',
|
||||||
l12set int(1) default 0,
|
`rate_tmp` INT(3) NULL DEFAULT '0',
|
||||||
l11set int(1) default 0,
|
`secretlimit` INT(2) NULL DEFAULT '3',
|
||||||
l10set int(1) default 0,
|
`l12set` INT(1) NULL DEFAULT '0',
|
||||||
l9set int(1) default 0,
|
`l11set` INT(1) NULL DEFAULT '0',
|
||||||
l8set int(1) default 0,
|
`l10set` INT(1) NULL DEFAULT '0',
|
||||||
l7set int(1) default 0,
|
`l9set` INT(1) NULL DEFAULT '0',
|
||||||
l6set int(1) default 0,
|
`l8set` INT(1) NULL DEFAULT '0',
|
||||||
l5set int(1) default 0,
|
`l7set` INT(1) NULL DEFAULT '0',
|
||||||
scout int(1) default 0,
|
`l6set` INT(1) NULL DEFAULT '0',
|
||||||
war int(1) default 0,
|
`l5set` INT(1) NULL DEFAULT '0',
|
||||||
sabotagelimit int(4) default 36,
|
`scout` INT(1) NULL DEFAULT '0',
|
||||||
surlimit int(4) default 72,
|
`war` INT(1) NULL DEFAULT '0',
|
||||||
scoutmsg text default '',
|
`sabotagelimit` INT(4) NULL DEFAULT '36',
|
||||||
tech int(8) default 0, totaltech int(8) default 0,
|
`surlimit` INT(4) NULL DEFAULT '72',
|
||||||
power int(8) default 0,
|
`scoutmsg` TEXT NULL DEFAULT '',
|
||||||
spy char(255) default '',
|
`tech` INT(8) NULL DEFAULT '0',
|
||||||
level int(1) default 0,
|
`totaltech` INT(8) NULL DEFAULT '0',
|
||||||
type int(2) default 0,
|
`power` INT(8) NULL DEFAULT '0',
|
||||||
rule text default '',
|
`spy` CHAR(255) NULL DEFAULT '',
|
||||||
history mediumtext default '',
|
`level` INT(1) NULL DEFAULT '0',
|
||||||
board0 text default '', board0_who int(6) default 0, board0_when datetime,
|
`type` INT(2) NULL DEFAULT '0',
|
||||||
board1 text default '', board1_who int(6) default 0, board1_when datetime,
|
`rule` TEXT NULL DEFAULT '',
|
||||||
board2 text default '', board2_who int(6) default 0, board2_when datetime,
|
`history` MEDIUMTEXT NULL DEFAULT '',
|
||||||
board3 text default '', board3_who int(6) default 0, board3_when datetime,
|
`board0` TEXT NULL DEFAULT '',
|
||||||
board4 text default '', board4_who int(6) default 0, board4_when datetime,
|
`board0_who` INT(6) NULL DEFAULT '0',
|
||||||
board5 text default '', board5_who int(6) default 0, board5_when datetime,
|
`board0_when` DATETIME NULL DEFAULT NULL,
|
||||||
board6 text default '', board6_who int(6) default 0, board6_when datetime,
|
`board1` TEXT NULL DEFAULT '',
|
||||||
board7 text default '', board7_who int(6) default 0, board7_when datetime,
|
`board1_who` INT(6) NULL DEFAULT '0',
|
||||||
board8 text default '', board8_who int(6) default 0, board8_when datetime,
|
`board1_when` DATETIME NULL DEFAULT NULL,
|
||||||
board9 text default '', board9_who int(6) default 0, board9_when datetime,
|
`board2` TEXT NULL DEFAULT '',
|
||||||
board10 text default '', board10_who int(6) default 0, board10_when datetime,
|
`board2_who` INT(6) NULL DEFAULT '0',
|
||||||
board11 text default '', board11_who int(6) default 0, board11_when datetime,
|
`board2_when` DATETIME NULL DEFAULT NULL,
|
||||||
board12 text default '', board12_who int(6) default 0, board12_when datetime,
|
`board3` TEXT NULL DEFAULT '',
|
||||||
board13 text default '', board13_who int(6) default 0, board13_when datetime,
|
`board3_who` INT(6) NULL DEFAULT '0',
|
||||||
board14 text default '', board14_who int(6) default 0, board14_when datetime,
|
`board3_when` DATETIME NULL DEFAULT NULL,
|
||||||
board15 text default '', board15_who int(6) default 0, board15_when datetime,
|
`board4` TEXT NULL DEFAULT '',
|
||||||
board16 text default '', board16_who int(6) default 0, board16_when datetime,
|
`board4_who` INT(6) NULL DEFAULT '0',
|
||||||
board17 text default '', board17_who int(6) default 0, board17_when datetime,
|
`board4_when` DATETIME NULL DEFAULT NULL,
|
||||||
board18 text default '', board18_who int(6) default 0, board18_when datetime,
|
`board5` TEXT NULL DEFAULT '',
|
||||||
board19 text default '', board19_who int(6) default 0, board19_when datetime,
|
`board5_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard0 text default '', coreboard0_who int(6) default 0, coreboard0_when datetime,
|
`board5_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard1 text default '', coreboard1_who int(6) default 0, coreboard1_when datetime,
|
`board6` TEXT NULL DEFAULT '',
|
||||||
coreboard2 text default '', coreboard2_who int(6) default 0, coreboard2_when datetime,
|
`board6_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard3 text default '', coreboard3_who int(6) default 0, coreboard3_when datetime,
|
`board6_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard4 text default '', coreboard4_who int(6) default 0, coreboard4_when datetime,
|
`board7` TEXT NULL DEFAULT '',
|
||||||
coreboard5 text default '', coreboard5_who int(6) default 0, coreboard5_when datetime,
|
`board7_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard6 text default '', coreboard6_who int(6) default 0, coreboard6_when datetime,
|
`board7_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard7 text default '', coreboard7_who int(6) default 0, coreboard7_when datetime,
|
`board8` TEXT NULL DEFAULT '',
|
||||||
coreboard8 text default '', coreboard8_who int(6) default 0, coreboard8_when datetime,
|
`board8_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard9 text default '', coreboard9_who int(6) default 0, coreboard9_when datetime,
|
`board8_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard10 text default '', coreboard10_who int(6) default 0, coreboard10_when datetime,
|
`board9` TEXT NULL DEFAULT '',
|
||||||
coreboard11 text default '', coreboard11_who int(6) default 0, coreboard11_when datetime,
|
`board9_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard12 text default '', coreboard12_who int(6) default 0, coreboard12_when datetime,
|
`board9_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard13 text default '', coreboard13_who int(6) default 0, coreboard13_when datetime,
|
`board10` TEXT NULL DEFAULT '',
|
||||||
coreboard14 text default '', coreboard14_who int(6) default 0, coreboard14_when datetime,
|
`board10_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard15 text default '', coreboard15_who int(6) default 0, coreboard15_when datetime,
|
`board10_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard16 text default '', coreboard16_who int(6) default 0, coreboard16_when datetime,
|
`board11` TEXT NULL DEFAULT '',
|
||||||
coreboard17 text default '', coreboard17_who int(6) default 0, coreboard17_when datetime,
|
`board11_who` INT(6) NULL DEFAULT '0',
|
||||||
coreboard18 text default '', coreboard18_who int(6) default 0, coreboard18_when datetime,
|
`board11_when` DATETIME NULL DEFAULT NULL,
|
||||||
coreboard19 text default '', coreboard19_who int(6) default 0, coreboard19_when datetime,
|
`board12` TEXT NULL DEFAULT '',
|
||||||
boardindex int(2) default 19,
|
`board12_who` INT(6) NULL DEFAULT '0',
|
||||||
coreindex int(2) default 19,
|
`board12_when` DATETIME NULL DEFAULT NULL,
|
||||||
l12term int(4) default 0, l11term int(4) default 0, l10term int(4) default 0, l9term int(4) default 0,
|
`board13` TEXT NULL DEFAULT '',
|
||||||
l12turn0 char(14) default '00000000000099', l11turn0 char(14) default '00000000000099', l10turn0 char(14) default '00000000000099', l9turn0 char(14) default '00000000000099',
|
`board13_who` INT(6) NULL DEFAULT '0',
|
||||||
l12turn1 char(14) default '00000000000099', l11turn1 char(14) default '00000000000099', l10turn1 char(14) default '00000000000099', l9turn1 char(14) default '00000000000099',
|
`board13_when` DATETIME NULL DEFAULT NULL,
|
||||||
l12turn2 char(14) default '00000000000099', l11turn2 char(14) default '00000000000099', l10turn2 char(14) default '00000000000099', l9turn2 char(14) default '00000000000099',
|
`board14` TEXT NULL DEFAULT '',
|
||||||
l12turn3 char(14) default '00000000000099', l11turn3 char(14) default '00000000000099', l10turn3 char(14) default '00000000000099', l9turn3 char(14) default '00000000000099',
|
`board14_who` INT(6) NULL DEFAULT '0',
|
||||||
l12turn4 char(14) default '00000000000099', l11turn4 char(14) default '00000000000099', l10turn4 char(14) default '00000000000099', l9turn4 char(14) default '00000000000099',
|
`board14_when` DATETIME NULL DEFAULT NULL,
|
||||||
l12turn5 char(14) default '00000000000099', l11turn5 char(14) default '00000000000099', l10turn5 char(14) default '00000000000099', l9turn5 char(14) default '00000000000099',
|
`board15` TEXT NULL DEFAULT '',
|
||||||
l12turn6 char(14) default '00000000000099', l11turn6 char(14) default '00000000000099', l10turn6 char(14) default '00000000000099', l9turn6 char(14) default '00000000000099',
|
`board15_who` INT(6) NULL DEFAULT '0',
|
||||||
l12turn7 char(14) default '00000000000099', l11turn7 char(14) default '00000000000099', l10turn7 char(14) default '00000000000099', l9turn7 char(14) default '00000000000099',
|
`board15_when` DATETIME NULL DEFAULT NULL,
|
||||||
l12turn8 char(14) default '00000000000099', l11turn8 char(14) default '00000000000099', l10turn8 char(14) default '00000000000099', l9turn8 char(14) default '00000000000099',
|
`board16` TEXT NULL DEFAULT '',
|
||||||
l12turn9 char(14) default '00000000000099', l11turn9 char(14) default '00000000000099', l10turn9 char(14) default '00000000000099', l9turn9 char(14) default '00000000000099',
|
`board16_who` INT(6) NULL DEFAULT '0',
|
||||||
l12turn10 char(14) default '00000000000099', l11turn10 char(14) default '00000000000099', l10turn10 char(14) default '00000000000099', l9turn10 char(14) default '00000000000099',
|
`board16_when` DATETIME NULL DEFAULT NULL,
|
||||||
l12turn11 char(14) default '00000000000099', l11turn11 char(14) default '00000000000099', l10turn11 char(14) default '00000000000099', l9turn11 char(14) default '00000000000099',
|
`board17` TEXT NULL DEFAULT '',
|
||||||
|
`board17_who` INT(6) NULL DEFAULT '0',
|
||||||
l8term int(4) default 0, l7term int(4) default 0, l6term int(4) default 0, l5term int(4) default 0,
|
`board17_when` DATETIME NULL DEFAULT NULL,
|
||||||
l8turn0 char(14) default '00000000000099', l7turn0 char(14) default '00000000000099', l6turn0 char(14) default '00000000000099', l5turn0 char(14) default '00000000000099',
|
`board18` TEXT NULL DEFAULT '',
|
||||||
l8turn1 char(14) default '00000000000099', l7turn1 char(14) default '00000000000099', l6turn1 char(14) default '00000000000099', l5turn1 char(14) default '00000000000099',
|
`board18_who` INT(6) NULL DEFAULT '0',
|
||||||
l8turn2 char(14) default '00000000000099', l7turn2 char(14) default '00000000000099', l6turn2 char(14) default '00000000000099', l5turn2 char(14) default '00000000000099',
|
`board18_when` DATETIME NULL DEFAULT NULL,
|
||||||
l8turn3 char(14) default '00000000000099', l7turn3 char(14) default '00000000000099', l6turn3 char(14) default '00000000000099', l5turn3 char(14) default '00000000000099',
|
`board19` TEXT NULL DEFAULT '',
|
||||||
l8turn4 char(14) default '00000000000099', l7turn4 char(14) default '00000000000099', l6turn4 char(14) default '00000000000099', l5turn4 char(14) default '00000000000099',
|
`board19_who` INT(6) NULL DEFAULT '0',
|
||||||
l8turn5 char(14) default '00000000000099', l7turn5 char(14) default '00000000000099', l6turn5 char(14) default '00000000000099', l5turn5 char(14) default '00000000000099',
|
`board19_when` DATETIME NULL DEFAULT NULL,
|
||||||
l8turn6 char(14) default '00000000000099', l7turn6 char(14) default '00000000000099', l6turn6 char(14) default '00000000000099', l5turn6 char(14) default '00000000000099',
|
`coreboard0` TEXT NULL DEFAULT '',
|
||||||
l8turn7 char(14) default '00000000000099', l7turn7 char(14) default '00000000000099', l6turn7 char(14) default '00000000000099', l5turn7 char(14) default '00000000000099',
|
`coreboard0_who` INT(6) NULL DEFAULT '0',
|
||||||
l8turn8 char(14) default '00000000000099', l7turn8 char(14) default '00000000000099', l6turn8 char(14) default '00000000000099', l5turn8 char(14) default '00000000000099',
|
`coreboard0_when` DATETIME NULL DEFAULT NULL,
|
||||||
l8turn9 char(14) default '00000000000099', l7turn9 char(14) default '00000000000099', l6turn9 char(14) default '00000000000099', l5turn9 char(14) default '00000000000099',
|
`coreboard1` TEXT NULL DEFAULT '',
|
||||||
l8turn10 char(14) default '00000000000099', l7turn10 char(14) default '00000000000099', l6turn10 char(14) default '00000000000099', l5turn10 char(14) default '00000000000099',
|
`coreboard1_who` INT(6) NULL DEFAULT '0',
|
||||||
l8turn11 char(14) default '00000000000099', l7turn11 char(14) default '00000000000099', l6turn11 char(14) default '00000000000099', l5turn11 char(14) default '00000000000099',
|
`coreboard1_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard2` TEXT NULL DEFAULT '',
|
||||||
PRIMARY KEY (nation)
|
`coreboard2_who` INT(6) NULL DEFAULT '0',
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
`coreboard2_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard3` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard3_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard3_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard4` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard4_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard4_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard5` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard5_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard5_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard6` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard6_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard6_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard7` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard7_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard7_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard8` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard8_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard8_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard9` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard9_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard9_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard10` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard10_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard10_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard11` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard11_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard11_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard12` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard12_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard12_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard13` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard13_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard13_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard14` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard14_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard14_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard15` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard15_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard15_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard16` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard16_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard16_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard17` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard17_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard17_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard18` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard18_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard18_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`coreboard19` TEXT NULL DEFAULT '',
|
||||||
|
`coreboard19_who` INT(6) NULL DEFAULT '0',
|
||||||
|
`coreboard19_when` DATETIME NULL DEFAULT NULL,
|
||||||
|
`boardindex` INT(2) NULL DEFAULT '19',
|
||||||
|
`coreindex` INT(2) NULL DEFAULT '19',
|
||||||
|
`l12term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l11term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l10term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l9term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l12turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l12turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l11turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l10turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l9turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l7term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l6term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l5term` INT(4) NULL DEFAULT '0',
|
||||||
|
`l8turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn0` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn1` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn2` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn3` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn4` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn5` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn6` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn7` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn8` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn9` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn10` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l8turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l7turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l6turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`l5turn11` CHAR(14) NULL DEFAULT '00000000000099',
|
||||||
|
`aux` TEXT NOT NULL DEFAULT '{}',
|
||||||
|
PRIMARY KEY (`nation`)
|
||||||
|
)
|
||||||
|
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## 도시 테이블
|
## 도시 테이블
|
||||||
@@ -363,7 +524,7 @@ ENGINE=InnoDB;
|
|||||||
## 명전 테이블
|
## 명전 테이블
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
CREATE TABLE `ng_hall` (
|
CREATE TABLE IF NOT EXISTS `ng_hall` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`server_id` CHAR(20) NOT NULL,
|
`server_id` CHAR(20) NOT NULL,
|
||||||
`scenario` INT(11) NOT NULL,
|
`scenario` INT(11) NOT NULL,
|
||||||
@@ -385,12 +546,13 @@ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
|
|||||||
## 왕조 테이블
|
## 왕조 테이블
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
CREATE TABLE if not exists `ng_games` (
|
CREATE TABLE IF NOT EXISTS `ng_games` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`server_id` CHAR(20) NOT NULL,
|
`server_id` CHAR(20) NOT NULL,
|
||||||
`date` DATETIME NOT NULL,
|
`date` DATETIME NOT NULL,
|
||||||
`winner_nation` INT(11) NULL DEFAULT NULL,
|
`winner_nation` INT(11) NULL DEFAULT NULL,
|
||||||
`scenario` INT(11) NOT NULL,
|
`scenario` INT(11) NOT NULL,
|
||||||
|
`scenario_name` TEXT NOT NULL,
|
||||||
`env` TEXT NOT NULL COMMENT 'json',
|
`env` TEXT NOT NULL COMMENT 'json',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `server_id` (`server_id`),
|
UNIQUE INDEX `server_id` (`server_id`),
|
||||||
@@ -398,7 +560,7 @@ CREATE TABLE if not exists `ng_games` (
|
|||||||
)
|
)
|
||||||
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
CREATE TABLE `ng_old_nations` (
|
CREATE TABLE IF NOT EXISTS `ng_old_nations` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`server_id` CHAR(20) NOT NULL DEFAULT '0',
|
`server_id` CHAR(20) NOT NULL DEFAULT '0',
|
||||||
`nation` INT(11) NOT NULL DEFAULT '0',
|
`nation` INT(11) NOT NULL DEFAULT '0',
|
||||||
@@ -409,42 +571,67 @@ CREATE TABLE `ng_old_nations` (
|
|||||||
)
|
)
|
||||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
|
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
|
||||||
|
|
||||||
create table if not exists emperior (
|
CREATE TABLE IF NOT EXISTS `ng_old_generals` (
|
||||||
no int(6) not null auto_increment,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
phase char(255) default '',
|
`server_id` CHAR(20) NOT NULL,
|
||||||
nation_count char(64) default '',
|
`general_no` INT(11) NOT NULL,
|
||||||
nation_name text default '',
|
`owner` INT(11) NULL DEFAULT NULL,
|
||||||
nation_hist text default '',
|
`name` VARCHAR(32) NOT NULL,
|
||||||
gen_count char(64) default '',
|
`last_yearmonth` INT(11) NOT NULL,
|
||||||
personal_hist text default '',
|
`turntime` DATETIME NOT NULL,
|
||||||
special_hist text default '',
|
`data` MEDIUMTEXT NOT NULL,
|
||||||
name char(64) default '',
|
PRIMARY KEY (`id`),
|
||||||
type char(64) default '',
|
UNIQUE INDEX `by_no` (`server_id`, `general_no`),
|
||||||
color char(7) default '',
|
INDEX `by_name` (`server_id`, `name`),
|
||||||
year int(4) default 0,
|
INDEX `owner` (`owner`, `server_id`)
|
||||||
month int(2) default 0,
|
)
|
||||||
power int(8) default 0,
|
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
|
||||||
gennum int(3) default 0,
|
|
||||||
citynum int(3) default 0,
|
|
||||||
pop char(255) default 0,
|
|
||||||
poprate char(255) default '',
|
|
||||||
gold int(9) default 0,
|
|
||||||
rice int(9) default 0,
|
|
||||||
l12name char(64) default '', l12pic char(32) default '',
|
|
||||||
l11name char(64) default '', l11pic char(32) default '',
|
|
||||||
l10name char(64) default '', l10pic char(32) default '',
|
|
||||||
l9name char(64) default '', l9pic char(32) default '',
|
|
||||||
l8name char(64) default '', l8pic char(32) default '',
|
|
||||||
l7name char(64) default '', l7pic char(32) default '',
|
|
||||||
l6name char(64) default '', l6pic char(32) default '',
|
|
||||||
l5name char(64) default '', l5pic char(32) default '',
|
|
||||||
tiger char(64) default '',
|
|
||||||
eagle char(64) default '',
|
|
||||||
gen text default '',
|
|
||||||
history mediumtext default '',
|
|
||||||
|
|
||||||
PRIMARY KEY (no)
|
CREATE TABLE IF NOT EXISTS `emperior` (
|
||||||
) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8mb4;
|
`no` INT(6) NOT NULL AUTO_INCREMENT,
|
||||||
|
`server_id` CHAR(20) NULL DEFAULT '',
|
||||||
|
`phase` CHAR(255) NULL DEFAULT '',
|
||||||
|
`nation_count` CHAR(64) NULL DEFAULT '',
|
||||||
|
`nation_name` TEXT NULL DEFAULT '',
|
||||||
|
`nation_hist` TEXT NULL DEFAULT '',
|
||||||
|
`gen_count` CHAR(64) NULL DEFAULT '',
|
||||||
|
`personal_hist` TEXT NULL DEFAULT '',
|
||||||
|
`special_hist` TEXT NULL DEFAULT '',
|
||||||
|
`name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`type` CHAR(64) NULL DEFAULT '',
|
||||||
|
`color` CHAR(7) NULL DEFAULT '',
|
||||||
|
`year` INT(4) NULL DEFAULT '0',
|
||||||
|
`month` INT(2) NULL DEFAULT '0',
|
||||||
|
`power` INT(8) NULL DEFAULT '0',
|
||||||
|
`gennum` INT(3) NULL DEFAULT '0',
|
||||||
|
`citynum` INT(3) NULL DEFAULT '0',
|
||||||
|
`pop` CHAR(255) NULL DEFAULT '0',
|
||||||
|
`poprate` CHAR(255) NULL DEFAULT '',
|
||||||
|
`gold` INT(9) NULL DEFAULT '0',
|
||||||
|
`rice` INT(9) NULL DEFAULT '0',
|
||||||
|
`l12name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l12pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l11name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l11pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l10name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l10pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l9name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l9pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l8name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l8pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l7name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l7pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l6name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l6pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`l5name` CHAR(64) NULL DEFAULT '',
|
||||||
|
`l5pic` CHAR(32) NULL DEFAULT '',
|
||||||
|
`tiger` CHAR(64) NULL DEFAULT '',
|
||||||
|
`eagle` CHAR(64) NULL DEFAULT '',
|
||||||
|
`gen` TEXT NULL DEFAULT '',
|
||||||
|
`history` MEDIUMTEXT NULL DEFAULT '',
|
||||||
|
`aux` MEDIUMTEXT NULL DEFAULT '' COMMENT 'json',
|
||||||
|
PRIMARY KEY (`no`)
|
||||||
|
) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## 외교 테이블
|
## 외교 테이블
|
||||||
@@ -512,27 +699,28 @@ create table auction (
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
## 통계 테이블
|
## 통계 테이블
|
||||||
###########################################################################
|
###########################################################################
|
||||||
create table statistic (
|
CREATE TABLE `statistic` (
|
||||||
no int(6) not null auto_increment,
|
`no` INT(6) NOT NULL AUTO_INCREMENT,
|
||||||
year int(4) default 0,
|
`year` INT(4) NULL DEFAULT '0',
|
||||||
month int(2) default 0,
|
`month` INT(2) NULL DEFAULT '0',
|
||||||
nation_count int(2) default 0,
|
`nation_count` INT(2) NULL DEFAULT '0',
|
||||||
nation_name text default '',
|
`nation_name` TEXT NULL DEFAULT '',
|
||||||
nation_hist text default '',
|
`nation_hist` TEXT NULL DEFAULT '',
|
||||||
gen_count varchar(32) default '',
|
`gen_count` VARCHAR(32) NULL DEFAULT '',
|
||||||
personal_hist text default '',
|
`personal_hist` TEXT NULL DEFAULT '',
|
||||||
special_hist text default '',
|
`special_hist` TEXT NULL DEFAULT '',
|
||||||
power_hist text default '',
|
`power_hist` TEXT NULL DEFAULT '',
|
||||||
crewtype text default '',
|
`crewtype` TEXT NULL DEFAULT '',
|
||||||
etc text default '',
|
`etc` TEXT NULL DEFAULT '',
|
||||||
|
`aux` TEXT NULL DEFAULT '' COMMENT 'json',
|
||||||
PRIMARY KEY (no)
|
PRIMARY KEY (`no`)
|
||||||
) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8mb4;
|
)
|
||||||
|
ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## 연감 테이블
|
## 연감 테이블
|
||||||
###########################################################################
|
###########################################################################
|
||||||
CREATE TABLE if not exists `history` (
|
CREATE TABLE IF NOT EXISTS `history` (
|
||||||
`no` INT(6) NOT NULL AUTO_INCREMENT,
|
`no` INT(6) NOT NULL AUTO_INCREMENT,
|
||||||
`server_id` CHAR(20) NOT NULL DEFAULT '',
|
`server_id` CHAR(20) NOT NULL DEFAULT '',
|
||||||
`year` INT(4) NULL DEFAULT '0',
|
`year` INT(4) NULL DEFAULT '0',
|
||||||
@@ -591,7 +779,7 @@ ENGINE=InnoDB
|
|||||||
|
|
||||||
######
|
######
|
||||||
# 예약 오픈 테이블
|
# 예약 오픈 테이블
|
||||||
CREATE TABLE `reserved_open` (
|
CREATE TABLE IF NOT EXISTS `reserved_open` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`options` TEXT NULL DEFAULT NULL,
|
`options` TEXT NULL DEFAULT NULL,
|
||||||
`date` DATETIME NULL DEFAULT NULL,
|
`date` DATETIME NULL DEFAULT NULL,
|
||||||
@@ -620,7 +808,7 @@ ENGINE=MyISAM;
|
|||||||
###################
|
###################
|
||||||
# KV storage
|
# KV storage
|
||||||
###################
|
###################
|
||||||
CREATE TABLE if not exists `storage` (
|
CREATE TABLE IF NOT EXISTS `storage` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`namespace` VARCHAR(40) NOT NULL,
|
`namespace` VARCHAR(40) NOT NULL,
|
||||||
`key` VARCHAR(40) NOT NULL,
|
`key` VARCHAR(40) NOT NULL,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>에러</title>
|
<title>에러</title>
|
||||||
|
|
||||||
<link type="text/css" rel="stylesheet" href='../d_shared/common.css'>
|
<link type="text/css" rel="stylesheet" href='../d_shared/common.css'>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
>
|
>
|
||||||
<td style="width:130px;text-align:center;"
|
<td style="width:130px;text-align:center;"
|
||||||
><?=$nation['name']?></td>
|
><?=$nation['name']?></td>
|
||||||
<td style="width:870px;max-width:870px;max-height:200px;overflow:hidden;"
|
<td><div style="width:870px;max-width:870px;max-height:200px;overflow:hidden;"
|
||||||
><?=$nation['scoutmsg']?:'-'?></td>
|
><?=$nation['scoutmsg']?:'-'?></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<table width=1000 class='tb_layout bg2' style="margin:auto;margin-top:20px;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:98px;" />
|
||||||
|
<col style="width:238px;" />
|
||||||
|
<col style="width:98px;" />
|
||||||
|
<col style="width:238px;" />
|
||||||
|
<col style="width:98px;" />
|
||||||
|
<col style="width:238px;" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td colspan=8 style="color:<?=$this->newColor($color)?>; background-color:<?=$color?>; text-align:center;"
|
||||||
|
>【 <?=$name?> 】</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody style="text-align:center;">
|
||||||
|
<tr>
|
||||||
|
<td class="bg1">성향</td>
|
||||||
|
<td><?=$typeName?></td>
|
||||||
|
<td class="bg1">-</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td class="bg1">일자</td>
|
||||||
|
<td><?=$date?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bg1">최종 작위</td>
|
||||||
|
<td><?=$levelName?></td>
|
||||||
|
<td class="bg1">최종 장수 수</td>
|
||||||
|
<td><?=count($generals)?>명</td>
|
||||||
|
<td class="bg1">기술력</td>
|
||||||
|
<td><?=$tech?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bg1">최대 영토 수</td>
|
||||||
|
<td><?=count($maxCities??[])?></td>
|
||||||
|
<td class="bg1">최대 병력 수</td>
|
||||||
|
<td><?=$maxCrew??0?>명</td>
|
||||||
|
<td class="bg1">최대 국력</td>
|
||||||
|
<td><?=$maxPower??0?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign=top class="bg1"> 최대영토</td>
|
||||||
|
<td colspan=5><?=join(', ',$maxCities??[])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign=top class="bg1"> 장수명단</td>
|
||||||
|
<td colspan=5>
|
||||||
|
<?php foreach($generalsFull as $general): ?>
|
||||||
|
<?=$general['name']?>,
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign=top class="bg1">국가열전</td>
|
||||||
|
<td colspan=5 class='bg0' style="text-align:left;"><?=$this->ConvertLog($history)?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -7,6 +7,8 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>유저 관리</title>
|
<title>유저 관리</title>
|
||||||
|
|
||||||
<!-- 스타일 -->
|
<!-- 스타일 -->
|
||||||
@@ -14,7 +16,7 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('../css/admin_member.css')?>
|
<?=WebUtil::printCSS('../css/admin_member.css')?>
|
||||||
|
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?=WebUtil::printJS('../js/common.js')?>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ $acl = $session->acl;
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>서버목록</title>
|
<title>서버목록</title>
|
||||||
|
|
||||||
<!-- 스타일 -->
|
<!-- 스타일 -->
|
||||||
@@ -28,7 +30,7 @@ $acl = $session->acl;
|
|||||||
|
|
||||||
<!-- 액션 -->
|
<!-- 액션 -->
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?=WebUtil::printJS('../js/common.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../js/func.js')?>
|
<?=WebUtil::printJS('../js/func.js')?>
|
||||||
<?=WebUtil::printJS('../js/entrance.js')?>
|
<?=WebUtil::printJS('../js/entrance.js')?>
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>계정 관리</title>
|
<title>계정 관리</title>
|
||||||
|
|
||||||
<!-- 스타일 -->
|
<!-- 스타일 -->
|
||||||
@@ -18,7 +20,7 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<!-- 액션 -->
|
<!-- 액션 -->
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?=WebUtil::printJS('../js/common.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||||
<?=WebUtil::printJS('../js/func.js')?>
|
<?=WebUtil::printJS('../js/func.js')?>
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ $category = Util::getReq('category', 'int', 0);
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>튜토리얼</title>
|
<title>튜토리얼</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ if($sel == 0) $sel = 1;
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>스크린샷</title>
|
<title>스크린샷</title>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ if ($session->isLoggedIn()) {
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>삼국지 모의전투 HiDCHe</title>
|
<title>삼국지 모의전투 HiDCHe</title>
|
||||||
<?=WebUtil::printJS('e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('e_lib/sha512.min.js')?>
|
<?=WebUtil::printJS('e_lib/sha512.min.js')?>
|
||||||
@@ -58,7 +59,7 @@ function getOAuthToken(mode, scope_list){
|
|||||||
url += '&scope='+scope_list;
|
url += '&scope='+scope_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.open(url,"KakaoAccountLogin","width=600,height=450");
|
window.open(url,"KakaoAccountLogin","width=600,height=450,resizable=yes,scrollbars=yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendTempPasswordToKakaoTalk(){
|
function sendTempPasswordToKakaoTalk(){
|
||||||
@@ -172,6 +173,6 @@ function postOAuthResult(result){
|
|||||||
</div>
|
</div>
|
||||||
<div id="bottom_box">
|
<div id="bottom_box">
|
||||||
<div class="container"><a href="terms.2.html">개인정보처리방침</a> & <a href="terms.1.html">이용약관</a><br>© 2018 • HideD
|
<div class="container"><a href="terms.2.html">개인정보처리방침</a> & <a href="terms.1.html">이용약관</a><br>© 2018 • HideD
|
||||||
</div></div>
|
<br>크롬과 파이어폭스에 최적화되어있습니다.</div></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -10,9 +10,10 @@ use \kakao\KakaoKey as KakaoKey;
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>카카오 로그인하기</title>
|
<title>카카오 로그인하기</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var oauthMode = null;
|
var oauthMode = null;
|
||||||
@@ -27,7 +28,7 @@ function getOAuthToken(mode='login', scope_list = null){
|
|||||||
url += '&scope='+scope_list;
|
url += '&scope='+scope_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.open(url,"KakaoAccountLogin","width=600,height=450");
|
window.open(url,"KakaoAccountLogin","width=600,height=450,resizable=yes,scrollbars=yes");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ if($canJoin != 'Y'){
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>회원가입</title>
|
<title>회원가입</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ else{
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<script>
|
<script>
|
||||||
opener.location.href="javascript:postOAuthResult('<?=$oauth_mode?>');";
|
opener.location.href="javascript:postOAuthResult('<?=$oauth_mode?>');";
|
||||||
window.close();
|
window.close();
|
||||||
|
|||||||