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 |
@@ -89,4 +89,78 @@ input.with_skin:disabled {
|
||||
|
||||
caption.section_title {
|
||||
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">
|
||||
<head>
|
||||
<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>
|
||||
<?=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/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||
|
||||
@@ -11,7 +11,9 @@ if($session->userGrade < 4) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -38,7 +40,9 @@ $plock = MYDB_fetch_array($result);
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -34,7 +36,9 @@ $admin = getAdmin();
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -32,7 +34,9 @@ $db = DB::db();
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -12,7 +12,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -35,7 +37,9 @@ $conlimit = $gameStor->conlimit;
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -53,12 +57,7 @@ $conlimit = $gameStor->conlimit;
|
||||
echo "
|
||||
<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";
|
||||
$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);
|
||||
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
||||
$style = "style=;";
|
||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||
|
||||
@@ -25,7 +25,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -51,7 +53,9 @@ $sel2[$type2] = "selected";
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -19,7 +19,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -42,7 +44,9 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -23,7 +23,9 @@ if($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -49,7 +51,9 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -19,7 +19,9 @@ if ($session->userGrade < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
@@ -45,7 +47,9 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -1140,7 +1140,9 @@ switch($dex240) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -22,7 +22,9 @@ increaseRefresh("명장일람", 1);
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/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['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; }],
|
||||
["살 상 률", "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['dex10']; 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['dex40']; return $v; }],
|
||||
["전 력 전 승 률", "percent", function($v){$v['value'] = $v['ttw']/max(1, $v['ttw']+$v['ttd']+$v['ttl']); return $v; }],
|
||||
["통 솔 전 승 률", "percent", function($v){$v['value'] = $v['tlw']/max(1, $v['tlw']+$v['tld']+$v['tll']); return $v; }],
|
||||
["일 기 토 승 률", "percent", function($v){$v['value'] = $v['tpw']/max(1, $v['tpw']+$v['tpd']+$v['tpl']); return $v; }],
|
||||
["설 전 승 률", "percent", function($v){$v['value'] = $v['tiw']/max(1, $v['tiw']+$v['tid']+$v['til']); return $v; }],
|
||||
["전 력 전 승 률", "percent", function($v){
|
||||
$totalCnt = $v['ttw']+$v['ttd']+$v['ttl'];
|
||||
if($totalCnt < 50){
|
||||
$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['betwin']; 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) {
|
||||
@@ -112,10 +175,15 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
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);
|
||||
$value = $general['value'];
|
||||
|
||||
if($value > 0){
|
||||
$validCnt+=1;
|
||||
}
|
||||
|
||||
if($typeValue == 'percent'){
|
||||
$general['printValue'] = number_format($value*100, 2).'%';
|
||||
}
|
||||
@@ -130,9 +198,10 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||
return -($lhs['value'] <=> $rhs['value']);
|
||||
});
|
||||
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$typeName,
|
||||
'generals'=>array_slice($typeGenerals, 0, 10)
|
||||
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||
]);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -4,12 +4,7 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$select = Util::getReq('select', 'int', 0);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("왕조일람", 1);
|
||||
?>
|
||||
@@ -17,7 +12,9 @@ increaseRefresh("왕조일람", 1);
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
@@ -27,35 +24,57 @@ increaseRefresh("왕조일람", 1);
|
||||
<body>
|
||||
<table align=center width=1000 class="tb_layout bg0">
|
||||
<tr><td>역 대 왕 조<br>
|
||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
||||
<button onclick=window.close()>창 닫기</button><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
|
||||
if ($select == 0) {
|
||||
$query = "select * from emperior order by no desc";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$empcount = MYDB_num_rows($result);
|
||||
$showCurrentNation = true;
|
||||
|
||||
for ($i=0; $i < $empcount; $i++) {
|
||||
$emperior = MYDB_fetch_array($result);
|
||||
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
|
||||
|
||||
if($emperiors){
|
||||
$serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null);
|
||||
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 class='tb_layout bg0'>
|
||||
<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>
|
||||
<td bgcolor=skyblue align=center colspan=8>
|
||||
<form action=a_emperior.php method=get>
|
||||
<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?server_id=<?=$emperior['server_id']?>"><button type="button">역사 보기</button></a>
|
||||
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button>역사 보기</button></a>
|
||||
<?php endif ?>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -88,132 +107,10 @@ if ($select == 0) {
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
|
||||
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select);
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td bgcolor=skyblue align=center colspan=6>
|
||||
<form action=a_emperior.php method=get>
|
||||
<font size=5><?=$emperior['phase']?></font>
|
||||
<input type=submit value='전체보기'>
|
||||
</form>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -17,7 +17,9 @@ increaseRefresh("왕조일람", 2);
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/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>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/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')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -12,7 +12,7 @@ $db = DB::db();
|
||||
increaseRefresh("명예의전당", 1);
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
@@ -32,12 +32,14 @@ else{
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.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('js/hallOfFame.js')?>
|
||||
</head>
|
||||
@@ -92,10 +94,15 @@ foreach($types as $idx=>[$typeName, $typeValue]) {
|
||||
$hallResult = array_map(function($general)use($typeValue){
|
||||
$aux = Json::decode($general['aux']);
|
||||
$general += $aux;
|
||||
if(!key_exists('color', $general)){
|
||||
$general['bgColor'] = GameConst::$basecolor4;
|
||||
|
||||
if(!key_exists('bgColor', $general)){
|
||||
if(!key_exists('color', $general)){
|
||||
$general['bgColor'] = GameConst::$basecolor4;
|
||||
}
|
||||
else{
|
||||
$general['bgColor'] = $general['color'];
|
||||
}
|
||||
}
|
||||
|
||||
if(!key_exists('fgColor', $general)){
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ include "lib.php";
|
||||
include "func.php";
|
||||
$btn = Util::getReq('btn');
|
||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||
$serverID = Util::getReq('server_id', 'string', null);
|
||||
$serverID = Util::getReq('serverID', 'string', null);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
@@ -84,9 +84,11 @@ if ($month <= 0) {
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=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('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/base_map.js')?>
|
||||
@@ -157,7 +159,7 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist
|
||||
</table>
|
||||
<script>
|
||||
reloadWorldMap({
|
||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&server_id=<?=$serverID?>',
|
||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||
showMe:false,
|
||||
neutralView:true
|
||||
});
|
||||
|
||||
@@ -24,10 +24,14 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -26,8 +26,9 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<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::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('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/base_map.js')?>
|
||||
|
||||
@@ -50,7 +50,9 @@ if ($admin['maxonline'] < $curonline) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
<style>
|
||||
|
||||
@@ -28,7 +28,9 @@ $vote = $admin['vote']?:['-'];
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
<style>
|
||||
|
||||
@@ -56,7 +56,9 @@ if ($msg2 == "") {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -74,7 +74,9 @@ $sel[$type] = "selected";
|
||||
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
|
||||
|
||||
@@ -55,7 +55,9 @@ if($str3){
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -26,7 +26,9 @@ if($me['level'] < 5) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
|
||||
|
||||
@@ -77,7 +77,9 @@ for($i= $lv - 1; $i>=5; $i--){
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -33,7 +33,9 @@ $templates = new \League\Plates\Engine('templates');
|
||||
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
<style>
|
||||
|
||||
@@ -44,7 +44,9 @@ if ($me['level'] >= 5) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -75,8 +75,9 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
||||
<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::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('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/base_map.js')?>
|
||||
|
||||
@@ -50,11 +50,13 @@ $sel[$type] = "selected";
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -97,24 +99,28 @@ switch ($type) {
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$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>
|
||||
<td width=98 align=center id=bg1>이 름</td>
|
||||
<td width=98 align=center id=bg1>통무지</td>
|
||||
<td width=98 align=center id=bg1>부 대</td>
|
||||
<td width=58 align=center id=bg1>자 금</td>
|
||||
<td width=58 align=center id=bg1>군 량</td>
|
||||
<td width=48 align=center id=bg1>도시</td>
|
||||
<td width=28 align=center id=bg1>守</td>
|
||||
<td width=58 align=center id=bg1>병 종</td>
|
||||
<td width=68 align=center id=bg1>병 사</td>
|
||||
<td width=48 align=center id=bg1>훈련</td>
|
||||
<td width=48 align=center id=bg1>사기</td>
|
||||
<td width=148 align=center id=bg1>명 령</td>
|
||||
<td width=58 align=center id=bg1>삭턴</td>
|
||||
<td width=58 align=center id=bg1>턴</td>
|
||||
</tr>";
|
||||
<td width=98 align=center class=bg1>이 름</td>
|
||||
<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>
|
||||
<?php
|
||||
for ($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
$city = CityConst::byID($general['city'])->name;
|
||||
@@ -162,24 +168,24 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center>$name<br>Lv ".getExpLevel($general['experience'])."</td>
|
||||
<td align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||
<td align=center>$troop</td>
|
||||
<td align=center>{$general['gold']}</td>
|
||||
<td align=center>{$general['rice']}</td>
|
||||
<td align=center>$city</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 class='i_stat' align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||
<td class='i_troop' align=center>$troop</td>
|
||||
<td class='i_gold' align=center>{$general['gold']}</td>
|
||||
<td class='i_rice' align=center>{$general['rice']}</td>
|
||||
<td class='i_city' align=center>$city</td>
|
||||
<td align=center>$mode</td>
|
||||
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||
<td align=center>{$general['crew']}</td>
|
||||
<td align=center>{$general['train']}</td>
|
||||
<td align=center>{$general['atmos']}</td>";
|
||||
<td class='i_crewtype' align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||
<td class='i_crew' align=center>{$general['crew']}</td>
|
||||
<td class='i_train' align=center>{$general['train']}</td>
|
||||
<td class='i_atmos' align=center>{$general['atmos']}</td>";
|
||||
if ($general['npc'] >= 2) {
|
||||
echo "
|
||||
<td>
|
||||
<td class='i_action'>
|
||||
<font size=3>NPC 장수";
|
||||
} else {
|
||||
echo "
|
||||
<td>
|
||||
<td class='i_action'>
|
||||
<font size=1>";
|
||||
$turn = getTurn($general, 1, 0);
|
||||
|
||||
@@ -194,10 +200,11 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
</font>
|
||||
</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>";
|
||||
}
|
||||
echo "
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ if($meLevel == 0) {
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -36,10 +36,16 @@ $sel = [$type => "selected"];
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.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>
|
||||
|
||||
@@ -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><?=banner()?></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
<div id="helper_genlist" style="display:none;"></div>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ $sel = [$type => "selected"];
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -26,7 +26,9 @@ if($me['level'] == 0) {
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -77,7 +77,9 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -21,7 +21,9 @@ $me = MYDB_fetch_array($result);
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
|
||||
|
||||
@@ -16,7 +16,9 @@ increaseRefresh("국법", 1);
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
|
||||
|
||||
@@ -41,7 +41,9 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
||||
} ?>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
@@ -400,7 +402,7 @@ for($i=0;$i<16;$i+=1){
|
||||
}
|
||||
$bet = [];
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if($betting['bet'] == 0){
|
||||
if($betting["bet{$i}"] == 0){
|
||||
$bet[$i] = '∞';
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,14 @@ $troopcount = MYDB_num_rows($result);
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/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>
|
||||
|
||||
<body>
|
||||
@@ -36,7 +40,8 @@ $troopcount = MYDB_num_rows($result);
|
||||
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<form name=form1 method=post action=c_troop.php>
|
||||
<table class='tb_layout bg0'>
|
||||
<table id="troop_list" class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width=64 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=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $i < $troopcount; $i++) {
|
||||
$troop = MYDB_fetch_array($result);
|
||||
@@ -122,7 +129,8 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
<tr><td colspan=5>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</tbody>
|
||||
<tfoot>";
|
||||
if ($troopcount == 0) {
|
||||
}
|
||||
else if($me['troop'] == 0) {
|
||||
@@ -135,6 +143,7 @@ else if($me['troop'] == 0) {
|
||||
|
||||
echo "
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<br>";
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ $db = DB::db();
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
/* font-boostring Block */
|
||||
html * {max-height:1000000px;}
|
||||
|
||||
|
||||
html, body{
|
||||
background-color:black;
|
||||
color:white;
|
||||
line-height:1.3;
|
||||
font-family:'맑은 고딕';
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
table { font-family:'맑은 고딕'; }
|
||||
|
||||
@@ -1910,8 +1910,14 @@ function updateTurntime($no) {
|
||||
if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) {
|
||||
$general['killturn'] = ($general['deadyear'] - $admin['year']) * 12;
|
||||
$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'], '이');
|
||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>{$josaYi} <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
||||
@@ -2449,6 +2455,7 @@ function deleteNation($general) {
|
||||
$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']}'";
|
||||
|
||||
@@ -747,8 +747,9 @@ function command_Other($turn, $commandtype) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<script>
|
||||
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
||||
</script>
|
||||
|
||||
@@ -427,6 +427,15 @@ function postUpdateMonthly() {
|
||||
|
||||
$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";
|
||||
@@ -438,34 +447,33 @@ function postUpdateMonthly() {
|
||||
// 접속률
|
||||
// 숙련도
|
||||
// 명성,공헌
|
||||
$query = "
|
||||
select
|
||||
A.nation,
|
||||
A.gennum, A.gennum2, A.chemi,
|
||||
round((
|
||||
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
||||
+A.tech
|
||||
+if(A.level=0,0,(
|
||||
select round(
|
||||
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
|
||||
))
|
||||
+(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(experience+dedication)/100) from general where nation=A.nation)
|
||||
+(select round(avg(connect)) from general where nation=A.nation)
|
||||
)/10)
|
||||
as power
|
||||
from nation A
|
||||
group by A.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);
|
||||
$nations = $db->query('SELECT
|
||||
A.nation,
|
||||
A.gennum, A.gennum2, A.chemi, A.aux,
|
||||
round((
|
||||
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
||||
+A.tech
|
||||
+if(A.level=0,0,(
|
||||
select round(
|
||||
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
|
||||
))
|
||||
+(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(experience+dedication)/100) from general where nation=A.nation)
|
||||
+(select round(avg(connect)) from general where nation=A.nation)
|
||||
)/10)
|
||||
as power,
|
||||
(select sum(crew) from general where nation=A.nation) as totalCrew
|
||||
from nation A
|
||||
group by A.nation');
|
||||
foreach($nations as $nation) {
|
||||
$genNum[$nation['nation']] = $nation['gennum'];
|
||||
|
||||
$aux = Json::decode($nation['aux']);
|
||||
|
||||
|
||||
|
||||
if($nation['gennum'] > $nation['gennum2']) {
|
||||
// 장수가 증가했을때
|
||||
$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; }
|
||||
|
||||
//약간의 랜덤치 부여 (95% ~ 105%)
|
||||
|
||||
$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']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$aux['maxPower'] = max($aux['maxPower']??0, $nation['power']);
|
||||
$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']);
|
||||
}
|
||||
|
||||
// 전쟁기한 세팅
|
||||
@@ -690,6 +710,7 @@ function checkMerge() {
|
||||
$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년, 기술유지
|
||||
$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']}'";
|
||||
@@ -820,6 +841,7 @@ function checkSurrender() {
|
||||
$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;
|
||||
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
||||
@@ -1332,6 +1354,7 @@ function checkEmperior() {
|
||||
|
||||
$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']);
|
||||
@@ -1339,7 +1362,6 @@ function checkEmperior() {
|
||||
$db->insert('ng_old_nations', [
|
||||
'server_id'=>UniqueConst::$serverID,
|
||||
'nation'=>$nation['nation'],
|
||||
'history'=>'',
|
||||
'data'=>Json::encode($oldNation)
|
||||
]);
|
||||
|
||||
|
||||
@@ -156,7 +156,10 @@ function pushOldNationStop(int $no, int $nationNo){
|
||||
}
|
||||
|
||||
//DB-based
|
||||
function pushNationHistory($nation, $history) {
|
||||
function pushNationHistory($nation, ?string $history) {
|
||||
if(!$history){
|
||||
return;
|
||||
}
|
||||
if(!$nation || !$nation['nation']){
|
||||
return;
|
||||
}
|
||||
@@ -164,7 +167,10 @@ function pushNationHistory($nation, $history) {
|
||||
$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",
|
||||
$history.'<br>', $me['no']);
|
||||
}
|
||||
@@ -174,7 +180,7 @@ function getGeneralHistoryAll(int $no) {
|
||||
return ConvertLog($history);
|
||||
}
|
||||
|
||||
function pushWorldHistory(array $history, $year=null, $month=null) {
|
||||
function pushWorldHistory(?array $history, $year=null, $month=null) {
|
||||
if(!$history){
|
||||
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){
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ function printLimitMsg($turntime) {
|
||||
<html>
|
||||
<head>
|
||||
<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('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -1008,7 +1008,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
||||
$isWarUser = true;
|
||||
break;
|
||||
}
|
||||
if(Util::randF(0.2)){
|
||||
if(Util::randBool(0.2)){
|
||||
$isWarUser = false;
|
||||
break;
|
||||
}
|
||||
@@ -1206,7 +1206,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
||||
$score *= 4;
|
||||
}
|
||||
|
||||
if(Util::randF(0.3) && $frontImportantCitiesID){
|
||||
if(Util::randBool(0.3) && $frontImportantCitiesID){
|
||||
$targetCityID = Util::choiceRandom($frontImportantCitiesID);
|
||||
}
|
||||
else{
|
||||
@@ -1262,7 +1262,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
||||
if($targetCity['pop'] < 33000 + $nationGeneral['leader']){
|
||||
continue;
|
||||
}
|
||||
if (Util::randF($targetCity['pop'] / $targetCity['pop2'])) {
|
||||
if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,8 @@ $color = "cyan";
|
||||
<title><?=UniqueConst::$serverName?>: 메인</title>
|
||||
<meta charset="UTF-8">
|
||||
<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('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
@@ -27,7 +27,8 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<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/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
@@ -20,7 +20,8 @@ if($session->userGrade == 5){
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<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/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
@@ -6,6 +6,15 @@ include "func.php";
|
||||
|
||||
$db = DB::db();
|
||||
$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');
|
||||
|
||||
if(!$reserved){
|
||||
|
||||
@@ -13,7 +13,7 @@ $defaultPost = [
|
||||
'neutralView' => false,
|
||||
'showMe' => true
|
||||
];
|
||||
$post = WebUtil::parseJsonPost() + $defaultPost;
|
||||
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||
|
||||
if(!$session->isGameLoggedIn()){
|
||||
$post['neutralView'] = true;
|
||||
|
||||
@@ -6,7 +6,7 @@ include "func.php";
|
||||
|
||||
$year = Util::getReq('year', 'int');
|
||||
$month = Util::getReq('month', 'int');
|
||||
$serverID = Util::getReq('server_id', 'string', null);
|
||||
$serverID = Util::getReq('serverID', 'string', null);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ if (!$generalID) {
|
||||
]);
|
||||
}
|
||||
|
||||
$jsonPost = WebUtil::parseJsonPost();
|
||||
$jsonPost = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||
|
||||
$msgID = Util::toInt($jsonPost['msgID']??null);
|
||||
$msgResponse = $jsonPost['response']??null;
|
||||
|
||||
@@ -7,8 +7,7 @@ include('func.php');
|
||||
$session = Session::requireGameLogin([])->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$jsonPost = WebUtil::parseJsonPost();
|
||||
$reqSequence = (int)Util::array_get($jsonPost['sequence'], 0);
|
||||
$reqSequence = Util::getReq('sequence', 'int', 0);
|
||||
|
||||
|
||||
list($generalID, $nationID, $generalName) = DB::db()->queryFirstList(
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace sammo;
|
||||
include 'lib.php';
|
||||
include 'func.php';
|
||||
|
||||
$post = WebUtil::parseJsonPost();
|
||||
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||
'@phan-var mixed[] $post';
|
||||
|
||||
$v = new Validator($post);
|
||||
|
||||
@@ -31,7 +31,9 @@ $connect=$db->get();
|
||||
<html>
|
||||
<head>
|
||||
<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>
|
||||
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
||||
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
||||
@@ -39,7 +41,7 @@ var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../d_shared/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('js/join.js')?>
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ $rootDB->insert('member_log', [
|
||||
|
||||
?>
|
||||
<script>
|
||||
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n튜토리얼을 꼭 읽어보세요!');
|
||||
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n위키와 팁/강좌 게시판을 꼭 읽어보세요!');
|
||||
</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,
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
neutralView:option.neutralView,
|
||||
year:option.year,
|
||||
month:option.month,
|
||||
showMe:option.showMe,
|
||||
aux:option.aux
|
||||
})
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
neutralView:option.neutralView,
|
||||
year:option.year,
|
||||
month:option.month,
|
||||
showMe:option.showMe,
|
||||
aux:option.aux
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
deferred
|
||||
|
||||
@@ -34,11 +34,12 @@ function responseMessage(msgID, response){
|
||||
url: 'j_msg_decide_opt.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
msgID:msgID,
|
||||
response:response
|
||||
})
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
msgID:msgID,
|
||||
response:response
|
||||
})
|
||||
}
|
||||
}).then(refreshMsg);
|
||||
}
|
||||
|
||||
@@ -54,10 +55,9 @@ function fetchMsg(){
|
||||
url: 'j_msg_get_recent.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
data: {
|
||||
sequence:sequence
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -373,11 +373,12 @@ function activateMessageForm(){
|
||||
url:'j_msg_submit.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
mailbox:parseInt(targetMailbox),
|
||||
text:text
|
||||
})
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
mailbox:parseInt(targetMailbox),
|
||||
text:text
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
@@ -404,10 +405,6 @@ jQuery(function($){
|
||||
url:'j_basic_info.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
|
||||
})
|
||||
}).then(registerGlobal);
|
||||
|
||||
//sender_list.json 은 서버측에선 캐시 가능한 데이터임.
|
||||
@@ -415,10 +412,6 @@ jQuery(function($){
|
||||
url: 'j_msg_contact_list.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
var MessageList = fetchMsg();
|
||||
|
||||
@@ -146,9 +146,9 @@ function processWar($general, $city) {
|
||||
pushGenLog($general, $log);
|
||||
pushGeneralPublicRecord($alllog, $year, $month);
|
||||
pushWorldHistory($history);
|
||||
unset($log);
|
||||
unset($alllog);
|
||||
unset($history);
|
||||
$log = [];
|
||||
$alllog = [];
|
||||
$history= [];
|
||||
|
||||
//패퇴시 병량보충
|
||||
$destnation['rice'] += 500;
|
||||
@@ -602,14 +602,14 @@ function processWar($general, $city) {
|
||||
//특기보정 : 저격(수극), 활무기저격
|
||||
$snipe = false;
|
||||
$snipeItem = false;
|
||||
if(!$snipe && $general['special2'] == 70 && Util::randF(1/3)){
|
||||
if(!$snipe && $general['special2'] == 70 && Util::randBool(1/3)){
|
||||
$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;
|
||||
}
|
||||
if(!$snipe && $general['item'] == 2){
|
||||
if(Util::randF(1/5)){
|
||||
if(Util::randBool(1/5)){
|
||||
$snipe = true;
|
||||
$snipeItem = true;
|
||||
}
|
||||
@@ -642,14 +642,14 @@ function processWar($general, $city) {
|
||||
//특기보정 : 저격(수극), 활무기저격
|
||||
$snipe = false;
|
||||
$snipeItem = false;
|
||||
if(!$snipe && $oppose['special2'] == 70 && Util::randF(1/3)){
|
||||
if(!$snipe && $oppose['special2'] == 70 && Util::randBool(1/3)){
|
||||
$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;
|
||||
}
|
||||
if(!$snipe && $oppose['item'] == 2){
|
||||
if(Util::randF(1/5)){
|
||||
if(Util::randBool(1/5)){
|
||||
$snipe = true;
|
||||
$snipeItem = true;
|
||||
}
|
||||
@@ -1464,10 +1464,10 @@ function processWar($general, $city) {
|
||||
pushGenLog($oppose, $opplog);
|
||||
pushBatLog($oppose, $oppbatlog);
|
||||
pushBatRes($oppose, $oppbatres);
|
||||
unset($oppose);
|
||||
unset($opplog);
|
||||
unset($oppbatlog);
|
||||
unset($oppbatres);
|
||||
$oppose = null;
|
||||
$opplog = [];
|
||||
$oppbatlog = [];
|
||||
$oppbatres = [];
|
||||
// 공격 장수 병사 소진이나 쌀 소진시 실패 처리
|
||||
} elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) {
|
||||
if($myRice <= Util::round($general['crew']/100)) {
|
||||
@@ -1512,21 +1512,21 @@ function processWar($general, $city) {
|
||||
pushGenLog($oppose, $opplog);
|
||||
pushBatLog($oppose, $oppbatlog);
|
||||
pushBatRes($oppose, $oppbatres);
|
||||
unset($opplog);
|
||||
unset($oppbatlog);
|
||||
unset($oppbatres);
|
||||
// $josaYi = JosaUtil::pick($general['name'], '이');
|
||||
// $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||
// $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||
$opplog = [];
|
||||
$oppbatlog = [];
|
||||
$oppbatres = [];
|
||||
// $josaYi = JosaUtil::pick($general['name'], '이');
|
||||
// $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||
// $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
|
||||
break;
|
||||
} else {
|
||||
// 무승부일때 로그 남김
|
||||
pushGenLog($oppose, $opplog);
|
||||
pushBatLog($oppose, $oppbatlog);
|
||||
pushBatRes($oppose, $oppbatres);
|
||||
unset($opplog);
|
||||
unset($oppbatlog);
|
||||
unset($oppbatres);
|
||||
$opplog = [];
|
||||
$oppbatlog = [];
|
||||
$oppbatres = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1816,6 +1816,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
|
||||
//다른 코드와는 다르게 공용으로 쓰므로 남겨둠
|
||||
return $gen['no'];
|
||||
}, $oldNationGenerals);
|
||||
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||
|
||||
foreach($oldNationGenerals as $gen){
|
||||
|
||||
|
||||
@@ -123,7 +123,8 @@ function starter($name, $type=0) {
|
||||
<title><?=$name?></title>
|
||||
<meta charset="UTF-8">
|
||||
<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('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/base_map.js')?>
|
||||
|
||||
@@ -24,7 +24,9 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation
|
||||
<html>
|
||||
<head>
|
||||
<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('../d_shared/common.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::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/select_npc.js')?>
|
||||
|
||||
|
||||
@@ -41,5 +41,14 @@ DROP TABLE IF EXISTS world_history;
|
||||
DROP TABLE IF EXISTS general_public_record;
|
||||
|
||||
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;
|
||||
@@ -165,114 +165,275 @@ ENGINE=MyISAM;
|
||||
## 국가 테이블
|
||||
###########################################################################
|
||||
|
||||
create table nation (
|
||||
nation int(6) not null auto_increment,
|
||||
`name` CHAR(64) NOT NULL COLLATE 'utf8mb4_bin',
|
||||
color char(10) not null, can_change_flag int(1) default 1,
|
||||
onlinegen varchar(1024) default '',
|
||||
msg text default '',
|
||||
capital int(1) default 0, capset int(1) default 0,
|
||||
gennum int(3) default 1,
|
||||
gennum2 int(3) default 1,
|
||||
chemi int(3) default 0,
|
||||
gold int(8) default 0,
|
||||
rice int(8) default 0,
|
||||
bill int(3) default 0,
|
||||
rate int(3) default 0,
|
||||
rate_tmp int(3) default 0,
|
||||
secretlimit int(2) default 3,
|
||||
l12set int(1) default 0,
|
||||
l11set int(1) default 0,
|
||||
l10set int(1) default 0,
|
||||
l9set int(1) default 0,
|
||||
l8set int(1) default 0,
|
||||
l7set int(1) default 0,
|
||||
l6set int(1) default 0,
|
||||
l5set int(1) default 0,
|
||||
scout int(1) default 0,
|
||||
war int(1) default 0,
|
||||
sabotagelimit int(4) default 36,
|
||||
surlimit int(4) default 72,
|
||||
scoutmsg text default '',
|
||||
tech int(8) default 0, totaltech int(8) default 0,
|
||||
power int(8) default 0,
|
||||
spy char(255) default '',
|
||||
level int(1) default 0,
|
||||
type int(2) default 0,
|
||||
rule text default '',
|
||||
history mediumtext default '',
|
||||
board0 text default '', board0_who int(6) default 0, board0_when datetime,
|
||||
board1 text default '', board1_who int(6) default 0, board1_when datetime,
|
||||
board2 text default '', board2_who int(6) default 0, board2_when datetime,
|
||||
board3 text default '', board3_who int(6) default 0, board3_when datetime,
|
||||
board4 text default '', board4_who int(6) default 0, board4_when datetime,
|
||||
board5 text default '', board5_who int(6) default 0, board5_when datetime,
|
||||
board6 text default '', board6_who int(6) default 0, board6_when datetime,
|
||||
board7 text default '', board7_who int(6) default 0, board7_when datetime,
|
||||
board8 text default '', board8_who int(6) default 0, board8_when datetime,
|
||||
board9 text default '', board9_who int(6) default 0, board9_when datetime,
|
||||
board10 text default '', board10_who int(6) default 0, board10_when datetime,
|
||||
board11 text default '', board11_who int(6) default 0, board11_when datetime,
|
||||
board12 text default '', board12_who int(6) default 0, board12_when datetime,
|
||||
board13 text default '', board13_who int(6) default 0, board13_when datetime,
|
||||
board14 text default '', board14_who int(6) default 0, board14_when datetime,
|
||||
board15 text default '', board15_who int(6) default 0, board15_when datetime,
|
||||
board16 text default '', board16_who int(6) default 0, board16_when datetime,
|
||||
board17 text default '', board17_who int(6) default 0, board17_when datetime,
|
||||
board18 text default '', board18_who int(6) default 0, board18_when datetime,
|
||||
board19 text default '', board19_who int(6) default 0, board19_when datetime,
|
||||
coreboard0 text default '', coreboard0_who int(6) default 0, coreboard0_when datetime,
|
||||
coreboard1 text default '', coreboard1_who int(6) default 0, coreboard1_when datetime,
|
||||
coreboard2 text default '', coreboard2_who int(6) default 0, coreboard2_when datetime,
|
||||
coreboard3 text default '', coreboard3_who int(6) default 0, coreboard3_when datetime,
|
||||
coreboard4 text default '', coreboard4_who int(6) default 0, coreboard4_when datetime,
|
||||
coreboard5 text default '', coreboard5_who int(6) default 0, coreboard5_when datetime,
|
||||
coreboard6 text default '', coreboard6_who int(6) default 0, coreboard6_when datetime,
|
||||
coreboard7 text default '', coreboard7_who int(6) default 0, coreboard7_when datetime,
|
||||
coreboard8 text default '', coreboard8_who int(6) default 0, coreboard8_when datetime,
|
||||
coreboard9 text default '', coreboard9_who int(6) default 0, coreboard9_when datetime,
|
||||
coreboard10 text default '', coreboard10_who int(6) default 0, coreboard10_when datetime,
|
||||
coreboard11 text default '', coreboard11_who int(6) default 0, coreboard11_when datetime,
|
||||
coreboard12 text default '', coreboard12_who int(6) default 0, coreboard12_when datetime,
|
||||
coreboard13 text default '', coreboard13_who int(6) default 0, coreboard13_when datetime,
|
||||
coreboard14 text default '', coreboard14_who int(6) default 0, coreboard14_when datetime,
|
||||
coreboard15 text default '', coreboard15_who int(6) default 0, coreboard15_when datetime,
|
||||
coreboard16 text default '', coreboard16_who int(6) default 0, coreboard16_when datetime,
|
||||
coreboard17 text default '', coreboard17_who int(6) default 0, coreboard17_when datetime,
|
||||
coreboard18 text default '', coreboard18_who int(6) default 0, coreboard18_when datetime,
|
||||
coreboard19 text default '', coreboard19_who int(6) default 0, coreboard19_when datetime,
|
||||
boardindex int(2) default 19,
|
||||
coreindex int(2) default 19,
|
||||
l12term int(4) default 0, l11term int(4) default 0, l10term int(4) default 0, l9term int(4) default 0,
|
||||
l12turn0 char(14) default '00000000000099', l11turn0 char(14) default '00000000000099', l10turn0 char(14) default '00000000000099', l9turn0 char(14) default '00000000000099',
|
||||
l12turn1 char(14) default '00000000000099', l11turn1 char(14) default '00000000000099', l10turn1 char(14) default '00000000000099', l9turn1 char(14) default '00000000000099',
|
||||
l12turn2 char(14) default '00000000000099', l11turn2 char(14) default '00000000000099', l10turn2 char(14) default '00000000000099', l9turn2 char(14) default '00000000000099',
|
||||
l12turn3 char(14) default '00000000000099', l11turn3 char(14) default '00000000000099', l10turn3 char(14) default '00000000000099', l9turn3 char(14) default '00000000000099',
|
||||
l12turn4 char(14) default '00000000000099', l11turn4 char(14) default '00000000000099', l10turn4 char(14) default '00000000000099', l9turn4 char(14) default '00000000000099',
|
||||
l12turn5 char(14) default '00000000000099', l11turn5 char(14) default '00000000000099', l10turn5 char(14) default '00000000000099', l9turn5 char(14) default '00000000000099',
|
||||
l12turn6 char(14) default '00000000000099', l11turn6 char(14) default '00000000000099', l10turn6 char(14) default '00000000000099', l9turn6 char(14) default '00000000000099',
|
||||
l12turn7 char(14) default '00000000000099', l11turn7 char(14) default '00000000000099', l10turn7 char(14) default '00000000000099', l9turn7 char(14) default '00000000000099',
|
||||
l12turn8 char(14) default '00000000000099', l11turn8 char(14) default '00000000000099', l10turn8 char(14) default '00000000000099', l9turn8 char(14) default '00000000000099',
|
||||
l12turn9 char(14) default '00000000000099', l11turn9 char(14) default '00000000000099', l10turn9 char(14) default '00000000000099', l9turn9 char(14) default '00000000000099',
|
||||
l12turn10 char(14) default '00000000000099', l11turn10 char(14) default '00000000000099', l10turn10 char(14) default '00000000000099', l9turn10 char(14) default '00000000000099',
|
||||
l12turn11 char(14) default '00000000000099', l11turn11 char(14) default '00000000000099', l10turn11 char(14) default '00000000000099', l9turn11 char(14) default '00000000000099',
|
||||
|
||||
l8term int(4) default 0, l7term int(4) default 0, l6term int(4) default 0, l5term int(4) default 0,
|
||||
l8turn0 char(14) default '00000000000099', l7turn0 char(14) default '00000000000099', l6turn0 char(14) default '00000000000099', l5turn0 char(14) default '00000000000099',
|
||||
l8turn1 char(14) default '00000000000099', l7turn1 char(14) default '00000000000099', l6turn1 char(14) default '00000000000099', l5turn1 char(14) default '00000000000099',
|
||||
l8turn2 char(14) default '00000000000099', l7turn2 char(14) default '00000000000099', l6turn2 char(14) default '00000000000099', l5turn2 char(14) default '00000000000099',
|
||||
l8turn3 char(14) default '00000000000099', l7turn3 char(14) default '00000000000099', l6turn3 char(14) default '00000000000099', l5turn3 char(14) default '00000000000099',
|
||||
l8turn4 char(14) default '00000000000099', l7turn4 char(14) default '00000000000099', l6turn4 char(14) default '00000000000099', l5turn4 char(14) default '00000000000099',
|
||||
l8turn5 char(14) default '00000000000099', l7turn5 char(14) default '00000000000099', l6turn5 char(14) default '00000000000099', l5turn5 char(14) default '00000000000099',
|
||||
l8turn6 char(14) default '00000000000099', l7turn6 char(14) default '00000000000099', l6turn6 char(14) default '00000000000099', l5turn6 char(14) default '00000000000099',
|
||||
l8turn7 char(14) default '00000000000099', l7turn7 char(14) default '00000000000099', l6turn7 char(14) default '00000000000099', l5turn7 char(14) default '00000000000099',
|
||||
l8turn8 char(14) default '00000000000099', l7turn8 char(14) default '00000000000099', l6turn8 char(14) default '00000000000099', l5turn8 char(14) default '00000000000099',
|
||||
l8turn9 char(14) default '00000000000099', l7turn9 char(14) default '00000000000099', l6turn9 char(14) default '00000000000099', l5turn9 char(14) default '00000000000099',
|
||||
l8turn10 char(14) default '00000000000099', l7turn10 char(14) default '00000000000099', l6turn10 char(14) default '00000000000099', l5turn10 char(14) default '00000000000099',
|
||||
l8turn11 char(14) default '00000000000099', l7turn11 char(14) default '00000000000099', l6turn11 char(14) default '00000000000099', l5turn11 char(14) default '00000000000099',
|
||||
|
||||
PRIMARY KEY (nation)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||
CREATE TABLE `nation` (
|
||||
`nation` INT(6) NOT NULL AUTO_INCREMENT,
|
||||
`name` CHAR(64) NOT NULL COLLATE 'utf8mb4_bin',
|
||||
`color` CHAR(10) NOT NULL,
|
||||
`can_change_flag` INT(1) NULL DEFAULT '1',
|
||||
`onlinegen` VARCHAR(1024) NULL DEFAULT '',
|
||||
`msg` TEXT NULL DEFAULT '',
|
||||
`capital` INT(1) NULL DEFAULT '0',
|
||||
`capset` INT(1) NULL DEFAULT '0',
|
||||
`gennum` INT(3) NULL DEFAULT '1',
|
||||
`gennum2` INT(3) NULL DEFAULT '1',
|
||||
`chemi` INT(3) NULL DEFAULT '0',
|
||||
`gold` INT(8) NULL DEFAULT '0',
|
||||
`rice` INT(8) NULL DEFAULT '0',
|
||||
`bill` INT(3) NULL DEFAULT '0',
|
||||
`rate` INT(3) NULL DEFAULT '0',
|
||||
`rate_tmp` INT(3) NULL DEFAULT '0',
|
||||
`secretlimit` INT(2) NULL DEFAULT '3',
|
||||
`l12set` INT(1) NULL DEFAULT '0',
|
||||
`l11set` INT(1) NULL DEFAULT '0',
|
||||
`l10set` INT(1) NULL DEFAULT '0',
|
||||
`l9set` INT(1) NULL DEFAULT '0',
|
||||
`l8set` INT(1) NULL DEFAULT '0',
|
||||
`l7set` INT(1) NULL DEFAULT '0',
|
||||
`l6set` INT(1) NULL DEFAULT '0',
|
||||
`l5set` INT(1) NULL DEFAULT '0',
|
||||
`scout` INT(1) NULL DEFAULT '0',
|
||||
`war` INT(1) NULL DEFAULT '0',
|
||||
`sabotagelimit` INT(4) NULL DEFAULT '36',
|
||||
`surlimit` INT(4) NULL DEFAULT '72',
|
||||
`scoutmsg` TEXT NULL DEFAULT '',
|
||||
`tech` INT(8) NULL DEFAULT '0',
|
||||
`totaltech` INT(8) NULL DEFAULT '0',
|
||||
`power` INT(8) NULL DEFAULT '0',
|
||||
`spy` CHAR(255) NULL DEFAULT '',
|
||||
`level` INT(1) NULL DEFAULT '0',
|
||||
`type` INT(2) NULL DEFAULT '0',
|
||||
`rule` TEXT NULL DEFAULT '',
|
||||
`history` MEDIUMTEXT NULL DEFAULT '',
|
||||
`board0` TEXT NULL DEFAULT '',
|
||||
`board0_who` INT(6) NULL DEFAULT '0',
|
||||
`board0_when` DATETIME NULL DEFAULT NULL,
|
||||
`board1` TEXT NULL DEFAULT '',
|
||||
`board1_who` INT(6) NULL DEFAULT '0',
|
||||
`board1_when` DATETIME NULL DEFAULT NULL,
|
||||
`board2` TEXT NULL DEFAULT '',
|
||||
`board2_who` INT(6) NULL DEFAULT '0',
|
||||
`board2_when` DATETIME NULL DEFAULT NULL,
|
||||
`board3` TEXT NULL DEFAULT '',
|
||||
`board3_who` INT(6) NULL DEFAULT '0',
|
||||
`board3_when` DATETIME NULL DEFAULT NULL,
|
||||
`board4` TEXT NULL DEFAULT '',
|
||||
`board4_who` INT(6) NULL DEFAULT '0',
|
||||
`board4_when` DATETIME NULL DEFAULT NULL,
|
||||
`board5` TEXT NULL DEFAULT '',
|
||||
`board5_who` INT(6) NULL DEFAULT '0',
|
||||
`board5_when` DATETIME NULL DEFAULT NULL,
|
||||
`board6` TEXT NULL DEFAULT '',
|
||||
`board6_who` INT(6) NULL DEFAULT '0',
|
||||
`board6_when` DATETIME NULL DEFAULT NULL,
|
||||
`board7` TEXT NULL DEFAULT '',
|
||||
`board7_who` INT(6) NULL DEFAULT '0',
|
||||
`board7_when` DATETIME NULL DEFAULT NULL,
|
||||
`board8` TEXT NULL DEFAULT '',
|
||||
`board8_who` INT(6) NULL DEFAULT '0',
|
||||
`board8_when` DATETIME NULL DEFAULT NULL,
|
||||
`board9` TEXT NULL DEFAULT '',
|
||||
`board9_who` INT(6) NULL DEFAULT '0',
|
||||
`board9_when` DATETIME NULL DEFAULT NULL,
|
||||
`board10` TEXT NULL DEFAULT '',
|
||||
`board10_who` INT(6) NULL DEFAULT '0',
|
||||
`board10_when` DATETIME NULL DEFAULT NULL,
|
||||
`board11` TEXT NULL DEFAULT '',
|
||||
`board11_who` INT(6) NULL DEFAULT '0',
|
||||
`board11_when` DATETIME NULL DEFAULT NULL,
|
||||
`board12` TEXT NULL DEFAULT '',
|
||||
`board12_who` INT(6) NULL DEFAULT '0',
|
||||
`board12_when` DATETIME NULL DEFAULT NULL,
|
||||
`board13` TEXT NULL DEFAULT '',
|
||||
`board13_who` INT(6) NULL DEFAULT '0',
|
||||
`board13_when` DATETIME NULL DEFAULT NULL,
|
||||
`board14` TEXT NULL DEFAULT '',
|
||||
`board14_who` INT(6) NULL DEFAULT '0',
|
||||
`board14_when` DATETIME NULL DEFAULT NULL,
|
||||
`board15` TEXT NULL DEFAULT '',
|
||||
`board15_who` INT(6) NULL DEFAULT '0',
|
||||
`board15_when` DATETIME NULL DEFAULT NULL,
|
||||
`board16` TEXT NULL DEFAULT '',
|
||||
`board16_who` INT(6) NULL DEFAULT '0',
|
||||
`board16_when` DATETIME NULL DEFAULT NULL,
|
||||
`board17` TEXT NULL DEFAULT '',
|
||||
`board17_who` INT(6) NULL DEFAULT '0',
|
||||
`board17_when` DATETIME NULL DEFAULT NULL,
|
||||
`board18` TEXT NULL DEFAULT '',
|
||||
`board18_who` INT(6) NULL DEFAULT '0',
|
||||
`board18_when` DATETIME NULL DEFAULT NULL,
|
||||
`board19` TEXT NULL DEFAULT '',
|
||||
`board19_who` INT(6) NULL DEFAULT '0',
|
||||
`board19_when` DATETIME NULL DEFAULT NULL,
|
||||
`coreboard0` TEXT NULL DEFAULT '',
|
||||
`coreboard0_who` INT(6) NULL DEFAULT '0',
|
||||
`coreboard0_when` DATETIME NULL DEFAULT NULL,
|
||||
`coreboard1` TEXT NULL DEFAULT '',
|
||||
`coreboard1_who` INT(6) NULL DEFAULT '0',
|
||||
`coreboard1_when` DATETIME NULL DEFAULT NULL,
|
||||
`coreboard2` TEXT NULL DEFAULT '',
|
||||
`coreboard2_who` INT(6) NULL DEFAULT '0',
|
||||
`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;
|
||||
|
||||
###########################################################################
|
||||
## 도시 테이블
|
||||
@@ -618,7 +779,7 @@ ENGINE=InnoDB
|
||||
|
||||
######
|
||||
# 예약 오픈 테이블
|
||||
CREATE TABLE `reserved_open` (
|
||||
CREATE TABLE IF NOT EXISTS `reserved_open` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`options` TEXT NULL DEFAULT NULL,
|
||||
`date` DATETIME NULL DEFAULT NULL,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<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>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='../d_shared/common.css'>
|
||||
|
||||
@@ -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>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title>유저 관리</title>
|
||||
|
||||
<!-- 스타일 -->
|
||||
@@ -14,7 +16,7 @@ require(__dir__.'/../vendor/autoload.php');
|
||||
<?=WebUtil::printCSS('../d_shared/common.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('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../js/common.js')?>
|
||||
|
||||
@@ -18,6 +18,8 @@ $acl = $session->acl;
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title>서버목록</title>
|
||||
|
||||
<!-- 스타일 -->
|
||||
@@ -28,7 +30,7 @@ $acl = $session->acl;
|
||||
|
||||
<!-- 액션 -->
|
||||
<?=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('../js/func.js')?>
|
||||
<?=WebUtil::printJS('../js/entrance.js')?>
|
||||
|
||||
@@ -7,6 +7,8 @@ require(__dir__.'/../vendor/autoload.php');
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title>계정 관리</title>
|
||||
|
||||
<!-- 스타일 -->
|
||||
@@ -18,7 +20,7 @@ require(__dir__.'/../vendor/autoload.php');
|
||||
<!-- 액션 -->
|
||||
<?=WebUtil::printJS('../d_shared/common_path.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/sha512.min.js')?>
|
||||
<?=WebUtil::printJS('../js/func.js')?>
|
||||
|
||||
@@ -11,7 +11,9 @@ $category = Util::getReq('category', 'int', 0);
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -10,7 +10,9 @@ if($sel == 0) $sel = 1;
|
||||
<html>
|
||||
|
||||
<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>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -23,9 +23,10 @@ if ($session->isLoggedIn()) {
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<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>
|
||||
<?=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/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('e_lib/sha512.min.js')?>
|
||||
@@ -58,7 +59,7 @@ function getOAuthToken(mode, 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(){
|
||||
|
||||
@@ -10,9 +10,10 @@ use \kakao\KakaoKey as KakaoKey;
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<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>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.2.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<script>
|
||||
|
||||
var oauthMode = null;
|
||||
@@ -27,7 +28,7 @@ function getOAuthToken(mode='login', scope_list = null){
|
||||
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">
|
||||
<head>
|
||||
<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>
|
||||
<?=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/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||
|
||||
@@ -65,7 +65,8 @@ else{
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<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>
|
||||
opener.location.href="javascript:postOAuthResult('<?=$oauth_mode?>');";
|
||||
window.close();
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<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>OAuth 로그인 실패</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -65,22 +65,22 @@ class WebUtil
|
||||
//Use a switch statement to figure out the exact error.
|
||||
switch ($jsonError) {
|
||||
case JSON_ERROR_DEPTH:
|
||||
$error .= 'Maximum depth exceeded!';
|
||||
$error .= 'Maximum depth exceeded! : '.$content;
|
||||
break;
|
||||
case JSON_ERROR_STATE_MISMATCH:
|
||||
$error .= 'Underflow or the modes mismatch!';
|
||||
$error .= 'Underflow or the modes mismatch! : '.$content;
|
||||
break;
|
||||
case JSON_ERROR_CTRL_CHAR:
|
||||
$error .= 'Unexpected control character found';
|
||||
$error .= 'Unexpected control character found : '.$content;
|
||||
break;
|
||||
case JSON_ERROR_SYNTAX:
|
||||
$error .= 'Malformed JSON';
|
||||
$error .= 'Malformed JSON : '.$content;
|
||||
break;
|
||||
case JSON_ERROR_UTF8:
|
||||
$error .= 'Malformed UTF-8 characters found!';
|
||||
$error .= 'Malformed UTF-8 characters found! : '.$content;
|
||||
break;
|
||||
default:
|
||||
$error .= 'Unknown error!';
|
||||
$error .= 'Unknown error! : '.$content;
|
||||
break;
|
||||
}
|
||||
throw new \Exception($error);
|
||||
|
||||