refactor: bootstrap4 => bootstrap5 #200
+13
-1
@@ -23,5 +23,17 @@ module.exports = {
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
"vue/no-multiple-template-root": "off",
|
||||
"vue/no-v-for-template-key": "off",
|
||||
}
|
||||
"vue/multi-word-component-names": "off",//TODO: 삭제
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
alias: {
|
||||
map: [
|
||||
['@', './hwe/ts'],
|
||||
['@util', './hwe/ts/util'],
|
||||
['@scss', './hwe/scss'],
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
+158
-171
@@ -1,200 +1,187 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>설치</title>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?=WebUtil::printJS('../dist_js/vendors.js') ?>
|
||||
<?=WebUtil::printJS('../dist_js/install.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../css/install.css')?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('../dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('../dist_js/install.js') ?>
|
||||
<?= WebUtil::printCSS('../dist_css/vendor.css') ?>
|
||||
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?>
|
||||
<?= WebUtil::printCSS('../css/install.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-12 col-md-10 col-lg-7">
|
||||
<div class="card" id="db_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host"
|
||||
placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port"
|
||||
placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw"
|
||||
placeholder="DB비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name"
|
||||
placeholder="DB명(예:sammo)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="serv_host" id="serv_host"
|
||||
placeholder="접속경로(예:http://www.example.com)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
|
||||
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/icons" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
|
||||
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/game" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
|
||||
<div class="input-group col-sm-8">
|
||||
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
|
||||
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
|
||||
value="" />
|
||||
<div class="input-group-append">
|
||||
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
|
||||
<div class="col col-12 col-md-10 col-lg-7">
|
||||
<div class="card" id="db_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr style="width:100%; border-top: 1px solid lightgray;">
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
|
||||
placeholder="카카오톡 API의 Rest Key"
|
||||
value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
|
||||
placeholder="카카오톡 API의 Admin Key"
|
||||
value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
<button type="submit"
|
||||
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="serv_host" id="serv_host" placeholder="접속경로(예:http://www.example.com)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path" placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/icons" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="game_image_path" id="game_image_path" placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/game" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
|
||||
<div class="input-group col-sm-8">
|
||||
<input type="text" class="form-control" name="image_request_key" id="image_request_key" placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게" value="" />
|
||||
<div class="input-group-text">
|
||||
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr style="width:100%; border-top: 1px solid lightgray;">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key" placeholder="카카오톡 API의 Rest Key" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key" placeholder="카카오톡 API의 Admin Key" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--DB 폼 끝-->
|
||||
|
||||
<div class="card" id="admin_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(관리자 생성)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="admin_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="username" class="col-sm-3 col-form-label">계정명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="username" id="username" placeholder="계정명" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="비밀번호" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="비밀번호 확인" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="nickname" id="nickname" placeholder="닉네임" value="운영자" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="global_salt" name="global_salt">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--ADMIN 폼 끝-->
|
||||
|
||||
<!-- TODO: conf_kakao.php -->
|
||||
|
||||
</div>
|
||||
</div><!--DB 폼 끝-->
|
||||
|
||||
<div class="card" id="admin_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(관리자 생성)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="admin_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="username" class="col-sm-3 col-form-label">계정명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="username" id="username"
|
||||
placeholder="계정명"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="password" id="password"
|
||||
placeholder="비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
|
||||
placeholder="비밀번호 확인"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="nickname" id="nickname"
|
||||
placeholder="닉네임" value="운영자"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="global_salt" name="global_salt">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit"
|
||||
class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!--ADMIN 폼 끝-->
|
||||
|
||||
<!-- TODO: conf_kakao.php -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+1
-1
@@ -24,7 +24,7 @@ $plock = $db->queryFirstField('SELECT plock FROM plock');
|
||||
<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')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ $admin = getAdmin();
|
||||
<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')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ $db = DB::db();
|
||||
<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') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ function colorBlockedName($general){
|
||||
<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') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ $sel2[$type2] = "selected";
|
||||
<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') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ $generalObj = General::createGeneralObjFromDB($gen);
|
||||
<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') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ $sel[$type] = "selected";
|
||||
<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')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+347
-300
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -14,326 +15,372 @@ $db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("명장일람", 1);
|
||||
$templates = new \League\Plates\Engine(__DIR__.'/templates');
|
||||
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr><td>명 장 일 람<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<form name=form1 action=a_bestGeneral.php method=post>
|
||||
<tr><td align=center>
|
||||
<input type=submit name=btn value='유저 보기'>
|
||||
<input type=submit name=btn value='NPC 보기'>
|
||||
</td></tr>
|
||||
</form>
|
||||
</table>
|
||||
<div style="margin:auto;width:1100px;">
|
||||
<?php
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>명 장 일 람<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<form name=form1 action=a_bestGeneral.php method=post>
|
||||
<tr>
|
||||
<td align=center>
|
||||
<input type=submit name=btn value='유저 보기'>
|
||||
<input type=submit name=btn value='NPC 보기'>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<div style="margin:auto;width:1100px;">
|
||||
<?php
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
|
||||
$nationName = [0=>'재야'];
|
||||
$nationColor = [0=>'#000000'];
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
$nationColor[$nation['nation']] = $nation['color'];
|
||||
}
|
||||
|
||||
$types = [
|
||||
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
|
||||
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
|
||||
["계 략 성 공", "int", function($v) use ($gameStor){
|
||||
$v['value'] = $v['firenum'];
|
||||
if($gameStor->isunited){
|
||||
return $v;
|
||||
}
|
||||
$v['nationName'] = '???';
|
||||
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
$v['name'] = '???';
|
||||
$v['ownerName'] = null;
|
||||
$v['bgColor'] = GameConst::$basecolor4;
|
||||
$v['fgColor'] = newColor($v['bgColor']);
|
||||
return $v;
|
||||
}],
|
||||
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }],
|
||||
["승 리", "int", function($v){$v['value'] = $v['killnum']; 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['occupied']; return $v; }],
|
||||
["사 살", "int", function($v){$v['value'] = $v['killcrew']; 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['killcrew_person']; return $v; }],
|
||||
["대 인 살 상 률", "percent", function($v){
|
||||
if($v['warnum'] < 10){
|
||||
$v['value'] = 0;
|
||||
}
|
||||
else{
|
||||
$v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']);
|
||||
}
|
||||
return $v;
|
||||
}],
|
||||
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex1']; return $v; }],
|
||||
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex2']; return $v; }],
|
||||
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex3']; return $v; }],
|
||||
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex4']; return $v; }],
|
||||
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex5']; 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['tsw']+$v['tsd']+$v['tsl'];
|
||||
if($totalCnt < 50){
|
||||
$v['value'] = 0;
|
||||
}
|
||||
else{
|
||||
$v['value'] = $v['tsw']/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);
|
||||
$ownerNameList = [];
|
||||
if ($gameStor->isunited) {
|
||||
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
|
||||
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){
|
||||
if($v['betgold'] < GameConst::$defaultGold){
|
||||
$v['value'] = 0;
|
||||
$nationName = [0 => '재야'];
|
||||
$nationColor = [0 => '#000000'];
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
$nationColor[$nation['nation']] = $nation['color'];
|
||||
}
|
||||
else{
|
||||
$v['value'] = $v['betwingold']/max(1, $v['betgold']);
|
||||
}
|
||||
return $v;
|
||||
}],
|
||||
];
|
||||
|
||||
$generals = [];
|
||||
foreach($db->query(
|
||||
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
|
||||
$types = [
|
||||
["명 성", "int", function ($v) {
|
||||
$v['value'] = $v['experience'];
|
||||
return $v;
|
||||
}],
|
||||
["계 급", "int", function ($v) {
|
||||
$v['value'] = $v['dedication'];
|
||||
return $v;
|
||||
}],
|
||||
["계 략 성 공", "int", function ($v) use ($gameStor) {
|
||||
$v['value'] = $v['firenum'];
|
||||
if ($gameStor->isunited) {
|
||||
return $v;
|
||||
}
|
||||
$v['nationName'] = '???';
|
||||
$v['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
|
||||
$v['name'] = '???';
|
||||
$v['ownerName'] = null;
|
||||
$v['bgColor'] = GameConst::$basecolor4;
|
||||
$v['fgColor'] = newColor($v['bgColor']);
|
||||
return $v;
|
||||
}],
|
||||
["전 투 횟 수", "int", function ($v) {
|
||||
$v['value'] = $v['warnum'];
|
||||
return $v;
|
||||
}],
|
||||
["승 리", "int", function ($v) {
|
||||
$v['value'] = $v['killnum'];
|
||||
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['occupied'];
|
||||
return $v;
|
||||
}],
|
||||
["사 살", "int", function ($v) {
|
||||
$v['value'] = $v['killcrew'];
|
||||
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['killcrew_person'];
|
||||
return $v;
|
||||
}],
|
||||
["대 인 살 상 률", "percent", function ($v) {
|
||||
if ($v['warnum'] < 10) {
|
||||
$v['value'] = 0;
|
||||
} else {
|
||||
$v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']);
|
||||
}
|
||||
return $v;
|
||||
}],
|
||||
["보 병 숙 련 도", "int", function ($v) {
|
||||
$v['value'] = $v['dex1'];
|
||||
return $v;
|
||||
}],
|
||||
["궁 병 숙 련 도", "int", function ($v) {
|
||||
$v['value'] = $v['dex2'];
|
||||
return $v;
|
||||
}],
|
||||
["기 병 숙 련 도", "int", function ($v) {
|
||||
$v['value'] = $v['dex3'];
|
||||
return $v;
|
||||
}],
|
||||
["귀 병 숙 련 도", "int", function ($v) {
|
||||
$v['value'] = $v['dex4'];
|
||||
return $v;
|
||||
}],
|
||||
["차 병 숙 련 도", "int", function ($v) {
|
||||
$v['value'] = $v['dex5'];
|
||||
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['tsw'] + $v['tsd'] + $v['tsl'];
|
||||
if ($totalCnt < 50) {
|
||||
$v['value'] = 0;
|
||||
} else {
|
||||
$v['value'] = $v['tsw'] / 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) {
|
||||
if ($v['betgold'] < GameConst::$defaultGold) {
|
||||
$v['value'] = 0;
|
||||
} else {
|
||||
$v['value'] = $v['betwingold'] / max(1, $v['betgold']);
|
||||
}
|
||||
return $v;
|
||||
}],
|
||||
];
|
||||
|
||||
$generals = [];
|
||||
foreach ($db->query(
|
||||
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
|
||||
experience, dedication,
|
||||
dex1, dex2, dex3, dex4, dex5,
|
||||
horse, weapon, book, item
|
||||
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general
|
||||
){
|
||||
$generalID = $general['no'];
|
||||
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
$general['nationName'] = $nationName[$general['nation']];
|
||||
FROM general WHERE %l",
|
||||
$btn == "NPC 보기" ? "npc>=2" : "npc<2"
|
||||
) as $general) {
|
||||
$generalID = $general['no'];
|
||||
$general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4;
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
$general['nationName'] = $nationName[$general['nation']];
|
||||
|
||||
if(key_exists('picture', $general)){
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
}
|
||||
else{
|
||||
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
}
|
||||
|
||||
$generals[$generalID] = $general;
|
||||
}
|
||||
|
||||
foreach($db->queryAllLists('SELECT general_id, `type`, `value` FROM rank_data') as [$generalID, $typeKey, $value]){
|
||||
if(!key_exists($generalID, $generals)){
|
||||
continue;
|
||||
}
|
||||
$generals[$generalID][$typeKey] = $value;
|
||||
}
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||
$validCnt = 0;
|
||||
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt, $ownerNameList){
|
||||
$general['ownerName'] = $ownerNameList[$general['owner']]??null;
|
||||
$general = ($typeFunc)($general);
|
||||
$value = $general['value'];
|
||||
|
||||
if($value > 0){
|
||||
$validCnt+=1;
|
||||
}
|
||||
|
||||
if($typeValue == 'percent'){
|
||||
$general['printValue'] = number_format($value*100, 2).'%';
|
||||
}
|
||||
else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
return $general;
|
||||
}, $generals);
|
||||
|
||||
usort($typeGenerals, function($lhs, $rhs){
|
||||
//내림차순
|
||||
return -($lhs['value'] <=> $rhs['value']);
|
||||
});
|
||||
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$typeName,
|
||||
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div style="margin:auto;width:1100px;margin-top:5px;">
|
||||
<?php
|
||||
//유니크 아이템 소유자
|
||||
$itemTypes = [
|
||||
'horse'=>'명 마',
|
||||
'weapon'=>'명 검',
|
||||
'book'=>'명 서',
|
||||
'item'=>'도 구'
|
||||
];
|
||||
|
||||
$simpleItemTypes = array_keys($itemTypes); array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
||||
$itemOwners = [];
|
||||
|
||||
foreach($generals as $general){
|
||||
foreach($itemTypes as $itemType=>$itemTypeName){
|
||||
$itemClassName = $general[$itemType];
|
||||
$itemClass = buildItemClass($itemClassName);
|
||||
if($itemClass->isBuyable()){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(key_exists($itemClassName, $itemOwners)){
|
||||
$itemOwners[$itemClassName][] = $general;
|
||||
}
|
||||
else{
|
||||
$itemOwners[$itemClassName] = [$general];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach(GameConst::$allItems as $itemType=>$itemList){
|
||||
$itemNameType = $itemTypes[$itemType];
|
||||
$itemList = array_reverse($itemList, true);
|
||||
|
||||
|
||||
$itemRanker = [];
|
||||
foreach($itemList as $itemClassName=>$itemCnt){
|
||||
if($itemCnt==0){
|
||||
continue;
|
||||
}
|
||||
$itemClass = buildItemClass($itemClassName);
|
||||
|
||||
if($itemClass->isBuyable()){
|
||||
continue;
|
||||
}
|
||||
|
||||
$info = $itemClass->getInfo();
|
||||
$name = $itemClass->getName();
|
||||
|
||||
|
||||
if($info){
|
||||
$name = $templates->render('tooltip', [
|
||||
'text'=>$name,
|
||||
'info'=>$info,
|
||||
]);
|
||||
}
|
||||
foreach(Util::range($itemCnt) as $itemIdx){
|
||||
if(($itemOwners[$itemClassName][$itemIdx]??null) === null){
|
||||
$emptyCard = [
|
||||
'rankName' => $name,
|
||||
'pictureFullPath' => GetImageURL(0)."/default.jpg",
|
||||
'value'=>$itemClassName,
|
||||
'name'=>'미발견',
|
||||
'bgColor'=>GameConst::$basecolor4,
|
||||
'fgColor'=>newColor(GameConst::$basecolor4),
|
||||
];
|
||||
$itemRanker[] = $emptyCard;
|
||||
continue;
|
||||
if (key_exists('picture', $general)) {
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
} else {
|
||||
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
|
||||
}
|
||||
|
||||
$general = $itemOwners[$itemClassName][$itemIdx];
|
||||
|
||||
$card = [
|
||||
'rankName' => $name,
|
||||
'pictureFullPath' => $general['pictureFullPath'],
|
||||
'value'=>$itemClassName,
|
||||
'nationName'=>$general['nationName'],
|
||||
'name'=>$general['name'],
|
||||
'bgColor'=>$general['bgColor'],
|
||||
'fgColor'=>$general['fgColor'],
|
||||
];
|
||||
$itemRanker[] = $card;
|
||||
$generals[$generalID] = $general;
|
||||
}
|
||||
}
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$itemNameType,
|
||||
'generals'=>$itemRanker
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
foreach ($db->queryAllLists('SELECT general_id, `type`, `value` FROM rank_data') as [$generalID, $typeKey, $value]) {
|
||||
if (!key_exists($generalID, $generals)) {
|
||||
continue;
|
||||
}
|
||||
$generals[$generalID][$typeKey] = $value;
|
||||
}
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
foreach ($types as $idx => [$typeName, $typeValue, $typeFunc]) {
|
||||
$validCnt = 0;
|
||||
$typeGenerals = array_map(function ($general) use ($typeValue, $typeFunc, &$validCnt, $ownerNameList) {
|
||||
$general['ownerName'] = $ownerNameList[$general['owner']] ?? null;
|
||||
$general = ($typeFunc)($general);
|
||||
$value = $general['value'];
|
||||
|
||||
if ($value > 0) {
|
||||
$validCnt += 1;
|
||||
}
|
||||
|
||||
if ($typeValue == 'percent') {
|
||||
$general['printValue'] = number_format($value * 100, 2) . '%';
|
||||
} else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
return $general;
|
||||
}, $generals);
|
||||
|
||||
usort($typeGenerals, function ($lhs, $rhs) {
|
||||
//내림차순
|
||||
return - ($lhs['value'] <=> $rhs['value']);
|
||||
});
|
||||
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName' => $typeName,
|
||||
'generals' => array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div style="margin:auto;width:1100px;margin-top:5px;">
|
||||
<?php
|
||||
//유니크 아이템 소유자
|
||||
$itemTypes = [
|
||||
'horse' => '명 마',
|
||||
'weapon' => '명 검',
|
||||
'book' => '명 서',
|
||||
'item' => '도 구'
|
||||
];
|
||||
|
||||
$simpleItemTypes = array_keys($itemTypes);
|
||||
array_map(function ($itemType) {
|
||||
return $itemType[1];
|
||||
}, $itemTypes);
|
||||
$itemOwners = [];
|
||||
|
||||
foreach ($generals as $general) {
|
||||
foreach ($itemTypes as $itemType => $itemTypeName) {
|
||||
$itemClassName = $general[$itemType];
|
||||
$itemClass = buildItemClass($itemClassName);
|
||||
if ($itemClass->isBuyable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (key_exists($itemClassName, $itemOwners)) {
|
||||
$itemOwners[$itemClassName][] = $general;
|
||||
} else {
|
||||
$itemOwners[$itemClassName] = [$general];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameConst::$allItems as $itemType => $itemList) {
|
||||
$itemNameType = $itemTypes[$itemType];
|
||||
$itemList = array_reverse($itemList, true);
|
||||
|
||||
|
||||
$itemRanker = [];
|
||||
foreach ($itemList as $itemClassName => $itemCnt) {
|
||||
if ($itemCnt == 0) {
|
||||
continue;
|
||||
}
|
||||
$itemClass = buildItemClass($itemClassName);
|
||||
|
||||
if ($itemClass->isBuyable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$info = $itemClass->getInfo();
|
||||
$name = $itemClass->getName();
|
||||
|
||||
|
||||
if ($info) {
|
||||
$name = $templates->render('tooltip', [
|
||||
'text' => $name,
|
||||
'info' => $info,
|
||||
]);
|
||||
}
|
||||
foreach (Util::range($itemCnt) as $itemIdx) {
|
||||
if (($itemOwners[$itemClassName][$itemIdx] ?? null) === null) {
|
||||
$emptyCard = [
|
||||
'rankName' => $name,
|
||||
'pictureFullPath' => GetImageURL(0) . "/default.jpg",
|
||||
'value' => $itemClassName,
|
||||
'name' => '미발견',
|
||||
'bgColor' => GameConst::$basecolor4,
|
||||
'fgColor' => newColor(GameConst::$basecolor4),
|
||||
];
|
||||
$itemRanker[] = $emptyCard;
|
||||
continue;
|
||||
}
|
||||
|
||||
$general = $itemOwners[$itemClassName][$itemIdx];
|
||||
|
||||
$card = [
|
||||
'rankName' => $name,
|
||||
'pictureFullPath' => $general['pictureFullPath'],
|
||||
'value' => $itemClassName,
|
||||
'nationName' => $general['nationName'],
|
||||
'name' => $general['name'],
|
||||
'bgColor' => $general['bgColor'],
|
||||
'fgColor' => $general['fgColor'],
|
||||
];
|
||||
$itemRanker[] = $card;
|
||||
}
|
||||
}
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName' => $itemNameType,
|
||||
'generals' => $itemRanker
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+102
-94
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -12,119 +13,126 @@ increaseRefresh("왕조일람", 1);
|
||||
<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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class="tb_layout bg0">
|
||||
<tr><td>역 대 왕 조<br>
|
||||
<button onclick=window.close()>창 닫기</button><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class="tb_layout bg0">
|
||||
<tr>
|
||||
<td>역 대 왕 조<br>
|
||||
<button onclick=window.close()>창 닫기</button><br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$showCurrentNation = true;
|
||||
$showCurrentNation = true;
|
||||
|
||||
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
|
||||
$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 ($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']);
|
||||
?>
|
||||
if ($showCurrentNation) {
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
?>
|
||||
|
||||
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td style="background-color:#333333;" align=center colspan=8>
|
||||
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
|
||||
<a href="a_history.php"><button type='button'>역사 보기</button></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<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_history.php"><button type='button'>역사 보기</button></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
foreach($emperiors as $emperior){
|
||||
$serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||
?>
|
||||
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>
|
||||
<font size=5><?=$emperior['phase']?></font>
|
||||
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td bgcolor=skyblue align=center colspan=8>
|
||||
<font size=5><?= $emperior['phase'] ?></font>
|
||||
|
||||
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button type='button'>자세히</button></a>
|
||||
<a href="a_emperior_detail.php?select=<?= $emperior['no'] ?>"><button type='button'>자세히</button></a>
|
||||
|
||||
<?php if($emperior['server_id']): ?>
|
||||
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button type='button'>역사 보기</button></a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center style='color:<?=newColor($emperior['color'])?>;background-color:<?=$emperior['color']?>' colspan=8>
|
||||
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center width=80>국 력</td>
|
||||
<td align=center width=170><?=$emperior['power']?></td>
|
||||
<td class='bg1' align=center width=80>장 수</td>
|
||||
<td align=center width=170><?=$emperior['gennum']?></td>
|
||||
<td class='bg1' align=center width=80>속 령</td>
|
||||
<td align=center width=170><?=$emperior['citynum']?></td>
|
||||
<td class='bg1' align=center width=80>성 향</td>
|
||||
<td align=center width=170><?=$emperior['type']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center>황 제</td>
|
||||
<td align=center><?=$emperior['l12name']?></td>
|
||||
<td class='bg1' align=center>승 상</td>
|
||||
<td align=center><?=$emperior['l11name']?></td>
|
||||
<td class='bg1' align=center>표 기 장 군</td>
|
||||
<td align=center><?=$emperior['l10name']?></td>
|
||||
<td class='bg1' align=center>사 공</td>
|
||||
<td align=center><?=$emperior['l9name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center>거 기 장 군</td>
|
||||
<td align=center><?=$emperior['l8name']?></td>
|
||||
<td class='bg1' align=center>태 위</td>
|
||||
<td align=center><?=$emperior['l7name']?></td>
|
||||
<td class='bg1' align=center>위 장 군</td>
|
||||
<td align=center><?=$emperior['l6name']?></td>
|
||||
<td class='bg1' align=center>사 도</td>
|
||||
<td align=center><?=$emperior['l5name']?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php if ($emperior['server_id']) : ?>
|
||||
<a href="a_history.php?serverID=<?= $emperior['server_id'] ?>"><button type='button'>역사 보기</button></a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center style='color:<?= newColor($emperior['color']) ?>;background-color:<?= $emperior['color'] ?>' colspan=8>
|
||||
<font size=5><?= $emperior['name'] ?> (<?= $emperior['year'] ?>年 <?= $emperior['month'] ?>月)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center width=80>국 력</td>
|
||||
<td align=center width=170><?= $emperior['power'] ?></td>
|
||||
<td class='bg1' align=center width=80>장 수</td>
|
||||
<td align=center width=170><?= $emperior['gennum'] ?></td>
|
||||
<td class='bg1' align=center width=80>속 령</td>
|
||||
<td align=center width=170><?= $emperior['citynum'] ?></td>
|
||||
<td class='bg1' align=center width=80>성 향</td>
|
||||
<td align=center width=170><?= $emperior['type'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center>황 제</td>
|
||||
<td align=center><?= $emperior['l12name'] ?></td>
|
||||
<td class='bg1' align=center>승 상</td>
|
||||
<td align=center><?= $emperior['l11name'] ?></td>
|
||||
<td class='bg1' align=center>표 기 장 군</td>
|
||||
<td align=center><?= $emperior['l10name'] ?></td>
|
||||
<td class='bg1' align=center>사 공</td>
|
||||
<td align=center><?= $emperior['l9name'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1' align=center>거 기 장 군</td>
|
||||
<td align=center><?= $emperior['l8name'] ?></td>
|
||||
<td class='bg1' align=center>태 위</td>
|
||||
<td align=center><?= $emperior['l7name'] ?></td>
|
||||
<td class='bg1' align=center>위 장 군</td>
|
||||
<td align=center><?= $emperior['l6name'] ?></td>
|
||||
<td class='bg1' align=center>사 도</td>
|
||||
<td align=center><?= $emperior['l5name'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -26,9 +26,8 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
+129
-118
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -28,8 +29,8 @@ if ($type <= 0 || $type > 15) {
|
||||
}
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
if ($gameStor->isunited) {
|
||||
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
@@ -39,75 +40,81 @@ if($gameStor->isunited){
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>장 수 일 람<br><?=closeButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=post>정렬순서 :
|
||||
<select id='viewType' name='type' size=1>
|
||||
<option value=1>국가</option>
|
||||
<option value=2>통솔</option>
|
||||
<option value=3>무력</option>
|
||||
<option value=4>지력</option>
|
||||
<option value=5>명성</option>
|
||||
<option value=6>계급</option>
|
||||
<option value=7>관직</option>
|
||||
<option value=8>삭턴</option>
|
||||
<option value=9>벌점</option>
|
||||
<option value=10>Lv</option>
|
||||
<option value=11>성격</option>
|
||||
<option value=12>내특</option>
|
||||
<option value=13>전특</option>
|
||||
<option value=14>연령</option>
|
||||
<option value=15>NPC</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
$nationname[0] = "-";
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>장 수 일 람<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>정렬순서 :
|
||||
<select id='viewType' name='type' size=1>
|
||||
<option value=1>국가</option>
|
||||
<option value=2>통솔</option>
|
||||
<option value=3>무력</option>
|
||||
<option value=4>지력</option>
|
||||
<option value=5>명성</option>
|
||||
<option value=6>계급</option>
|
||||
<option value=7>관직</option>
|
||||
<option value=8>삭턴</option>
|
||||
<option value=9>벌점</option>
|
||||
<option value=10>Lv</option>
|
||||
<option value=11>성격</option>
|
||||
<option value=12>내특</option>
|
||||
<option value=13>전특</option>
|
||||
<option value=14>연령</option>
|
||||
<option value=15>NPC</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
$nationname[0] = "-";
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
|
||||
[$orderKey, $orderDesc] = [
|
||||
1=>['nation', false],
|
||||
2=>['leadership', true],
|
||||
3=>['strength', true],
|
||||
4=>['intel', true],
|
||||
5=>['experience', true],
|
||||
6=>['dedication', true],
|
||||
7=>['officer_level', true],
|
||||
8=>['killturn', false],
|
||||
9=>['connect', true],
|
||||
10=>['experience', true],
|
||||
11=>['personal', true],
|
||||
12=>['special', true],
|
||||
13=>['special2', true],
|
||||
14=>['age', true],
|
||||
15=>['npc', true],
|
||||
][$type];
|
||||
[$orderKey, $orderDesc] = [
|
||||
1 => ['nation', false],
|
||||
2 => ['leadership', true],
|
||||
3 => ['strength', true],
|
||||
4 => ['intel', true],
|
||||
5 => ['experience', true],
|
||||
6 => ['dedication', true],
|
||||
7 => ['officer_level', true],
|
||||
8 => ['killturn', false],
|
||||
9 => ['connect', true],
|
||||
10 => ['experience', true],
|
||||
11 => ['personal', true],
|
||||
12 => ['special', true],
|
||||
13 => ['special2', true],
|
||||
14 => ['age', true],
|
||||
15 => ['npc', true],
|
||||
][$type];
|
||||
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect from general order by %b %l', $orderKey, $orderDesc ? 'desc' : '');
|
||||
|
||||
echo"
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=64 align=center class='bg1'>얼 굴</td>
|
||||
@@ -126,90 +133,94 @@ echo"
|
||||
<td width=45 align=center class='bg1'>삭턴</td>
|
||||
<td width=70 align=center class='bg1'>벌점</td>
|
||||
</tr>";
|
||||
foreach($generalList as $general){
|
||||
$nation = $nationname[$general['nation']];
|
||||
foreach ($generalList as $general) {
|
||||
$nation = $nationname[$general['nation']];
|
||||
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationlevel[$general['nation']]??0);
|
||||
if ($lbonus > 0) {
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonusText = "";
|
||||
}
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationlevel[$general['nation']] ?? 0);
|
||||
if ($lbonus > 0) {
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonusText = "";
|
||||
}
|
||||
|
||||
if ($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
if ($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
|
||||
}
|
||||
if (key_exists($general['owner'], $ownerNameList)) {
|
||||
$name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>';
|
||||
}
|
||||
|
||||
$general['connect'] = Util::round($general['connect'], -1);
|
||||
$general['connect'] = Util::round($general['connect'], -1);
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr data-general-id='{$general['no']}'
|
||||
data-general-wounded='{$general['injury']}'
|
||||
data-general-leadership='{$general['leadership']}'
|
||||
data-general-leadership-bonus='{$lbonus}'
|
||||
data-general-strength='{$general['strength']}'
|
||||
data-general-intel='{$general['intel']}'
|
||||
data-is-npc='".($general['npc']>=2?'true':'false')."'
|
||||
data-is-npc='" . ($general['npc'] >= 2 ? 'true' : 'false') . "'
|
||||
>
|
||||
<td align=center><img class='generalIcon' width='64' height='64' src='{$imageTemp}/{$general['picture']}'></img></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>{$general['age']}세</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
|
||||
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
|
||||
<td align=center>" . displayCharInfo($general['personal']) . "</td>
|
||||
<td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td>
|
||||
<td align=center>Lv " . getExpLevel($general['experience']) . "</td>
|
||||
<td align=center>{$nation}</td>
|
||||
<td align=center>".getHonor($general['experience'])."</td>
|
||||
<td align=center>".getDed($general['dedication'])."</td>
|
||||
<td align=center>" . getHonor($general['experience']) . "</td>
|
||||
<td align=center>" . getDed($general['dedication']) . "</td>
|
||||
<td align=center>";
|
||||
echo getOfficerLevelText($general['officer_level']);
|
||||
echo "</td>
|
||||
echo getOfficerLevelText($general['officer_level']);
|
||||
echo "</td>
|
||||
<td align=center>$leadership</td>
|
||||
<td align=center>$strength</td>
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['killturn']}</td>
|
||||
<td align=center>{$general['connect']}";
|
||||
echo "<br>【".getConnect($general['connect'])."】</td>
|
||||
echo "<br>【" . getConnect($general['connect']) . "】</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#viewType").val("<?=$type?>").attr("selected", "selected");
|
||||
});
|
||||
</script>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#viewType").val("<?= $type ?>").attr("selected", "selected");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+124
-126
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -12,13 +13,13 @@ $db = DB::db();
|
||||
|
||||
increaseRefresh("명예의전당", 1);
|
||||
|
||||
$scenarioList = (function(){
|
||||
$scenarioList = (function () {
|
||||
$db = DB::db();
|
||||
$scenarioList= [];
|
||||
foreach($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo){
|
||||
$scenarioList = [];
|
||||
foreach ($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo) {
|
||||
$seasonIdx = $scenarioInfo['season'];
|
||||
$scenarioIdx = $scenarioInfo['scenario'];
|
||||
if(!key_exists($seasonIdx, $scenarioList)){
|
||||
if (!key_exists($seasonIdx, $scenarioList)) {
|
||||
$scenarioList[$seasonIdx] = [];
|
||||
}
|
||||
$scenarioList[$seasonIdx][$scenarioIdx] = $scenarioInfo;
|
||||
@@ -28,11 +29,10 @@ $scenarioList = (function(){
|
||||
|
||||
|
||||
|
||||
if($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx]??[])){
|
||||
if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
|
||||
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
|
||||
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$searchScenarioName = '* 모두 *';
|
||||
$searchFilter = $db->sqleval('season = %i', $seasonIdx);
|
||||
}
|
||||
@@ -42,134 +42,132 @@ else{
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJs('dist_js/hallOfFame.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJs('dist_js/hallOfFame.js') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr>
|
||||
<tr><td>
|
||||
시나리오 검색 : <select id="by_scenario" name="by_scenario">
|
||||
<?php foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value=""
|
||||
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
|
||||
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
|
||||
<?php foreach($subScenarioList as $info): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value="<?=$info['scenario']?>"
|
||||
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
|
||||
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
?>
|
||||
</select>
|
||||
</td></tr>
|
||||
</table>
|
||||
<div style="margin:auto;width:1100px;">
|
||||
<?php
|
||||
$types = [
|
||||
'experience'=>['명 성', 'int'],
|
||||
'dedication'=>['계 급', 'int'],
|
||||
'firenum'=>['계 략 성 공', 'int'],
|
||||
'warnum'=>['전 투 횟 수', 'int'],
|
||||
'killnum'=>['승 리', 'int'],
|
||||
'winrate'=>['승 률', 'percent'],
|
||||
'occupied'=>['점 령', 'int'],
|
||||
'killcrew'=>['사 살', 'int'],
|
||||
'killrate'=>['살 상 률', 'percent'],
|
||||
'killcrew_person'=>['대 인 사 살', 'int'],
|
||||
'killrate_person'=>['대 인 살 상 률', 'percent'],
|
||||
'dex1'=>['보 병 숙 련 도', 'int'],
|
||||
'dex2'=>['궁 병 숙 련 도', 'int'],
|
||||
'dex3'=>['기 병 숙 련 도', 'int'],
|
||||
'dex4'=>['귀 병 숙 련 도', 'int'],
|
||||
'dex5'=>['차 병 숙 련 도', 'int'],
|
||||
'ttrate'=>['전 력 전 승 률', 'percent'],
|
||||
'tlrate'=>['통 솔 전 승 률', 'percent'],
|
||||
'tsrate'=>['일 기 토 승 률', 'percent'],
|
||||
'tirate'=>['설 전 승 률', 'percent'],
|
||||
'betgold'=>['베 팅 투 자 액', 'int'],
|
||||
'betwin'=>['베 팅 당 첨', 'int'],
|
||||
'betwingold'=>['베 팅 수 익 금', 'int'],
|
||||
'betrate'=>['베 팅 수 익 률', 'percent'],
|
||||
];
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>명 예 의 전 당<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
시나리오 검색 : <select id="by_scenario" name="by_scenario">
|
||||
<?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?>
|
||||
<option data-season="<?= $iterSeasonIdx ?>" value="" <?= ($iterSeasonIdx == $seasonIdx && $scenarioIdx === null) ? "selected='selected'" : '' ?>>* 시즌 : <?= $iterSeasonIdx ?> 종합 *</option>
|
||||
<?php foreach ($subScenarioList as $info) : ?>
|
||||
<option data-season="<?= $iterSeasonIdx ?>" value="<?= $info['scenario'] ?>" <?= ($iterSeasonIdx == $seasonIdx && $info['scenario'] === $scenarioIdx) ? "selected='selected'" : '' ?>><?= $info['name'] ?>(<?= $info['cnt'] ?>회)</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin:auto;width:1100px;">
|
||||
<?php
|
||||
$types = [
|
||||
'experience' => ['명 성', 'int'],
|
||||
'dedication' => ['계 급', 'int'],
|
||||
'firenum' => ['계 략 성 공', 'int'],
|
||||
'warnum' => ['전 투 횟 수', 'int'],
|
||||
'killnum' => ['승 리', 'int'],
|
||||
'winrate' => ['승 률', 'percent'],
|
||||
'occupied' => ['점 령', 'int'],
|
||||
'killcrew' => ['사 살', 'int'],
|
||||
'killrate' => ['살 상 률', 'percent'],
|
||||
'killcrew_person' => ['대 인 사 살', 'int'],
|
||||
'killrate_person' => ['대 인 살 상 률', 'percent'],
|
||||
'dex1' => ['보 병 숙 련 도', 'int'],
|
||||
'dex2' => ['궁 병 숙 련 도', 'int'],
|
||||
'dex3' => ['기 병 숙 련 도', 'int'],
|
||||
'dex4' => ['귀 병 숙 련 도', 'int'],
|
||||
'dex5' => ['차 병 숙 련 도', 'int'],
|
||||
'ttrate' => ['전 력 전 승 률', 'percent'],
|
||||
'tlrate' => ['통 솔 전 승 률', 'percent'],
|
||||
'tsrate' => ['일 기 토 승 률', 'percent'],
|
||||
'tirate' => ['설 전 승 률', 'percent'],
|
||||
'betgold' => ['베 팅 투 자 액', 'int'],
|
||||
'betwin' => ['베 팅 당 첨', 'int'],
|
||||
'betwingold' => ['베 팅 수 익 금', 'int'],
|
||||
'betrate' => ['베 팅 수 익 률', 'percent'],
|
||||
];
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
$ownerNameList = [];
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
|
||||
foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
|
||||
$hallResult = $db->query('SELECT * FROM hall WHERE `type`=%s AND %? ORDER BY `value` DESC LIMIT 10', $typeName, $searchFilter);
|
||||
|
||||
$hallResult = array_map(function($general)use($typeValue, $ownerNameList){
|
||||
$aux = Json::decode($general['aux']);
|
||||
$general += $aux;
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$general['ownerName'] = $ownerNameList[$general['owner']];
|
||||
$ownerNameList = [];
|
||||
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
|
||||
if(!key_exists('bgColor', $general)){
|
||||
if(!key_exists('color', $general)){
|
||||
$general['bgColor'] = GameConst::$basecolor4;
|
||||
}
|
||||
else{
|
||||
$general['bgColor'] = $general['color'];
|
||||
}
|
||||
}
|
||||
foreach ($types as $typeName => [$typeDescribe, $typeValue]) {
|
||||
$hallResult = $db->query('SELECT * FROM hall WHERE `type`=%s AND %? ORDER BY `value` DESC LIMIT 10', $typeName, $searchFilter);
|
||||
|
||||
if(!key_exists('fgColor', $general)){
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
}
|
||||
$hallResult = array_map(function ($general) use ($typeValue, $ownerNameList) {
|
||||
$aux = Json::decode($general['aux']);
|
||||
$general += $aux;
|
||||
|
||||
if(key_exists('picture', $general)){
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
}
|
||||
else{
|
||||
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
}
|
||||
if (key_exists($general['owner'], $ownerNameList)) {
|
||||
$general['ownerName'] = $ownerNameList[$general['owner']];
|
||||
}
|
||||
|
||||
if(!key_exists('printValue', $general)){
|
||||
$value = $general['value'];
|
||||
if($typeValue == 'percent'){
|
||||
$general['printValue'] = number_format($value*100, 2).'%';
|
||||
}
|
||||
else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
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']);
|
||||
}
|
||||
|
||||
if (key_exists('picture', $general)) {
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
} else {
|
||||
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
|
||||
}
|
||||
|
||||
if (!key_exists('printValue', $general)) {
|
||||
$value = $general['value'];
|
||||
if ($typeValue == 'percent') {
|
||||
$general['printValue'] = number_format($value * 100, 2) . '%';
|
||||
} else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $general;
|
||||
}, $hallResult);
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName' => $typeDescribe,
|
||||
'generals' => $hallResult
|
||||
]);
|
||||
}
|
||||
|
||||
return $general;
|
||||
}, $hallResult);
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$typeDescribe,
|
||||
'generals'=>$hallResult
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
?>
|
||||
</div>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+129
-113
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -14,15 +15,15 @@ $userID = Session::getUserID();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
if(!$serverID){
|
||||
if (!$serverID) {
|
||||
$serverID = UniqueConst::$serverID;
|
||||
}
|
||||
|
||||
if($serverID === UniqueConst::$serverID){
|
||||
if ($serverID === UniqueConst::$serverID) {
|
||||
increaseRefresh("연감", 1);
|
||||
}
|
||||
|
||||
$admin = $gameStor->getValues(['startyear','year','month','map_theme']);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'map_theme']);
|
||||
|
||||
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID);
|
||||
|
||||
@@ -37,7 +38,7 @@ if ($con >= 2) {
|
||||
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
|
||||
$s = $s_year * 12 + $s_month;
|
||||
|
||||
if($s_year === null){
|
||||
if ($s_year === null) {
|
||||
echo '인자 에러';
|
||||
exit();
|
||||
}
|
||||
@@ -45,19 +46,17 @@ if($s_year === null){
|
||||
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
|
||||
$e = $e_year * 12 + $e_month;
|
||||
|
||||
if($serverID !== UniqueConst::$serverID){
|
||||
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID)?:'che';
|
||||
}
|
||||
else{
|
||||
$mapTheme = $admin['map_theme']??'che';
|
||||
if ($serverID !== UniqueConst::$serverID) {
|
||||
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID) ?: 'che';
|
||||
} else {
|
||||
$mapTheme = $admin['map_theme'] ?? 'che';
|
||||
}
|
||||
|
||||
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
||||
if($serverID !== UniqueConst::$serverID && !$yearmonth){
|
||||
if ($serverID !== UniqueConst::$serverID && !$yearmonth) {
|
||||
$year = $s_year;
|
||||
$month = $s_month;
|
||||
}
|
||||
else if (!$yearmonth) {
|
||||
} else if (!$yearmonth) {
|
||||
$year = $admin['year'];
|
||||
$month = $admin['month'] - 1;
|
||||
} else {
|
||||
@@ -70,7 +69,7 @@ else if (!$yearmonth) {
|
||||
$month += 1;
|
||||
}
|
||||
}
|
||||
$now = ($year*12) + $month;
|
||||
$now = ($year * 12) + $month;
|
||||
|
||||
if ($now < $s) {
|
||||
$now = $s;
|
||||
@@ -95,107 +94,124 @@ $nations = Json::decode($history['nations']);
|
||||
<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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
|
||||
<?=WebUtil::printJS('dist_js/history.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
<?=WebUtil::printCSS('css/history.css')?>
|
||||
<script>
|
||||
var startYear = <?=$s_year?>;
|
||||
var startMonth = <?=$s_month?>;
|
||||
var lastYear = <?=$e_year?>;
|
||||
var lastMonth = <?=$e_month?>;
|
||||
var selectYear = <?=$year?>;
|
||||
var selectMonth = <?=$month?>;
|
||||
var nations = <?=$nations?$history['nations']:'{}'?>;
|
||||
</script>
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?>
|
||||
<?= WebUtil::printJS('dist_js/history.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
<?= WebUtil::printCSS('css/history.css') ?>
|
||||
<script>
|
||||
var startYear = <?= $s_year ?>;
|
||||
var startMonth = <?= $s_month ?>;
|
||||
var lastYear = <?= $e_year ?>;
|
||||
var lastMonth = <?= $e_month ?>;
|
||||
var selectYear = <?= $year ?>;
|
||||
var selectMonth = <?= $month ?>;
|
||||
var nations = <?= $nations ? $history['nations'] : '{}' ?>;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>연 감<br><?=closeButton()?></td></tr>
|
||||
<tr><td>
|
||||
<form name=form1 method=post>
|
||||
연월 선택 :
|
||||
<input type=submit name=btn value="◀◀ 이전달">
|
||||
<select id='yearmonth' name=yearmonth size=1>
|
||||
<option selected='selected'><?=$year?>년 <?=$month?>월</option>
|
||||
<option><?=$e_year?>년 12월</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
<input type=submit name=btn value="다음달 ▶▶">
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 height=520 class='tb_layout bg0'>
|
||||
<thead><tr><th colspan=5 align=center class='bg1'>중 원 지 도</th></tr></thead>
|
||||
<tbody>
|
||||
<tr height=520>
|
||||
<td width=698>
|
||||
<?=getMapHtml($mapTheme)?>
|
||||
</td>
|
||||
<td id='nation_list_frame'>
|
||||
<table id='nation_list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width=130>국명</th>
|
||||
<th width=70>국력</th>
|
||||
<th width=45>장수</th>
|
||||
<th width=45>속령</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($nations as $nation): ?>
|
||||
<tr>
|
||||
<td><span style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'><?=$nation['name']?></td>
|
||||
<td style='text-align:right'><?=number_format($nation['power'])?></td>
|
||||
<td style='text-align:right'><?=number_format($nation['gennum'])?></td>
|
||||
<td style='text-align:right'><?=number_format(count($nation['cities']??[]))?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th colspan=5 align=center class='bg1'>중 원 정 세</th></tr>
|
||||
<tr>
|
||||
<td colspan=5 valign=top>
|
||||
<?=formatHistoryToHTML(Json::decode($history['global_history']))?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th colspan=5 align=center class='bg1'>장 수 동 향</th></tr>
|
||||
<tr>
|
||||
<td colspan=5 valign=top>
|
||||
<?=formatHistoryToHTML(Json::decode($history['global_action']))?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
reloadWorldMap({
|
||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||
showMe:false,
|
||||
neutralView:true,
|
||||
useCachedMap:false,
|
||||
year:<?=$year?>,
|
||||
month:<?=$month?>,
|
||||
});
|
||||
</script>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>연 감<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>
|
||||
연월 선택 :
|
||||
<input type=submit name=btn value="◀◀ 이전달">
|
||||
<select id='yearmonth' name=yearmonth size=1>
|
||||
<option selected='selected'><?= $year ?>년 <?= $month ?>월</option>
|
||||
<option><?= $e_year ?>년 12월</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
<input type=submit name=btn value="다음달 ▶▶">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 height=520 class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan=5 align=center class='bg1'>중 원 지 도</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr height=520>
|
||||
<td width=698>
|
||||
<?= getMapHtml($mapTheme) ?>
|
||||
</td>
|
||||
<td id='nation_list_frame'>
|
||||
<table id='nation_list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width=130>국명</th>
|
||||
<th width=70>국력</th>
|
||||
<th width=45>장수</th>
|
||||
<th width=45>속령</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($nations as $nation) : ?>
|
||||
<tr>
|
||||
<td><span style='color:<?= newColor($nation['color']) ?>;background-color:<?= $nation['color'] ?>'><?= $nation['name'] ?></td>
|
||||
<td style='text-align:right'><?= number_format($nation['power']) ?></td>
|
||||
<td style='text-align:right'><?= number_format($nation['gennum']) ?></td>
|
||||
<td style='text-align:right'><?= number_format(count($nation['cities'] ?? [])) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=5 align=center class='bg1'>중 원 정 세</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5 valign=top>
|
||||
<?= formatHistoryToHTML(Json::decode($history['global_history'])) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=5 align=center class='bg1'>장 수 동 향</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5 valign=top>
|
||||
<?= formatHistoryToHTML(Json::decode($history['global_action'])) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>
|
||||
window.serverNick = '<?= DB::prefix() ?>';
|
||||
window.serverID = '<?= UniqueConst::$serverID ?>';
|
||||
reloadWorldMap({
|
||||
targetJson: 'j_map_history.php?year=<?= $year ?>&month=<?= $month ?>&serverID=<?= $serverID ?>',
|
||||
showMe: false,
|
||||
neutralView: true,
|
||||
useCachedMap: false,
|
||||
year: <?= $year ?>,
|
||||
month: <?= $month ?>,
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+124
-109
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -15,145 +16,155 @@ increaseRefresh("세력일람", 2);
|
||||
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<!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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/extKingdoms.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/extKingdoms.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>세 력 일 람<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>세 력 일 람<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$nations = getAllNationStaticInfo();
|
||||
uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];});
|
||||
$nations = getAllNationStaticInfo();
|
||||
uasort($nations, function ($lhs, $rhs) {
|
||||
return $rhs['power'] <=> $lhs['power'];
|
||||
});
|
||||
|
||||
$nations[0] = getNationStaticInfo(0);
|
||||
$nations[0] = getNationStaticInfo(0);
|
||||
|
||||
foreach($db->query('SELECT npc,name,city,nation,officer_level,penalty,permission FROM general ORDER BY dedication DESC') as $general){
|
||||
$nationID = $general['nation'];
|
||||
foreach ($db->query('SELECT npc,name,city,nation,officer_level,penalty,permission FROM general ORDER BY dedication DESC') as $general) {
|
||||
$nationID = $general['nation'];
|
||||
|
||||
if(!key_exists('generals', $nations[$nationID])){
|
||||
$nations[$nationID]['generals'] = [];
|
||||
}
|
||||
$nations[$nationID]['generals'][] = $general;
|
||||
}
|
||||
|
||||
foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $nationID]) {
|
||||
if(!key_exists('cities', $nations[$nationID])){
|
||||
$nations[$nationID]['cities'] = [];
|
||||
}
|
||||
$nations[$nationID]['cities'][$cityID] = $cityName;
|
||||
}
|
||||
|
||||
foreach ($nations as $nation) {
|
||||
if ($nation['nation'] == 0) {
|
||||
//재야 도시, 장수
|
||||
continue;
|
||||
}
|
||||
$generals = $nation['generals'];
|
||||
|
||||
$chiefs = [];
|
||||
$ambassadors = [];
|
||||
$auditors = [];
|
||||
foreach($generals as $general){
|
||||
$officerLevel = $general['officer_level'];
|
||||
if($officerLevel >= 5){
|
||||
$chiefs[$officerLevel] = $general;
|
||||
}
|
||||
$generalPermission = checkSecretPermission($general, false);
|
||||
if($generalPermission == 4){
|
||||
$ambassadors[] = $general['name'];
|
||||
}
|
||||
else if($generalPermission == 3){
|
||||
$auditors[] = $general['name'];
|
||||
if (!key_exists('generals', $nations[$nationID])) {
|
||||
$nations[$nationID]['generals'] = [];
|
||||
}
|
||||
$nations[$nationID]['generals'][] = $general;
|
||||
}
|
||||
|
||||
echo "
|
||||
foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $nationID]) {
|
||||
if (!key_exists('cities', $nations[$nationID])) {
|
||||
$nations[$nationID]['cities'] = [];
|
||||
}
|
||||
$nations[$nationID]['cities'][$cityID] = $cityName;
|
||||
}
|
||||
|
||||
foreach ($nations as $nation) {
|
||||
if ($nation['nation'] == 0) {
|
||||
//재야 도시, 장수
|
||||
continue;
|
||||
}
|
||||
$generals = $nation['generals'];
|
||||
|
||||
$chiefs = [];
|
||||
$ambassadors = [];
|
||||
$auditors = [];
|
||||
foreach ($generals as $general) {
|
||||
$officerLevel = $general['officer_level'];
|
||||
if ($officerLevel >= 5) {
|
||||
$chiefs[$officerLevel] = $general;
|
||||
}
|
||||
$generalPermission = checkSecretPermission($general, false);
|
||||
if ($generalPermission == 4) {
|
||||
$ambassadors[] = $general['name'];
|
||||
} else if ($generalPermission == 3) {
|
||||
$auditors[] = $general['name'];
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
||||
<td colspan=8 align=center style=color:" . newColor($nation['color']) . "; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=80 align=center class='bg1'>성 향</td>
|
||||
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
||||
<td width=170 align=center><font color=yellow>" . getNationType($nation['type']) . "</font></td>
|
||||
<td width=80 align=center class='bg1'>작 위</td>
|
||||
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
|
||||
<td width=170 align=center>" . getNationLevel($nation['level']) . "</td>
|
||||
<td width=80 align=center class='bg1'>국 력</td>
|
||||
<td width=170 align=center>{$nation['power']}</td>
|
||||
<td width=80 align=center class='bg1'>장수 / 속령</td>
|
||||
<td width=170 align=center>{$nation['gennum']} / ".count($nation['cities']??[])."</td>
|
||||
<td width=170 align=center>{$nation['gennum']} / " . count($nation['cities'] ?? []) . "</td>
|
||||
";
|
||||
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
|
||||
if($chiefLevel % 4 == 0){
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
$chief = $chiefs[$chiefLevel]??['name'=>'-','npc'=>0];
|
||||
$officerLevelText = getOfficerLevelText($chiefLevel, $nation['level']);
|
||||
$chiefText = getColoredName($chief['name'], $chief['npc']);
|
||||
echo "<td class='center bg1'>{$officerLevelText}</td>
|
||||
for ($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--) {
|
||||
if ($chiefLevel % 4 == 0) {
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
$chief = $chiefs[$chiefLevel] ?? ['name' => '-', 'npc' => 0];
|
||||
$officerLevelText = getOfficerLevelText($chiefLevel, $nation['level']);
|
||||
$chiefText = getColoredName($chief['name'], $chief['npc']);
|
||||
echo "<td class='center bg1'>{$officerLevelText}</td>
|
||||
<td class='center'>{$chiefText}</td>";
|
||||
}
|
||||
echo "</tr>
|
||||
}
|
||||
echo "</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>외교권자</td><td colspan=5>";
|
||||
echo join(', ', $ambassadors);
|
||||
echo "</td><td align=center class='bg1'>조언자</td><td align=center >";
|
||||
echo count($auditors).'명';
|
||||
echo "</td></tr>
|
||||
echo join(', ', $ambassadors);
|
||||
echo "</td><td align=center class='bg1'>조언자</td><td align=center >";
|
||||
echo count($auditors) . '명';
|
||||
echo "</td></tr>
|
||||
<tr>
|
||||
<td colspan=8>";
|
||||
if($nation['level'] > 0) {
|
||||
echo "속령 일람 : ";
|
||||
if ($nation['level'] > 0) {
|
||||
echo "속령 일람 : ";
|
||||
|
||||
foreach($nation['cities'] as $cityID => $cityName) {
|
||||
if($cityID == $nation['capital']) {
|
||||
echo "<font color=cyan>[{$cityName}]</font>, ";
|
||||
} else {
|
||||
echo "{$cityName}, ";
|
||||
foreach ($nation['cities'] as $cityID => $cityName) {
|
||||
if ($cityID == $nation['capital']) {
|
||||
echo "<font color=cyan>[{$cityName}]</font>, ";
|
||||
} else {
|
||||
echo "{$cityName}, ";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$cityName = CityConst::byID($chiefs[12]['city'])->name;
|
||||
} else {
|
||||
$cityName = CityConst::byID($chiefs[12]['city'])->name;
|
||||
|
||||
echo "현재 위치 : <font color=yellow>{$cityName}</font>";
|
||||
}
|
||||
echo"
|
||||
echo "현재 위치 : <font color=yellow>{$cityName}</font>";
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=8> 장수 일람 : ";
|
||||
foreach($generals as $general){
|
||||
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; }
|
||||
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; }
|
||||
else { echo "{$general['name']}, "; }
|
||||
}
|
||||
echo"
|
||||
foreach ($generals as $general) {
|
||||
if ($general['npc'] >= 2) {
|
||||
echo "<font color=cyan>{$general['name']}</font>, ";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
echo "<font color=skyblue>{$general['name']}</font>, ";
|
||||
} else {
|
||||
echo "{$general['name']}, ";
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>";
|
||||
}
|
||||
}
|
||||
|
||||
//재야
|
||||
echo "
|
||||
//재야
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=5 align=center>【 재 야 】</td>
|
||||
@@ -163,33 +174,37 @@ echo "
|
||||
<td width=123 align=center class='bg1'>장 수</td>
|
||||
<td width=123 align=center>{$nations[0]['gennum']}</td>
|
||||
<td width=123 align=center class='bg1'>속 령</td>
|
||||
<td width=123 align=center>".count($nations[0]['cities']??[])."</td>
|
||||
<td width=123 align=center>" . count($nations[0]['cities'] ?? []) . "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5> 속령 일람 : ";
|
||||
foreach($nations[0]['cities']??[] as $cityName) {
|
||||
echo "{$cityName}, ";
|
||||
}
|
||||
echo"
|
||||
foreach ($nations[0]['cities'] ?? [] as $cityName) {
|
||||
echo "{$cityName}, ";
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5> 장수 일람 : ";
|
||||
foreach($nations[0]['generals'] as $general) {
|
||||
foreach ($nations[0]['generals'] as $general) {
|
||||
$generalText = getColoredName($general['name'], $general['npc']);
|
||||
echo "{$generalText}, ";
|
||||
}
|
||||
echo"
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
</table>";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+108
-98
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -6,7 +7,7 @@ include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 1);
|
||||
|
||||
if($type <= 0 || $type > 8){
|
||||
if ($type <= 0 || $type > 8) {
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
@@ -22,112 +23,121 @@ $sel[$type] = "selected";
|
||||
<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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>빙 의 일 람<br><?=closeButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1]??''?> value=1>이름</option>
|
||||
<option <?=$sel[2]??''?> value=2>국가</option>
|
||||
<option <?=$sel[3]??''?> value=3>종능</option>
|
||||
<option <?=$sel[4]??''?> value=4>통솔</option>
|
||||
<option <?=$sel[5]??''?> value=5>무력</option>
|
||||
<option <?=$sel[6]??''?> value=6>지력</option>
|
||||
<option <?=$sel[7]??''?> value=7>명성</option>
|
||||
<option <?=$sel[8]??''?> value=8>계급</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationName = [];
|
||||
$nationName[0] = "-";
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
}
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>빙 의 일 람<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?= $sel[1] ?? '' ?> value=1>이름</option>
|
||||
<option <?= $sel[2] ?? '' ?> value=2>국가</option>
|
||||
<option <?= $sel[3] ?? '' ?> value=3>종능</option>
|
||||
<option <?= $sel[4] ?? '' ?> value=4>통솔</option>
|
||||
<option <?= $sel[5] ?? '' ?> value=5>무력</option>
|
||||
<option <?= $sel[6] ?? '' ?> value=6>지력</option>
|
||||
<option <?= $sel[7] ?? '' ?> value=7>명성</option>
|
||||
<option <?= $sel[8] ?? '' ?> value=8>계급</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationName = [];
|
||||
$nationName[0] = "-";
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
}
|
||||
|
||||
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
|
||||
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
|
||||
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
|
||||
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
|
||||
|
||||
if($generalListFromPool){
|
||||
$generalList = array_merge($generalListFromPool, $generalList);
|
||||
}
|
||||
if ($generalListFromPool) {
|
||||
$generalList = array_merge($generalListFromPool, $generalList);
|
||||
}
|
||||
|
||||
$sortType = [
|
||||
1 => ['name', true],
|
||||
2 => ['nation', true],
|
||||
3 => ['sum', false],
|
||||
4 => ['leadership', false],
|
||||
5 => ['strength', false],
|
||||
6 => ['intel', false],
|
||||
7 => ['experience', false],
|
||||
8 => ['dedication', false],
|
||||
];
|
||||
$sortType = [
|
||||
1 => ['name', true],
|
||||
2 => ['nation', true],
|
||||
3 => ['sum', false],
|
||||
4 => ['leadership', false],
|
||||
5 => ['strength', false],
|
||||
6 => ['intel', false],
|
||||
7 => ['experience', false],
|
||||
8 => ['dedication', false],
|
||||
];
|
||||
|
||||
[$sortKey, $isAsc] = $sortType[$type];
|
||||
[$sortKey, $isAsc] = $sortType[$type];
|
||||
|
||||
if($isAsc){
|
||||
usort($generalList, function($lhs, $rhs)use($sortKey){
|
||||
return $lhs[$sortKey] <=> $rhs[$sortKey];
|
||||
});
|
||||
}
|
||||
else{
|
||||
usort($generalList, function($lhs, $rhs)use($sortKey){
|
||||
return $rhs[$sortKey] <=> $lhs[$sortKey];
|
||||
});
|
||||
}
|
||||
if ($isAsc) {
|
||||
usort($generalList, function ($lhs, $rhs) use ($sortKey) {
|
||||
return $lhs[$sortKey] <=> $rhs[$sortKey];
|
||||
});
|
||||
} else {
|
||||
usort($generalList, function ($lhs, $rhs) use ($sortKey) {
|
||||
return $rhs[$sortKey] <=> $lhs[$sortKey];
|
||||
});
|
||||
}
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=102 align=center class='bg1'>희생된 장수</td>
|
||||
<td width=102 align=center class='bg1'>악령 이름</td>
|
||||
<td width=68 align=center class='bg1'>레벨</td>
|
||||
<td width=118 align=center class='bg1'>국가</td>
|
||||
<td width=68 align=center class='bg1'>성격</td>
|
||||
<td width=88 align=center class='bg1'>특기</td>
|
||||
<td width=68 align=center class='bg1'>종능</td>
|
||||
<td width=68 align=center class='bg1'>통솔</td>
|
||||
<td width=68 align=center class='bg1'>무력</td>
|
||||
<td width=68 align=center class='bg1'>지력</td>
|
||||
<td width=78 align=center class='bg1'>명성</td>
|
||||
<td width=78 align=center class='bg1'>계급</td>
|
||||
</tr>
|
||||
<?php foreach($generalList as $general): ?>
|
||||
<tr>
|
||||
<td align=center><?=getColoredName($general['name'], $general['npc'])?></td>
|
||||
<td align=center><?=$general['owner_name']?></td>
|
||||
<td align=center>Lv <?=$general['explevel']?></td>
|
||||
<td align=center><?=$nationName[$general['nation']]?></td>
|
||||
<td align=center><?=displayCharInfo($general['personal'])?></td>
|
||||
<td align=center><?=displaySpecialDomesticInfo($general['special'])?> / <?=displaySpecialWarInfo($general['special2'])?></td>
|
||||
<td align=center><?=$general['sum']?></td>
|
||||
<td align=center><?=$general['leadership']?></td>
|
||||
<td align=center><?=$general['strength']?></td>
|
||||
<td align=center><?=$general['intel']?></td>
|
||||
<td align=center><?=$general['experience']?></td>
|
||||
<td align=center><?=$general['dedication']?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=102 align=center class='bg1'>희생된 장수</td>
|
||||
<td width=102 align=center class='bg1'>악령 이름</td>
|
||||
<td width=68 align=center class='bg1'>레벨</td>
|
||||
<td width=118 align=center class='bg1'>국가</td>
|
||||
<td width=68 align=center class='bg1'>성격</td>
|
||||
<td width=88 align=center class='bg1'>특기</td>
|
||||
<td width=68 align=center class='bg1'>종능</td>
|
||||
<td width=68 align=center class='bg1'>통솔</td>
|
||||
<td width=68 align=center class='bg1'>무력</td>
|
||||
<td width=68 align=center class='bg1'>지력</td>
|
||||
<td width=78 align=center class='bg1'>명성</td>
|
||||
<td width=78 align=center class='bg1'>계급</td>
|
||||
</tr>
|
||||
<?php foreach ($generalList as $general) : ?>
|
||||
<tr>
|
||||
<td align=center><?= getColoredName($general['name'], $general['npc']) ?></td>
|
||||
<td align=center><?= $general['owner_name'] ?></td>
|
||||
<td align=center>Lv <?= $general['explevel'] ?></td>
|
||||
<td align=center><?= $nationName[$general['nation']] ?></td>
|
||||
<td align=center><?= displayCharInfo($general['personal']) ?></td>
|
||||
<td align=center><?= displaySpecialDomesticInfo($general['special']) ?> / <?= displaySpecialWarInfo($general['special2']) ?></td>
|
||||
<td align=center><?= $general['sum'] ?></td>
|
||||
<td align=center><?= $general['leadership'] ?></td>
|
||||
<td align=center><?= $general['strength'] ?></td>
|
||||
<td align=center><?= $general['intel'] ?></td>
|
||||
<td align=center><?= $general['experience'] ?></td>
|
||||
<td align=center><?= $general['dedication'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+62
-51
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -13,70 +14,80 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
increaseRefresh("세력도", 2);
|
||||
TurnExecutionHelper::executeAllCommand();
|
||||
|
||||
$mapTheme = $gameStor->map_theme??'che';
|
||||
$mapTheme = $gameStor->map_theme ?? 'che';
|
||||
|
||||
$me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<!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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('dist_js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
$(function(){
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/map.js') ?>
|
||||
<script>
|
||||
window.serverNick = '<?= DB::prefix() ?>';
|
||||
window.serverID = '<?= UniqueConst::$serverID ?>';
|
||||
$(function() {
|
||||
|
||||
reloadWorldMap({
|
||||
neutralView:true,
|
||||
showMe:true,
|
||||
useCachedMap:true
|
||||
});
|
||||
reloadWorldMap({
|
||||
neutralView: true,
|
||||
showMe: true,
|
||||
useCachedMap: true
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
});
|
||||
</script>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/normalize.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1200 class='tb_layout bg0'>
|
||||
<tr><td>세 력 도<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1200 height=520 class='tb_layout bg0'>
|
||||
<tr height=520>
|
||||
<td width=498 valign=top>
|
||||
<?=formatHistoryToHTML(getGlobalActionLogRecent(34))?>
|
||||
</td>
|
||||
<td width=698>
|
||||
<?=getMapHtml($mapTheme)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 valign=top>
|
||||
<?=formatHistoryToHTML(getGlobalHistoryLogRecent(34))?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1200 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<table align=center width=1200 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>세 력 도<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1200 height=520 class='tb_layout bg0'>
|
||||
<tr height=520>
|
||||
<td width=498 valign=top>
|
||||
<?= formatHistoryToHTML(getGlobalActionLogRecent(34)) ?>
|
||||
</td>
|
||||
<td width=698>
|
||||
<?= getMapHtml($mapTheme) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 valign=top>
|
||||
<?= formatHistoryToHTML(getGlobalHistoryLogRecent(34)) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1200 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+205
-148
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -9,9 +10,9 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("갱신정보", 2);
|
||||
|
||||
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'refresh', 'maxrefresh', 'maxonline']);
|
||||
|
||||
$log = getRawFileLogRecent(__DIR__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
|
||||
$log = getRawFileLogRecent(__DIR__ . '/logs/' . UniqueConst::$serverID . '/_traffic.txt', 11, 100);
|
||||
|
||||
$date = [];
|
||||
$year = [];
|
||||
@@ -20,7 +21,7 @@ $refresh = [];
|
||||
$online = [];
|
||||
|
||||
$curonline = getOnlineNum();
|
||||
foreach($log as $i=>$value){
|
||||
foreach ($log as $i => $value) {
|
||||
$parse = Json::decode($value);
|
||||
$date[$i] = $parse[0];
|
||||
$year[$i] = $parse[1];
|
||||
@@ -47,155 +48,183 @@ if ($admin['maxonline'] < $curonline) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
.big_bar{
|
||||
float:left;
|
||||
position:relative;
|
||||
height:30px;
|
||||
}
|
||||
.big_bar span{
|
||||
float:right;
|
||||
padding:0;
|
||||
margin:0;
|
||||
line-height:30px;
|
||||
padding-right:1ch;
|
||||
}
|
||||
<title><?= UniqueConst::$serverName ?>: 트래픽정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
.big_bar {
|
||||
float: left;
|
||||
position: relative;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.little_bar{
|
||||
float:left;
|
||||
position:relative;
|
||||
height:17px;
|
||||
}
|
||||
.big_bar span {
|
||||
float: right;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
padding-right: 1ch;
|
||||
}
|
||||
|
||||
span.out_bar{
|
||||
line-height:30px;
|
||||
margin-left:1ch;
|
||||
}
|
||||
</style>
|
||||
.little_bar {
|
||||
float: left;
|
||||
position: relative;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
span.out_bar {
|
||||
line-height: 30px;
|
||||
margin-left: 1ch;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>트 래 픽 정 보<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1016>
|
||||
<tr><td align=left>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 량</font></td></tr>
|
||||
<?php
|
||||
$refresh[] = $admin['refresh'];
|
||||
foreach($refresh as $i=>$value){
|
||||
$w = round($value / $admin['maxrefresh'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center class='bg2'><?=$dt?></td>
|
||||
<td width=2 align=center class='bg1'></td>
|
||||
<td width=320>
|
||||
<?php if($w == 0): ?>
|
||||
<span class="out_bar"><?=$value?></span>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||
<?php else:?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||
<?php endif;?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>트 래 픽 정 보<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1016>
|
||||
<tr>
|
||||
<td align=left>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=4 align=center class='bg2'>
|
||||
<font size=5>접 속 량</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$refresh[] = $admin['refresh'];
|
||||
foreach ($refresh as $i => $value) {
|
||||
$w = round($value / $admin['maxrefresh'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?= $year[$i] ?>년 <?= $month[$i] ?>월</td>
|
||||
<td width=60 align=center class='bg2'><?= $dt ?></td>
|
||||
<td width=2 align=center class='bg1'></td>
|
||||
<td width=320>
|
||||
<?php if ($w == 0) : ?>
|
||||
<span class="out_bar"><?= $value ?></span>
|
||||
<?php elseif ($w < 10) : ?>
|
||||
<div class='big_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'></div><span class="out_bar"><?= $value ?></span>
|
||||
<?php else : ?>
|
||||
<div class='big_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'><span><?= $value ?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=4 height=5 align=center class='bg1'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td align=right>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=4 align=center class='bg2'>
|
||||
<font size=5>접 속 자</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$online[] = $curonline;
|
||||
foreach ($online as $i => $value) {
|
||||
$w = round($value / $admin['maxonline'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?= $year[$i] ?>년 <?= $month[$i] ?>월</td>
|
||||
<td width=60 align=center class='bg2'><?= $dt ?></td>
|
||||
<td width=2 align=center class='bg1'></td>
|
||||
<td width=320>
|
||||
<?php if ($w == 0) : ?>
|
||||
<span class="out_bar"><?= $value ?></span>
|
||||
<?php elseif ($w < 10) : ?>
|
||||
<div class='big_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'></div><span class="out_bar"><?= $value ?></span>
|
||||
<?php else : ?>
|
||||
<div class='big_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'><span><?= $value ?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=4 height=5 align=center class='bg1'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=3 align=center class='bg2'>
|
||||
<font size=5>주 의 대 상 자 (순간과도갱신)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
|
||||
$max_refresh['name'] = '접속자 총합';
|
||||
|
||||
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
|
||||
|
||||
foreach ($refresh_result as $i => $user) {
|
||||
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
|
||||
$w2 = round(100 - $w, 1);
|
||||
$color = getTrafficColor($w);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center><?= $user['name'] ?></td>
|
||||
<td width=98 align=center><?= $user['connect'] ?>(<?= $user['refresh'] ?>)</td>
|
||||
<td width=798>
|
||||
<?php if ($w == 0) : ?>
|
||||
<?php elseif ($w < 10) : ?>
|
||||
<div class='little_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'></div>
|
||||
<?php else : ?>
|
||||
<div class='little_bar' style='width:<?= $w ?>%;background-color:<?= $color ?>;'></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?=$admin['maxrefresh']?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td align=right>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 자</font></td></tr>
|
||||
<?php
|
||||
$online[] = $curonline;
|
||||
foreach($online as $i=>$value){
|
||||
$w = round($value / $admin['maxonline'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center class='bg2'><?=$dt?></td>
|
||||
<td width=2 align=center class='bg1'></td>
|
||||
<td width=320>
|
||||
<?php if($w == 0): ?>
|
||||
<span class="out_bar"><?=$value?></span>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||
<?php else:?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||
<?php endif;?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?=$admin['maxonline']?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=3 align=center class='bg2'><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr>
|
||||
<?php
|
||||
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
|
||||
$max_refresh['name'] = '접속자 총합';
|
||||
|
||||
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
|
||||
|
||||
foreach ($refresh_result as $i=>$user) {
|
||||
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
|
||||
$w2 = round(100 - $w, 1);
|
||||
$color = getTrafficColor($w);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center><?=$user['name']?></td>
|
||||
<td width=98 align=center><?=$user['connect']?>(<?=$user['refresh']?>)</td>
|
||||
<td width=798>
|
||||
<?php if($w == 0): ?>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||
<?php else:?>
|
||||
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<?php
|
||||
@@ -204,7 +233,7 @@ function getTrafficColor($per)
|
||||
$r = getHex($per);
|
||||
$b = getHex(100 - $per);
|
||||
$color = $r . "00" . $b;
|
||||
return '#'.$color;
|
||||
return '#' . $color;
|
||||
}
|
||||
|
||||
function getHex($dec)
|
||||
@@ -218,9 +247,37 @@ function getHex($dec)
|
||||
function getHexCode($hex)
|
||||
{
|
||||
switch ($hex) {
|
||||
case 0: return "0"; case 1: return "1"; case 2: return "2"; case 3: return "3";
|
||||
case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7";
|
||||
case 8: return "8"; case 9: return "9"; case 10: return "A"; case 11: return "B";
|
||||
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";
|
||||
case 0:
|
||||
return "0";
|
||||
case 1:
|
||||
return "1";
|
||||
case 2:
|
||||
return "2";
|
||||
case 3:
|
||||
return "3";
|
||||
case 4:
|
||||
return "4";
|
||||
case 5:
|
||||
return "5";
|
||||
case 6:
|
||||
return "6";
|
||||
case 7:
|
||||
return "7";
|
||||
case 8:
|
||||
return "8";
|
||||
case 9:
|
||||
return "9";
|
||||
case 10:
|
||||
return "A";
|
||||
case 11:
|
||||
return "B";
|
||||
case 12:
|
||||
return "C";
|
||||
case 13:
|
||||
return "D";
|
||||
case 14:
|
||||
return "E";
|
||||
case 15:
|
||||
return "F";
|
||||
}
|
||||
}
|
||||
|
||||
+267
-233
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -11,155 +12,163 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("설문조사", 1);
|
||||
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()] ?? []);
|
||||
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
|
||||
|
||||
$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']);
|
||||
$vote_title = $admin['vote_title']??'-';
|
||||
$vote = $admin['vote']?:['-'];
|
||||
$admin = $gameStor->getValues(['develcost', 'voteopen', 'vote_title', 'vote', 'votecomment']);
|
||||
$vote_title = $admin['vote_title'] ?? '-';
|
||||
$vote = $admin['vote'] ?: ['-'];
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 설문조사</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
.little_bar{
|
||||
float:left;
|
||||
position:relative;
|
||||
height:17px;
|
||||
line-height:17px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function captureKey(e) {
|
||||
if(e.keyCode == 13 && e.srcElement.type == 'text') {
|
||||
form1.btn.value = '댓글';
|
||||
form1.btn.click();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<title><?= UniqueConst::$serverName ?>: 설문조사</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
.little_bar {
|
||||
float: left;
|
||||
position: relative;
|
||||
height: 17px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function captureKey(e) {
|
||||
if (e.keyCode == 13 && e.srcElement.type == 'text') {
|
||||
form1.btn.value = '댓글';
|
||||
form1.btn.click();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>설 문 조 사<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form name=form1 action=c_vote.php method=post>
|
||||
<tr><td colspan=3 align=center class='bg2'><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
|
||||
<?php
|
||||
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>설 문 조 사<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form name=form1 action=c_vote.php method=post>
|
||||
<tr>
|
||||
<td colspan=3 align=center class='bg2'>
|
||||
<font size=5>설 문 조 사 (<?= $admin['develcost'] * 5 ?>금과 추첨으로 유니크템 증정!)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=48 align=center><input type=submit name=btn value='알림'></td>
|
||||
<td width=98 align=center><input type=submit name=btn value='수정'></td>
|
||||
<td width=848 align=left><input type=text name=title style=width:848px;></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
$vote_title = Tag2Code($vote_title);
|
||||
echo "
|
||||
$vote_title = Tag2Code($vote_title);
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=2 width=148 align=center class='bg1'>제 목</td>
|
||||
<td width=848 align=left> {$vote_title}</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$voteCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote>0 AND npc<2');
|
||||
$allCount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
||||
$voteCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote>0 AND npc<2');
|
||||
$allCount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
||||
|
||||
$percentage = round($voteCount / $allCount * 100, 1);
|
||||
$percentage = round($voteCount / $allCount * 100, 1);
|
||||
|
||||
$voteTypeCount = count($vote);
|
||||
for ($i=1; $i < $voteTypeCount; $i++) {
|
||||
echo "
|
||||
$voteTypeCount = count($vote);
|
||||
for ($i = 1; $i < $voteTypeCount; $i++) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=48 align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$i}.</td>
|
||||
<td width=48 align=center style=color:" . getNewColor($i) . "; bgcolor=" . getVoteColor($i) . ">{$i}.</td>
|
||||
<td width=98 align=center>
|
||||
";
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
<input type=radio name=sel value={$i}>
|
||||
";
|
||||
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
$vCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote=%i', $i);
|
||||
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
$vCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote=%i', $i);
|
||||
|
||||
$per = @round($vCount / $voteCount * 100, 1);
|
||||
echo "{$vCount} 표 ({$per}%)";
|
||||
} else {
|
||||
echo "추후공개";
|
||||
}
|
||||
$vote[$i] = Tag2Code($vote[$i]);
|
||||
echo "
|
||||
$per = @round($vCount / $voteCount * 100, 1);
|
||||
echo "{$vCount} 표 ({$per}%)";
|
||||
} else {
|
||||
echo "추후공개";
|
||||
}
|
||||
$vote[$i] = Tag2Code($vote[$i]);
|
||||
echo "
|
||||
</td>
|
||||
<td align=left> {$vote[$i]}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
<tr>
|
||||
";
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
<td align=center>투표</td>
|
||||
<td align=center><input type=submit name=btn value='투표'></td>
|
||||
";
|
||||
} else {
|
||||
echo "
|
||||
} else {
|
||||
echo "
|
||||
<td colspan=2 align=center>결산</td>
|
||||
";
|
||||
}
|
||||
echo "
|
||||
}
|
||||
echo "
|
||||
<td align=left> 투표율 : {$voteCount} / {$allCount} ({$percentage} %)</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center><input type=submit name=btn value='리셋'></td>
|
||||
<td align=center><input type=submit name=btn value='추가'></td>
|
||||
<td align=left><input type=text name=str style=width:848px;></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
if ($admin['votecomment']) {
|
||||
$comment = $admin['votecomment'];
|
||||
$commentCount = count($comment);
|
||||
} else {
|
||||
$commentCount = 0;
|
||||
}
|
||||
echo "
|
||||
if ($admin['votecomment']) {
|
||||
$comment = $admin['votecomment'];
|
||||
$commentCount = count($comment);
|
||||
} else {
|
||||
$commentCount = 0;
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=4 align=center class='bg1'>댓 글</td>
|
||||
</tr>
|
||||
";
|
||||
for ($i=0; $i < $commentCount; $i++) {
|
||||
$cmt = $comment[$i];
|
||||
$cmt[2] = Tag2Code($cmt[2]);
|
||||
$j = $i+1;
|
||||
echo "
|
||||
for ($i = 0; $i < $commentCount; $i++) {
|
||||
$cmt = $comment[$i];
|
||||
$cmt[2] = Tag2Code($cmt[2]);
|
||||
$j = $i + 1;
|
||||
echo "
|
||||
<tr>
|
||||
<td width=28 align=center>{$j}.</td>
|
||||
<td width=130 align=center>{$cmt[0]}</td>
|
||||
@@ -167,202 +176,205 @@ for ($i=0; $i < $commentCount; $i++) {
|
||||
<td width=712 align=left> {$cmt[2]}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
if ($me['no'] > 0) {
|
||||
echo "
|
||||
}
|
||||
if ($me['no'] > 0) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=158 colspan=2 align=center>-</td>
|
||||
<td width=130 align=center><input type=submit name=btn value='댓글'></td>
|
||||
<td align=left><input type=text name=comment maxlength=60 style=width:700px; onkeydown='return captureKey(event)'></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=3 align=center class='bg2'><font size=5>
|
||||
전 체 통 계
|
||||
<?php
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=3 align=center class='bg2'>
|
||||
<font size=5>
|
||||
전 체 통 계
|
||||
<?php
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<input type=submit name=btn value='숨김'>
|
||||
<input type=submit name=btn value='전체통계만'>
|
||||
<input type=submit name=btn value='전부'>";
|
||||
}
|
||||
echo "
|
||||
}
|
||||
echo "
|
||||
</font></td></tr>";
|
||||
|
||||
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
echo "
|
||||
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=130 align=center>전 체</td>
|
||||
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
|
||||
<td width=742>
|
||||
";
|
||||
|
||||
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
|
||||
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
|
||||
|
||||
$totalVote = [];
|
||||
$nationVoteCount = [];
|
||||
$nationVote = [];
|
||||
$totalVote = [];
|
||||
$nationVoteCount = [];
|
||||
$nationVote = [];
|
||||
|
||||
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
|
||||
$nation = $row['nation'];
|
||||
$ownVote = $row['vote'];
|
||||
$cnt = $row['cnt'];
|
||||
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
|
||||
$nation = $row['nation'];
|
||||
$ownVote = $row['vote'];
|
||||
$cnt = $row['cnt'];
|
||||
|
||||
if (!isset($totalVote[$ownVote])) {
|
||||
$totalVote[$ownVote] = 0;
|
||||
}
|
||||
if (!isset($totalVote[$ownVote])) {
|
||||
$totalVote[$ownVote] = 0;
|
||||
}
|
||||
|
||||
if (!isset($nationVoteCount[$nation])) {
|
||||
$nationVoteCount[$nation] = 0;
|
||||
$nationVote[$nation] = [];
|
||||
}
|
||||
if (!isset($nationVoteCount[$nation])) {
|
||||
$nationVoteCount[$nation] = 0;
|
||||
$nationVote[$nation] = [];
|
||||
}
|
||||
|
||||
if (!isset($nationVote[$nation][$ownVote])) {
|
||||
$nationVote[$nation][$ownVote] = 0;
|
||||
}
|
||||
if (!isset($nationVote[$nation][$ownVote])) {
|
||||
$nationVote[$nation][$ownVote] = 0;
|
||||
}
|
||||
|
||||
$totalVote[$ownVote] += $cnt;
|
||||
$nationVoteCount[$nation] += $cnt;
|
||||
$nationVote[$nation][$ownVote] += $cnt;
|
||||
}
|
||||
$totalVote[$ownVote] += $cnt;
|
||||
$nationVoteCount[$nation] += $cnt;
|
||||
$nationVote[$nation][$ownVote] += $cnt;
|
||||
}
|
||||
|
||||
$totalPer = 0;
|
||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(($totalVote[$i]??0) * 100 / $memCount, 1);
|
||||
if($i == $voteTypeCount-1){
|
||||
$per = 100-$totalPer;
|
||||
}
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
$totalPer = 0;
|
||||
for ($i = 0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(($totalVote[$i] ?? 0) * 100 / $memCount, 1);
|
||||
if ($i == $voteTypeCount - 1) {
|
||||
$per = 100 - $totalPer;
|
||||
} else {
|
||||
$totalPer += $per;
|
||||
}
|
||||
|
||||
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if($per == 0): ?>
|
||||
<?php elseif($per < 10): ?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
|
||||
<?php else:?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$totalVote[$i]?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
}
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if ($per == 0) : ?>
|
||||
<?php elseif ($per < 10) : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($i) ?>;background-color:<?= getVoteColor($i) ?>;'></div>
|
||||
<?php else : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($i) ?>;background-color:<?= getVoteColor($i) ?>;'><?= $totalVote[$i] ?></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=0 AND npc <2');
|
||||
if ($memCount == 0) {
|
||||
$memCount = 1;
|
||||
}
|
||||
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=0 AND npc <2');
|
||||
if ($memCount == 0) {
|
||||
$memCount = 1;
|
||||
}
|
||||
|
||||
if (!isset($nationVoteCount[0])) {
|
||||
$nationVoteCount[0] = 0;
|
||||
}
|
||||
$percentage = round($nationVoteCount[0] / $memCount * 100, 1);
|
||||
if (!isset($nationVoteCount[0])) {
|
||||
$nationVoteCount[0] = 0;
|
||||
}
|
||||
$percentage = round($nationVoteCount[0] / $memCount * 100, 1);
|
||||
|
||||
echo "
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center bgcolor=black>재 야</td>
|
||||
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</td>
|
||||
<td>
|
||||
";
|
||||
|
||||
$totalPer = 0;
|
||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
|
||||
if($i == $voteTypeCount-1){
|
||||
$per = 100-$totalPer;
|
||||
}
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if($per == 0): ?>
|
||||
<?php elseif($per < 10): ?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
|
||||
<?php else:?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$nationVote[0][$i]?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
}
|
||||
$totalPer = 0;
|
||||
for ($i = 0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
|
||||
if ($i == $voteTypeCount - 1) {
|
||||
$per = 100 - $totalPer;
|
||||
} else {
|
||||
$totalPer += $per;
|
||||
}
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if ($per == 0) : ?>
|
||||
<?php elseif ($per < 10) : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($i) ?>;background-color:<?= getVoteColor($i) ?>;'></div>
|
||||
<?php else : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($i) ?>;background-color:<?= getVoteColor($i) ?>;'><?= $nationVote[0][$i] ?></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
foreach($db->query('SELECT nation,color,name,gennum from nation order by gennum desc') as $i=>$nation){
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=%i AND npc<2', $nation['nation']);
|
||||
foreach ($db->query('SELECT nation,color,name,gennum from nation order by gennum desc') as $i => $nation) {
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=%i AND npc<2', $nation['nation']);
|
||||
|
||||
|
||||
|
||||
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
|
||||
if($memCount == 0){
|
||||
$percentage = 100;
|
||||
}
|
||||
else{
|
||||
$percentage = round($voteCount / $memCount * 100, 1);
|
||||
}
|
||||
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
|
||||
if ($memCount == 0) {
|
||||
$percentage = 100;
|
||||
} else {
|
||||
$percentage = round($voteCount / $memCount * 100, 1);
|
||||
}
|
||||
|
||||
|
||||
echo "
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
|
||||
<td align=center style=color:" . newColor($nation['color']) . "; bgcolor={$nation['color']}>{$nation['name']}</td>
|
||||
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</td>
|
||||
<td align=center>
|
||||
";
|
||||
|
||||
$totalPer = 0;
|
||||
for ($k=0; $k < $voteTypeCount; $k++) {
|
||||
if($memCount == 0){
|
||||
$per = 0;
|
||||
continue;
|
||||
}
|
||||
$totalPer = 0;
|
||||
for ($k = 0; $k < $voteTypeCount; $k++) {
|
||||
if ($memCount == 0) {
|
||||
$per = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
$per = round(($nationVote[$nation['nation']][$k]??0) / $memCount * 100, 1);
|
||||
$per = round(($nationVote[$nation['nation']][$k] ?? 0) / $memCount * 100, 1);
|
||||
|
||||
if($i == $voteTypeCount-1){
|
||||
$per = 100-$totalPer;
|
||||
}
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
if ($i == $voteTypeCount - 1) {
|
||||
$per = 100 - $totalPer;
|
||||
} else {
|
||||
$totalPer += $per;
|
||||
}
|
||||
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if($per == 0): ?>
|
||||
<?php elseif($per < 10): ?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'></div>
|
||||
<?php else:?>
|
||||
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'><?=$nationVote[$nation['nation']][$k]??0?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
}
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if ($per == 0) : ?>
|
||||
<?php elseif ($per < 10) : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($k) ?>;background-color:<?= getVoteColor($k) ?>;'></div>
|
||||
<?php else : ?>
|
||||
<div class='little_bar' style='width:<?= $per ?>%;color:<?= getNewColor($k) ?>;background-color:<?= getVoteColor($k) ?>;'><?= $nationVote[$nation['nation']][$k] ?? 0 ?></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<?php
|
||||
@@ -373,15 +385,31 @@ function getVoteColor($type)
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
default:
|
||||
case 0: $color = "black"; break;
|
||||
case 1: $color = "red"; break;
|
||||
case 2: $color = "orange"; break;
|
||||
case 3: $color = "yellow"; break;
|
||||
case 4: $color = "green"; break;
|
||||
case 5: $color = "blue"; break;
|
||||
case 6: $color = "navy"; break;
|
||||
case 7: $color = "purple"; break;
|
||||
default:
|
||||
case 0:
|
||||
$color = "black";
|
||||
break;
|
||||
case 1:
|
||||
$color = "red";
|
||||
break;
|
||||
case 2:
|
||||
$color = "orange";
|
||||
break;
|
||||
case 3:
|
||||
$color = "yellow";
|
||||
break;
|
||||
case 4:
|
||||
$color = "green";
|
||||
break;
|
||||
case 5:
|
||||
$color = "blue";
|
||||
break;
|
||||
case 6:
|
||||
$color = "navy";
|
||||
break;
|
||||
case 7:
|
||||
$color = "purple";
|
||||
break;
|
||||
}
|
||||
|
||||
return $color;
|
||||
@@ -394,9 +422,15 @@ function getNewColor($type)
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 2: $color = "black"; break;
|
||||
case 3: $color = "black"; break;
|
||||
default:$color = "white"; break;
|
||||
case 2:
|
||||
$color = "black";
|
||||
break;
|
||||
case 3:
|
||||
$color = "black";
|
||||
break;
|
||||
default:
|
||||
$color = "white";
|
||||
break;
|
||||
}
|
||||
|
||||
return $color;
|
||||
|
||||
+233
-199
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -44,64 +45,76 @@ if ($msg2 == "") {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 거래장</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>거 래 장<br><?=closeButton()?></td></tr>
|
||||
<tr><td align=center class='bg2'><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form method=post action=c_auction.php>
|
||||
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>판매자</td>
|
||||
<td width=118>물품</td>
|
||||
<td width=88>수량</td>
|
||||
<td width=88>시작판매가</td>
|
||||
<td width=88>현재판매가</td>
|
||||
<td width=88>즉시판매가</td>
|
||||
<td width=48>단가</td>
|
||||
<td width=98>구매 예정자</td>
|
||||
<td width=148>거래종료</td>
|
||||
</tr>
|
||||
<?php
|
||||
$chk = 0;
|
||||
foreach($db->query('SELECT * from auction where type=0 order by expire') as $auction){
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
|
||||
echo "
|
||||
<head>
|
||||
<title><?= UniqueConst::$serverName ?>: 거래장</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>거 래 장<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg2'>
|
||||
<font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form method=post action=c_auction.php>
|
||||
<tr>
|
||||
<td colspan=11 align=center bgcolor=orange>
|
||||
<font size=5>팝 니 다</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>판매자</td>
|
||||
<td width=118>물품</td>
|
||||
<td width=88>수량</td>
|
||||
<td width=88>시작판매가</td>
|
||||
<td width=88>현재판매가</td>
|
||||
<td width=88>즉시판매가</td>
|
||||
<td width=48>단가</td>
|
||||
<td width=98>구매 예정자</td>
|
||||
<td width=148>거래종료</td>
|
||||
</tr>
|
||||
<?php
|
||||
$chk = 0;
|
||||
foreach ($db->query('SELECT * from auction where type=0 order by expire') as $auction) {
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
|
||||
@@ -116,79 +129,83 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
|
||||
<td>{$auction['expire']}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>입찰등록</td>
|
||||
<td colspan=10>
|
||||
지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?=$btn?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: 쌀
|
||||
판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
|
||||
<input type=<?=$btn?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=11>
|
||||
ㆍ<font color=cyan>Hint</font>) 거래자가 판매(물품 판매, 금 수령), 입찰자가 구매(물품 구입, 금 지불).<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 판매자 유리.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 입찰자 유리.<br>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form method=post action=c_auction.php>
|
||||
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>구매자</td>
|
||||
<td width=118>물품</td>
|
||||
<td width=88>수량</td>
|
||||
<td width=88>시작구매가</td>
|
||||
<td width=88>현재구매가</td>
|
||||
<td width=88>즉시구매가</td>
|
||||
<td width=48>단가</td>
|
||||
<td width=98>판매 예정자</td>
|
||||
<td width=148>거래종료</td>
|
||||
</tr>
|
||||
<?php
|
||||
$chk = 0;
|
||||
foreach($db->query('SELECT * from auction where type=1 order by expire') as $auction){
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
echo "
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?= ConvertLog($msg) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>입찰등록</td>
|
||||
<td colspan=10>
|
||||
지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?= $btn ?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: 쌀
|
||||
판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
|
||||
<input type=<?= $btn ?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=11>
|
||||
ㆍ<font color=cyan>Hint</font>) 거래자가 판매(물품 판매, 금 수령), 입찰자가 구매(물품 구입, 금 지불).<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 판매자 유리.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 입찰자 유리.<br>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form method=post action=c_auction.php>
|
||||
<tr>
|
||||
<td colspan=11 align=center bgcolor=skyblue>
|
||||
<font size=5>삽 니 다</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>구매자</td>
|
||||
<td width=118>물품</td>
|
||||
<td width=88>수량</td>
|
||||
<td width=88>시작구매가</td>
|
||||
<td width=88>현재구매가</td>
|
||||
<td width=88>즉시구매가</td>
|
||||
<td width=48>단가</td>
|
||||
<td width=98>판매 예정자</td>
|
||||
<td width=148>거래종료</td>
|
||||
</tr>
|
||||
<?php
|
||||
$chk = 0;
|
||||
foreach ($db->query('SELECT * from auction where type=1 order by expire') as $auction) {
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
|
||||
@@ -203,73 +220,90 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
|
||||
<td>{$auction['expire']}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>입찰등록</td>
|
||||
<td colspan=10>
|
||||
수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?=$btn?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: 쌀
|
||||
구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
|
||||
<input type=<?=$btn?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=11>
|
||||
ㆍ<font color=cyan>Hint</font>) 거래자가 구매(물품 구매, 금 지불), 입찰자가 판매(물품 판매, 금 수령).<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 구매자 유리.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 입찰자 유리.<br>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td align=center class='bg2'><font size=5>최 근 기 록</font></td></tr>
|
||||
<tr><td>
|
||||
<?=getAuctionLogRecent(20)?>
|
||||
</td></tr>
|
||||
<tr><td align=center class='bg2'><font size=5>도 움 말</font></td></tr>
|
||||
<tr><td>
|
||||
<font color=white size=2>
|
||||
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 겁니다.<br>
|
||||
ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 겁니다.<br>
|
||||
ㆍ마감임박때 입찰하는 경우 입찰후 1턴 후로 종료시간이 연장됩니다.<br>
|
||||
ㆍ즉시구매가로 입찰하는 경우 입찰후 1턴 후로 종료시간이 결정됩니다.<br>
|
||||
ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
|
||||
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
|
||||
ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.<br>
|
||||
ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.<br>
|
||||
ㆍ<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
|
||||
ㆍ<font color=red>★ 최고가 거래 ★</font> 혹은 <font color=red>★ 최저가 거래 ★</font> 는 암거래 및 악용의 가능성이니 감시 부탁드립니다.<br>
|
||||
ㆍ거래와 입찰은 취소가 불가능하니 주의하세요!<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가는 금/쌀로 쌀1을 거래하기 위한 금의 양입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
|
||||
ㆍ즐거운 거래!
|
||||
</font>
|
||||
</td></tr>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?= ConvertLog($msg2) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>입찰등록</td>
|
||||
<td colspan=10>
|
||||
수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?= $btn ?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: 쌀
|
||||
구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
|
||||
<input type=<?= $btn ?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=11>
|
||||
ㆍ<font color=cyan>Hint</font>) 거래자가 구매(물품 구매, 금 지불), 입찰자가 판매(물품 판매, 금 수령).<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 구매자 유리.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 입찰자 유리.<br>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td align=center class='bg2'>
|
||||
<font size=5>최 근 기 록</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?= getAuctionLogRecent(20) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg2'>
|
||||
<font size=5>도 움 말</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font color=white size=2>
|
||||
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 겁니다.<br>
|
||||
ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 겁니다.<br>
|
||||
ㆍ마감임박때 입찰하는 경우 입찰후 1턴 후로 종료시간이 연장됩니다.<br>
|
||||
ㆍ즉시구매가로 입찰하는 경우 입찰후 1턴 후로 종료시간이 결정됩니다.<br>
|
||||
ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
|
||||
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
|
||||
ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.<br>
|
||||
ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.<br>
|
||||
ㆍ<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
|
||||
ㆍ<font color=red>★ 최고가 거래 ★</font> 혹은 <font color=red>★ 최저가 거래 ★</font> 는 암거래 및 악용의 가능성이니 감시 부탁드립니다.<br>
|
||||
ㆍ거래와 입찰은 취소가 불가능하니 주의하세요!<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가는 금/쌀로 쌀1을 거래하기 위한 금의 양입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.<br>
|
||||
ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
|
||||
ㆍ즐거운 거래!
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+125
-104
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -6,7 +7,7 @@ include "func.php";
|
||||
|
||||
$v = new Validator($_POST + $_GET);
|
||||
$v->rule('required', 'gen')
|
||||
->rule('integer', 'gen');
|
||||
->rule('integer', 'gen');
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
@@ -14,24 +15,24 @@ $reqQueryType = Util::getReq('query_type', 'string', null);
|
||||
|
||||
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
|
||||
$queryMap = [
|
||||
'turntime' => ['최근턴', 0, function($lhs, $rhs){
|
||||
return -($lhs['turntime']<=>$rhs['turntime']);
|
||||
'turntime' => ['최근턴', 0, function ($lhs, $rhs) {
|
||||
return - ($lhs['turntime'] <=> $rhs['turntime']);
|
||||
}],
|
||||
'recent_war' => ['최근전투', 1, function($lhs, $rhs){
|
||||
return -($lhs['recent_war']<=>$rhs['recent_war']);
|
||||
'recent_war' => ['최근전투', 1, function ($lhs, $rhs) {
|
||||
return - ($lhs['recent_war'] <=> $rhs['recent_war']);
|
||||
}],
|
||||
'name' => ['장수명', 0, function($lhs, $rhs){
|
||||
if($lhs['npc'] !== $rhs['npc']){
|
||||
return $lhs['npc']<=>$rhs['npc'];
|
||||
'name' => ['장수명', 0, function ($lhs, $rhs) {
|
||||
if ($lhs['npc'] !== $rhs['npc']) {
|
||||
return $lhs['npc'] <=> $rhs['npc'];
|
||||
}
|
||||
return $lhs['name']<=>$rhs['name'];
|
||||
return $lhs['name'] <=> $rhs['name'];
|
||||
}],
|
||||
'warnum' => ['전투수', 2, function($lhs, $rhs){
|
||||
return -($lhs['warnum']<=>$rhs['warnum']);
|
||||
'warnum' => ['전투수', 2, function ($lhs, $rhs) {
|
||||
return - ($lhs['warnum'] <=> $rhs['warnum']);
|
||||
}]
|
||||
];
|
||||
|
||||
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
|
||||
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
|
||||
$reqQueryType = Util::array_first_key($queryMap);
|
||||
}
|
||||
|
||||
@@ -60,11 +61,10 @@ if ($con >= 2) {
|
||||
}
|
||||
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
if ($permission < 0) {
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
} else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
@@ -80,34 +80,33 @@ if ($btn == '정렬하기') {
|
||||
|
||||
|
||||
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
|
||||
if($reqArgType===0){
|
||||
if ($reqArgType === 0) {
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID);
|
||||
}
|
||||
else if($reqArgType===1){
|
||||
} else if ($reqArgType === 1) {
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
|
||||
}
|
||||
else if($reqArgType===2){
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b
|
||||
} else if ($reqArgType === 2) {
|
||||
$generalBasicList = $db->query(
|
||||
'SELECT no, name, npc, turntime, officer_level, value as %b
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
WHERE rank_data.type = %s AND general.nation = %i',
|
||||
$reqQueryType, $reqQueryType, $nationID
|
||||
$reqQueryType,
|
||||
$reqQueryType,
|
||||
$nationID
|
||||
);
|
||||
}
|
||||
else if($reqArgType===3){
|
||||
$generalBasicList = array_map(function($arr){
|
||||
} else if ($reqArgType === 3) {
|
||||
$generalBasicList = array_map(function ($arr) {
|
||||
$arr['aux'] = Json::decode($arr['aux']);
|
||||
return $arr;
|
||||
}, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID));
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
throw new \sammo\MustNotBeReachedException();
|
||||
}
|
||||
|
||||
|
||||
usort($generalBasicList, $comp);
|
||||
|
||||
if(!$gen){
|
||||
if (!$gen) {
|
||||
$gen = $generalBasicList[0]['no'];
|
||||
}
|
||||
$showGeneral = General::createGeneralObjFromDB($gen);
|
||||
@@ -116,84 +115,106 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 감찰부</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<title><?= UniqueConst::$serverName ?>: 감찰부</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>감 찰 부<br><?=closeButton()?></td></tr>
|
||||
<tr><td>
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name='query_type' size=1>
|
||||
<?php foreach($queryMap as $queryType => [$queryTypeText,]): ?>
|
||||
<option <?=$queryType==$reqQueryType?'selected':''?> value='<?=$queryType?>'><?=$queryTypeText?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
<select name=gen size=1>
|
||||
<?php foreach($generalBasicList as $general): ?>
|
||||
<option <?=$gen==$general['no']?'selected':''?> value='<?=$general['no']?>'><?=$general['officer_level']>4?"*{$general['name']}*":$general['name']?> (<?=substr($general['turntime'], 14, 5)?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table width=1000 align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50% align=center class='bg1'><font color=skyblue size=3>장 수 정 보</font></td>
|
||||
<td width=50% align=center class='bg1'><font color=orange size=3>장 수 열 전</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($showGeneral); generalInfo2($showGeneral); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?=formatHistoryToHTML(getGeneralHistoryLogAll($gen))?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td>
|
||||
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?=formatHistoryToHTML(getBattleDetailLogRecent($gen, 24))?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?=formatHistoryToHTML(getBattleResultRecent($gen, 24))?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($showGeneral->getNPCType() > 1 || $permission >= 2): ?>
|
||||
<tr>
|
||||
<td align=center class='bg1'><font color=orange size=3>개인 기록</font></td>
|
||||
<td align=center class='bg1'><font color=orange size=3> </font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?=formatHistoryToHTML(getGeneralActionLogRecent($gen, 24))?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>감 찰 부<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name='query_type' size=1>
|
||||
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
|
||||
<option <?= $queryType == $reqQueryType ? 'selected' : '' ?> value='<?= $queryType ?>'><?= $queryTypeText ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
<select name=gen size=1>
|
||||
<?php foreach ($generalBasicList as $general) : ?>
|
||||
<option <?= $gen == $general['no'] ? 'selected' : '' ?> value='<?= $general['no'] ?>'><?= $general['officer_level'] > 4 ? "*{$general['name']}*" : $general['name'] ?> (<?= substr($general['turntime'], 14, 5) ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width=1000 align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50% align=center class='bg1'>
|
||||
<font color=skyblue size=3>장 수 정 보</font>
|
||||
</td>
|
||||
<td width=50% align=center class='bg1'>
|
||||
<font color=orange size=3>장 수 열 전</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($showGeneral);
|
||||
generalInfo2($showGeneral); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 기록</font>
|
||||
</td>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 결과</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?= formatHistoryToHTML(getBattleDetailLogRecent($gen, 24)) ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?= formatHistoryToHTML(getBattleResultRecent($gen, 24)) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?>
|
||||
<tr>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>개인 기록</font>
|
||||
</td>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3> </font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?= formatHistoryToHTML(getGeneralActionLogRecent($gen, 24)) ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+483
-380
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -26,7 +27,7 @@ $me = $db->queryFirstRow('SELECT no,tournament,con,turntime from general where o
|
||||
$myBetTotal = array_sum($myBet);
|
||||
$globalBetTotal = array_sum($globalBet);
|
||||
|
||||
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost']);
|
||||
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'develcost']);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -35,21 +36,42 @@ if ($con >= 2) {
|
||||
}
|
||||
|
||||
switch ($admin['tnmt_type']) {
|
||||
default: throw new \RuntimeException('Invalid tnmt_type');
|
||||
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break;
|
||||
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break;
|
||||
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break;
|
||||
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "지력"; $tp3 = "intel"; break;
|
||||
default:
|
||||
throw new \RuntimeException('Invalid tnmt_type');
|
||||
case 0:
|
||||
$tnmt_type = "<font color=cyan>전력전</font>";
|
||||
$tp = "total";
|
||||
$tp2 = "종합";
|
||||
$tp3 = "total";
|
||||
break;
|
||||
case 1:
|
||||
$tnmt_type = "<font color=cyan>통솔전</font>";
|
||||
$tp = "leadership";
|
||||
$tp2 = "통솔";
|
||||
$tp3 = "leadership";
|
||||
break;
|
||||
case 2:
|
||||
$tnmt_type = "<font color=cyan>일기토</font>";
|
||||
$tp = "strength";
|
||||
$tp2 = "무력";
|
||||
$tp3 = "strength";
|
||||
break;
|
||||
case 3:
|
||||
$tnmt_type = "<font color=cyan>설전</font>";
|
||||
$tp = "intel";
|
||||
$tp2 = "지력";
|
||||
$tp3 = "intel";
|
||||
break;
|
||||
}
|
||||
|
||||
$str1 = getTournament($admin['tournament']);
|
||||
$str2 = getTournamentTime();
|
||||
if($str2){
|
||||
$str2 = ', '.$str2;
|
||||
if ($str2) {
|
||||
$str2 = ', ' . $str2;
|
||||
}
|
||||
$str3 = getTournamentTerm();
|
||||
if($str3){
|
||||
$str3 = ', '.$str3;
|
||||
if ($str3) {
|
||||
$str3 = ', ' . $str3;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -58,306 +80,349 @@ if($str3){
|
||||
<?php if ($con == 1) {
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
|
||||
<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('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/betting.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/betting.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr><td>베 팅 장<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr>
|
||||
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
|
||||
<tr><td height=50 colspan=16 align=center class='bg2'><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
|
||||
while(count($generalList) < 1){
|
||||
$generalList[] = [
|
||||
'name'=>'-',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
}
|
||||
foreach($generalList as $i=>$general){
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
echo "<td colspan=16>{$general['name']}</td>";
|
||||
}
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>베 팅 장<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=16><input type=button value='갱신' onclick='location.reload()'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=16 align=center>
|
||||
<font color=white size=6><?= $tnmt_type ?> (<?= $str1 . $str2 . $str3 ?>)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=50 colspan=16 align=center class='bg2'>
|
||||
<font color=limegreen size=6>16강 상황</font><br>
|
||||
<font color=orange size=3>(전체 금액 : <?= $globalBetTotal ?> / 내 투자 금액 : <?= $myBetTotal ?>)</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
|
||||
<tr align=center>
|
||||
<td height=10 colspan=16></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
|
||||
while (count($generalList) < 1) {
|
||||
$generalList[] = [
|
||||
'name' => '-',
|
||||
'npc' => 0,
|
||||
'win' => 0
|
||||
];
|
||||
}
|
||||
foreach ($generalList as $i => $general) {
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
|
||||
}
|
||||
echo "<td colspan=16>{$general['name']}</td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
$cent = [];
|
||||
$line = [];
|
||||
$gen = [];
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
|
||||
while(count($generalList) < 2){
|
||||
$generalList[] = [
|
||||
'name'=>'-',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
}
|
||||
foreach($generalList as $i=>$general){
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>";
|
||||
echo "<td colspan=16>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
|
||||
}
|
||||
echo "
|
||||
$cent = [];
|
||||
$line = [];
|
||||
$gen = [];
|
||||
for ($i = 0; $i < 1; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
|
||||
while (count($generalList) < 2) {
|
||||
$generalList[] = [
|
||||
'name' => '-',
|
||||
'npc' => 0,
|
||||
'win' => 0
|
||||
];
|
||||
}
|
||||
foreach ($generalList as $i => $general) {
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i = 0; $i < 1; $i++) {
|
||||
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
||||
$line[$i * 2] = $line[$i * 2] . "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━" . "</font>";
|
||||
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━━━━━━━━━━━━━━━┓" . "</font>";
|
||||
echo "<td colspan=16>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
||||
}
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
echo "<td colspan=8>{$gen[$i]}</td>";
|
||||
}
|
||||
for ($i = 0; $i < 2; $i++) {
|
||||
echo "<td colspan=8>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
|
||||
while(count($generalList) < 4){
|
||||
$generalList[] = [
|
||||
'name'=>'-',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
}
|
||||
foreach($generalList as $i=>$general){
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━┓"."</font>";
|
||||
echo "<td colspan=8>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
|
||||
}
|
||||
echo "
|
||||
for ($i = 0; $i < 2; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
|
||||
while (count($generalList) < 4) {
|
||||
$generalList[] = [
|
||||
'name' => '-',
|
||||
'npc' => 0,
|
||||
'win' => 0
|
||||
];
|
||||
}
|
||||
foreach ($generalList as $i => $general) {
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i = 0; $i < 2; $i++) {
|
||||
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
||||
$line[$i * 2] = $line[$i * 2] . "┏━━━━━━━━━━━━━" . "</font>";
|
||||
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━┓" . "</font>";
|
||||
echo "<td colspan=8>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
||||
}
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
echo "<td colspan=4>{$gen[$i]}</td>";
|
||||
}
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
echo "<td colspan=4>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
|
||||
while(count($generalList) < 8){
|
||||
$generalList[] = [
|
||||
'name'=>'-',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
}
|
||||
foreach($generalList as $i=>$general){
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━┓"."</font>";
|
||||
echo "<td colspan=4>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
|
||||
}
|
||||
echo "
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
|
||||
while (count($generalList) < 8) {
|
||||
$generalList[] = [
|
||||
'name' => '-',
|
||||
'npc' => 0,
|
||||
'win' => 0
|
||||
];
|
||||
}
|
||||
foreach ($generalList as $i => $general) {
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
||||
$line[$i * 2] = $line[$i * 2] . "┏━━━━━━" . "</font>";
|
||||
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━┓" . "</font>";
|
||||
echo "<td colspan=4>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
||||
}
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
echo "<td colspan=2>{$gen[$i]}</td>";
|
||||
}
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
echo "<td colspan=2>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
|
||||
while(count($generalList) < 16){
|
||||
$generalList[] = [
|
||||
'name'=>'-',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
}
|
||||
foreach($generalList as $i=>$general){
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━┓"."</font>";
|
||||
echo "<td colspan=2>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
|
||||
}
|
||||
echo "
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
|
||||
while (count($generalList) < 16) {
|
||||
$generalList[] = [
|
||||
'name' => '-',
|
||||
'npc' => 0,
|
||||
'win' => 0
|
||||
];
|
||||
}
|
||||
foreach ($generalList as $i => $general) {
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
||||
$line[$i * 2] = $line[$i * 2] . "┏━━" . "</font>";
|
||||
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━┓" . "</font>";
|
||||
echo "<td colspan=2>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
||||
}
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td width=70>{$gen[$i]}</td>";
|
||||
}
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "<td width=70>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
$bet = [];
|
||||
$gold = [];
|
||||
$bet = [];
|
||||
$gold = [];
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if($globalBet[$i] == 0){
|
||||
$bet[$i] = "∞";
|
||||
}
|
||||
else{
|
||||
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
if ($globalBet[$i] == 0) {
|
||||
$bet[$i] = "∞";
|
||||
} else {
|
||||
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
|
||||
}
|
||||
}
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if(!is_numeric($bet[$i])){
|
||||
$gold[$i] = 0;
|
||||
}
|
||||
else{
|
||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>
|
||||
<?php
|
||||
echo "
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
if (!is_numeric($bet[$i])) {
|
||||
$gold[$i] = 0;
|
||||
} else {
|
||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr align=center>
|
||||
<td height=10 colspan=16></td>
|
||||
</tr>
|
||||
<?php
|
||||
echo "
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td>
|
||||
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td>
|
||||
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
|
||||
}
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
<td>×</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
<td>∥</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>";
|
||||
|
||||
if ($admin['tournament'] == 6) {
|
||||
echo "
|
||||
if ($admin['tournament'] == 6) {
|
||||
echo "
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td>
|
||||
<select size=1 id='target_{$i}' style=color:white;background-color:black;>
|
||||
<option style=color:white; value=10>금10</option>
|
||||
@@ -369,127 +434,165 @@ if ($admin['tournament'] == 6) {
|
||||
<option style=color:white; value=1000>최대</option>
|
||||
</select>
|
||||
</td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
for ($i = 0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td><input type=button class='submitBtn' data-target='{$i}' value=베팅! style=width:100%;color:white;background-color:black;></td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
?>
|
||||
<tr align=center>
|
||||
<td height=30 colspan=16>
|
||||
<font color=skyblue size=4>배당률</font> × <font color=orange size=4>베팅금</font> = <font color=cyan size=4>적중시 환수금</font><br>
|
||||
<font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr align=center><td height=50 colspan=4 class='bg2'><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
|
||||
<tr align=center><td colspan=4 class='bg2'><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
?>
|
||||
<tr align=center>
|
||||
<td height=30 colspan=16>
|
||||
<font color=skyblue size=4>배당률</font> × <font color=orange size=4>베팅금</font> = <font color=cyan size=4>적중시 환수금</font><br>
|
||||
<font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td height=10 colspan=16></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr align=center>
|
||||
<td height=50 colspan=4 class='bg2'>
|
||||
<font color=yellow size=6>토너먼트 랭킹</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td colspan=4 class='bg2'>
|
||||
<font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
|
||||
$tournamentType = [
|
||||
'전 력 전'=>[
|
||||
'종합',
|
||||
function(General $general){return $general->getVar('leadership')+$general->getVar('strength')+$general->getVar('intel');},
|
||||
'tt',
|
||||
],
|
||||
'통 솔 전'=>[
|
||||
'통솔',
|
||||
function(General $general){return $general->getVar('leadership');},
|
||||
'tl',
|
||||
],
|
||||
'일 기 토'=>[
|
||||
'무력',
|
||||
function(General $general){return $general->getVar('strength');},
|
||||
'ts',
|
||||
],
|
||||
'설 전'=>[
|
||||
'지력',
|
||||
function(General $general){return $general->getVar('intel');},
|
||||
'ti',
|
||||
],
|
||||
];
|
||||
$tournamentType = [
|
||||
'전 력 전' => [
|
||||
'종합',
|
||||
function (General $general) {
|
||||
return $general->getVar('leadership') + $general->getVar('strength') + $general->getVar('intel');
|
||||
},
|
||||
'tt',
|
||||
],
|
||||
'통 솔 전' => [
|
||||
'통솔',
|
||||
function (General $general) {
|
||||
return $general->getVar('leadership');
|
||||
},
|
||||
'tl',
|
||||
],
|
||||
'일 기 토' => [
|
||||
'무력',
|
||||
function (General $general) {
|
||||
return $general->getVar('strength');
|
||||
},
|
||||
'ts',
|
||||
],
|
||||
'설 전' => [
|
||||
'지력',
|
||||
function (General $general) {
|
||||
return $general->getVar('intel');
|
||||
},
|
||||
'ti',
|
||||
],
|
||||
];
|
||||
|
||||
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
|
||||
$type2 = array("종합", "통솔", "무력", "지력");
|
||||
$type3 = array("tt", "tl", "ts", "ti");
|
||||
$type4 = array("total", "leadership", "strength", "intel");
|
||||
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
|
||||
$type2 = array("종합", "통솔", "무력", "지력");
|
||||
$type3 = array("tt", "tl", "ts", "ti");
|
||||
$type4 = array("total", "leadership", "strength", "intel");
|
||||
|
||||
foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankColumn]): ?>
|
||||
<td>
|
||||
<table align=center width=280 class='tb_layout bg0'>
|
||||
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4><?=$tournamentTypeText?></font></td></tr>
|
||||
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center><?=$statTypeText?></td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr>
|
||||
<?php
|
||||
$prizeColumn = "{$rankColumn}p";
|
||||
$gameColumn = "{$rankColumn}g";
|
||||
$winColumn = "{$rankColumn}w";
|
||||
$drawColumn = "{$rankColumn}d";
|
||||
$loseColumn = "{$rankColumn}l";
|
||||
$tournamentRankerList = General::createGeneralObjListFromDB(
|
||||
$db->queryFirstColumn('SELECT general_id FROM rank_data WHERE `type`= %s ORDER BY value DESC LIMIT 40', $gameColumn),
|
||||
[$prizeColumn, $gameColumn, $winColumn, $drawColumn, $loseColumn,'leadership', 'strength', 'intel', 'no', 'npc', 'name'],
|
||||
0
|
||||
);
|
||||
usort($tournamentRankerList, function(General $lhs, General $rhs) use($gameColumn, $winColumn, $drawColumn, $loseColumn){
|
||||
$result = -($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
|
||||
if($result !== 0) return $result;
|
||||
$result = -(
|
||||
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
|
||||
<=>
|
||||
($rhs->getRankVar($winColumn)+$rhs->getRankVar($drawColumn)+$rhs->getRankVar($loseColumn))
|
||||
);
|
||||
if($result !== 0) return $result;
|
||||
$result = -($lhs->getRankVar($winColumn) <=> $rhs->getRankVar($winColumn));
|
||||
if($result !== 0) return $result;
|
||||
$result = -($lhs->getRankVar($drawColumn) <=> $rhs->getRankVar($drawColumn));
|
||||
if($result !== 0) return $result;
|
||||
return $lhs->getRankVar($loseColumn) <=> $rhs->getRankVar($loseColumn);
|
||||
});
|
||||
$tournamentRankerList = array_splice($tournamentRankerList, 0, 30);
|
||||
foreach($tournamentRankerList as $rank=>$ranker){
|
||||
printRow(
|
||||
$rank,
|
||||
$ranker->getNPCType(),
|
||||
$ranker->getName(),
|
||||
($statFunc)($ranker),
|
||||
$ranker->getRankVar($winColumn)+$ranker->getRankVar($drawColumn)+$ranker->getRankVar($loseColumn),
|
||||
$ranker->getRankVar($winColumn),
|
||||
$ranker->getRankVar($drawColumn),
|
||||
$ranker->getRankVar($loseColumn),
|
||||
$ranker->getRankVar($gameColumn),
|
||||
$ranker->getRankVar($prizeColumn),
|
||||
0
|
||||
);
|
||||
}
|
||||
?>
|
||||
</table></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=16>
|
||||
ㆍ토너먼트의 16강 대진표가 완성되면, 베팅 기간이 주어집니다.<br>
|
||||
ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 알 수 있습니다.<br>
|
||||
ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 금 1000씩 베팅 가능합니다.<br>
|
||||
ㆍ소지금 500원 이하일땐 베팅이 불가능합니다.
|
||||
ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?>
|
||||
<td>
|
||||
<table align=center width=280 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=9 align=center style=color:white;background-color:black;>
|
||||
<font size=4><?= $tournamentTypeText ?></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='bg1'>
|
||||
<td align=center>순</td>
|
||||
<td align=center>장수</td>
|
||||
<td align=center><?= $statTypeText ?></td>
|
||||
<td align=center>경</td>
|
||||
<td align=center>승</td>
|
||||
<td align=center>무</td>
|
||||
<td align=center>패</td>
|
||||
<td align=center>점</td>
|
||||
<td align=center>勝</td>
|
||||
</tr>
|
||||
<?php
|
||||
$prizeColumn = "{$rankColumn}p";
|
||||
$gameColumn = "{$rankColumn}g";
|
||||
$winColumn = "{$rankColumn}w";
|
||||
$drawColumn = "{$rankColumn}d";
|
||||
$loseColumn = "{$rankColumn}l";
|
||||
$tournamentRankerList = General::createGeneralObjListFromDB(
|
||||
$db->queryFirstColumn('SELECT general_id FROM rank_data WHERE `type`= %s ORDER BY value DESC LIMIT 40', $gameColumn),
|
||||
[$prizeColumn, $gameColumn, $winColumn, $drawColumn, $loseColumn, 'leadership', 'strength', 'intel', 'no', 'npc', 'name'],
|
||||
0
|
||||
);
|
||||
usort($tournamentRankerList, function (General $lhs, General $rhs) use ($gameColumn, $winColumn, $drawColumn, $loseColumn) {
|
||||
$result = - ($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
|
||||
if ($result !== 0) return $result;
|
||||
$result = - (
|
||||
($lhs->getRankVar($winColumn) + $lhs->getRankVar($drawColumn) + $lhs->getRankVar($loseColumn))
|
||||
<=>
|
||||
($rhs->getRankVar($winColumn) + $rhs->getRankVar($drawColumn) + $rhs->getRankVar($loseColumn))
|
||||
);
|
||||
if ($result !== 0) return $result;
|
||||
$result = - ($lhs->getRankVar($winColumn) <=> $rhs->getRankVar($winColumn));
|
||||
if ($result !== 0) return $result;
|
||||
$result = - ($lhs->getRankVar($drawColumn) <=> $rhs->getRankVar($drawColumn));
|
||||
if ($result !== 0) return $result;
|
||||
return $lhs->getRankVar($loseColumn) <=> $rhs->getRankVar($loseColumn);
|
||||
});
|
||||
$tournamentRankerList = array_splice($tournamentRankerList, 0, 30);
|
||||
foreach ($tournamentRankerList as $rank => $ranker) {
|
||||
printRow(
|
||||
$rank,
|
||||
$ranker->getNPCType(),
|
||||
$ranker->getName(),
|
||||
($statFunc)($ranker),
|
||||
$ranker->getRankVar($winColumn) + $ranker->getRankVar($drawColumn) + $ranker->getRankVar($loseColumn),
|
||||
$ranker->getRankVar($winColumn),
|
||||
$ranker->getRankVar($drawColumn),
|
||||
$ranker->getRankVar($loseColumn),
|
||||
$ranker->getRankVar($gameColumn),
|
||||
$ranker->getRankVar($prizeColumn),
|
||||
0
|
||||
);
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=16>
|
||||
ㆍ토너먼트의 16강 대진표가 완성되면, 베팅 기간이 주어집니다.<br>
|
||||
ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 알 수 있습니다.<br>
|
||||
ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 금 1000씩 베팅 가능합니다.<br>
|
||||
ㆍ소지금 500원 이하일땐 베팅이 불가능합니다.
|
||||
ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+70
-90
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -10,99 +11,78 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
|
||||
?>
|
||||
<!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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/chiefCenter.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/chiefCenter.css')?>
|
||||
<script type="text/javascript">
|
||||
var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
||||
</script>
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/chiefCenter.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/chiefCenter.css') ?>
|
||||
<script type="text/javascript">
|
||||
var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>;
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
|
||||
<div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br>
|
||||
<?=backButton()?></div>
|
||||
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
|
||||
<div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
|
||||
><div class='chiefTurnIdxPanel'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?>
|
||||
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
|
||||
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
|
||||
><div class='chiefTurnBox turn<?=$turnIdx?>'
|
||||
><div class='chiefTurnTime'> </div
|
||||
><div class='chiefTurnPad'><span class='chiefTurnText'> </span></div
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
><div class='chiefTurnIdxPanel tail'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
></div
|
||||
><div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'
|
||||
><div style='width:400px;text-align:right;'
|
||||
><?=chiefTurnTable()
|
||||
?></div
|
||||
><div style='width:400px;display: flex;justify-content: center;flex-direction: column;'
|
||||
><div
|
||||
><input type='button' id='turnPush' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='미루기▼'
|
||||
><input type='button' id='turnPull' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='▲당기기'
|
||||
></div
|
||||
><div
|
||||
><?=chiefCommandTable($generalObj)
|
||||
?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='실 행'
|
||||
></div
|
||||
></div
|
||||
></div
|
||||
><div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
|
||||
><div class='chiefTurnIdxPanel'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
|
||||
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
|
||||
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
|
||||
><div class='chiefTurnBox turn<?=$turnIdx?>'
|
||||
><div class='chiefTurnTime'> </div
|
||||
><div class='chiefTurnPad'><span class='chiefTurnText'> </span></div
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
><div class='chiefTurnIdxPanel tail'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
></div
|
||||
><div
|
||||
><?=backButton()
|
||||
?><?=banner()
|
||||
?></div>
|
||||
</div>
|
||||
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
|
||||
<div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br>
|
||||
<?= backButton() ?></div>
|
||||
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
|
||||
<div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
|
||||
<div class='chiefTurnIdxPanel'>
|
||||
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
|
||||
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
|
||||
</div <?php foreach ([12, 10, 8, 6] as $chiefIdx) : ?>>
|
||||
<div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
|
||||
<div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
|
||||
<div class='chiefTurnBox turn<?= $turnIdx ?>'>
|
||||
<div class='chiefTurnTime'> </div>
|
||||
<div class='chiefTurnPad'><span class='chiefTurnText'> </span></div>
|
||||
</div <?php endforeach; ?>>
|
||||
</div <?php endforeach; ?>>
|
||||
<div class='chiefTurnIdxPanel tail'>
|
||||
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
|
||||
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'>
|
||||
<div style='width:400px;text-align:right;'><?= chiefTurnTable()
|
||||
?></div>
|
||||
<div style='width:400px;display: flex;justify-content: center;flex-direction: column;'>
|
||||
<div><input type='button' id='turnPush' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='미루기▼'><input type='button' id='turnPull' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='▲당기기'></div>
|
||||
<div><?= chiefCommandTable($generalObj)
|
||||
?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='실 행'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
|
||||
<div class='chiefTurnIdxPanel'>
|
||||
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
|
||||
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
|
||||
</div <?php foreach ([11, 9, 7, 5] as $chiefIdx) : ?>>
|
||||
<div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
|
||||
<div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
|
||||
<div class='chiefTurnBox turn<?= $turnIdx ?>'>
|
||||
<div class='chiefTurnTime'> </div>
|
||||
<div class='chiefTurnPad'><span class='chiefTurnText'> </span></div>
|
||||
</div <?php endforeach; ?>>
|
||||
</div <?php endforeach; ?>>
|
||||
<div class='chiefTurnIdxPanel tail'>
|
||||
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
|
||||
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div><?= backButton()
|
||||
?><?= banner()
|
||||
?></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+433
-419
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -16,10 +17,10 @@ $db = DB::db();
|
||||
increaseRefresh("현재도시", 1);
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
|
||||
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation'])??[
|
||||
'nation'=>0,
|
||||
'level'=>0,
|
||||
'spy'=>''
|
||||
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']) ?? [
|
||||
'nation' => 0,
|
||||
'level' => 0,
|
||||
'spy' => ''
|
||||
];
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
@@ -29,117 +30,129 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 도시정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/currentCity.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
#general_list tr td{
|
||||
text-align:center;
|
||||
}
|
||||
<title><?= UniqueConst::$serverName ?>: 도시정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/currentCity.js') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<style>
|
||||
#general_list tr td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#general_list tr td:last-child{
|
||||
text-align:left;
|
||||
padding-left:1em;
|
||||
}
|
||||
#general_list tr td:last-child {
|
||||
text-align: left;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.general_turn_text{
|
||||
font-size:x-small;
|
||||
}
|
||||
</style>
|
||||
.general_turn_text {
|
||||
font-size: x-small;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>도 시 정 보<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>도 시 정 보<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=998>
|
||||
<form name=cityselect method=get>
|
||||
<div style='text-align:center;'>도시선택 :
|
||||
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
|
||||
<?php
|
||||
if(!$citylist){
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=998>
|
||||
<form name=cityselect method=get>
|
||||
<div style='text-align:center;'>도시선택 :
|
||||
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
|
||||
<?php
|
||||
if (!$citylist) {
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
|
||||
// 재야일때는 현재 도시만
|
||||
$valid = 0;
|
||||
if($me['officer_level'] == 0) {
|
||||
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
|
||||
echo "
|
||||
// 재야일때는 현재 도시만
|
||||
$valid = 0;
|
||||
if ($me['officer_level'] == 0) {
|
||||
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
} else {
|
||||
// 아국 도시들 선택
|
||||
foreach($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city){
|
||||
echo "
|
||||
if ($city['city'] == $citylist) {
|
||||
echo " selected";
|
||||
$valid = 1;
|
||||
}
|
||||
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
|
||||
if ($city['nation'] == 0) echo "공백지";
|
||||
elseif ($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
} else {
|
||||
// 아국 도시들 선택
|
||||
foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) {
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
if ($city['city'] == $citylist) {
|
||||
echo " selected";
|
||||
$valid = 1;
|
||||
}
|
||||
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
|
||||
if ($city['nation'] == 0) echo "공백지";
|
||||
elseif ($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
|
||||
// 아국 장수가 있는 타국 도시들 선택
|
||||
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city){
|
||||
echo "
|
||||
// 아국 장수가 있는 타국 도시들 선택
|
||||
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) {
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
if ($city['city'] == $citylist) {
|
||||
echo " selected";
|
||||
$valid = 1;
|
||||
}
|
||||
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
|
||||
if ($city['nation'] == 0) echo "공백지";
|
||||
elseif ($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
if($myNation['level'] > 0) {
|
||||
// 첩보도시도 목록에 추가
|
||||
if ($myNation['level'] > 0) {
|
||||
// 첩보도시도 목록에 추가
|
||||
|
||||
$rawSpy = $myNation['spy'];
|
||||
$rawSpy = $myNation['spy'];
|
||||
|
||||
if($rawSpy == ''){
|
||||
$spyCities = [];
|
||||
}
|
||||
else{
|
||||
$spyCities = array_keys(Json::decode($rawSpy));
|
||||
}
|
||||
if ($rawSpy == '') {
|
||||
$spyCities = [];
|
||||
} else {
|
||||
$spyCities = array_keys(Json::decode($rawSpy));
|
||||
}
|
||||
|
||||
|
||||
if($spyCities){
|
||||
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
|
||||
echo "<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
if ($spyCities) {
|
||||
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
|
||||
echo "<option value={$city['city']}";
|
||||
if ($city['city'] == $citylist) {
|
||||
echo " selected";
|
||||
$valid = 1;
|
||||
}
|
||||
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
|
||||
if ($city['nation'] == 0) echo "공백지";
|
||||
elseif ($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select></div>
|
||||
<p align=center>명령 화면에서 도시를 클릭하셔도 됩니다.</p>
|
||||
</form>
|
||||
@@ -148,378 +161,379 @@ echo "
|
||||
</table>
|
||||
<br>";
|
||||
|
||||
unset($city);
|
||||
unset($city);
|
||||
|
||||
// 첩보된 도시까지만 허용
|
||||
// 첩보된 도시까지만 허용
|
||||
|
||||
$showDetailedInfo = false;
|
||||
if($valid){
|
||||
$showDetailedInfo = true;
|
||||
}
|
||||
$showDetailedInfo = false;
|
||||
if ($valid) {
|
||||
$showDetailedInfo = true;
|
||||
}
|
||||
|
||||
if(!key_exists($citylist, CityConst::all())){
|
||||
$citylist = $me['city'];
|
||||
$showDetailedInfo = true;
|
||||
$valid = 1;
|
||||
}
|
||||
if (!key_exists($citylist, CityConst::all())) {
|
||||
$citylist = $me['city'];
|
||||
$showDetailedInfo = true;
|
||||
$valid = 1;
|
||||
}
|
||||
|
||||
if($userGrade >= 5){
|
||||
$valid = true;
|
||||
$showDetailedInfo = true;
|
||||
}
|
||||
if ($userGrade >= 5) {
|
||||
$valid = true;
|
||||
$showDetailedInfo = true;
|
||||
}
|
||||
|
||||
if(!$valid) {
|
||||
$ownCities = Util::convertArrayToSetLike($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i AND nation != 0', $me['nation']));
|
||||
foreach(array_keys(CityConst::byID($citylist)->path) as $pathID){
|
||||
if(key_exists($pathID, $ownCities)){
|
||||
$showDetailedInfo = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$valid) {
|
||||
$ownCities = Util::convertArrayToSetLike($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i AND nation != 0', $me['nation']));
|
||||
foreach (array_keys(CityConst::byID($citylist)->path) as $pathID) {
|
||||
if (key_exists($pathID, $ownCities)) {
|
||||
$showDetailedInfo = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
|
||||
$cityNation = getNationStaticInfo($city['nation']);
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
|
||||
$cityNation = getNationStaticInfo($city['nation']);
|
||||
|
||||
//태수, 군사, 종사
|
||||
$officer = [
|
||||
4=>['name'=>'-', 'npc'=>0],
|
||||
3=>['name'=>'-', 'npc'=>0],
|
||||
2=>['name'=>'-', 'npc'=>0]
|
||||
];
|
||||
//태수, 군사, 종사
|
||||
$officer = [
|
||||
4 => ['name' => '-', 'npc' => 0],
|
||||
3 => ['name' => '-', 'npc' => 0],
|
||||
2 => ['name' => '-', 'npc' => 0]
|
||||
];
|
||||
|
||||
foreach($db->query('SELECT `name`, npc, `officer_level` FROM general WHERE `officer_city` = %i', $city['city']) as $officerInfo){
|
||||
$officer[$officerInfo['officer_level']] = $officerInfo;
|
||||
}
|
||||
foreach ($db->query('SELECT `name`, npc, `officer_level` FROM general WHERE `officer_city` = %i', $city['city']) as $officerInfo) {
|
||||
$officer[$officerInfo['officer_level']] = $officerInfo;
|
||||
}
|
||||
|
||||
if($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
if ($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
|
||||
if($showDetailedInfo){
|
||||
$generals = $db->query(
|
||||
'SELECT %l from general where city=%i order by turntime',
|
||||
Util::formatListOfBackticks($dbColumns),
|
||||
$city['city']
|
||||
);
|
||||
}
|
||||
else{
|
||||
$generals = [];
|
||||
}
|
||||
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
|
||||
if ($showDetailedInfo) {
|
||||
$generals = $db->query(
|
||||
'SELECT %l from general where city=%i order by turntime',
|
||||
Util::formatListOfBackticks($dbColumns),
|
||||
$city['city']
|
||||
);
|
||||
} else {
|
||||
$generals = [];
|
||||
}
|
||||
|
||||
if($valid){
|
||||
$city['trustText'] = round($city['trust'], 1);
|
||||
$city['popRateText'] = round($city['pop']/$city['pop_max']*100, 2);
|
||||
}
|
||||
else{
|
||||
$city['agri'] = '?';
|
||||
$city['comm'] = '?';
|
||||
$city['pop'] = '?';
|
||||
$city['secu'] = '?';
|
||||
$city['trustText'] = '?';
|
||||
$city['popRateText'] = '?';
|
||||
if ($valid) {
|
||||
$city['trustText'] = round($city['trust'], 1);
|
||||
$city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2);
|
||||
} else {
|
||||
$city['agri'] = '?';
|
||||
$city['comm'] = '?';
|
||||
$city['pop'] = '?';
|
||||
$city['secu'] = '?';
|
||||
$city['trustText'] = '?';
|
||||
$city['popRateText'] = '?';
|
||||
|
||||
if($city['nation'] != 0){
|
||||
$city['def'] = '?';
|
||||
$city['wall'] = '?';
|
||||
}
|
||||
}
|
||||
if ($city['nation'] != 0) {
|
||||
$city['def'] = '?';
|
||||
$city['wall'] = '?';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$generalTurnList = [];
|
||||
$generalTurnList = [];
|
||||
|
||||
if($generals){
|
||||
foreach($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]
|
||||
){
|
||||
if(!key_exists($generalID, $generalTurnList)){
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
}
|
||||
if ($generals) {
|
||||
foreach ($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]) {
|
||||
if (!key_exists($generalID, $generalTurnList)) {
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
|
||||
$generalsFormat = [];
|
||||
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
|
||||
$generalsFormat = [];
|
||||
|
||||
|
||||
foreach($generals as $general){
|
||||
$nationInfo = getNationStaticInfo($general['nation']);
|
||||
foreach ($generals as $general) {
|
||||
$nationInfo = getNationStaticInfo($general['nation']);
|
||||
|
||||
if($general['nation'] != 0 && $general['nation'] == $myNation['nation']){
|
||||
$ourGeneral = true;
|
||||
}
|
||||
else{
|
||||
$ourGeneral = false;
|
||||
}
|
||||
if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) {
|
||||
$ourGeneral = true;
|
||||
} else {
|
||||
$ourGeneral = false;
|
||||
}
|
||||
|
||||
if($userGrade == 6){
|
||||
$ourGeneral = true;
|
||||
}
|
||||
if ($userGrade == 6) {
|
||||
$ourGeneral = true;
|
||||
}
|
||||
|
||||
$isNPC = $general['npc']>1;
|
||||
$wounded = $general['injury'];
|
||||
$isNPC = $general['npc'] > 1;
|
||||
$wounded = $general['injury'];
|
||||
|
||||
|
||||
$name = $general['name'];
|
||||
$nameText = formatName($name, $general['npc']);
|
||||
$name = $general['name'];
|
||||
$nameText = formatName($name, $general['npc']);
|
||||
|
||||
$leadership = $general['leadership'];
|
||||
$strength = $general['strength'];
|
||||
$intel = $general['intel'];
|
||||
$leadership = $general['leadership'];
|
||||
$strength = $general['strength'];
|
||||
$intel = $general['intel'];
|
||||
|
||||
$leadershipText = formatWounded($leadership, $general['injury']);
|
||||
$strengthText = formatWounded($strength, $general['injury']);
|
||||
$intelText = formatWounded($intel, $general['injury']);
|
||||
$leadershipText = formatWounded($leadership, $general['injury']);
|
||||
$strengthText = formatWounded($strength, $general['injury']);
|
||||
$intelText = formatWounded($intel, $general['injury']);
|
||||
|
||||
$officerLevel = $general['officer_level'];
|
||||
$officerLevelText = getOfficerLevelText($officerLevel);
|
||||
$officerLevel = $general['officer_level'];
|
||||
$officerLevelText = getOfficerLevelText($officerLevel);
|
||||
|
||||
$leadershipBonus = calcLeadershipBonus($officerLevel, $nationInfo['level']);
|
||||
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
|
||||
$leadershipBonus = calcLeadershipBonus($officerLevel, $nationInfo['level']);
|
||||
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
|
||||
|
||||
if($ourGeneral){
|
||||
$defenceTrain = $general['defence_train'];
|
||||
$defenceTrainText = formatDefenceTrain($defenceTrain);
|
||||
$crewType = $general['crewtype'];
|
||||
$crewTypeText = GameUnitConst::byId($crewType)->name;
|
||||
$crew = $general['crew'];
|
||||
$train = $general['train'];
|
||||
$atmos = $general['atmos'];
|
||||
}
|
||||
else{
|
||||
$defenceTrain = 0;
|
||||
$defenceTrainText = '';
|
||||
$crewType = 0;
|
||||
$crewTypeText = '';
|
||||
$crew = $general['crew'];
|
||||
$train = -1;
|
||||
$atmos = -1;
|
||||
if ($ourGeneral) {
|
||||
$defenceTrain = $general['defence_train'];
|
||||
$defenceTrainText = formatDefenceTrain($defenceTrain);
|
||||
$crewType = $general['crewtype'];
|
||||
$crewTypeText = GameUnitConst::byId($crewType)->name;
|
||||
$crew = $general['crew'];
|
||||
$train = $general['train'];
|
||||
$atmos = $general['atmos'];
|
||||
} else {
|
||||
$defenceTrain = 0;
|
||||
$defenceTrainText = '';
|
||||
$crewType = 0;
|
||||
$crewTypeText = '';
|
||||
$crew = $general['crew'];
|
||||
$train = -1;
|
||||
$atmos = -1;
|
||||
|
||||
if(!$valid){
|
||||
$crew = -1;
|
||||
}
|
||||
}
|
||||
if (!$valid) {
|
||||
$crew = -1;
|
||||
}
|
||||
}
|
||||
|
||||
$nation = $general['nation'];
|
||||
$nationName = $nationInfo['name'];
|
||||
$nation = $general['nation'];
|
||||
$nationName = $nationInfo['name'];
|
||||
|
||||
if($ourGeneral && !$isNPC){
|
||||
$turnText = [];
|
||||
$generalObj = new General($general, null, null, null, null, null, false);
|
||||
foreach($generalTurnList[$generalObj->getID()] as $turnRawIdx=>$turn){
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turnText[] = "{$turnIdx} : $turn";
|
||||
}
|
||||
$turnText = join('<br>', $turnText);
|
||||
}
|
||||
else{
|
||||
$turnText = '';
|
||||
}
|
||||
if ($ourGeneral && !$isNPC) {
|
||||
$turnText = [];
|
||||
$generalObj = new General($general, null, null, null, null, null, false);
|
||||
foreach ($generalTurnList[$generalObj->getID()] as $turnRawIdx => $turn) {
|
||||
$turnIdx = $turnRawIdx + 1;
|
||||
$turnText[] = "{$turnIdx} : $turn";
|
||||
}
|
||||
$turnText = join('<br>', $turnText);
|
||||
} else {
|
||||
$turnText = '';
|
||||
}
|
||||
|
||||
$generalsFormat[] = [
|
||||
'ourGeneral'=>$ourGeneral,
|
||||
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
|
||||
'isNPC'=>$isNPC,
|
||||
'wounded'=>$wounded,
|
||||
'name'=>$name,
|
||||
'nameText'=>$nameText,
|
||||
'leadership'=>$leadership,
|
||||
'leadershipText'=>$leadershipText,
|
||||
'leadershipBonus'=>$leadershipBonus,
|
||||
'leadershipBonusText'=>$leadershipBonusText,
|
||||
'officerLevel'=>$officerLevel,
|
||||
'officerLevelText'=>$officerLevelText,
|
||||
'strength'=>$strength,
|
||||
'strengthText'=>$strengthText,
|
||||
'intel'=>$intel,
|
||||
'intelText'=>$intelText,
|
||||
'defenceTrain'=>$defenceTrain,
|
||||
'defenceTrainText'=>$defenceTrainText,
|
||||
'crewType'=>$crewType,
|
||||
'crewTypeText'=>$crewTypeText,
|
||||
'crew'=>$crew,
|
||||
'train'=>$train,
|
||||
'atmos'=>$atmos,
|
||||
'nation'=>$nation,
|
||||
'nationName'=>$nationName,
|
||||
'turnText'=>$turnText
|
||||
];
|
||||
}
|
||||
$generalsFormat[] = [
|
||||
'ourGeneral' => $ourGeneral,
|
||||
'iconPath' => GetImageURL($general['imgsvr']) . '/' . $general['picture'],
|
||||
'isNPC' => $isNPC,
|
||||
'wounded' => $wounded,
|
||||
'name' => $name,
|
||||
'nameText' => $nameText,
|
||||
'leadership' => $leadership,
|
||||
'leadershipText' => $leadershipText,
|
||||
'leadershipBonus' => $leadershipBonus,
|
||||
'leadershipBonusText' => $leadershipBonusText,
|
||||
'officerLevel' => $officerLevel,
|
||||
'officerLevelText' => $officerLevelText,
|
||||
'strength' => $strength,
|
||||
'strengthText' => $strengthText,
|
||||
'intel' => $intel,
|
||||
'intelText' => $intelText,
|
||||
'defenceTrain' => $defenceTrain,
|
||||
'defenceTrainText' => $defenceTrainText,
|
||||
'crewType' => $crewType,
|
||||
'crewTypeText' => $crewTypeText,
|
||||
'crew' => $crew,
|
||||
'train' => $train,
|
||||
'atmos' => $atmos,
|
||||
'nation' => $nation,
|
||||
'nationName' => $nationName,
|
||||
'turnText' => $turnText
|
||||
];
|
||||
}
|
||||
|
||||
$generalsName = array_map(function($gen){return getColoredName($gen['name'], $gen['npc']);}, $generals);
|
||||
$generalsName = array_map(function ($gen) {
|
||||
return getColoredName($gen['name'], $gen['npc']);
|
||||
}, $generals);
|
||||
|
||||
$enemyCrew = 0;
|
||||
$enemyCnt = 0;
|
||||
$enemyArmedCnt = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
$enemyCrew = 0;
|
||||
$enemyCnt = 0;
|
||||
$enemyArmedCnt = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
|
||||
$crewDef = 0;
|
||||
$genDef = 0 ;
|
||||
$crewDef = 0;
|
||||
$genDef = 0;
|
||||
|
||||
$crewTotal = 0;
|
||||
$armedGenTotal = 0;
|
||||
$genTotal = 0;
|
||||
$crewTotal = 0;
|
||||
$armedGenTotal = 0;
|
||||
$genTotal = 0;
|
||||
|
||||
|
||||
foreach($generalsFormat as $general){
|
||||
if(!$general['nation'] || !$myNation['nation']){
|
||||
continue;
|
||||
}
|
||||
if($general['nation'] != $myNation['nation']){
|
||||
$enemyCnt += 1;
|
||||
if($general['crew'] >= 0){
|
||||
$enemyCrew += $general['crew'];
|
||||
}
|
||||
if($general['crew'] > 0){
|
||||
$enemyArmedCnt += 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
foreach ($generalsFormat as $general) {
|
||||
if (!$general['nation'] || !$myNation['nation']) {
|
||||
continue;
|
||||
}
|
||||
if ($general['nation'] != $myNation['nation']) {
|
||||
$enemyCnt += 1;
|
||||
if ($general['crew'] >= 0) {
|
||||
$enemyCrew += $general['crew'];
|
||||
}
|
||||
if ($general['crew'] > 0) {
|
||||
$enemyArmedCnt += 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$crewTotal += $general['crew'];
|
||||
$genTotal += 1;
|
||||
$crewTotal += $general['crew'];
|
||||
$genTotal += 1;
|
||||
|
||||
if($general['crew'] == 0){
|
||||
continue;
|
||||
}
|
||||
$armedGenTotal += 1;
|
||||
if ($general['crew'] == 0) {
|
||||
continue;
|
||||
}
|
||||
$armedGenTotal += 1;
|
||||
|
||||
$minTrain = min($general['train'], $general['atmos']);
|
||||
$minTrain = min($general['train'], $general['atmos']);
|
||||
|
||||
if($minTrain >= 90){
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
}
|
||||
if ($minTrain >= 90) {
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
}
|
||||
|
||||
$chkDef = false;
|
||||
$chkDef = false;
|
||||
|
||||
if($minTrain >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
}
|
||||
if ($minTrain >= 80) {
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
}
|
||||
|
||||
if($minTrain >= 60){
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
}
|
||||
if ($minTrain >= 60) {
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
}
|
||||
|
||||
if($minTrain >= $general['defenceTrain']){
|
||||
$crewDef += $general['crew'];
|
||||
$genDef += 1;
|
||||
$chkDef = true;
|
||||
}
|
||||
if ($minTrain >= $general['defenceTrain']) {
|
||||
$crewDef += $general['crew'];
|
||||
$genDef += 1;
|
||||
$chkDef = true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
}
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=11 align=center style='color:<?= newColor($cityNation['color']) ?>; background:<?= $cityNation['color'] ?>'>【 <?= CityConst::$regionMap[$city['region']] ?> | <?= CityConst::$levelMap[$city['level']] ?> 】 <?= $city['name'] ?></td>
|
||||
<td style='color:<?= newColor($cityNation['color']) ?>; background:<?= $cityNation['color'] ?>' class='center'><?= date('m-d H:i:s') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=48 class=bg1>주민</td>
|
||||
<td align=center width=112><?= $city['pop'] ?>/<?= $city['pop_max'] ?></td>
|
||||
<td align=center width=48 class=bg1>농업</td>
|
||||
<td align=center width=108><?= $city['agri'] ?>/<?= $city['agri_max'] ?></td>
|
||||
<td align=center width=48 class=bg1>상업</td>
|
||||
<td align=center width=108><?= $city['comm'] ?>/<?= $city['comm_max'] ?></td>
|
||||
<td align=center width=48 class=bg1>치안</td>
|
||||
<td align=center width=108><?= $city['secu'] ?>/<?= $city['secu_max'] ?></td>
|
||||
<td align=center width=48 class=bg1>수비</td>
|
||||
<td align=center width=108><?= $city['def'] ?>/<?= $city['def_max'] ?></td>
|
||||
<td align=center width=48 class=bg1>성벽</td>
|
||||
<td align=center width=108><?= $city['wall'] ?>/<?= $city['wall_max'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>민심</td>
|
||||
<td align=center><?= $city['trustText'] ?></td>
|
||||
<td align=center class=bg1>시세</td>
|
||||
<td align=center><?= $city['trade'] ?>%</td>
|
||||
<td align=center class=bg1>인구</td>
|
||||
<td align=center><?= $city['popRateText'] ?>%</td>
|
||||
<td align=center class=bg1>태수</td>
|
||||
<td align=center><?= $officer[4]['name'] ?></td>
|
||||
<td align=center class=bg1>군사</td>
|
||||
<td align=center><?= $officer[3]['name'] ?></td>
|
||||
<td align=center class=bg1>종사</td>
|
||||
<td align=center><?= $officer[2]['name'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>도시명</td>
|
||||
<td align=center><?= $city['name'] ?></td>
|
||||
<td align=center class=bg1>적군</td>
|
||||
<td align=center><?= number_format($enemyCrew) ?>/<?= number_format($enemyArmedCnt) ?>(<?= number_format($enemyCnt) ?>)</td>
|
||||
<td align=center class=bg1>병장(총)</td>
|
||||
<td align=center><?= number_format($crewTotal) ?>/<?= number_format($armedGenTotal) ?>(<?= number_format($genTotal) ?>)</td>
|
||||
<td align=center class=bg1>90병장</td>
|
||||
<td align=center><?= number_format($crew90) ?>/<?= number_format($gen90) ?></td>
|
||||
<td align=center class=bg1>60병장</td>
|
||||
<td align=center><?= number_format($crew60) ?>/<?= number_format($gen60) ?></td>
|
||||
<td align=center class=bg1>수비○</td>
|
||||
<td align=center><?= number_format($crewDef) ?>/<?= number_format($genDef) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>장수</td>
|
||||
<td colspan=11><?= $showDetailedInfo ? join(', ', $generalsName) : '<span style="color:gray">알 수 없음</span>' ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
</table>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=11 align=center style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>'>【 <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
|
||||
<td style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>' class='center'><?=date('m-d H:i:s')?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=48 class=bg1>주민</td>
|
||||
<td align=center width=112><?=$city['pop']?>/<?=$city['pop_max']?></td>
|
||||
<td align=center width=48 class=bg1>농업</td>
|
||||
<td align=center width=108><?=$city['agri']?>/<?=$city['agri_max']?></td>
|
||||
<td align=center width=48 class=bg1>상업</td>
|
||||
<td align=center width=108><?=$city['comm']?>/<?=$city['comm_max']?></td>
|
||||
<td align=center width=48 class=bg1>치안</td>
|
||||
<td align=center width=108><?=$city['secu']?>/<?=$city['secu_max']?></td>
|
||||
<td align=center width=48 class=bg1>수비</td>
|
||||
<td align=center width=108><?=$city['def']?>/<?=$city['def_max']?></td>
|
||||
<td align=center width=48 class=bg1>성벽</td>
|
||||
<td align=center width=108><?=$city['wall']?>/<?=$city['wall_max']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>민심</td>
|
||||
<td align=center><?=$city['trustText']?></td>
|
||||
<td align=center class=bg1>시세</td>
|
||||
<td align=center><?=$city['trade']?>%</td>
|
||||
<td align=center class=bg1>인구</td>
|
||||
<td align=center><?=$city['popRateText']?>%</td>
|
||||
<td align=center class=bg1>태수</td>
|
||||
<td align=center><?=$officer[4]['name']?></td>
|
||||
<td align=center class=bg1>군사</td>
|
||||
<td align=center><?=$officer[3]['name']?></td>
|
||||
<td align=center class=bg1>종사</td>
|
||||
<td align=center><?=$officer[2]['name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>도시명</td>
|
||||
<td align=center><?=$city['name']?></td>
|
||||
<td align=center class=bg1>적군</td>
|
||||
<td align=center><?=number_format($enemyCrew)?>/<?=number_format($enemyArmedCnt)?>(<?=number_format($enemyCnt)?>)</td>
|
||||
<td align=center class=bg1>병장(총)</td>
|
||||
<td align=center><?=number_format($crewTotal)?>/<?=number_format($armedGenTotal)?>(<?=number_format($genTotal)?>)</td>
|
||||
<td align=center class=bg1>90병장</td>
|
||||
<td align=center><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
|
||||
<td align=center class=bg1>60병장</td>
|
||||
<td align=center><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
|
||||
<td align=center class=bg1>수비○</td>
|
||||
<td align=center><?=number_format($crewDef)?>/<?=number_format($genDef)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>장수</td>
|
||||
<td colspan=11><?=$showDetailedInfo?join(', ', $generalsName):'<span style="color:gray">알 수 없음</span>'?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<?php if($showDetailedInfo): ?>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width=64 align=center class=bg1>얼 굴</td>
|
||||
<td width=128 align=center class=bg1>이 름</td>
|
||||
<td width=48 align=center class=bg1>통솔</td>
|
||||
<td width=48 align=center class=bg1>무력</td>
|
||||
<td width=48 align=center class=bg1>지력</td>
|
||||
<td width=78 align=center class=bg1>관 직</td>
|
||||
<td width=28 align=center class=bg1>守</td>
|
||||
<td width=78 align=center class=bg1>병 종</td>
|
||||
<td width=78 align=center class=bg1>병 사</td>
|
||||
<td width=48 align=center class=bg1>훈련</td>
|
||||
<td width=48 align=center class=bg1>사기</td>
|
||||
<td width=280 align=center class=bg1>명 령</td>
|
||||
</tr></thead>
|
||||
<tbody class='bg0' id='general_list'>
|
||||
<?php
|
||||
foreach($generalsFormat as $general){
|
||||
echo $templates->render('cityGeneral', $general);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<?php if ($showDetailedInfo) : ?>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width=64 align=center class=bg1>얼 굴</td>
|
||||
<td width=128 align=center class=bg1>이 름</td>
|
||||
<td width=48 align=center class=bg1>통솔</td>
|
||||
<td width=48 align=center class=bg1>무력</td>
|
||||
<td width=48 align=center class=bg1>지력</td>
|
||||
<td width=78 align=center class=bg1>관 직</td>
|
||||
<td width=28 align=center class=bg1>守</td>
|
||||
<td width=78 align=center class=bg1>병 종</td>
|
||||
<td width=78 align=center class=bg1>병 사</td>
|
||||
<td width=48 align=center class=bg1>훈련</td>
|
||||
<td width=48 align=center class=bg1>사기</td>
|
||||
<td width=280 align=center class=bg1>명 령</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='bg0' id='general_list'>
|
||||
<?php
|
||||
foreach ($generalsFormat as $general) {
|
||||
echo $templates->render('cityGeneral', $general);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+249
-221
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -26,11 +27,10 @@ if ($con >= 2) {
|
||||
}
|
||||
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
if ($permission < 0) {
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
} else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
@@ -48,241 +48,269 @@ $nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
|
||||
?>
|
||||
<!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>
|
||||
<script>
|
||||
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>;
|
||||
var storedData = <?=Json::encode([
|
||||
"nationMsg"=>$nationStor->notice??'',
|
||||
"scoutMsg"=>$nationStor->scout_msg??''
|
||||
])?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/dipcenter.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
|
||||
<?=WebUtil::printCSS('dist_css/vendors.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/dipcenter.css')?>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?= UniqueConst::$serverName ?>: 내무부</title>
|
||||
<script>
|
||||
var editable = <?= (($me['officer_level'] >= 5 || $permission == 4) ? 'true' : 'false') ?>;
|
||||
var storedData = <?= Json::encode([
|
||||
"nationMsg" => $nationStor->notice ?? '',
|
||||
"scoutMsg" => $nationStor->scout_msg ?? ''
|
||||
]) ?>;
|
||||
</script>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/dipcenter.js') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/vendors.css') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/dipcenter.css') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>내 무 부<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
||||
<tr>
|
||||
<td width=130 align=center class=bg1>국 가 명</td>
|
||||
<td width=50 align=center class=bg1>국력</td>
|
||||
<td width=40 align=center class=bg1>장수</td>
|
||||
<td width=40 align=center class=bg1>속령</td>
|
||||
<td width=80 align=center class=bg1>상태</td>
|
||||
<td width=60 align=center class=bg1>기간</td>
|
||||
<td width=100 align=center class=bg1>종 료 시 점</td>
|
||||
</tr>
|
||||
<?php
|
||||
$admin = $gameStor->getValues(['year','month']);
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>내 무 부<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=9 align=center bgcolor=blue>외 교 관 계</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=130 align=center class=bg1>국 가 명</td>
|
||||
<td width=50 align=center class=bg1>국력</td>
|
||||
<td width=40 align=center class=bg1>장수</td>
|
||||
<td width=40 align=center class=bg1>속령</td>
|
||||
<td width=80 align=center class=bg1>상태</td>
|
||||
<td width=60 align=center class=bg1>기간</td>
|
||||
<td width=100 align=center class=bg1>종 료 시 점</td>
|
||||
</tr>
|
||||
<?php
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
|
||||
$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
|
||||
$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
|
||||
$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
|
||||
|
||||
$nationsList = getAllNationStaticInfo();
|
||||
uasort($nationsList, function(array $lhs, array $rhs){
|
||||
return -($lhs['power']<=>$rhs['power']);
|
||||
});
|
||||
$nationsList = getAllNationStaticInfo();
|
||||
uasort($nationsList, function (array $lhs, array $rhs) {
|
||||
return - ($lhs['power'] <=> $rhs['power']);
|
||||
});
|
||||
|
||||
foreach($nationsList as $staticNation):
|
||||
//속령수
|
||||
$staticNationID = $staticNation['nation'];
|
||||
$cityCnt = $cityCntList[$staticNation['nation']]??0;
|
||||
foreach ($nationsList as $staticNation) :
|
||||
//속령수
|
||||
$staticNationID = $staticNation['nation'];
|
||||
$cityCnt = $cityCntList[$staticNation['nation']] ?? 0;
|
||||
|
||||
$dipStateText = '-';
|
||||
$dipTermText = '-';
|
||||
$dipEndDateText = '-';
|
||||
if($staticNationID !== $nationID){
|
||||
$diplomacyState = $dipStateList[$staticNationID];
|
||||
$dipStateText = '-';
|
||||
$dipTermText = '-';
|
||||
$dipEndDateText = '-';
|
||||
if ($staticNationID !== $nationID) {
|
||||
$diplomacyState = $dipStateList[$staticNationID];
|
||||
|
||||
$dipStateText = [
|
||||
0 => "<font color=red>교 전</font>",
|
||||
1 => "<font color=magenta>선포중</font>",
|
||||
2 => "통 상",
|
||||
7 => "<font color=green>불가침</font>",
|
||||
][$diplomacyState['state']];
|
||||
$dipStateText = [
|
||||
0 => "<font color=red>교 전</font>",
|
||||
1 => "<font color=magenta>선포중</font>",
|
||||
2 => "통 상",
|
||||
7 => "<font color=green>불가침</font>",
|
||||
][$diplomacyState['state']];
|
||||
|
||||
if($diplomacyState['term']){
|
||||
$dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1;
|
||||
$dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12);
|
||||
$dipEndMonth = $dipEndMonth % 12 + 1;
|
||||
if ($diplomacyState['term']) {
|
||||
$dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1;
|
||||
$dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12);
|
||||
$dipEndMonth = $dipEndMonth % 12 + 1;
|
||||
|
||||
$dipTermText = $diplomacyState['term'].'개월';
|
||||
$dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月";
|
||||
}
|
||||
$dipTermText = $diplomacyState['term'] . '개월';
|
||||
$dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class='center' style='color:<?= newColor($staticNation['color']) ?>;background-color:<?= $staticNation['color'] ?>'><?= $staticNation['name'] ?></td>
|
||||
<td class='center'><?= $staticNation['power'] ?></td>
|
||||
<td class='center'><?= $staticNation['gennum'] ?></td>
|
||||
<td class='center'><?= $cityCnt ?></td>
|
||||
<td class='center'><?= $dipStateText ?></td>
|
||||
<td class='center'><?= $dipTermText ?></td>
|
||||
<td class='center'><?= $dipEndDateText ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
// 수입 연산
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = '+' . number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = '+' . number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class='center' style='color:<?=newColor($staticNation['color'])?>;background-color:<?=$staticNation['color']?>'><?=$staticNation['name']?></td>
|
||||
<td class='center'><?=$staticNation['power']?></td>
|
||||
<td class='center'><?=$staticNation['gennum']?></td>
|
||||
<td class='center'><?=$cityCnt?></td>
|
||||
<td class='center'><?=$dipStateText?></td>
|
||||
<td class='center'><?=$dipTermText?></td>
|
||||
<td class='center'><?=$dipEndDateText?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
?>
|
||||
<table width=1000 class='tb_layout bg0' style='margin:auto;'>
|
||||
<form name=form1 method=post action=c_dipcenter.php>
|
||||
<tr>
|
||||
<td colspan=2 height=10></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메시지</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id='noticeForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
국가 방침
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
|
||||
<div class='edit_form viewer'></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id='scoutMsgForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
임관 권유
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
|
||||
<input type='hidden' class='input_form' name='scoutMsg' data-global='scoutMsg'>
|
||||
<div style="width:870px;margin-left:auto;">
|
||||
<div class='edit_form viewer'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 수입 연산
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = '+'.number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = '+'.number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
|
||||
?>
|
||||
<table width=1000 class='tb_layout bg0' style='margin:auto;'>
|
||||
<form name=form1 method=post action=c_dipcenter.php>
|
||||
<tr><td colspan=2 height=10></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메시지</td></tr>
|
||||
<tr><td colspan='2'><div id='noticeForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
국가 방침
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
|
||||
<div class='edit_form viewer'></div>
|
||||
</div></td></tr>
|
||||
<tr><td colspan='2'><div id='scoutMsgForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
임관 권유
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
|
||||
<input type='hidden' class='input_form' name='scoutMsg' data-global='scoutMsg'>
|
||||
<div style="width:870px;margin-left:auto;">
|
||||
<div class='edit_form viewer'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=green>예 산 & 정 책</td></tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<table width=998 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=2 align=center class=bg1>자금 예산</td>
|
||||
<td colspan=2 align=center class=bg1>병량 예산</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=number_format($nation['gold'])?></td>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=number_format($nation['rice'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>단기수입 </td>
|
||||
<td align=center>+<?=number_format($warIncome)?></td>
|
||||
<td align=right class=bg1>둔전수입 </td>
|
||||
<td align=center>+<?=number_format($wallIncome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세 금 </td>
|
||||
<td align=center>+<?=number_format($goldIncome)?></td>
|
||||
<td align=right class=bg1>세 곡 </td>
|
||||
<td align=center>+<?=number_format($riceIncome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>국고 예산 </td>
|
||||
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=right class=bg1>병량 예산 </td>
|
||||
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세율 (5 ~ 30%) </td>
|
||||
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
|
||||
<td align=right class=bg1>봉급 지급률 (20 ~ 200%) </td>
|
||||
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급률></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
|
||||
<td align=right class=bg1>전쟁 허용/금지 변경 가능</td>
|
||||
<td align=center><?=$nationStor->getValue('available_war_setting_cnt')?>회(월 +<?=GameConst::$incAvailableWarSettingCnt?>회, 최대<?=GameConst::$maxAvailableWarSettingCnt?>회)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 align=center>
|
||||
<?php
|
||||
if ($nation['scout'] == 0) {
|
||||
echo "
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 align=center bgcolor=green>예 산 & 정 책</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<table width=998 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=2 align=center class=bg1>자금 예산</td>
|
||||
<td colspan=2 align=center class=bg1>병량 예산</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?= number_format($nation['gold']) ?></td>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?= number_format($nation['rice']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>단기수입 </td>
|
||||
<td align=center>+<?= number_format($warIncome) ?></td>
|
||||
<td align=right class=bg1>둔전수입 </td>
|
||||
<td align=center>+<?= number_format($wallIncome) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세 금 </td>
|
||||
<td align=center>+<?= number_format($goldIncome) ?></td>
|
||||
<td align=right class=bg1>세 곡 </td>
|
||||
<td align=center>+<?= number_format($riceIncome) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?= number_format($totalGoldIncome) ?> / -<?= number_format($outcome) ?></td>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?= number_format($totalRiceIncome) ?> / -<?= number_format($outcome) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>국고 예산 </td>
|
||||
<td align=center><?= number_format($budgetgold) ?> (<?= $budgetgolddiff ?>)</td>
|
||||
<td align=right class=bg1>병량 예산 </td>
|
||||
<td align=center><?= number_format($budgetrice) ?> (<?= $budgetricediff ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세율 (5 ~ 30%) </td>
|
||||
<td align=center><input type=text <?= $read ?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['rate'] ?>>% <input type=<?= $btn ?> name=btn value=세율></td>
|
||||
<td align=right class=bg1>봉급 지급률 (20 ~ 200%) </td>
|
||||
<td align=center><input type=text <?= $read ?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['bill'] ?>>% <input type=<?= $btn ?> name=btn value=지급률></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||
<td align=center><input type=text <?= $read ?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['secretlimit'] ?>>년 <input type=<?= $btn ?> name=btn value=기밀권한></td>
|
||||
<td align=right class=bg1>전쟁 허용/금지 변경 가능</td>
|
||||
<td align=center><?= $nationStor->getValue('available_war_setting_cnt') ?>회(월 +<?= GameConst::$incAvailableWarSettingCnt ?>회, 최대<?= GameConst::$maxAvailableWarSettingCnt ?>회)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 align=center>
|
||||
<?php
|
||||
if ($nation['scout'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 허가'>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($nation['war'] == 0) {
|
||||
echo "
|
||||
if ($nation['war'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 허가'>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr><td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td></tr>
|
||||
<tr><td colspan=2 height=10></td></tr>
|
||||
</form>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 height=10></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+159
-146
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -12,20 +13,20 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("중원정보", 1);
|
||||
|
||||
$mapTheme = $gameStor->map_theme??'che';
|
||||
$mapTheme = $gameStor->map_theme ?? 'che';
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,nation FROM general WHERE owner=%i', $userID);
|
||||
$myNationID = $me['nation'];
|
||||
|
||||
$nations = array_filter(getAllNationStaticInfo(), function(array $nation){
|
||||
$nations = array_filter(getAllNationStaticInfo(), function (array $nation) {
|
||||
return $nation['level'];
|
||||
});
|
||||
uasort($nations, function(array $lhs, array $rhs){
|
||||
return -($lhs['power']<=>$rhs['power']);
|
||||
uasort($nations, function (array $lhs, array $rhs) {
|
||||
return - ($lhs['power'] <=> $rhs['power']);
|
||||
});
|
||||
$nationCnt = count($nations);
|
||||
|
||||
foreach($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation != 0 GROUP BY nation') as [$nationID, $cityCnt]){
|
||||
foreach ($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation != 0 GROUP BY nation') as [$nationID, $cityCnt]) {
|
||||
$nations[$nationID]['city_cnt'] = $cityCnt;
|
||||
}
|
||||
|
||||
@@ -34,10 +35,9 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
||||
$cityID,
|
||||
$cityName,
|
||||
$rawConflict
|
||||
])
|
||||
{
|
||||
]) {
|
||||
$rawConflict = Json::decode($rawConflict);
|
||||
if (count($rawConflict)<2) {
|
||||
if (count($rawConflict) < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
||||
|
||||
|
||||
$conflict = [];
|
||||
foreach ($rawConflict as $nationID=>$killnum) {
|
||||
foreach ($rawConflict as $nationID => $killnum) {
|
||||
$conflict[$nationID] = [
|
||||
'killnum'=>$killnum,
|
||||
'percent'=>round(100*$killnum / $sum, 1),
|
||||
'name'=>$nations[$nationID]['name'],
|
||||
'color'=>$nations[$nationID]['color']
|
||||
'killnum' => $killnum,
|
||||
'percent' => round(100 * $killnum / $sum, 1),
|
||||
'name' => $nations[$nationID]['name'],
|
||||
'color' => $nations[$nationID]['color']
|
||||
];
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
||||
};
|
||||
|
||||
$diplomacyList = [];
|
||||
foreach($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you, $state]){
|
||||
if(!key_exists($me, $diplomacyList)){
|
||||
foreach ($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you, $state]) {
|
||||
if (!key_exists($me, $diplomacyList)) {
|
||||
$diplomacyList[$me] = [];
|
||||
}
|
||||
|
||||
@@ -72,157 +72,170 @@ $cellWidth = intdiv(888, max(1, $nationCnt));
|
||||
$defaultStateChar = '?';
|
||||
$sameNationStateChar = '\';
|
||||
$infomativeStateCharMap = [
|
||||
0=>'<span style="color:red;">★</span>',
|
||||
1=>'<span style="color:magenta;">▲</span>',
|
||||
2=>'ㆍ',
|
||||
7=>'<span style="color:green;">@</span>'
|
||||
0 => '<span style="color:red;">★</span>',
|
||||
1 => '<span style="color:magenta;">▲</span>',
|
||||
2 => 'ㆍ',
|
||||
7 => '<span style="color:green;">@</span>'
|
||||
];
|
||||
$neutralStateCharMap = [
|
||||
0=>'<span style="color:red;">★</span>',
|
||||
1=>'<span style="color:magenta;">▲</span>'
|
||||
0 => '<span style="color:red;">★</span>',
|
||||
1 => '<span style="color:magenta;">▲</span>'
|
||||
];
|
||||
|
||||
?>
|
||||
<!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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('dist_js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
$(function(){
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/map.js') ?>
|
||||
<script>
|
||||
window.serverNick = '<?= DB::prefix() ?>';
|
||||
window.serverID = '<?= UniqueConst::$serverID ?>';
|
||||
$(function() {
|
||||
|
||||
reloadWorldMap({
|
||||
neutralView:true,
|
||||
showMe:true,
|
||||
useCachedMap:true
|
||||
});
|
||||
reloadWorldMap({
|
||||
neutralView: true,
|
||||
showMe: true,
|
||||
useCachedMap: true
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
<?=WebUtil::printCSS('css/history.css')?>
|
||||
});
|
||||
</script>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
<?= WebUtil::printCSS('css/history.css') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>중 원 정 보<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=<?=$nationCnt+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
|
||||
<tr>
|
||||
<td align=center width=130 style=background-color:<?=GameConst::$basecolor2?>;> </td>
|
||||
<?php foreach($nations as $nation): ?>
|
||||
<td align=center width=<?=$cellWidth?> style='background-color:<?=$nation['color']?>;color:<?=newColor($nation['color'])?>'><?=$nation['name']?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php foreach($nations as $me=>$meNation): ?>
|
||||
<tr style='text-align:center;'>
|
||||
<td align=center style='background-color:<?=$meNation['color']?>;color:<?=newColor($meNation['color'])?>'><?=$meNation['name']?></td>
|
||||
<?php foreach(array_keys($nations) as $you): ?>
|
||||
<td <?=($me==$myNationID||$you==$myNationID)?'style="background-color:'.GameConst::$basecolor3.'"':''?>><?php
|
||||
if($me==$you){
|
||||
echo $sameNationStateChar;
|
||||
}
|
||||
else if($me==$myNationID || $you==$myNationID || $session->userGrade >= 5){
|
||||
echo $infomativeStateCharMap[$diplomacyList[$me][$you]]??$defaultStateChar;
|
||||
}
|
||||
else{
|
||||
echo $neutralStateCharMap[$diplomacyList[$me][$you]]??$defaultStateChar;
|
||||
}
|
||||
?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr><td colspan=<?=$nationCnt+1?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>중 원 정 보<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=<?= $nationCnt + 1 ?> align=center bgcolor=blue>외 교 현 황</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;> </td>
|
||||
<?php foreach ($nations as $nation) : ?>
|
||||
<td align=center width=<?= $cellWidth ?> style='background-color:<?= $nation['color'] ?>;color:<?= newColor($nation['color']) ?>'><?= $nation['name'] ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php foreach ($nations as $me => $meNation) : ?>
|
||||
<tr style='text-align:center;'>
|
||||
<td align=center style='background-color:<?= $meNation['color'] ?>;color:<?= newColor($meNation['color']) ?>'><?= $meNation['name'] ?></td>
|
||||
<?php foreach (array_keys($nations) as $you) : ?>
|
||||
<td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php
|
||||
if ($me == $you) {
|
||||
echo $sameNationStateChar;
|
||||
} else if ($me == $myNationID || $you == $myNationID || $session->userGrade >= 5) {
|
||||
echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
|
||||
} else {
|
||||
echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
|
||||
}
|
||||
?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td colspan=<?= $nationCnt + 1 ?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ($realConflict) : ?>
|
||||
<?php if ($realConflict) : ?>
|
||||
|
||||
<br>
|
||||
<table align='center' width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr>
|
||||
<?php foreach($realConflict as list($cityID, $cityName, $conflict)): ?>
|
||||
<tr>
|
||||
<td align=center width=48><?=$cityName?></td>
|
||||
<td style='width:948px;position:relative;'>
|
||||
<table class='tb_layout bg0' style='width:100%;'>
|
||||
<?php foreach($conflict as $item): ?>
|
||||
<br>
|
||||
<table align='center' width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td>
|
||||
</tr>
|
||||
<?php foreach ($realConflict as list($cityID, $cityName, $conflict)) : ?>
|
||||
<tr>
|
||||
<td
|
||||
width=130
|
||||
align=right
|
||||
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
|
||||
><?=$item['name']?> </td>
|
||||
<td width=48 align=right><?=(float)$item['percent']?> % </td>
|
||||
<td width=*><div
|
||||
style='display:inline-block;width:<?=$item['percent']?>%;background-color:<?=$item['color']?>;'
|
||||
> </div></td>
|
||||
<td align=center width=48><?= $cityName ?></td>
|
||||
<td style='width:948px;position:relative;'>
|
||||
<table class='tb_layout bg0' style='width:100%;'>
|
||||
<?php foreach ($conflict as $item) : ?>
|
||||
<tr>
|
||||
<td width=130 align=right style='color:<?= newColor($item['color']) ?>;background-color:<?= $item['color'] ?>;'><?= $item['name'] ?> </td>
|
||||
<td width=48 align=right><?= (float)$item['percent'] ?> % </td>
|
||||
<td width=*>
|
||||
<div style='display:inline-block;width:<?= $item['percent'] ?>%;background-color:<?= $item['color'] ?>;'> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<tr>
|
||||
<td colspan=2 height=5 class='bg1'></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr><td colspan=2 height=5 class='bg1'></td></tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=5 align=center bgcolor=green>
|
||||
<font size=3>중 원 지 도</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=698 height=420>
|
||||
<?= getMapHtml($mapTheme) ?>
|
||||
</td>
|
||||
<td id='nation_list_frame'>
|
||||
<table id='nation_list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width=130>국명</th>
|
||||
<th width=70>국력</th>
|
||||
<th width=45>장수</th>
|
||||
<th width=45>속령</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($nations as $nation) : ?>
|
||||
<tr>
|
||||
<td><span style='color:<?= newColor($nation['color']) ?>;background-color:<?= $nation['color'] ?>'><?= $nation['name'] ?></td>
|
||||
<td style='text-align:right'><?= number_format($nation['power']) ?></td>
|
||||
<td style='text-align:right'><?= number_format($nation['gennum']) ?></td>
|
||||
<td style='text-align:right'><?= number_format($nation['city_cnt']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=698 height=420>
|
||||
<?=getMapHtml($mapTheme)?>
|
||||
</td>
|
||||
<td id='nation_list_frame'>
|
||||
<table id='nation_list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width=130>국명</th>
|
||||
<th width=70>국력</th>
|
||||
<th width=45>장수</th>
|
||||
<th width=45>속령</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($nations as $nation): ?>
|
||||
<tr>
|
||||
<td><span style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'><?=$nation['name']?></td>
|
||||
<td style='text-align:right'><?=number_format($nation['power'])?></td>
|
||||
<td style='text-align:right'><?=number_format($nation['gennum'])?></td>
|
||||
<td style='text-align:right'><?=number_format($nation['city_cnt'])?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+218
-179
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -29,11 +30,10 @@ if ($con >= 2) {
|
||||
}
|
||||
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
if ($permission < 0) {
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
} else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
@@ -48,199 +48,238 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<?php if ($con == 1) {
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>암 행 부<br><?=closeButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=get>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1]??''?> value=1>자금</option>
|
||||
<option <?=$sel[2]??''?> value=2>군량</option>
|
||||
<option <?=$sel[3]??''?> value=3>도시</option>
|
||||
<option <?=$sel[4]??''?> value=4>병종</option>
|
||||
<option <?=$sel[5]??''?> value=5>병사</option>
|
||||
<option <?=$sel[6]??''?> value=6>삭제턴</option>
|
||||
<option <?=$sel[7]??''?> value=7>턴</option>
|
||||
<option <?=$sel[8]??''?> value=8>부대</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$troopName = [];
|
||||
foreach($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]){
|
||||
$troopName[$troopID] = $tName;
|
||||
}
|
||||
|
||||
$orderSQL = '';
|
||||
switch ($type) {
|
||||
case 1: $orderSQL = "order by gold desc"; break;
|
||||
case 2: $orderSQL = "order by rice desc"; break;
|
||||
case 3: $orderSQL = "order by city"; break;
|
||||
case 4: $orderSQL = "order by crewtype desc"; break;
|
||||
case 5: $orderSQL = "order by crew desc"; break;
|
||||
case 6: $orderSQL = "order by killturn"; break;
|
||||
case 7: $orderSQL = "order by turntime"; break;
|
||||
case 8: $orderSQL = "order by troop desc"; break;
|
||||
}
|
||||
|
||||
$generals = $db->query(
|
||||
'SELECT npc,defence_train,no,officer_level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
|
||||
$me['nation'],
|
||||
$orderSQL
|
||||
);
|
||||
|
||||
$generalTurnList = [];
|
||||
|
||||
foreach($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]
|
||||
){
|
||||
if(!key_exists($generalID, $generalTurnList)){
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
$genCntEff = 0;
|
||||
foreach ($generals as &$general) {
|
||||
$general['cityText'] = CityConst::byID($general['city'])->name;
|
||||
$general['troopText'] = $troopName[$general['troop']]??'-';
|
||||
|
||||
if($general['npc'] != 5){
|
||||
$genCntEff += 1;
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>암 행 부<br><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=get>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?= $sel[1] ?? '' ?> value=1>자금</option>
|
||||
<option <?= $sel[2] ?? '' ?> value=2>군량</option>
|
||||
<option <?= $sel[3] ?? '' ?> value=3>도시</option>
|
||||
<option <?= $sel[4] ?? '' ?> value=4>병종</option>
|
||||
<option <?= $sel[5] ?? '' ?> value=5>병사</option>
|
||||
<option <?= $sel[6] ?? '' ?> value=6>삭제턴</option>
|
||||
<option <?= $sel[7] ?? '' ?> value=7>턴</option>
|
||||
<option <?= $sel[8] ?? '' ?> value=8>부대</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$troopName = [];
|
||||
foreach ($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]) {
|
||||
$troopName[$troopID] = $tName;
|
||||
}
|
||||
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
|
||||
if ($lbonus > 0) {
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonusText = "";
|
||||
}
|
||||
$general['lbonus'] = $lbonus;
|
||||
$general['lbonusText'] = $lbonusText;
|
||||
|
||||
if ($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
$orderSQL = '';
|
||||
switch ($type) {
|
||||
case 1:
|
||||
$orderSQL = "order by gold desc";
|
||||
break;
|
||||
case 2:
|
||||
$orderSQL = "order by rice desc";
|
||||
break;
|
||||
case 3:
|
||||
$orderSQL = "order by city";
|
||||
break;
|
||||
case 4:
|
||||
$orderSQL = "order by crewtype desc";
|
||||
break;
|
||||
case 5:
|
||||
$orderSQL = "order by crew desc";
|
||||
break;
|
||||
case 6:
|
||||
$orderSQL = "order by killturn";
|
||||
break;
|
||||
case 7:
|
||||
$orderSQL = "order by turntime";
|
||||
break;
|
||||
case 8:
|
||||
$orderSQL = "order by troop desc";
|
||||
break;
|
||||
}
|
||||
|
||||
$general['leadershipText'] = $leadership;
|
||||
$general['strengthText'] = $strength;
|
||||
$general['intelText'] = $intel;
|
||||
$generals = $db->query(
|
||||
'SELECT npc,defence_train,no,officer_level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
|
||||
$me['nation'],
|
||||
$orderSQL
|
||||
);
|
||||
|
||||
$general['expLevelText'] = getExpLevel($general['experience']);
|
||||
$generalTurnList = [];
|
||||
|
||||
$general['nameText'] = getColoredName($general['name'], $general['npc']);
|
||||
|
||||
$general['modeText'] = formatDefenceTrain($general['defence_train']);
|
||||
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name??'-';
|
||||
|
||||
|
||||
if ($general['npc'] < 2) {
|
||||
$turntext = [];
|
||||
foreach($generalTurnList[$general['no']] as $turnRawIdx=>$turn){
|
||||
$turn = StringUtil::subStringForWidth($turn, 0, 41);
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turntext[] = " $turnIdx : $turn";
|
||||
foreach ($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]) {
|
||||
if (!key_exists($generalID, $generalTurnList)) {
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$general['turntext'] = join("<br>\n", $turntext);
|
||||
}
|
||||
}
|
||||
unset($general);
|
||||
|
||||
$genCnt = countPureGeneralFromRawList($generals);
|
||||
$totalGold = 0;
|
||||
$totalRice = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
$crewTotal = 0;
|
||||
//$genTotal = 0;
|
||||
foreach($generals as $general){
|
||||
if($general['npc']==5){
|
||||
continue;
|
||||
}
|
||||
$totalGold += $general['gold'];
|
||||
$totalRice += $general['rice'];
|
||||
|
||||
$crewTotal += $general['crew'];
|
||||
|
||||
if($general['crew'] == 0){
|
||||
continue;
|
||||
}
|
||||
if($general['train'] >= 90 && $general['atmos'] >= 90){
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
if($general['train'] >= 80 && $general['atmos'] >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
$genCntEff = 0;
|
||||
foreach ($generals as &$general) {
|
||||
$general['cityText'] = CityConst::byID($general['city'])->name;
|
||||
$general['troopText'] = $troopName[$general['troop']] ?? '-';
|
||||
|
||||
if ($general['npc'] != 5) {
|
||||
$genCntEff += 1;
|
||||
}
|
||||
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
|
||||
if ($lbonus > 0) {
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonusText = "";
|
||||
}
|
||||
$general['lbonus'] = $lbonus;
|
||||
$general['lbonusText'] = $lbonusText;
|
||||
|
||||
if ($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
$general['leadershipText'] = $leadership;
|
||||
$general['strengthText'] = $strength;
|
||||
$general['intelText'] = $intel;
|
||||
|
||||
$general['expLevelText'] = getExpLevel($general['experience']);
|
||||
|
||||
$general['nameText'] = getColoredName($general['name'], $general['npc']);
|
||||
|
||||
$general['modeText'] = formatDefenceTrain($general['defence_train']);
|
||||
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name ?? '-';
|
||||
|
||||
|
||||
if ($general['npc'] < 2) {
|
||||
$turntext = [];
|
||||
foreach ($generalTurnList[$general['no']] as $turnRawIdx => $turn) {
|
||||
$turn = StringUtil::subStringForWidth($turn, 0, 41);
|
||||
$turnIdx = $turnRawIdx + 1;
|
||||
$turntext[] = " $turnIdx : $turn";
|
||||
}
|
||||
$general['turntext'] = join("<br>\n", $turntext);
|
||||
}
|
||||
}
|
||||
unset($general);
|
||||
|
||||
if($general['train'] >= 60 && $general['atmos'] >= 60){
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
$genCnt = countPureGeneralFromRawList($generals);
|
||||
$totalGold = 0;
|
||||
$totalRice = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
$crewTotal = 0;
|
||||
//$genTotal = 0;
|
||||
foreach ($generals as $general) {
|
||||
if ($general['npc'] == 5) {
|
||||
continue;
|
||||
}
|
||||
$totalGold += $general['gold'];
|
||||
$totalRice += $general['rice'];
|
||||
|
||||
$crewTotal += $general['crew'];
|
||||
|
||||
if ($general['crew'] == 0) {
|
||||
continue;
|
||||
}
|
||||
if ($general['train'] >= 90 && $general['atmos'] >= 90) {
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
}
|
||||
|
||||
if ($general['train'] >= 80 && $general['atmos'] >= 80) {
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
}
|
||||
|
||||
if ($general['train'] >= 60 && $general['atmos'] >= 60) {
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
|
||||
<thead>
|
||||
<colgroup>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
</colgroup>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='bg1'>전체 금</td><td><?=number_format($totalGold)?></td>
|
||||
<td class='bg1'>전체 쌀</td><td><?=number_format($totalRice)?></td>
|
||||
<td class='bg1'>평균 금</td><td><?=number_format($totalGold/$genCntEff, 2)?></td>
|
||||
<td class='bg1'>평균 쌀</td><td><?=number_format($totalRice/$genCntEff, 2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td>
|
||||
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
|
||||
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td>
|
||||
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
|
||||
<thead>
|
||||
<colgroup>
|
||||
<col style="width:120px;">
|
||||
<col>
|
||||
<col style="width:120px;">
|
||||
<col>
|
||||
<col style="width:120px;">
|
||||
<col>
|
||||
<col style="width:120px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='bg1'>전체 금</td>
|
||||
<td><?= number_format($totalGold) ?></td>
|
||||
<td class='bg1'>전체 쌀</td>
|
||||
<td><?= number_format($totalRice) ?></td>
|
||||
<td class='bg1'>평균 금</td>
|
||||
<td><?= number_format($totalGold / $genCntEff, 2) ?></td>
|
||||
<td class='bg1'>평균 쌀</td>
|
||||
<td><?= number_format($totalRice / $genCntEff, 2) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1'>전체 병력/장수</td>
|
||||
<td><?= number_format($crewTotal) ?>/<?= number_format($genCntEff) ?></td>
|
||||
<td class='bg1'>훈사 90 병력/장수</td>
|
||||
<td><?= number_format($crew90) ?>/<?= number_format($gen90) ?></td>
|
||||
<td class='bg1'>훈사 80 병력/장수</td>
|
||||
<td><?= number_format($crew80) ?>/<?= number_format($gen80) ?></td>
|
||||
<td class='bg1'>훈사 60 병력/장수</td>
|
||||
<td><?= number_format($crew60) ?>/<?= number_format($gen60) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?=$templates->render('generalList', ['generals'=>$generals])?>
|
||||
<?= $templates->render('generalList', ['generals' => $generals]) ?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= closeButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+412
-368
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -17,7 +18,7 @@ $me = $db->queryFirstRow('SELECT no,nation,officer_level from general where owne
|
||||
$nationID = $me['nation'];
|
||||
|
||||
$meLevel = $me['officer_level'];
|
||||
if($meLevel == 0) {
|
||||
if ($meLevel == 0) {
|
||||
echo "재야입니다.";
|
||||
exit();
|
||||
}
|
||||
@@ -29,182 +30,202 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
|
||||
<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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/bossInfo.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<script type="text/javascript">
|
||||
var chiefStatMin = <?=GameConst::$chiefStatMin?>;
|
||||
var myLevel = <?=$meLevel?>;
|
||||
</script>
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/bossInfo.js') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<script type="text/javascript">
|
||||
var chiefStatMin = <?= GameConst::$chiefStatMin ?>;
|
||||
var myLevel = <?= $meLevel ?>;
|
||||
</script>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$ambassadors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nationID);
|
||||
$auditors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nationID);
|
||||
$candidateAmbassadors = [];
|
||||
$candidateAuditors = [];
|
||||
foreach($ambassadors as $ambassador){
|
||||
$candidateAmbassadors[] = $ambassador;
|
||||
}
|
||||
foreach($auditors as $auditor){
|
||||
$candidateAuditors[] = $auditor;
|
||||
}
|
||||
foreach($db->query('SELECT no, name, nation, officer_level, penalty, permission FROM general WHERE nation = %i AND permission = \'normal\' AND officer_level != 12', $nationID) as $candidate){
|
||||
$maxPermission = checkSecretMaxPermission($candidate);
|
||||
if($maxPermission == 4){
|
||||
$candidateAmbassadors[] = $candidate;
|
||||
$ambassadors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nationID);
|
||||
$auditors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nationID);
|
||||
$candidateAmbassadors = [];
|
||||
$candidateAuditors = [];
|
||||
foreach ($ambassadors as $ambassador) {
|
||||
$candidateAmbassadors[] = $ambassador;
|
||||
}
|
||||
if($maxPermission >= 3){
|
||||
$candidateAuditors[] = $candidate;
|
||||
foreach ($auditors as $auditor) {
|
||||
$candidateAuditors[] = $auditor;
|
||||
}
|
||||
foreach ($db->query('SELECT no, name, nation, officer_level, penalty, permission FROM general WHERE nation = %i AND permission = \'normal\' AND officer_level != 12', $nationID) as $candidate) {
|
||||
$maxPermission = checkSecretMaxPermission($candidate);
|
||||
if ($maxPermission == 4) {
|
||||
$candidateAmbassadors[] = $candidate;
|
||||
}
|
||||
if ($maxPermission >= 3) {
|
||||
$candidateAuditors[] = $candidate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script>
|
||||
var candidateAmbassadors = <?=Json::encode(array_map(function($value){
|
||||
return [
|
||||
'id'=>$value['no'],
|
||||
'text'=>$value['name'],
|
||||
"selected"=>($value['permission']!='normal')
|
||||
];
|
||||
}, $candidateAmbassadors))?>;
|
||||
?>
|
||||
<script>
|
||||
var candidateAmbassadors = <?= Json::encode(array_map(function ($value) {
|
||||
return [
|
||||
'id' => $value['no'],
|
||||
'text' => $value['name'],
|
||||
"selected" => ($value['permission'] != 'normal')
|
||||
];
|
||||
}, $candidateAmbassadors)) ?>;
|
||||
|
||||
var candidateAuditors = <?=Json::encode(array_map(function($value){
|
||||
return [
|
||||
'id'=>$value['no'],
|
||||
'text'=>$value['name'],
|
||||
"selected"=>($value['permission']!='normal')
|
||||
];
|
||||
}, $candidateAuditors))?>;
|
||||
</script>
|
||||
var candidateAuditors = <?= Json::encode(array_map(function ($value) {
|
||||
return [
|
||||
'id' => $value['no'],
|
||||
'text' => $value['name'],
|
||||
"selected" => ($value['permission'] != 'normal')
|
||||
];
|
||||
}, $candidateAuditors)) ?>;
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>인 사 부<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>인 사 부<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
|
||||
$lv = getNationChiefLevel($nation['level']);
|
||||
if($meLevel >= 5) { $btn = "button"; }
|
||||
else { $btn = "hidden"; }
|
||||
|
||||
$level = Util::convertArrayToDict(
|
||||
$db->query(
|
||||
'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc',
|
||||
$nationID, $lv
|
||||
),
|
||||
'officer_level'
|
||||
);
|
||||
|
||||
|
||||
$tigers = $db->query('SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
|
||||
$nationID
|
||||
);// 오호장군
|
||||
$tigerstr = join(', ', array_map(function($arr){
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $tigers));
|
||||
|
||||
$eagles = $db->query('SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
|
||||
$nationID
|
||||
);// 건안칠자
|
||||
$eaglestr = join(', ', array_map(function($arr){
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $eagles));
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td align=center style='color:<?=newColor($nation['color'])?>; background-color:<?=$nation['color']?>' colspan=6>
|
||||
<font size=5>【 <?=$nation['name']?> 】</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
for($i=12; $i >= $lv; $i-=2) {
|
||||
$i1 = $i; $i2 = $i - 1;
|
||||
$imageTemp1 = GetImageURL($level[$i1]['imgsvr']??0);
|
||||
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']??0);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
|
||||
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>오호장군【승전】</td>
|
||||
<td colspan=5><?=$tigerstr?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>건안칠자【계략】</td>
|
||||
<td colspan=5><?=$eaglestr?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=6 height=5></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
|
||||
<tr>
|
||||
<td width=498 align=right class='bg1'>대상 장수</td>
|
||||
<td width=498>
|
||||
<?php
|
||||
|
||||
if($meLevel >= 5){
|
||||
$candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
|
||||
$candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
|
||||
$candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김
|
||||
}
|
||||
else{
|
||||
$candidateStrength = [];
|
||||
$candidateIntel = [];
|
||||
$candidateAny = [];
|
||||
}
|
||||
|
||||
|
||||
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $meLevel)) {
|
||||
echo "
|
||||
<select id='genlist_kick' size=1 style=color:white;background-color:black;>";
|
||||
|
||||
foreach($candidateAny as $general) {
|
||||
if($general['no'] === $me['no']){
|
||||
continue;
|
||||
}
|
||||
echo "
|
||||
<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} <small>({$general['leadership']}/{$general['strength']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||
$lv = getNationChiefLevel($nation['level']);
|
||||
if ($meLevel >= 5) {
|
||||
$btn = "button";
|
||||
} else {
|
||||
$btn = "hidden";
|
||||
}
|
||||
|
||||
echo "
|
||||
$level = Util::convertArrayToDict(
|
||||
$db->query(
|
||||
'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc',
|
||||
$nationID,
|
||||
$lv
|
||||
),
|
||||
'officer_level'
|
||||
);
|
||||
|
||||
|
||||
$tigers = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
|
||||
$nationID
|
||||
); // 오호장군
|
||||
$tigerstr = join(', ', array_map(function ($arr) {
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $tigers));
|
||||
|
||||
$eagles = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
|
||||
$nationID
|
||||
); // 건안칠자
|
||||
$eaglestr = join(', ', array_map(function ($arr) {
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $eagles));
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td align=center style='color:<?= newColor($nation['color']) ?>; background-color:<?= $nation['color'] ?>' colspan=6>
|
||||
<font size=5>【 <?= $nation['name'] ?> 】</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i = 12; $i >= $lv; $i -= 2) {
|
||||
$i1 = $i;
|
||||
$i2 = $i - 1;
|
||||
$imageTemp1 = GetImageURL($level[$i1]['imgsvr'] ?? 0);
|
||||
$imageTemp2 = GetImageURL($level[$i2]['imgsvr'] ?? 0);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>
|
||||
<font size=4><?= getOfficerLevelText($i1, $nation['level']) ?></font>
|
||||
</td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp1 ?>/<?= $level[$i1]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
|
||||
<td width=332>
|
||||
<font size=4><?= $level[$i1]['name'] ?? '-' ?>(<?= $level[$i1]['belong'] ?? '-' ?>년)</font>
|
||||
</td>
|
||||
<td width=98 align=center class='bg1'>
|
||||
<font size=4><?= getOfficerLevelText($i2, $nation['level']) ?></font>
|
||||
</td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp2 ?>/<?= $level[$i2]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
|
||||
<td width=332>
|
||||
<font size=4><?= $level[$i2]['name'] ?? '-' ?>(<?= $level[$i2]['belong'] ?? '-' ?>년)</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>오호장군【승전】</td>
|
||||
<td colspan=5><?= $tigerstr ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>건안칠자【계략】</td>
|
||||
<td colspan=5><?= $eaglestr ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=6 height=5></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 align=center bgcolor=red>추 방</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right class='bg1'>대상 장수</td>
|
||||
<td width=498>
|
||||
<?php
|
||||
|
||||
if ($meLevel >= 5) {
|
||||
$candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
|
||||
$candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
|
||||
$candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김
|
||||
} else {
|
||||
$candidateStrength = [];
|
||||
$candidateIntel = [];
|
||||
$candidateAny = [];
|
||||
}
|
||||
|
||||
|
||||
if ($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $meLevel)) {
|
||||
echo "
|
||||
<select id='genlist_kick' size=1 style=color:white;background-color:black;>";
|
||||
|
||||
foreach ($candidateAny as $general) {
|
||||
if ($general['no'] === $me['no']) {
|
||||
continue;
|
||||
}
|
||||
echo "
|
||||
<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} <small>({$general['leadership']}/{$general['strength']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||
}
|
||||
|
||||
echo "
|
||||
</select>
|
||||
<input type=$btn id='btn_kick' value=추방>";
|
||||
}
|
||||
}
|
||||
|
||||
$officerLevelText = getOfficerLevelText(11, $nation['level']);
|
||||
echo "
|
||||
$officerLevelText = getOfficerLevelText(11, $nation['level']);
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -212,112 +233,121 @@ echo "
|
||||
<tr><td colspan=4 height=5></td></tr>
|
||||
<tr><td colspan=4 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
|
||||
<tr>
|
||||
<td width=98 align=right class='bg1'>".getOfficerLevelText(12, $nation['level'])."</td>
|
||||
<td width=398>{$level[12]['name']} 【".CityConst::byID($level[12]['city'])->name."】</td>
|
||||
<td width=98 align=right class='bg1'>" . getOfficerLevelText(12, $nation['level']) . "</td>
|
||||
<td width=398>{$level[12]['name']} 【" . CityConst::byID($level[12]['city'])->name . "】</td>
|
||||
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
|
||||
<td width=398>
|
||||
";
|
||||
|
||||
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
|
||||
echo "
|
||||
if ($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
|
||||
echo "
|
||||
<select id='genlist_11' size=1 maxlength=15 style=color:white;background-color:black;>
|
||||
<option value=0 data-officer_level='0' data-name=''>____공석____</option>";
|
||||
|
||||
foreach($candidateAny as $general) {
|
||||
if($general['officer_level'] == 11) {
|
||||
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} elseif($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
}
|
||||
}
|
||||
foreach ($candidateAny as $general) {
|
||||
if ($general['officer_level'] == 11) {
|
||||
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} elseif ($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<input class='btn_appoint' type=$btn data-officer_level='11' data-officer_level_text='{$officerLevelText}' value=임명>";
|
||||
} else {
|
||||
if(key_exists(11, $level)){
|
||||
echo "{$level[11]['name']} 【".CityConst::byID($level[11]['city'])->name."】";
|
||||
}
|
||||
|
||||
}
|
||||
echo "
|
||||
} else {
|
||||
if (key_exists(11, $level)) {
|
||||
echo "{$level[11]['name']} 【" . CityConst::byID($level[11]['city'])->name . "】";
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
for($i=10; $i >= $lv; $i--) {
|
||||
if($i % 2 == 0) { echo "<tr>"; }
|
||||
$officerLevelText = getOfficerLevelText($i, $nation['level']);
|
||||
echo "
|
||||
for ($i = 10; $i >= $lv; $i--) {
|
||||
if ($i % 2 == 0) {
|
||||
echo "<tr>";
|
||||
}
|
||||
$officerLevelText = getOfficerLevelText($i, $nation['level']);
|
||||
echo "
|
||||
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
|
||||
<td width=398>
|
||||
";
|
||||
|
||||
|
||||
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $i)) {
|
||||
echo "
|
||||
if ($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $i)) {
|
||||
echo "
|
||||
<select id='genlist_{$i}' size=1 style=color:white;background-color:black;>
|
||||
<option value=0 data-officer_level='0' data-name=''>____공석____</option>";
|
||||
|
||||
foreach(($i%2==0?$candidateStrength:$candidateIntel) as $general) {
|
||||
if($general['officer_level'] == $i) {
|
||||
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} elseif($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
}
|
||||
}
|
||||
foreach (($i % 2 == 0 ? $candidateStrength : $candidateIntel) as $general) {
|
||||
if ($general['officer_level'] == $i) {
|
||||
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} elseif ($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<input class='btn_appoint' type=$btn data-officer_level='{$i}' data-officer_level_text='$officerLevelText' value=임명>";
|
||||
} else {
|
||||
$general = $level[$i]??null;
|
||||
if($general){
|
||||
echo "{$general['name']} 【".CityConst::byID($general['city'])->name."】";
|
||||
}
|
||||
}
|
||||
echo "</td>";
|
||||
if($i % 2 == 1) { echo "</tr>"; }
|
||||
}
|
||||
echo "
|
||||
} else {
|
||||
$general = $level[$i] ?? null;
|
||||
if ($general) {
|
||||
echo "{$general['name']} 【" . CityConst::byID($general['city'])->name . "】";
|
||||
}
|
||||
}
|
||||
echo "</td>";
|
||||
if ($i % 2 == 1) {
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
echo "
|
||||
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
|
||||
</table>
|
||||
|
||||
";
|
||||
|
||||
if($meLevel == 12):
|
||||
?>
|
||||
<table align='center' width='1000' class='tb_layout bg0'>
|
||||
<tr><td colspan='4' height='5'></td></tr>
|
||||
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr>
|
||||
<tr>
|
||||
<td width=98 align=right class='bg1'>외교권자</td>
|
||||
<td width=398>
|
||||
<select id="selectAmbassador" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAmbassador' type='button'>임명</button>
|
||||
</td>
|
||||
<td width=98 align=right class='bg1'>조언자</td>
|
||||
<td width=398>
|
||||
<select id="selectAuditor" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAuditor' type='button'>임명</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<table align=center width=1000 id='officer_list' class='tb_layout bg0'>
|
||||
<tr><td colspan=5 height=5></td></tr>
|
||||
<?php
|
||||
if($meLevel >= 5) {
|
||||
$officerLevelText = getOfficerLevelText(4, $nation['level']);
|
||||
echo "
|
||||
if ($meLevel == 12) :
|
||||
?>
|
||||
<table align='center' width='1000' class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan='4' height='5'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=right class='bg1'>외교권자</td>
|
||||
<td width=398>
|
||||
<select id="selectAmbassador" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAmbassador' type='button'>임명</button>
|
||||
</td>
|
||||
<td width=98 align=right class='bg1'>조언자</td>
|
||||
<td width=398>
|
||||
<select id="selectAuditor" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAuditor' type='button'>임명</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<table align=center width=1000 id='officer_list' class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=5 height=5></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($meLevel >= 5) {
|
||||
$officerLevelText = getOfficerLevelText(4, $nation['level']);
|
||||
echo "
|
||||
<tr><td colspan=5 align=center bgcolor=orange>도 시 관 직 임 명</td></tr>
|
||||
<tr>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
@@ -325,142 +355,142 @@ if($meLevel >= 5) {
|
||||
<select id='citylist_4' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$cityList = $db->query('SELECT city,name,region,officer_set FROM city WHERE nation=%i ORDER BY region,level DESC,binary(name)', $nationID);
|
||||
$region = 0;
|
||||
foreach($cityList as $city){
|
||||
if(isOfficerSet($city['officer_set'], 4)){
|
||||
continue;
|
||||
}
|
||||
$cityList = $db->query('SELECT city,name,region,officer_set FROM city WHERE nation=%i ORDER BY region,level DESC,binary(name)', $nationID);
|
||||
$region = 0;
|
||||
foreach ($cityList as $city) {
|
||||
if (isOfficerSet($city['officer_set'], 4)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($region != $city['region']) {
|
||||
if($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 ".CityConst::$regionMap[$city['region']]." 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
if ($region != $city['region']) {
|
||||
if ($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 " . CityConst::$regionMap[$city['region']] . " 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<select id='genlist_4' size=1 style=color:white;background-color:black;>
|
||||
<option value=0 data-officer_level='0' data-name=''>____공석____</option>
|
||||
";
|
||||
|
||||
foreach($candidateStrength as $general) {
|
||||
if($general['officer_level'] == 4) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} elseif($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
}
|
||||
}
|
||||
foreach ($candidateStrength as $general) {
|
||||
if ($general['officer_level'] == 4) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} elseif ($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<input class='btn_appoint' type=$btn data-officer_level='4' data-officer_level_text='{$officerLevelText}' value=임명>
|
||||
</td>
|
||||
</tr>";
|
||||
$officerLevelText = getOfficerLevelText(3, $nation['level']);
|
||||
echo "<tr>
|
||||
$officerLevelText = getOfficerLevelText(3, $nation['level']);
|
||||
echo "<tr>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
<td colspan=2>
|
||||
<select id='citylist_3' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$region = 0;
|
||||
foreach($cityList as $city){
|
||||
if(isOfficerSet($city['officer_set'], 3)){
|
||||
continue;
|
||||
}
|
||||
$region = 0;
|
||||
foreach ($cityList as $city) {
|
||||
if (isOfficerSet($city['officer_set'], 3)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($region != $city['region']) {
|
||||
if($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 ".CityConst::$regionMap[$city['region']]." 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
if ($region != $city['region']) {
|
||||
if ($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 " . CityConst::$regionMap[$city['region']] . " 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<select id='genlist_3' size=1 style=color:white;background-color:black;>
|
||||
<option value=0 data-officer_level='0' data-name=''>____공석____</option>
|
||||
";
|
||||
|
||||
foreach($candidateIntel as $general) {
|
||||
if($general['officer_level'] == 3) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} elseif($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
}
|
||||
}
|
||||
foreach ($candidateIntel as $general) {
|
||||
if ($general['officer_level'] == 3) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} elseif ($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<input class='btn_appoint' type=$btn data-officer_level='3' data-officer_level_text='{$officerLevelText}' value=임명>
|
||||
</td>
|
||||
</tr>";
|
||||
$officerLevelText = getOfficerLevelText(2, $nation['level']);
|
||||
echo "<tr>
|
||||
$officerLevelText = getOfficerLevelText(2, $nation['level']);
|
||||
echo "<tr>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
<td colspan=2>
|
||||
<select id='citylist_2' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$region = 0;
|
||||
foreach($cityList as $city){
|
||||
if(isOfficerSet($city['officer_set'], 2)){
|
||||
continue;
|
||||
}
|
||||
$region = 0;
|
||||
foreach ($cityList as $city) {
|
||||
if (isOfficerSet($city['officer_set'], 2)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($region != $city['region']) {
|
||||
if($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 ".CityConst::$regionMap[$city['region']]." 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
if ($region != $city['region']) {
|
||||
if ($region != 0) {
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "<optgroup label=' 【 " . CityConst::$regionMap[$city['region']] . " 】 ' style=color:skyblue;>";
|
||||
$region = $city['region'];
|
||||
}
|
||||
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<select id='genlist_2' size=1 style=color:white;background-color:black;>
|
||||
<option value=0>____<span class='name_field'>공석</span>____</option>
|
||||
";
|
||||
|
||||
foreach ($candidateAny as $general) {
|
||||
if($general['officer_level'] == 2) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} elseif($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【".CityConst::byID($general['city'])->name."】</option>";
|
||||
}
|
||||
}
|
||||
foreach ($candidateAny as $general) {
|
||||
if ($general['officer_level'] == 2) {
|
||||
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} elseif ($general['officer_level'] > 1) {
|
||||
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
} else {
|
||||
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} 【" . CityConst::byID($general['city'])->name . "】</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
</select>
|
||||
<input class='btn_appoint' type=$btn data-officer_level='2' data-officer_level_text='{$officerLevelText}' value=임명>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=5>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
|
||||
";
|
||||
}
|
||||
echo "
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td width=158 align=center class='bg1' colspan=2><font size=4>도 시</font></td>
|
||||
<td width=278 align=center class='bg1'><font size=4>태 수 (사관) 【현재도시】</font></td>
|
||||
@@ -469,59 +499,73 @@ echo "
|
||||
</tr>
|
||||
";
|
||||
|
||||
$citylevel = getCityLevelList();
|
||||
$citylevel = getCityLevelList();
|
||||
|
||||
$officerList = [];
|
||||
$officerList = [];
|
||||
|
||||
foreach($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer){
|
||||
$officerCityID = $officer['officer_city'];
|
||||
if(!key_exists($officerCityID, $officerList)){
|
||||
$officerList[$officerCityID] = [];
|
||||
}
|
||||
$officerList[$officerCityID][$officer['officer_level']] = $officer;
|
||||
}
|
||||
foreach ($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer) {
|
||||
$officerCityID = $officer['officer_city'];
|
||||
if (!key_exists($officerCityID, $officerList)) {
|
||||
$officerList[$officerCityID] = [];
|
||||
}
|
||||
$officerList[$officerCityID][$officer['officer_level']] = $officer;
|
||||
}
|
||||
|
||||
$region = 0;
|
||||
$dummyOfficer = [
|
||||
'name'=>'-',
|
||||
'belong'=>0,
|
||||
];
|
||||
$region = 0;
|
||||
$dummyOfficer = [
|
||||
'name' => '-',
|
||||
'belong' => 0,
|
||||
];
|
||||
|
||||
$textColor = newColor($nation['color']);
|
||||
$nationColor = $nation['color'];
|
||||
$textColor = newColor($nation['color']);
|
||||
$nationColor = $nation['color'];
|
||||
|
||||
foreach($db->query('SELECT city,name,level,region,officer_set from city where nation=%i order by region,level desc,binary(name)', $nationID) as $city) {
|
||||
$cityID = $city['city'];
|
||||
$cityOfficerList = $officerList[$cityID]??[];
|
||||
?>
|
||||
<?php if($region != $city['region']): ?>
|
||||
<tr><td colspan=5 height=3 class='bg1'></td></tr>
|
||||
<tr><td colspan=5 class='bg1'><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr>
|
||||
<?php endif; $region = $city['region']; ?>
|
||||
<tr>
|
||||
<td width=78 align=center style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'>【<?=$citylevel[$city['level']]?>】</td>
|
||||
<td width=78 align=right style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'><?=$city['name']?> </td>
|
||||
foreach ($db->query('SELECT city,name,level,region,officer_set from city where nation=%i order by region,level desc,binary(name)', $nationID) as $city) {
|
||||
$cityID = $city['city'];
|
||||
$cityOfficerList = $officerList[$cityID] ?? [];
|
||||
?>
|
||||
<?php if ($region != $city['region']) : ?>
|
||||
<tr>
|
||||
<td colspan=5 height=3 class='bg1'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5 class='bg1'>
|
||||
<font size=4 color=skyblue> 【 <?= CityConst::$regionMap[$city['region']] ?> 】 </font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
$region = $city['region']; ?>
|
||||
<tr>
|
||||
<td width=78 align=center style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'>【<?= $citylevel[$city['level']] ?>】</td>
|
||||
<td width=78 align=right style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'><?= $city['name'] ?> </td>
|
||||
|
||||
<?php foreach(Util::range(4, 1, -1) as $officerLevel): ?>
|
||||
<?php if(key_exists($officerLevel, $cityOfficerList)):
|
||||
$officer = $cityOfficerList[$officerLevel];
|
||||
?>
|
||||
<td style="color:<?=isOfficerSet($city['officer_set'], $officerLevel)?'orange':'white'?>;"><?=$officer['name']?>(<?=$officer['belong']?>년) 【<?=CityConst::byID($officer['city'])->name?>】</td>
|
||||
<?php else: ?>
|
||||
<td>-</td>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php
|
||||
<?php foreach (Util::range(4, 1, -1) as $officerLevel) : ?>
|
||||
<?php if (key_exists($officerLevel, $cityOfficerList)) :
|
||||
$officer = $cityOfficerList[$officerLevel];
|
||||
?>
|
||||
<td style="color:<?= isOfficerSet($city['officer_set'], $officerLevel) ? 'orange' : 'white' ?>;"><?= $officer['name'] ?>(<?= $officer['belong'] ?>년) 【<?= CityConst::byID($officer['city'])->name ?>】</td>
|
||||
<?php else : ?>
|
||||
<td>-</td>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+177
-124
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -31,122 +32,169 @@ $sel = [$type => "selected"];
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/extExpandCity.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/extExpandCity.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>세 력 도 시<br><?=backButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1]??''?> value=1>기본</option>
|
||||
<option <?=$sel[2]??''?> value=2>인구</option>
|
||||
<option <?=$sel[3]??''?> value=3>인구율</option>
|
||||
<option <?=$sel[4]??''?> value=4>민심</option>
|
||||
<option <?=$sel[5]??''?> value=5>농업</option>
|
||||
<option <?=$sel[6]??''?> value=6>상업</option>
|
||||
<option <?=$sel[7]??''?> value=7>치안</option>
|
||||
<option <?=$sel[8]??''?> value=8>수비</option>
|
||||
<option <?=$sel[9]??''?> value=9>성벽</option>
|
||||
<option <?=$sel[10]??''?> value=10>시세</option>
|
||||
<option <?=$sel[11]??''?> value=11>지역</option>
|
||||
<option <?=$sel[12]??''?> value=12>규모</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>세 력 도 시<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?= $sel[1] ?? '' ?> value=1>기본</option>
|
||||
<option <?= $sel[2] ?? '' ?> value=2>인구</option>
|
||||
<option <?= $sel[3] ?? '' ?> value=3>인구율</option>
|
||||
<option <?= $sel[4] ?? '' ?> value=4>민심</option>
|
||||
<option <?= $sel[5] ?? '' ?> value=5>농업</option>
|
||||
<option <?= $sel[6] ?? '' ?> value=6>상업</option>
|
||||
<option <?= $sel[7] ?? '' ?> value=7>치안</option>
|
||||
<option <?= $sel[8] ?? '' ?> value=8>수비</option>
|
||||
<option <?= $sel[9] ?? '' ?> value=9>성벽</option>
|
||||
<option <?= $sel[10] ?? '' ?> value=10>시세</option>
|
||||
<option <?= $sel[11] ?? '' ?> value=11>지역</option>
|
||||
<option <?= $sel[12] ?? '' ?> value=12>규모</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$nation = getNationStaticInfo($me['nation']); //국가정보
|
||||
$nation = getNationStaticInfo($me['nation']); //국가정보
|
||||
|
||||
$officerList = [];
|
||||
foreach($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer){
|
||||
$officerCityID = $officer['officer_city'];
|
||||
if(!key_exists($officerCityID, $officerList)){
|
||||
$officerList[$officerCityID] = [];
|
||||
}
|
||||
$officerList[$officerCityID][$officer['officer_level']] = $officer;
|
||||
}
|
||||
|
||||
|
||||
$cityList = $db->query('SELECT *,pop/pop_max as poprate from city where nation=%i', $nationID);
|
||||
|
||||
|
||||
switch ($type) {
|
||||
case 1: break;
|
||||
case 2: usort($cityList, function($lhs, $rhs){return $rhs['pop'] <=> $lhs['pop'];}); break;
|
||||
case 3: usort($cityList, function($lhs, $rhs){return $rhs['poprate'] <=> $lhs['poprate'];}); break;
|
||||
case 4: usort($cityList, function($lhs, $rhs){return $rhs['trust'] <=> $lhs['trust'];}); break;
|
||||
case 5: usort($cityList, function($lhs, $rhs){return $rhs['agri'] <=> $lhs['agri'];}); break;
|
||||
case 6: usort($cityList, function($lhs, $rhs){return $rhs['comm'] <=> $lhs['comm'];}); break;
|
||||
case 7: usort($cityList, function($lhs, $rhs){return $rhs['secu'] <=> $lhs['secu'];}); break;
|
||||
case 8: usort($cityList, function($lhs, $rhs){return $rhs['def'] <=> $lhs['def'];}); break;
|
||||
case 9: usort($cityList, function($lhs, $rhs){return $rhs['wall'] <=> $lhs['wall'];}); break;
|
||||
case 10: usort($cityList, function($lhs, $rhs){return $rhs['trade'] <=> $lhs['trade'];}); break;
|
||||
case 11: usort($cityList, function($lhs, $rhs){
|
||||
$cmpTrust = $lhs['region'] <=> $rhs['region'];
|
||||
if($cmpTrust != 0){
|
||||
return $cmpTrust;
|
||||
$officerList = [];
|
||||
foreach ($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer) {
|
||||
$officerCityID = $officer['officer_city'];
|
||||
if (!key_exists($officerCityID, $officerList)) {
|
||||
$officerList[$officerCityID] = [];
|
||||
}
|
||||
return $rhs['level']<=>$lhs['level'];
|
||||
}); break;
|
||||
case 12: usort($cityList, function($lhs, $rhs){
|
||||
$cmpTrust = $rhs['level'] <=> $lhs['level'];
|
||||
if($cmpTrust != 0){
|
||||
return $cmpTrust;
|
||||
$officerList[$officerCityID][$officer['officer_level']] = $officer;
|
||||
}
|
||||
|
||||
|
||||
$cityList = $db->query('SELECT *,pop/pop_max as poprate from city where nation=%i', $nationID);
|
||||
|
||||
|
||||
switch ($type) {
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['pop'] <=> $lhs['pop'];
|
||||
});
|
||||
break;
|
||||
case 3:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['poprate'] <=> $lhs['poprate'];
|
||||
});
|
||||
break;
|
||||
case 4:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['trust'] <=> $lhs['trust'];
|
||||
});
|
||||
break;
|
||||
case 5:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['agri'] <=> $lhs['agri'];
|
||||
});
|
||||
break;
|
||||
case 6:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['comm'] <=> $lhs['comm'];
|
||||
});
|
||||
break;
|
||||
case 7:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['secu'] <=> $lhs['secu'];
|
||||
});
|
||||
break;
|
||||
case 8:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['def'] <=> $lhs['def'];
|
||||
});
|
||||
break;
|
||||
case 9:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['wall'] <=> $lhs['wall'];
|
||||
});
|
||||
break;
|
||||
case 10:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
return $rhs['trade'] <=> $lhs['trade'];
|
||||
});
|
||||
break;
|
||||
case 11:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
$cmpTrust = $lhs['region'] <=> $rhs['region'];
|
||||
if ($cmpTrust != 0) {
|
||||
return $cmpTrust;
|
||||
}
|
||||
return $rhs['level'] <=> $lhs['level'];
|
||||
});
|
||||
break;
|
||||
case 12:
|
||||
usort($cityList, function ($lhs, $rhs) {
|
||||
$cmpTrust = $rhs['level'] <=> $lhs['level'];
|
||||
if ($cmpTrust != 0) {
|
||||
return $cmpTrust;
|
||||
}
|
||||
return $lhs['region'] <=> $rhs['region'];
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
$region = 0;
|
||||
$level = 0;
|
||||
|
||||
foreach ($cityList as $city) {
|
||||
$cityID = $city['city'];
|
||||
if ($city['city'] == $nation['capital']) {
|
||||
$city['name'] = "<font color=cyan>[{$city['name']}]</font>";
|
||||
}
|
||||
return $lhs['region']<=>$rhs['region'];
|
||||
}); break;
|
||||
}
|
||||
|
||||
$region = 0;
|
||||
$level = 0;
|
||||
$officerQuery = [];
|
||||
$officerName = [
|
||||
2 => '-',
|
||||
3 => '-',
|
||||
4 => '-'
|
||||
];
|
||||
|
||||
foreach($cityList as $city){
|
||||
$cityID = $city['city'];
|
||||
if ($city['city'] == $nation['capital']) {
|
||||
$city['name'] = "<font color=cyan>[{$city['name']}]</font>";
|
||||
}
|
||||
$cityOfficerList = $officerList[$cityID] ?? [];
|
||||
foreach ($cityOfficerList as $cityOfficer) {
|
||||
$officerName[$cityOfficer['officer_level']] = getColoredName($cityOfficer['name'], $cityOfficer['npc']);
|
||||
}
|
||||
|
||||
$officerQuery = [];
|
||||
$officerName = [
|
||||
2=>'-',
|
||||
3=>'-',
|
||||
4=>'-'
|
||||
];
|
||||
if ($type == 10 && $city['region'] != $region) {
|
||||
echo "<br>";
|
||||
$region = $city['region'];
|
||||
} elseif ($type == 11 && $city['level'] != $level) {
|
||||
echo "<br>";
|
||||
$level = $city['level'];
|
||||
}
|
||||
|
||||
$cityOfficerList = $officerList[$cityID]??[];
|
||||
foreach($cityOfficerList as $cityOfficer){
|
||||
$officerName[$cityOfficer['officer_level']] = getColoredName($cityOfficer['name'], $cityOfficer['npc']);
|
||||
}
|
||||
if ($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
if ($type == 10 && $city['region'] != $region) {
|
||||
echo "<br>";
|
||||
$region = $city['region'];
|
||||
} elseif ($type == 11 && $city['level'] != $level) {
|
||||
echo "<br>";
|
||||
$level = $city['level'];
|
||||
}
|
||||
|
||||
if ($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
echo "
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</font></td>
|
||||
<td colspan=12 style=color:" . newColor($nation['color']) . "; bgcolor={$nation['color']}><font size=2>【 " . CityConst::$regionMap[$city['region']] . " | " . CityConst::$levelMap[$city['level']] . " 】 {$city['name']}</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=46 class='bg1'>주민</td>
|
||||
@@ -164,46 +212,51 @@ foreach($cityList as $city){
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>민심</td>
|
||||
<td align=center>".round($city['trust'], 1)."</td>
|
||||
<td align=center>" . round($city['trust'], 1) . "</td>
|
||||
<td align=center class='bg1'>시세</td>
|
||||
<td align=center>{$city['trade']}%</td>
|
||||
<td align=center class='bg1'>인구</td>
|
||||
<td align=center>".round($city['pop']/$city['pop_max']*100, 2)." %</td>
|
||||
<td align=center>" . round($city['pop'] / $city['pop_max'] * 100, 2) . " %</td>
|
||||
<td align=center class='bg1'>태수</td>
|
||||
<td align=center>";
|
||||
echo $officerName[4];
|
||||
echo "</td>
|
||||
echo $officerName[4];
|
||||
echo "</td>
|
||||
<td align=center class='bg1'>군사</td>
|
||||
<td align=center>";
|
||||
echo $officerName[3];
|
||||
echo "</td>
|
||||
echo $officerName[3];
|
||||
echo "</td>
|
||||
<td align=center class='bg1'>종사</td>
|
||||
<td align=center>";
|
||||
echo $officerName[2];
|
||||
echo "</td>
|
||||
echo $officerName[2];
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>장수</td>
|
||||
<td colspan=11>";
|
||||
$generalList = $db->query('SELECT npc, name FROM general WHERE city = %i AND nation = %i', $city['city'], $me['nation']);
|
||||
if (!$generalList) {
|
||||
echo "-";
|
||||
}
|
||||
foreach($generalList as $general) {
|
||||
echo getColoredName($general['name'], $general['npc']).', ';
|
||||
}
|
||||
echo "
|
||||
$generalList = $db->query('SELECT npc, name FROM general WHERE city = %i AND nation = %i', $city['city'], $me['nation']);
|
||||
if (!$generalList) {
|
||||
echo "-";
|
||||
}
|
||||
foreach ($generalList as $general) {
|
||||
echo getColoredName($general['name'], $general['npc']) . ', ';
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0 anchor'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<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>
|
||||
|
||||
</html>
|
||||
+118
-100
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 1);
|
||||
if($type <= 0 || $type > 15) {
|
||||
if ($type <= 0 || $type > 15) {
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
@@ -20,7 +21,7 @@ increaseRefresh("세력장수", 1);
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,nation,officer_level from general where owner=%i', $userID);
|
||||
|
||||
if($me['officer_level'] == 0) {
|
||||
if ($me['officer_level'] == 0) {
|
||||
echo "재야입니다.";
|
||||
exit();
|
||||
}
|
||||
@@ -28,8 +29,8 @@ if($me['officer_level'] == 0) {
|
||||
$sel = [$type => "selected"];
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
if ($gameStor->isunited) {
|
||||
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
@@ -40,69 +41,75 @@ if($gameStor->isunited){
|
||||
<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('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<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('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>세 력 장 수<br><?=backButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1]??''?> value=1>관직</option>
|
||||
<option <?=$sel[2]??''?> value=2>계급</option>
|
||||
<option <?=$sel[3]??''?> value=3>명성</option>
|
||||
<option <?=$sel[4]??''?> value=4>통솔</option>
|
||||
<option <?=$sel[5]??''?> value=5>무력</option>
|
||||
<option <?=$sel[6]??''?> value=6>지력</option>
|
||||
<option <?=$sel[7]??''?> value=7>자금</option>
|
||||
<option <?=$sel[8]??''?> value=8>군량</option>
|
||||
<option <?=$sel[9]??''?> value=9>병사</option>
|
||||
<option <?=$sel[10]??''?> value=10>벌점</option>
|
||||
<option <?=$sel[11]??''?> value=11>성격</option>
|
||||
<option <?=$sel[12]??''?> value=12>내특</option>
|
||||
<option <?=$sel[13]??''?> value=13>전특</option>
|
||||
<option <?=$sel[14]??''?> value=14>사관</option>
|
||||
<option <?=$sel[15]??''?> value=15>NPC</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>세 력 장 수<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?= $sel[1] ?? '' ?> value=1>관직</option>
|
||||
<option <?= $sel[2] ?? '' ?> value=2>계급</option>
|
||||
<option <?= $sel[3] ?? '' ?> value=3>명성</option>
|
||||
<option <?= $sel[4] ?? '' ?> value=4>통솔</option>
|
||||
<option <?= $sel[5] ?? '' ?> value=5>무력</option>
|
||||
<option <?= $sel[6] ?? '' ?> value=6>지력</option>
|
||||
<option <?= $sel[7] ?? '' ?> value=7>자금</option>
|
||||
<option <?= $sel[8] ?? '' ?> value=8>군량</option>
|
||||
<option <?= $sel[9] ?? '' ?> value=9>병사</option>
|
||||
<option <?= $sel[10] ?? '' ?> value=10>벌점</option>
|
||||
<option <?= $sel[11] ?? '' ?> value=11>성격</option>
|
||||
<option <?= $sel[12] ?? '' ?> value=12>내특</option>
|
||||
<option <?= $sel[13] ?? '' ?> value=13>전특</option>
|
||||
<option <?= $sel[14] ?? '' ?> value=14>사관</option>
|
||||
<option <?= $sel[15] ?? '' ?> value=15>NPC</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
|
||||
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
|
||||
|
||||
[$orderKey, $orderDesc] = [
|
||||
1=>['officer_level', true],
|
||||
2=>['dedication', true],
|
||||
3=>['experience', true],
|
||||
4=>['leadership', true],
|
||||
5=>['strength', true],
|
||||
6=>['intel', true],
|
||||
7=>['gold', true],
|
||||
8=>['rice', true],
|
||||
9=>['crew', true],
|
||||
10=>['connect', true],
|
||||
11=>['personal', true],
|
||||
12=>['special', true],
|
||||
13=>['special2', true],
|
||||
14=>['belong', true],
|
||||
15=>['npc', true],
|
||||
][$type];
|
||||
[$orderKey, $orderDesc] = [
|
||||
1 => ['officer_level', true],
|
||||
2 => ['dedication', true],
|
||||
3 => ['experience', true],
|
||||
4 => ['leadership', true],
|
||||
5 => ['strength', true],
|
||||
6 => ['intel', true],
|
||||
7 => ['gold', true],
|
||||
8 => ['rice', true],
|
||||
9 => ['crew', true],
|
||||
10 => ['connect', true],
|
||||
11 => ['personal', true],
|
||||
12 => ['special', true],
|
||||
13 => ['special2', true],
|
||||
14 => ['belong', true],
|
||||
15 => ['npc', true],
|
||||
][$type];
|
||||
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect,gold,rice,crew,belong from general where nation = %i order by %b %l', $me['nation'], $orderKey, $orderDesc?'desc':'');
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect,gold,rice,crew,belong from general where nation = %i order by %b %l', $me['nation'], $orderKey, $orderDesc ? 'desc' : '');
|
||||
|
||||
echo"
|
||||
echo "
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=64 align=center class='bg1'>얼 굴</td>
|
||||
@@ -121,66 +128,77 @@ echo"
|
||||
<td width=48 align=center class='bg1'>사 관</td>
|
||||
<td width=70 align=center class='bg1'>벌점</td>
|
||||
</tr>";
|
||||
foreach($generalList as $general){
|
||||
foreach ($generalList as $general) {
|
||||
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
|
||||
if($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
}
|
||||
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
|
||||
if ($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
}
|
||||
|
||||
if($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonus}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonus}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
if ($general['injury'] > 0) {
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
|
||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonus}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leadership = "{$general['leadership']}{$lbonus}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; }
|
||||
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
else { $name = "{$general['name']}"; }
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
|
||||
}
|
||||
if (key_exists($general['owner'], $ownerNameList)) {
|
||||
$name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>';
|
||||
}
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>"; echo getOfficerLevelText($general['officer_level'], $nationLevel); echo "</td>
|
||||
<td align=center>".getDed($general['dedication'])."</td>
|
||||
<td align=center>".getHonor($general['experience'])."</td>
|
||||
<td align=center>".getBill($general['dedication'])."</td>
|
||||
<td align=center>";
|
||||
echo getOfficerLevelText($general['officer_level'], $nationLevel);
|
||||
echo "</td>
|
||||
<td align=center>" . getDed($general['dedication']) . "</td>
|
||||
<td align=center>" . getHonor($general['experience']) . "</td>
|
||||
<td align=center>" . getBill($general['dedication']) . "</td>
|
||||
<td align=center>$leadership</td>
|
||||
<td align=center>$strength</td>
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['gold']}</td>
|
||||
<td align=center>{$general['rice']}</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
|
||||
<td align=center>" . displayCharInfo($general['personal']) . "</td>
|
||||
<td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td>
|
||||
<td align=center>{$general['belong']}</td>
|
||||
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
|
||||
<td align=center>{$general['connect']}";
|
||||
echo "<br>(" . getConnect($general['connect']) . ")</td>
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+130
-124
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -14,7 +15,7 @@ increaseRefresh("세력정보", 1);
|
||||
|
||||
$nationID = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
|
||||
|
||||
if($nationID == 0) {
|
||||
if ($nationID == 0) {
|
||||
echo "재야입니다.";
|
||||
exit();
|
||||
}
|
||||
@@ -23,139 +24,144 @@ if($nationID == 0) {
|
||||
<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::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<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('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>세 력 정 보<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>세 력 정 보<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
$nation = $db->queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,capital FROM nation WHERE nation=%i', $nationID); //국가정보
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
$nation = $db->queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,capital FROM nation WHERE nation=%i', $nationID); //국가정보
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
|
||||
$currPop = 0;
|
||||
$maxPop = 0;
|
||||
$cityNames = [];
|
||||
$currPop = 0;
|
||||
$maxPop = 0;
|
||||
$cityNames = [];
|
||||
|
||||
foreach($cityList as $city){
|
||||
$currPop += $city['pop'];
|
||||
$maxPop += $city['pop_max'];
|
||||
if($city['city'] == $nation['capital']){
|
||||
$cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>";
|
||||
foreach ($cityList as $city) {
|
||||
$currPop += $city['pop'];
|
||||
$maxPop += $city['pop_max'];
|
||||
if ($city['city'] == $nation['capital']) {
|
||||
$cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>";
|
||||
} else {
|
||||
$cityNames[] = $city['name'];
|
||||
}
|
||||
}
|
||||
else{
|
||||
$cityNames[] = $city['name'];
|
||||
|
||||
[$currCrew, $maxCrew] = $db->queryFirstList('SELECT sum(crew), sum(leadership)*100 FROM general WHERE nation=%i AND npc != 5', $nation['nation']);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = '+' . number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = '+' . number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
}
|
||||
|
||||
[$currCrew, $maxCrew] = $db->queryFirstList('SELECT sum(crew), sum(leadership)*100 FROM general WHERE nation=%i AND npc != 5', $nation['nation']);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=8 align=center style='color:<?= newColor($nation['color']) ?>;background-color:<?= $nation['color'] ?>'>【<?= $nation['name'] ?>】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>총주민</td>
|
||||
<td width=198 align=center><?= number_format($currPop) ?>/<?= number_format($maxPop) ?></td>
|
||||
<td width=98 align=center class='bg1'>총병사</td>
|
||||
<td width=198 align=center><?= number_format($currCrew) ?>/<?= number_format($maxCrew) ?></td>
|
||||
<td width=98 align=center class='bg1'>국 력</td>
|
||||
<td width=298 align=center colspan=3><?= $nation['power'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>국 고</td>
|
||||
<td align=center><?= number_format($nation['gold']) ?></td>
|
||||
<td align=center class='bg1'>병 량</td>
|
||||
<td align=center><?= number_format($nation['rice']) ?></td>
|
||||
<td align=center class='bg1'>세 율</td>
|
||||
<td align=center colspan=3><?= $nation['rate'] ?> %</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>세금/단기</td>
|
||||
<td align=center>+<?= number_format($goldIncome) ?> / +<?= number_format($warIncome) ?></td>
|
||||
<td align=center class='bg1'>세곡/둔전</td>
|
||||
<td align=center>+<?= number_format($riceIncome) ?> / +<?= number_format($wallIncome) ?></td>
|
||||
<td align=center class='bg1'>지급률</td>
|
||||
<td align=center colspan=3><?= $nation['bill'] ?> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?= number_format($totalGoldIncome) ?> / -<?= number_format($outcome) ?></td>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?= number_format($totalRiceIncome) ?> / -<?= number_format($outcome) ?></td>
|
||||
<td align=center class='bg1'>속 령</td>
|
||||
<td width=98 align=center><?= count($cityList) ?></td>
|
||||
<td width=98 align=center class='bg1'>장 수</td>
|
||||
<td width=98 align=center><?= $nation['gennum'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>국고 예산</td>
|
||||
<td align=center><?= number_format($budgetgold) ?> (<?= $budgetgolddiff ?>)</td>
|
||||
<td align=center class='bg1'>병량 예산</td>
|
||||
<td align=center><?= number_format($budgetrice) ?> (<?= $budgetricediff ?>)</td>
|
||||
<td align=center class='bg1'>기술력</td>
|
||||
<td align=center><?= number_format(floor($nation['tech'])) ?></td>
|
||||
<td align=center class='bg1'>작 위</td>
|
||||
<td align=center><?= getNationLevel($nation['level']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top class='bg1'> 속령일람 :</td>
|
||||
<td colspan=7><?= join(', ', $cityNames) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top class='bg1'>국가열전</td>
|
||||
<td colspan=7 class='bg0'><?= formatHistoryToHTML(getNationHistoryLogAll($nation['nation'])) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = '+'.number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = '+'.number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=8 align=center style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'>【<?=$nation['name']?>】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center class='bg1'>총주민</td>
|
||||
<td width=198 align=center><?=number_format($currPop)?>/<?=number_format($maxPop)?></td>
|
||||
<td width=98 align=center class='bg1'>총병사</td>
|
||||
<td width=198 align=center><?=number_format($currCrew)?>/<?=number_format($maxCrew)?></td>
|
||||
<td width=98 align=center class='bg1'>국 력</td>
|
||||
<td width=298 align=center colspan=3><?=$nation['power']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>국 고</td>
|
||||
<td align=center><?=number_format($nation['gold'])?></td>
|
||||
<td align=center class='bg1'>병 량</td>
|
||||
<td align=center><?=number_format($nation['rice'])?></td>
|
||||
<td align=center class='bg1'>세 율</td>
|
||||
<td align=center colspan=3><?=$nation['rate']?> %</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>세금/단기</td>
|
||||
<td align=center>+<?=number_format($goldIncome)?> / +<?=number_format($warIncome)?></td>
|
||||
<td align=center class='bg1'>세곡/둔전</td>
|
||||
<td align=center>+<?=number_format($riceIncome)?> / +<?=number_format($wallIncome)?></td>
|
||||
<td align=center class='bg1'>지급률</td>
|
||||
<td align=center colspan=3><?=$nation['bill']?> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center class='bg1'>속 령</td>
|
||||
<td width=98 align=center><?=count($cityList)?></td>
|
||||
<td width=98 align=center class='bg1'>장 수</td>
|
||||
<td width=98 align=center><?=$nation['gennum']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>국고 예산</td>
|
||||
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=center class='bg1'>병량 예산</td>
|
||||
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
|
||||
<td align=center class='bg1'>기술력</td>
|
||||
<td align=center><?=number_format(floor($nation['tech']))?></td>
|
||||
<td align=center class='bg1'>작 위</td>
|
||||
<td align=center><?=getNationLevel($nation['level'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top class='bg1'> 속령일람 :</td>
|
||||
<td colspan=7><?=join(', ', $cityNames)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top class='bg1'>국가열전</td>
|
||||
<td colspan=7 class='bg0'><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+127
-110
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -28,138 +29,154 @@ if ($myset > 0) {
|
||||
}
|
||||
|
||||
$targetTime = addTurn($me->getVar('lastrefresh'), $gameStor->turnterm, 2);
|
||||
if($gameStor->turntime <= $gameStor->opentime){
|
||||
if ($gameStor->turntime <= $gameStor->opentime) {
|
||||
//서버 가오픈시 할 수 있는 행동
|
||||
if($me->getNPCType() == 0){
|
||||
if ($me->getNPCType() == 0) {
|
||||
$showDieImmediatelyBtn = true;
|
||||
if($targetTime <= TimeUtil::now()){
|
||||
if ($targetTime <= TimeUtil::now()) {
|
||||
$availableDieImmediately = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$use_treatment = $me->getAuxVar('use_treatment')??10;
|
||||
$use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
|
||||
$use_treatment = $me->getAuxVar('use_treatment') ?? 10;
|
||||
$use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn') ?? 1;
|
||||
?>
|
||||
<!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>
|
||||
<script>
|
||||
var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/myPage.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?= UniqueConst::$serverName ?>: 내정보</title>
|
||||
<script>
|
||||
var availableDieImmediately = <?= $availableDieImmediately ? 'true' : 'false' ?>;
|
||||
</script>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/myPage.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>내 정 보<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50%>
|
||||
<?php generalInfo($me); ?>
|
||||
<?php generalInfo2($me); ?>
|
||||
</td>
|
||||
<td width=50% valign=top style="padding-left:4ch;">
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>내 정 보<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50%>
|
||||
<?php generalInfo($me); ?>
|
||||
<?php generalInfo2($me); ?>
|
||||
</td>
|
||||
<td width=50% valign=top style="padding-left:4ch;">
|
||||
토너먼트 【
|
||||
<input type=radio class='tnmt' name=tnmt value=0 <?=$me->getVar('tnmt')==0?"checked":""; ?>>수동참여
|
||||
<input type=radio class='tnmt' name=tnmt value=1 <?=$me->getVar('tnmt')==1?"checked":""; ?>>자동참여
|
||||
<input type=radio class='tnmt' name=tnmt value=0 <?= $me->getVar('tnmt') == 0 ? "checked" : ""; ?>>수동참여
|
||||
<input type=radio class='tnmt' name=tnmt value=1 <?= $me->getVar('tnmt') == 1 ? "checked" : ""; ?>>자동참여
|
||||
】<br>
|
||||
∞<span style='color:orange'>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</span><br><br>
|
||||
∞<span style='color:orange'>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</span><br><br>
|
||||
|
||||
환약 사용 【<select id='use_treatment' name='use_treatment'>
|
||||
<option value=10 <?=($use_treatment==10)?"selected":""; ?>>경상</option>
|
||||
<option value=21 <?=($use_treatment==21)?"selected":""; ?>>중상</option>
|
||||
<option value=41 <?=($use_treatment==41)?"selected":""; ?>>심각</option>
|
||||
<option value=61 <?=($use_treatment==61)?"selected":""; ?>>위독</option>
|
||||
<option value=100 <?=($use_treatment==100)?"selected":""; ?>>사용안함</option>
|
||||
환약 사용 【<select id='use_treatment' name='use_treatment'>
|
||||
<option value=10 <?= ($use_treatment == 10) ? "selected" : ""; ?>>경상</option>
|
||||
<option value=21 <?= ($use_treatment == 21) ? "selected" : ""; ?>>중상</option>
|
||||
<option value=41 <?= ($use_treatment == 41) ? "selected" : ""; ?>>심각</option>
|
||||
<option value=61 <?= ($use_treatment == 61) ? "selected" : ""; ?>>위독</option>
|
||||
<option value=100 <?= ($use_treatment == 100) ? "selected" : ""; ?>>사용안함</option>
|
||||
</select>】<br>
|
||||
∞<span style='color:orange'>부상을 입었을 때 환약을 사용하는 기준입니다.</span><br><br>
|
||||
<?php if(($gameStor->autorun_user['options']['chief'])??false) : ?>
|
||||
자동 사령턴 허용 【<select id='use_auto_nation_turn' name='use_auto_nation_turn'>
|
||||
<option value=1 <?=$use_auto_nation_turn?"selected":""; ?>>허용</option>
|
||||
<option value=0 <?=(!$use_auto_nation_turn)?"selected":""; ?>>허용 안함</option>
|
||||
</select>】<br>
|
||||
∞<span style='color:orange'>수뇌가 되었을 때 휴식 턴이어도 적당한 턴을 알아서 넣는 것을 허용합니다.</span><br><br>
|
||||
<?php endif; ?>
|
||||
∞<span style='color:orange'>부상을 입었을 때 환약을 사용하는 기준입니다.</span><br><br>
|
||||
<?php if (($gameStor->autorun_user['options']['chief']) ?? false) : ?>
|
||||
자동 사령턴 허용 【<select id='use_auto_nation_turn' name='use_auto_nation_turn'>
|
||||
<option value=1 <?= $use_auto_nation_turn ? "selected" : ""; ?>>허용</option>
|
||||
<option value=0 <?= (!$use_auto_nation_turn) ? "selected" : ""; ?>>허용 안함</option>
|
||||
</select>】<br>
|
||||
∞<span style='color:orange'>수뇌가 되었을 때 휴식 턴이어도 적당한 턴을 알아서 넣는 것을 허용합니다.</span><br><br>
|
||||
<?php endif; ?>
|
||||
수비 【<select id='defence_train' name='defence_train'>
|
||||
<?php foreach([90, 80, 60, 40] as $targetDefenceTrain): ?>
|
||||
<option value='<?=$targetDefenceTrain?>' <?=$me->getVar('defence_train')==$targetDefenceTrain?"selected":""; ?>><?=formatDefenceTrain($targetDefenceTrain)?>(훈사<?=$targetDefenceTrain?>)</option>
|
||||
<?php endforeach; ?>
|
||||
<option value=999 <?=$me->getVar('defence_train')==999?"selected":""; ?>><?=formatDefenceTrain(999)?>[훈련, 사기 -3]</option>
|
||||
<?php foreach ([90, 80, 60, 40] as $targetDefenceTrain) : ?>
|
||||
<option value='<?= $targetDefenceTrain ?>' <?= $me->getVar('defence_train') == $targetDefenceTrain ? "selected" : ""; ?>><?= formatDefenceTrain($targetDefenceTrain) ?>(훈사<?= $targetDefenceTrain ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
<option value=999 <?= $me->getVar('defence_train') == 999 ? "selected" : ""; ?>><?= formatDefenceTrain(999) ?>[훈련, 사기 -3]</option>
|
||||
</select>
|
||||
】<br><br>
|
||||
<input type=<?=$submit?> id='set_my_setting' name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:14px; value=설정저장><br>
|
||||
∞<span style='color:orange'>설정저장은 이달중 <?=$myset?>회 남았습니다.</span><br><br>
|
||||
<?php if(!($gameStor->autorun_user['limit_minutes']??false)): ?>
|
||||
휴 가 신 청<br>
|
||||
<button type="button" id='vacation' style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:14px;>휴가 신청</button><br><br>
|
||||
<?php endif; ?>
|
||||
<!--빙의 해제용 삭턴 조절<br>
|
||||
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:14px;>빙의 해체 요청</button></a>-->
|
||||
<input type=<?= $submit ?> id='set_my_setting' name=btn style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px; value=설정저장><br>
|
||||
∞<span style='color:orange'>설정저장은 이달중 <?= $myset ?>회 남았습니다.</span><br><br>
|
||||
<?php if (!($gameStor->autorun_user['limit_minutes'] ?? false)) : ?>
|
||||
휴 가 신 청<br>
|
||||
<button type="button" id='vacation' style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>휴가 신청</button><br><br>
|
||||
<?php endif; ?>
|
||||
<!--빙의 해제용 삭턴 조절<br>
|
||||
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>빙의 해체 요청</button></a>-->
|
||||
|
||||
<?php if($showDieImmediatelyBtn): ?>
|
||||
가오픈 기간 내 장수 삭제 (<?=substr($targetTime, 0, 19)?> 부터)<br>
|
||||
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:14px;>장수 삭제</button></a><br><br>
|
||||
<?php endif; ?>
|
||||
<?php if ($showDieImmediatelyBtn) : ?>
|
||||
가오픈 기간 내 장수 삭제 (<?= substr($targetTime, 0, 19) ?> 부터)<br>
|
||||
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>장수 삭제</button></a><br><br>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($gameStor->npcmode==2 && $me->getNPCType()==0): ?>
|
||||
다른 장수 선택 (<?=substr($me->getAuxVar('next_change')??TimeUtil::now(), 0, 19)?> 부터)<br>
|
||||
<a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:14px;>다른 장수 선택</button></a><br><br>
|
||||
<?php endif; ?>
|
||||
<?php if ($gameStor->npcmode == 2 && $me->getNPCType() == 0) : ?>
|
||||
다른 장수 선택 (<?= substr($me->getAuxVar('next_change') ?? TimeUtil::now(), 0, 19) ?> 부터)<br>
|
||||
<a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>다른 장수 선택</button></a><br><br>
|
||||
<?php endif; ?>
|
||||
|
||||
개인용 CSS<br>
|
||||
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'><font color=skyblue size=3>개인 기록</font></td>
|
||||
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<div id='generalActionPlate'>
|
||||
<?=formatHistoryToHTML(getGeneralActionLogRecent($generalID, 24), 'generalAction')?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="generalAction">이전 로그 불러오기</button>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<div id='battleDetailPlate'>
|
||||
<?=formatHistoryToHTML(getBattleDetailLogRecent($generalID, 24), 'battleDetail')?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleDetail">이전 로그 불러오기</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'><font color=skyblue size=3>장수 열전</font></td>
|
||||
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?=formatHistoryToHTML(getGeneralHistoryLogAll($generalID))?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<div id='battleResultPlate'>
|
||||
<?=formatHistoryToHTML(getBattleResultRecent($generalID, 24), 'battleResult')?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleResult">이전 로그 불러오기</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
개인용 CSS<br>
|
||||
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>
|
||||
<font color=skyblue size=3>개인 기록</font>
|
||||
</td>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 기록</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<div id='generalActionPlate'>
|
||||
<?= formatHistoryToHTML(getGeneralActionLogRecent($generalID, 24), 'generalAction') ?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="generalAction">이전 로그 불러오기</button>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<div id='battleDetailPlate'>
|
||||
<?= formatHistoryToHTML(getBattleDetailLogRecent($generalID, 24), 'battleDetail') ?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleDetail">이전 로그 불러오기</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class='bg1'>
|
||||
<font color=skyblue size=3>장수 열전</font>
|
||||
</td>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 결과</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?= formatHistoryToHTML(getGeneralHistoryLogAll($generalID)) ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<div id='battleResultPlate'>
|
||||
<?= formatHistoryToHTML(getBattleResultRecent($generalID, 24), 'battleResult') ?>
|
||||
</div>
|
||||
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleResult">이전 로그 불러오기</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+68
-58
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -12,19 +13,18 @@ $isChiefTurn = Util::getReq('is_chief', 'bool', false);
|
||||
function die_redirect()
|
||||
{
|
||||
global $isChiefTurn;
|
||||
if(!$isChiefTurn){
|
||||
if (!$isChiefTurn) {
|
||||
header('location:index.php', true, 303);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
header('location:b_chiefcenter.php', true, 303);
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
if(!$turnList || !$commandType){
|
||||
if (!$turnList || !$commandType) {
|
||||
die_redirect();
|
||||
}
|
||||
if(!is_array($turnList)){
|
||||
if (!is_array($turnList)) {
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
if(!$isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableGeneralCommand))){
|
||||
if (!$isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableGeneralCommand))) {
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
if($isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableChiefCommand))){
|
||||
if ($isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableChiefCommand))) {
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
@@ -44,23 +44,22 @@ $gameStor = KVStorage::getStorage($db, 'game_env')->turnOnCache();
|
||||
$env = $gameStor->getAll();
|
||||
$general = General::createGeneralObjFromDB($session->generalID);
|
||||
|
||||
if(!$isChiefTurn){
|
||||
if (!$isChiefTurn) {
|
||||
$commandObj = buildGeneralCommandClass($commandType, $general, $env);
|
||||
}
|
||||
else{
|
||||
if($general->getVar('officer_level') < 5){
|
||||
} else {
|
||||
if ($general->getVar('officer_level') < 5) {
|
||||
die_redirect();
|
||||
}
|
||||
$commandObj = buildNationCommandClass($commandType, $general, $env, new LastTurn());
|
||||
}
|
||||
|
||||
|
||||
if($commandObj->isArgValid()){
|
||||
if ($commandObj->isArgValid()) {
|
||||
//인자가 필요없는 타입의 경우 processing에서 '전혀' 처리하지 않음!
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
if(!$commandObj->hasPermissionToReserve()){
|
||||
if (!$commandObj->hasPermissionToReserve()) {
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
@@ -70,57 +69,68 @@ $cssList = $commandObj->getCSSFiles();
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=$commandObj->getName()?></title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('dist_js/processing.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
window.command = '<?=$commandType?>';
|
||||
window.turnList = [<?=join(', ',$turnList)?>];
|
||||
window.isChiefTurn = <?=$isChiefTurn?'true':'false'?>;
|
||||
var jsPlugins = <?=Json::encode($jsList)?>;
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/main.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
<?=WebUtil::printCSS('css/processing.css')?>
|
||||
<title><?= $commandObj->getName() ?></title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/processing.js') ?>
|
||||
<script>
|
||||
window.serverNick = '<?= DB::prefix() ?>';
|
||||
window.serverID = '<?= UniqueConst::$serverID ?>';
|
||||
window.command = '<?= $commandType ?>';
|
||||
window.turnList = [<?= join(', ', $turnList) ?>];
|
||||
window.isChiefTurn = <?= $isChiefTurn ? 'true' : 'false' ?>;
|
||||
var jsPlugins = <?= Json::encode($jsList) ?>;
|
||||
</script>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/main.css') ?>
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
<?= WebUtil::printCSS('css/processing.css') ?>
|
||||
|
||||
<?php
|
||||
foreach($cssList as $css){
|
||||
print(WebUtil::printCSS($css));
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
foreach ($cssList as $css) {
|
||||
print(WebUtil::printCSS($css));
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body class="img_back">
|
||||
<table class="tb_layout bg0" style="width:1000px;margin:auto;">
|
||||
<tr><td class="bg1" style='text-align:center;'><?=$commandObj->getName()?></td></tr>
|
||||
<tr><td>
|
||||
<input type=button value='돌아가기' onclick="history.back();"><br>
|
||||
</td></tr></table>
|
||||
<table class="tb_layout bg0" style="width:1000px;margin:auto;">
|
||||
<tr>
|
||||
<td class="bg1" style='text-align:center;'><?= $commandObj->getName() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type=button value='돌아가기' onclick="history.back();"><br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;">
|
||||
<?=$commandObj->getForm()?>
|
||||
</div>
|
||||
<div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;">
|
||||
<?= $commandObj->getForm() ?>
|
||||
</div>
|
||||
|
||||
<table class="tb_layout bg0" style="width:1000px;margin:auto;">
|
||||
<tr><td>
|
||||
<input type=button value='돌아가기' onclick="history.back();"><br>
|
||||
<?=banner()?>
|
||||
</td></tr></table>
|
||||
<table class="tb_layout bg0" style="width:1000px;margin:auto;">
|
||||
<tr>
|
||||
<td>
|
||||
<input type=button value='돌아가기' onclick="history.back();"><br>
|
||||
<?= banner() ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -43,7 +43,7 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 토너먼트</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+160
-136
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -14,19 +15,18 @@ increaseRefresh("부대편성", 1);
|
||||
$me = $db->queryFirstRow('SELECT no,nation,troop FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$troops = [];
|
||||
foreach($db->query('SELECT troop_leader,name FROM troop WHERE nation = %i', $me['nation']) as $rawTroop){
|
||||
foreach ($db->query('SELECT troop_leader,name FROM troop WHERE nation = %i', $me['nation']) as $rawTroop) {
|
||||
$troops[$rawTroop['troop_leader']] = [
|
||||
'name'=>$rawTroop['name'],
|
||||
'users'=>[]
|
||||
'name' => $rawTroop['name'],
|
||||
'users' => []
|
||||
];
|
||||
}
|
||||
|
||||
foreach($db->query(
|
||||
foreach ($db->query(
|
||||
'SELECT no,name,turntime,troop,city FROM general WHERE troop!=0 AND nation = %i ORDER BY turntime ASC',
|
||||
$me['nation']
|
||||
) as $general
|
||||
){
|
||||
if(!key_exists($general['troop'], $troops)){
|
||||
) as $general) {
|
||||
if (!key_exists($general['troop'], $troops)) {
|
||||
trigger_error("올바르지 않은 부대 소속 {$general['no']}, {$general['name']} : {$general['troop']}");
|
||||
continue;
|
||||
}
|
||||
@@ -36,33 +36,32 @@ foreach($db->query(
|
||||
$troops[$general['troop']]['users'][] = $general;
|
||||
}
|
||||
|
||||
if($troops){
|
||||
if ($troops) {
|
||||
$troopLeaders = $db->query(
|
||||
'SELECT no,name,picture,imgsvr,turntime,city,troop FROM general WHERE no IN %li',
|
||||
array_keys($troops)
|
||||
);
|
||||
$generalTurnList = [];
|
||||
|
||||
foreach($db->queryAllLists(
|
||||
foreach ($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($troopLeaders, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]
|
||||
){
|
||||
if(!key_exists($generalID, $generalTurnList)){
|
||||
) as [$generalID, $turnIdx, $brief]) {
|
||||
if (!key_exists($generalID, $generalTurnList)) {
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
foreach($troopLeaders as $troopLeader){
|
||||
foreach ($troopLeaders as $troopLeader) {
|
||||
$imageTemp = GetImageURL($troopLeader['imgsvr']);
|
||||
|
||||
$troopLeader['pictureFullPath'] = "$imageTemp/{$troopLeader['picture']}";
|
||||
$troopLeader['cityText'] = CityConst::byID($troopLeader['city'])->name;
|
||||
|
||||
$turnText = [];
|
||||
foreach($generalTurnList[$troopLeader['no']] as $rawTurnIdx => $brief){
|
||||
if($brief != '집합'){
|
||||
foreach ($generalTurnList[$troopLeader['no']] as $rawTurnIdx => $brief) {
|
||||
if ($brief != '집합') {
|
||||
$brief = '~';
|
||||
}
|
||||
$turnIdx = $rawTurnIdx + 1;
|
||||
@@ -73,143 +72,168 @@ if($troops){
|
||||
}
|
||||
}
|
||||
|
||||
uasort($troops, function($lhs, $rhs){
|
||||
return $lhs['leader']['turntime']<=>$rhs['leader']['turntime'];
|
||||
uasort($troops, function ($lhs, $rhs) {
|
||||
return $lhs['leader']['turntime'] <=> $rhs['leader']['turntime'];
|
||||
})
|
||||
|
||||
?>
|
||||
<!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::preloadJS('dist_js/troop.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('dist_css/troop.css')?>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<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::preloadJS('dist_js/troop.js') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('dist_css/troop.css') ?>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="width:1000px;margin:auto;">
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<table id="troop_list" class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width=64 class='bg1 center'>선 택</td>
|
||||
<td width=130 class='bg1 center'>부 대 정 보</td>
|
||||
<td width=100 class='bg1 center'>부 대 장</td>
|
||||
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
||||
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot><tr><td colspan='5'>
|
||||
<?php if(!$troops): ?>
|
||||
<?php elseif($me['troop'] == 0): ?>
|
||||
<input type=button id='btnJoinTroop' value='부 대 가 입'>
|
||||
<?php else: ?>
|
||||
<input type=button id="btnLeaveTroop" value='부 대 탈 퇴'>
|
||||
<?php endif;?>
|
||||
</td></tr></tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($troops as $troopNo=>$troop) {
|
||||
$troopLeader = $troop['leader'];
|
||||
$genlistText = [];
|
||||
$cityText = $troopLeader['cityText'];
|
||||
$cityID = $troopLeader['city'];
|
||||
$leaderID = $troopLeader['no'];
|
||||
<div style="width:1000px;margin:auto;">
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td>부 대 편 성<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="troop_list" class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width=64 class='bg1 center'>선 택</td>
|
||||
<td width=130 class='bg1 center'>부 대 정 보</td>
|
||||
<td width=100 class='bg1 center'>부 대 장</td>
|
||||
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
||||
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5'>
|
||||
<?php if (!$troops) : ?>
|
||||
<?php elseif ($me['troop'] == 0) : ?>
|
||||
<input type=button id='btnJoinTroop' value='부 대 가 입'>
|
||||
<?php else : ?>
|
||||
<input type=button id="btnLeaveTroop" value='부 대 탈 퇴'>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($troops as $troopNo => $troop) {
|
||||
$troopLeader = $troop['leader'];
|
||||
$genlistText = [];
|
||||
$cityText = $troopLeader['cityText'];
|
||||
$cityID = $troopLeader['city'];
|
||||
$leaderID = $troopLeader['no'];
|
||||
|
||||
foreach ($troop['users'] as $troopUser) {
|
||||
$spanClass = 'troopUser';
|
||||
if ($troopUser['city'] !== $cityID) {
|
||||
$spanClass.= ' diffCity';
|
||||
}
|
||||
if ($troopUser['no'] == $leaderID) {
|
||||
$spanClass.= ' leader';
|
||||
}
|
||||
$genlistText[] = "<span class='$spanClass' data-general-id='{$troopUser['no']}'
|
||||
foreach ($troop['users'] as $troopUser) {
|
||||
$spanClass = 'troopUser';
|
||||
if ($troopUser['city'] !== $cityID) {
|
||||
$spanClass .= ' diffCity';
|
||||
}
|
||||
if ($troopUser['no'] == $leaderID) {
|
||||
$spanClass .= ' leader';
|
||||
}
|
||||
$genlistText[] = "<span class='$spanClass' data-general-id='{$troopUser['no']}'
|
||||
><span class='generalName'>{$troopUser['name']}</span><span class='cityText'>【{$troopUser['cityText']}】</span
|
||||
></span>";
|
||||
}
|
||||
}
|
||||
|
||||
$genlistText = sprintf('%s (%d명)', join(', ', $genlistText), count($genlistText)); ?>
|
||||
$genlistText = sprintf('%s (%d명)', join(', ', $genlistText), count($genlistText)); ?>
|
||||
|
||||
<?php if ($me['troop'] == 0): ?>
|
||||
<tr>
|
||||
<td align=center rowspan=2><input type='radio' class='troopId' name='troop' value='<?=$troopNo?>'></td>
|
||||
<td align=center><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?=$genlistText?></td>
|
||||
<td rowspan=2><?=$troopLeader['turnText']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td>
|
||||
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr>
|
||||
<tr><td colspan=5>
|
||||
<?php if ($me['troop'] == 0) : ?>
|
||||
<tr>
|
||||
<td align=center rowspan=2><input type='radio' class='troopId' name='troop' value='<?= $troopNo ?>'></td>
|
||||
<td align=center><?= $troop['name'] ?><br>【 <?= $cityText ?> 】</td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?= $troopLeader['pictureFullPath'] ?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?= $genlistText ?></td>
|
||||
<td rowspan=2><?= $troopLeader['turnText'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>
|
||||
<font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
|
||||
</td>
|
||||
<td align=center>
|
||||
<font size=1><?= $troopLeader['name'] ?></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5>
|
||||
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td align=center rowspan=2> </td>
|
||||
<td align=center ><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?=$genlistText?></td>
|
||||
<td rowspan=2>
|
||||
<?php if ($me['no'] == $troopLeader['no']): ?>
|
||||
<select id='genNo' name=gen size=3 style=color:white;background-color:black;font-size:14px;width:128px;>";
|
||||
<?php foreach ($troop['users'] as $troopUser): ?>
|
||||
<?php if ($troopUser['no'] == $me['no']) {
|
||||
continue;
|
||||
} ?>
|
||||
<option value='<?=$troopUser['no']?>'><?=$troopUser['name']?></option>
|
||||
<?php endforeach; ?>
|
||||
</select><br>
|
||||
<input type=button id='btnKickTroop' value='부 대 추 방' style=width:130px;height:25px;>
|
||||
<?php else: ?>
|
||||
<?=$troopLeader['turnText']?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td>
|
||||
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr>
|
||||
<tr><td colspan=5></td></tr>
|
||||
<?php endif;
|
||||
<?php else : ?>
|
||||
<tr>
|
||||
<td align=center rowspan=2> </td>
|
||||
<td align=center><?= $troop['name'] ?><br>【 <?= $cityText ?> 】</td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?= $troopLeader['pictureFullPath'] ?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?= $genlistText ?></td>
|
||||
<td rowspan=2>
|
||||
<?php if ($me['no'] == $troopLeader['no']) : ?>
|
||||
<select id='genNo' name=gen size=3 style=color:white;background-color:black;font-size:14px;width:128px;>";
|
||||
<?php foreach ($troop['users'] as $troopUser) : ?>
|
||||
<?php if ($troopUser['no'] == $me['no']) {
|
||||
continue;
|
||||
} ?>
|
||||
<option value='<?= $troopUser['no'] ?>'><?= $troopUser['name'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select><br>
|
||||
<input type=button id='btnKickTroop' value='부 대 추 방' style=width:130px;height:25px;>
|
||||
<?php else : ?>
|
||||
<?= $troopLeader['turnText'] ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>
|
||||
<font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
|
||||
</td>
|
||||
<td align=center>
|
||||
<font size=1><?= $troopLeader['name'] ?></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5></td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
} //foreach ($troops as $troopNo=>$troop) {
|
||||
?>
|
||||
|
||||
} //foreach ($troops as $troopNo=>$troop) {
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=80 class='bg1'>부 대 명</td>
|
||||
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=18 id='nameplate'></td>
|
||||
<?php if ($me['troop'] == 0) : ?>
|
||||
<td><input type=button id='btnCreateTroop' value='부 대 창 설'></td>
|
||||
<?php else : ?>
|
||||
<td><input type=button id='btnChangeTroopName' value='부 대 변 경'></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=80 class='bg1'>부 대 명</td>
|
||||
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=18 id='nameplate'></td>
|
||||
<?php if($me['troop'] == 0): ?>
|
||||
<td><input type=button id='btnCreateTroop' value='부 대 창 설'></td>
|
||||
<?php else: ?>
|
||||
<td><input type=button id='btnChangeTroopName' value='부 대 변 경'></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?=WebUtil::printJS('dist_js/troop.js')?>
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td><?= backButton() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= banner() ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?= WebUtil::printJS('dist_js/troop.js') ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+460
-480
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -14,536 +15,515 @@ $year = $gameStor->year;
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no, nation, city FROM general WHERE owner =%i', Session::getUserID());
|
||||
|
||||
if($me){
|
||||
if ($me) {
|
||||
$generalID = $me['no'];
|
||||
$nationID = $me['nation'];
|
||||
$city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$generalID = 0;
|
||||
$nationID = 0;
|
||||
$city = [
|
||||
'city'=>0,
|
||||
'level'=>5,
|
||||
'def'=>1000,
|
||||
'wall'=>1000,
|
||||
'city' => 0,
|
||||
'level' => 5,
|
||||
'def' => 1000,
|
||||
'wall' => 1000,
|
||||
];
|
||||
}
|
||||
|
||||
if($nationID){
|
||||
if ($nationID) {
|
||||
$nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$nation = null;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 전투 시뮬레이터</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1100" />
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/battle_simulator.css')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<script>
|
||||
var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
var city = <?=Json::encode($city)?>;
|
||||
var nation = <?=Json::encode($nation)?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('dist_js/battle_simulator.js')?>
|
||||
<title><?= UniqueConst::$serverName ?>: 전투 시뮬레이터</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1100" />
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/battle_simulator.css') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<script>
|
||||
var defaultSpecialDomestic = '<?= GameConst::$defaultSpecialDomestic ?>';
|
||||
var city = <?= Json::encode($city) ?>;
|
||||
var nation = <?= Json::encode($nation) ?>;
|
||||
</script>
|
||||
<?= WebUtil::printJS('dist_js/battle_simulator.js') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
전역 설정
|
||||
</div>
|
||||
<div class="card-body dragpad_battle">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" aria-describedby="text_year" value="<?=$startYear?>" disabled>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">년 시작</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" id="year" value="<?=$year?>" min="<?=$startYear?>">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">년</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" id="month" value="1" min="1" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">월</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="input-group mr-2" role="group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">반복 횟수</span>
|
||||
</div>
|
||||
<select class="custom-select" id="repeat_cnt">
|
||||
<option value="1">1회 (로그 표기)</option>
|
||||
<option value="1000">1000회 (요약 표기)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group mr-2" role="group">
|
||||
<button type="button" class="btn btn-danger btn-begin_battle">전투</button>
|
||||
</div>
|
||||
<div class="btn-group mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-battle-save">모두 저장</button>
|
||||
<input type="file" class="form_load_battle_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-2 attacker_nation">
|
||||
<div id="container">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
출병국 설정
|
||||
</div>
|
||||
<div class="card-body nation_detail dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 성향</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(GameConst::$availableNationType as $typeID): ?>
|
||||
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?=$typeID?>"><?=$nationTypeClass->getName()?> (<?=$nationTypeClass::$pros?>, <?=$nationTypeClass::$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기술</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">등급</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_level">
|
||||
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
|
||||
<option value="<?=$nationLevel?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도시 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_city_level">
|
||||
<?php foreach(getCityLevelList() as $levelID => $name): ?>
|
||||
<option value="<?=$levelID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수도</span>
|
||||
</div>
|
||||
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 attacker_form general_form" data-general_no='1'>
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
<div class="col-sm defender-column">
|
||||
<div class="card mb-2 defender_nation">
|
||||
<div class="card-header">
|
||||
수비국 설정
|
||||
전역 설정
|
||||
</div>
|
||||
<div class="card-body dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 성향</span>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" aria-describedby="text_year" value="<?= $startYear ?>" disabled>
|
||||
<div class="input-group-text"> 년 시작 </div>
|
||||
<input type="number" class="form-control" id="year" value="<?= $year ?>" min="<?= $startYear ?>">
|
||||
<div class="input-group-text"> 년 </div>
|
||||
<input type="number" class="form-control" id="month" value="1" min="1" max="12">
|
||||
<div class="input-group-text"> 월 </div>
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(GameConst::$availableNationType as $typeID): ?>
|
||||
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?=$typeID?>"><?=$nationTypeObj->getName()?> (<?=$nationTypeObj::$pros?>, <?=$nationTypeObj::$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기술</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">등급</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_level">
|
||||
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
|
||||
<option value="<?=$nationLevel?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도시 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_city_level">
|
||||
<?php foreach(getCityLevelList() as $levelID => $name): ?>
|
||||
<option value="<?=$levelID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수도</span>
|
||||
</div>
|
||||
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수비</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">성벽</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 defender_add_form">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-success add-defender">추가</button>
|
||||
<div class="col-sm-6">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="input-group me-2" role="group">
|
||||
<div class="input-group-text">
|
||||
반복 횟수
|
||||
</div>
|
||||
<select class="form-select" id="repeat_cnt">
|
||||
<option value="1">1회 (로그 표기)</option>
|
||||
<option value="1000">1000회 (요약 표기)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group me-2" role="group">
|
||||
<button type="button" class="btn btn-danger btn-begin_battle">전투</button>
|
||||
</div>
|
||||
<div class="btn-group me-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-battle-save">모두 저장</button>
|
||||
<input type="file" class="form_load_battle_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 form_sample">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-2 attacker_nation">
|
||||
<div class="card-header">
|
||||
출병국 설정
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-warning copy-defender">복제</button>
|
||||
<button type="button" class="btn btn-danger delete-defender">제거</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body general_detail">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">이름</span>
|
||||
</div>
|
||||
<input type="text" class="form-control form_general_name" value="무명" style="width:15ch;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">직위</span>
|
||||
</div>
|
||||
<select class="custom-select form_officer_level" style="width:8ch;">
|
||||
<option value="1">일반</option>
|
||||
<option value="4">태수</option>
|
||||
<option value="3">군사</option>
|
||||
<option value="2">종사</option>
|
||||
<option value="10">무장 수뇌</option>
|
||||
<option value="9">지장 수뇌</option>
|
||||
<option value="11">참모</option>
|
||||
<option value="12">군주</option>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Level</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
|
||||
<div class="card-body nation_detail dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">국가 성향
|
||||
</div>
|
||||
<select class="form-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach (GameConst::$availableNationType as $typeID) : ?>
|
||||
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?= $typeID ?>"><?= $nationTypeClass->getName() ?> (<?= $nationTypeClass::$pros ?>, <?= $nationTypeClass::$cons ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">기술 </div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-text">등급 </div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">국가 규모 </div>
|
||||
<select class="form-select form_nation_level">
|
||||
<?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?>
|
||||
<option value="<?= $nationLevel ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">도시 규모
|
||||
</div>
|
||||
<select class="form-select form_city_level">
|
||||
<?php foreach (getCityLevelList() as $levelID => $name) : ?>
|
||||
<option value="<?= $levelID ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">수도
|
||||
</div>
|
||||
<div class="input-group-text btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">통솔</span>
|
||||
<div class="card mb-2 attacker_form general_form" data-general_no='1'>
|
||||
<div class="card-header">
|
||||
<div class="float-sm-start" style="line-height:25px;">출병자 설정</div>
|
||||
<div class="float-sm-end btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm me-2" role="group">
|
||||
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm me-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">무력</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_strength" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">지력</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1">
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">명마</span>
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
<div class="col-sm defender-column">
|
||||
<div class="card mb-2 defender_nation">
|
||||
<div class="card-header">
|
||||
수비국 설정
|
||||
</div>
|
||||
<select class="custom-select form_general_horse">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach(GameConst::$allItems['horse'] as $horseID=>$cnt): ?>
|
||||
<option value="<?=$horseID?>"><?=getItemName($horseID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">무기</span>
|
||||
<div class="card-body dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">국가 성향
|
||||
</div>
|
||||
<select class="form-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach (GameConst::$availableNationType as $typeID) : ?>
|
||||
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?= $typeID ?>"><?= $nationTypeObj->getName() ?> (<?= $nationTypeObj::$pros ?>, <?= $nationTypeObj::$cons ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">기술
|
||||
</div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-text">등급
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">국가 규모
|
||||
</div>
|
||||
<select class="form-select form_nation_level">
|
||||
<?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?>
|
||||
<option value="<?= $nationLevel ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">도시 규모
|
||||
</div>
|
||||
<select class="form-select form_city_level">
|
||||
<?php foreach (getCityLevelList() as $levelID => $name) : ?>
|
||||
<option value="<?= $levelID ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">수도
|
||||
</div>
|
||||
<div class="input-group-text btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">수비
|
||||
</div>
|
||||
<input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10">
|
||||
<div class="input-group-text">성벽
|
||||
</div>
|
||||
<input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10">
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select form_general_weap">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach(GameConst::$allItems['weapon'] as $weaponID=>$cnt): ?>
|
||||
<option value="<?=$weaponID?>"><?=getItemName($weaponID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">서적</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_book">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach(GameConst::$allItems['book'] as $bookID=>$cnt): ?>
|
||||
<option value="<?=$bookID?>"><?=getItemName($bookID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">부상</span>
|
||||
<div class="card mb-2 defender_add_form">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-start" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-end btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm me-2" role="group">
|
||||
<button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-success add-defender">추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">%(<span class="injury_helptext">건강</span>)</span>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">군량</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도구</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_item">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach(GameConst::$allItems['item'] as $itemID=>$cnt): ?>
|
||||
<option value="<?=$itemID?>"><?=getItemName($itemID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">병종</span>
|
||||
<div class="card mb-2 form_sample">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-start" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-end btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm me-2" role="group">
|
||||
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm me-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-warning copy-defender">복제</button>
|
||||
<button type="button" class="btn btn-danger delete-defender">제거</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select form_crewtype">
|
||||
<?php foreach(GameUnitConst::all() as $crewTypeID => $crewType): ?>
|
||||
<?php if($crewType->armType === GameUnitConst::T_CASTLE){ continue; } ?>
|
||||
<option value="<?=$crewTypeID?>"><?=$crewType->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">병사</span>
|
||||
<div class="card-body general_detail">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">이름
|
||||
</div>
|
||||
<input type="text" class="form-control form_general_name" value="무명" style="width:15ch;">
|
||||
<div class="input-group-text">직위
|
||||
</div>
|
||||
<select class="form-select form_officer_level" style="width:8ch;">
|
||||
<option value="1">일반</option>
|
||||
<option value="4">태수</option>
|
||||
<option value="3">군사</option>
|
||||
<option value="2">종사</option>
|
||||
<option value="10">무장 수뇌</option>
|
||||
<option value="9">지장 수뇌</option>
|
||||
<option value="11">참모</option>
|
||||
<option value="12">군주</option>
|
||||
</select>
|
||||
<div class="input-group-text">Level
|
||||
</div>
|
||||
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
|
||||
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">통솔
|
||||
</div>
|
||||
<input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-text">무력
|
||||
</div>
|
||||
<input type="number" class="form-control form_strength" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-text">지력
|
||||
</div>
|
||||
<input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1">
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">명마
|
||||
</div>
|
||||
<select class="form-select form_general_horse">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach (GameConst::$allItems['horse'] as $horseID => $cnt) : ?>
|
||||
<option value="<?= $horseID ?>"><?= getItemName($horseID) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">무기
|
||||
</div>
|
||||
<select class="form-select form_general_weap">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach (GameConst::$allItems['weapon'] as $weaponID => $cnt) : ?>
|
||||
<option value="<?= $weaponID ?>"><?= getItemName($weaponID) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">서적
|
||||
</div>
|
||||
<select class="form-select form_general_book">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach (GameConst::$allItems['book'] as $bookID => $cnt) : ?>
|
||||
<option value="<?= $bookID ?>"><?= getItemName($bookID) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">부상
|
||||
</div>
|
||||
<input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1">
|
||||
<div class="input-group-text">%(<span class="injury_helptext">건강</span>)
|
||||
</div>
|
||||
<div class="input-group-text">군량
|
||||
</div>
|
||||
<input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50">
|
||||
<div class="input-group-text">도구
|
||||
</div>
|
||||
<select class="form-select form_general_item">
|
||||
<option value='None'>-</option>
|
||||
<?php foreach (GameConst::$allItems['item'] as $itemID => $cnt) : ?>
|
||||
<option value="<?= $itemID ?>"><?= getItemName($itemID) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">병종
|
||||
</div>
|
||||
<select class="form-select form_crewtype">
|
||||
<?php foreach (GameUnitConst::all() as $crewTypeID => $crewType) : ?>
|
||||
<?php if ($crewType->armType === GameUnitConst::T_CASTLE) {
|
||||
continue;
|
||||
} ?>
|
||||
<option value="<?= $crewTypeID ?>"><?= $crewType->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">병사
|
||||
</div>
|
||||
<input type="number" class="form-control form_crew" value="7000" min="100" step="100">
|
||||
<div class="input-group-text">성격
|
||||
</div>
|
||||
<select class="form-select form_general_character">
|
||||
<?php foreach (getCharacterList(false) as $characterID => [$name, $info]) : ?>
|
||||
<option value="<?= $characterID ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">훈련
|
||||
</div>
|
||||
<input type="number" class="form-control form_train" value="100" min="40" max="<?= GameConst::$maxTrainByWar ?>" step="1">
|
||||
<div class="input-group-text">사기
|
||||
</div>
|
||||
<input type="number" class="form-control form_atmos" value="100" min="40" max="<?= GameConst::$maxAtmosByWar ?>" step="1">
|
||||
<div class="input-group-text">전특
|
||||
</div>
|
||||
<select class="form-select form_general_special_war">
|
||||
<?php foreach (SpecialityHelper::getSpecialWarList(false) as $specialWarID => $specialObj) : ?>
|
||||
<option value="<?= $specialWarID ?>"><?= $specialObj->getName() ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">보병숙련
|
||||
</div>
|
||||
<select class="form-select form_dex1">
|
||||
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
|
||||
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">궁병숙련
|
||||
</div>
|
||||
<select class="form-select form_dex2">
|
||||
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
|
||||
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">기병숙련
|
||||
</div>
|
||||
<select class="form-select form_dex3">
|
||||
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
|
||||
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text">귀병숙련
|
||||
</div>
|
||||
<select class="form-select form_dex4">
|
||||
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
|
||||
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text">차병숙련
|
||||
</div>
|
||||
<select class="form-select form_dex5">
|
||||
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
|
||||
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-text only_defender">수비여부
|
||||
</div>
|
||||
<select class="form-select form_defence_train only_defender">
|
||||
<option value="90">훈사 90</option>
|
||||
<option value="80">훈사 80</option>
|
||||
<option value="60">훈사 60</option>
|
||||
<option value="40">훈사 40</option>
|
||||
<option value="999">안함</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-text">전투 수
|
||||
</div>
|
||||
<input type="number" class="form-control form_warnum" value="0" step="1">
|
||||
<div class="input-group-text">승리 수
|
||||
</div>
|
||||
<input type="number" class="form-control form_killnum" value="0" step="1">
|
||||
<div class="input-group-text">사살 수
|
||||
</div>
|
||||
<input type="number" class="form-control form_killcrew" value="0" step="1">
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" class="form-control form_crew" value="7000" min="100" step="100">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">성격</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_character">
|
||||
<?php foreach(getCharacterList(false) as $characterID => [$name,$info]): ?>
|
||||
<option value="<?=$characterID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">훈련</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_train" value="100" min="40" max="<?=GameConst::$maxTrainByWar?>" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">사기</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_atmos" value="100" min="40" max="<?=GameConst::$maxAtmosByWar?>" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">전특</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_special_war">
|
||||
<?php foreach(SpecialityHelper::getSpecialWarList(false) as $specialWarID =>$specialObj): ?>
|
||||
<option value="<?=$specialWarID?>"><?=$specialObj->getName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">보병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex1">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">궁병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex2">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex3">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">귀병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex4">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">차병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex5">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend only_defender">
|
||||
<span class="input-group-text">수비여부</span>
|
||||
</div>
|
||||
<select class="custom-select form_defence_train only_defender">
|
||||
<option value="90">훈사 90</option>
|
||||
<option value="80">훈사 80</option>
|
||||
<option value="60">훈사 60</option>
|
||||
<option value="40">훈사 40</option>
|
||||
<option value="999">안함</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">전투 수</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_warnum" value="0" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">승리 수</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_killnum" value="0" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">사살 수</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_killcrew" value="0" step="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
전투 요약
|
||||
</div>
|
||||
<table class="table">
|
||||
<tbody id="battle_result_summary">
|
||||
<tr><th style='width:18ch;'>전투 일시</th><td id='result_datetime'></td></tr>
|
||||
<tr><th>전투 횟수</th><td id='result_warcnt'></td></tr>
|
||||
<tr><th>전투 페이즈</th><td id='result_phase'></td></tr>
|
||||
<tr><th>준 피해</th><td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td></tr>
|
||||
<tr><th>받은 피해</th><td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td></tr>
|
||||
<tr><th>출병자 군량 소모</th><td id='result_attackerRice'></td></tr>
|
||||
<tr><th>수비자 군량 소모</th><td id='result_defenderRice'></td></tr>
|
||||
<tr><th>공격자 스킬</th><td id='result_attackerSkills'></td></tr>
|
||||
<tr class='result_defenderSkills'><th>수비자1 스킬</th><td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 로그
|
||||
전투 요약
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleResultLog">
|
||||
<table class="table">
|
||||
<tbody id="battle_result_summary">
|
||||
<tr>
|
||||
<th style='width:18ch;'>전투 일시</th>
|
||||
<td id='result_datetime'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전투 횟수</th>
|
||||
<td id='result_warcnt'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전투 페이즈</th>
|
||||
<td id='result_phase'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>준 피해</th>
|
||||
<td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>받은 피해</th>
|
||||
<td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출병자 군량 소모</th>
|
||||
<td id='result_attackerRice'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>수비자 군량 소모</th>
|
||||
<td id='result_defenderRice'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>공격자 스킬</th>
|
||||
<td id='result_attackerSkills'></td>
|
||||
</tr>
|
||||
<tr class='result_defenderSkills'>
|
||||
<th>수비자1 스킬</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 로그
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleResultLog">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 상세 로그
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleDetailLog">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 상세 로그
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleDetailLog">
|
||||
|
||||
<div id="importModal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">장수 목록</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select id="modalSelector"></select>
|
||||
<p>타국 장수를 선택한 경우 숙련과 아이템은 0으로 초기화됩니다.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" id='importFromDB'>가져오기</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="importModal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">장수 목록</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select id="modalSelector"></select>
|
||||
<p>타국 장수를 선택한 경우 숙련과 아이템은 0으로 초기화됩니다.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" id='importFromDB'>가져오기</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+3
-1
@@ -1,2 +1,4 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
.form-group{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ function printLimitMsg($turntime) {
|
||||
<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')?>
|
||||
<?=WebUtil::printCSS('dist_css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -28,7 +28,7 @@ function requireAdminPermissionHTML()
|
||||
<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') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ if (!$otherTextInfo) {
|
||||
<meta name="viewport" content="width=500" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
||||
<?= WebUtil::printJS('dist_js/v_main.js', true) ?>
|
||||
|
||||
+230
-330
@@ -1,379 +1,279 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
if(!class_exists('\sammo\DB')){
|
||||
if (!class_exists('\sammo\DB')) {
|
||||
header('Location:install_db.php');
|
||||
}
|
||||
|
||||
$session = Session::requireLogin();
|
||||
|
||||
$serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$serverAcl = $session->acl[$serverName] ?? [];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowFullReset = in_array('fullReset', $serverAcl);
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
if($session->userGrade < 5 && !$allowReset){
|
||||
if ($session->userGrade < 5 && !$allowReset) {
|
||||
die('관리자 아님');
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/install.js')?>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('css/install.css')?>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/install.js') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/install.css') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" style="min-width:720px;">
|
||||
<div class="container">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-8" >
|
||||
<div class="card" id="game_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(환경 설정)
|
||||
<!--턴시간, 시간동기화, 시나리오, 상성, 확장장수, NPC유저, 이미지설정-->
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="game_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="turnterm" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="120">120
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="turnterm" value="60" checked>60
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="30">30
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="20">20
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="10">10
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="5">5
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="2">2
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="1">1
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="sync" class="col-sm-3 col-form-label">시간 동기화</label>
|
||||
<div class="col-sm-9" style="display: inline-flex;">
|
||||
<div id="sync" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="sync" value="1" checked>Y
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="sync" value="0">N
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
시간 단위에 맞게 년/월이 설정됩니다. <br>예: 120분(오전1시=1월), 60분(오전/오후 1시=1월)
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="scenario_sel" class="col-sm-3 col-form-label">시나리오 선택</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="scenario" size="1" id="scenario_sel">
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="fiction" class="col-sm-3 col-form-label">NPC 상성</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="fiction" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="fiction" value="0" checked>연의
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="fiction" value="1">가상
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="extend" class="col-sm-3 col-form-label">확장 NPC</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="extend" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="extend" value="1" checked>포함
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="extend" value="0">미포함
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="block_general_create" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="block_general_create" value="0" checked>가능
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="block_general_create" value="1">불가
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="npcmode" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="npcmode" value="1">가능
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="npcmode" value="0" checked>불가
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="npcmode" value="2">선택 생성 가능
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-form-label" id="autorun_set_label">휴식 턴 시 장수 턴</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="develop" name="autorun_user[]" value="develop">내정
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="warp" name="autorun_user[]" value="warp">순간이동
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="recruit" name="autorun_user[]" value="recruit">징병
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="recruit_high" name="autorun_user[]" value="recruit_high">모병
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="train" name="autorun_user[]" value="train">훈사
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="battle" name="autorun_user[]" value="battle">출병
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="chief" name="autorun_user[]" value="chief">기본 사령턴
|
||||
</label>
|
||||
<div class="col col-lg-8">
|
||||
<div class="card" id="game_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(환경 설정)
|
||||
<!--턴시간, 시간동기화, 시나리오, 상성, 확장장수, NPC유저, 이미지설정-->
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="game_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="turnterm" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_120" value="120"><label for="turnterm_120" class="btn btn-secondary">120</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_60" value="60" checked><label for="turnterm_60" class="btn btn-secondary">60</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_30" value="30"><label for="turnterm_30" class="btn btn-secondary">30</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_20" value="20"><label for="turnterm_20" class="btn btn-secondary">20</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_10" value="10"><label for="turnterm_10" class="btn btn-secondary">10</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_5" value="5"><label for="turnterm_5" class="btn btn-secondary">5</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_2" value="2"><label for="turnterm_2" class="btn btn-secondary">2</label>
|
||||
<input type="radio" class="btn-check" name="turnterm" id="turnterm_1" value="1"><label for="turnterm_1" class="btn btn-secondary">1</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">유효 시간</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="sync" class="col-sm-3 col-form-label">시간 동기화</label>
|
||||
<div class="col-sm-9" style="display: inline-flex;">
|
||||
<div id="sync" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input class="btn-check" id="sync_1" type="radio" name="sync" value="1" checked><label class="btn btn-secondary" for="sync_1">Y</label>
|
||||
<input class="btn-check" id="sync_0" type="radio" name="sync" value="0"><label class="btn btn-secondary" for="sync_0">N</label>
|
||||
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
시간 단위에 맞게 년/월이 설정됩니다.<br>예: 120분(오전1시=1월), 60분(오전/오후 1시=1월)
|
||||
</small>
|
||||
</div>
|
||||
<select class="custom-select" name="autorun_user_minutes" id="autorun_user_minutes">
|
||||
<option value="0" selected>꺼짐</option>
|
||||
<option value="43200">항상</option>
|
||||
<option value="10">10분</option>
|
||||
<option value="20">20분</option>
|
||||
<option value="30">30분</option>
|
||||
<option value="60">1시간</option>
|
||||
<option value="120">2시간</option>
|
||||
<option value="180">3시간</option>
|
||||
<option value="240">4시간</option>
|
||||
<option value="360">6시간</option>
|
||||
<option value="480">8시간</option>
|
||||
<option value="600">10시간</option>
|
||||
<option value="720">12시간</option>
|
||||
<option value="1440">24시간</option>
|
||||
<option value="2160">36시간</option>
|
||||
<option value="2880">48시간</option>
|
||||
<option value="3600">60시간</option>
|
||||
<option value="4320">72시간</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-form-label">휴식 턴 시 사령 턴</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="autorun_chief_reward" id="autorun_chief_reward">포상/몰수
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="autorun_chief_warp" id="autorun_chief_warp">발령
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="autorun_chief_declaration" id="autorun_chief_declaration">선포
|
||||
</label>
|
||||
<div class="form-group row">
|
||||
<label for="scenario_sel" class="col-sm-3 col-form-label">시나리오 선택</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="scenario" size="1" id="scenario_sel">
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">유효 시간</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="fiction" class="col-sm-3 col-form-label">NPC 상성</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="fiction" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" id="fiction_0" class="btn-check" name="fiction" value="0" checked><label for="fiction_0" class="btn btn-secondary"> 연의 </label>
|
||||
<input type="radio" id="fiction_1" class="btn-check" name="fiction" value="1"><label for="fiction_1" class="btn btn-secondary"> 가상 </label>
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select" name="autorun_chief_minutes" id="autorun_chief_minutes">
|
||||
<option value="0" selected>꺼짐</option>
|
||||
<option value="43200">항상</option>
|
||||
<option value="10">10분</option>
|
||||
<option value="20">20분</option>
|
||||
<option value="30">30분</option>
|
||||
<option value="60">1시간</option>
|
||||
<option value="120">2시간</option>
|
||||
<option value="180">3시간</option>
|
||||
<option value="240">4시간</option>
|
||||
<option value="360">6시간</option>
|
||||
<option value="480">8시간</option>
|
||||
<option value="600">10시간</option>
|
||||
<option value="720">12시간</option>
|
||||
<option value="1440">24시간</option>
|
||||
<option value="2160">36시간</option>
|
||||
<option value="2880">48시간</option>
|
||||
<option value="3600">60시간</option>
|
||||
<option value="4320">72시간</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="join_mode" class="col-sm-3 col-form-label">임관 모드</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="join_mode" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="join_mode" value="full" checked>일반
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="join_mode" value="onlyRandom">랜덤 임관
|
||||
</label>
|
||||
<div class="form-group row">
|
||||
<label for="extend" class="col-sm-3 col-form-label">확장 NPC</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="extend" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" id="extend_1" class="btn-check" name="extend" value="1" checked><label for="extend_1" class="btn btn-secondary">포함</label>
|
||||
<input type="radio" id="extend_0" class="btn-check" name="extend" value="0"><label for="extend_0" class="btn btn-secondary">미포함</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="show_img_level" class="col-sm-3 col-form-label">이미지 표기</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="show_img_level" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="show_img_level" value="0">안함
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="show_img_level" value="1">전콘
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="show_img_level" value="2">전콘, 병종
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="show_img_level" value="3" checked>전콘, 병종, NPC
|
||||
</label>
|
||||
<div class="form-group row">
|
||||
<label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="block_general_create" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" class="btn-check" id="block_general_create_0" name="block_general_create" value="0" checked><label for="block_general_create_0" class="btn btn-secondary">가능</label>
|
||||
<input type="radio" class="btn-check" id="block_general_create_1" name="block_general_create" value="1"><label for="block_general_create_1" class="btn btn-secondary">불가</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="tournament_trig" class="col-sm-3 col-form-label">토너먼트 자동 시작<br>경기 단위</label>
|
||||
<div class="col-sm-9" id="tournament_trig">
|
||||
<div id="tournament_trig" class="btn-group-toggle btn-group flex-wrap" data-toggle="buttons">
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="0">안함
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="1">12분(총 5일)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="2">7분(총 10시간)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="3">3분(총 4시간)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25 active">
|
||||
<input type="radio" name="tournament_trig" value="4" checked>1분(총 82분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="5">30초(총 41분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="6">15초(총 21분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="7">5초(총 7분)
|
||||
</label>
|
||||
<div class="form-group row">
|
||||
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="npcmode" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" id="npcmode_1" class="btn-check" name="npcmode" value="1"><label for="npcmode_1" class="btn btn-secondary"> 가능 </label>
|
||||
<input type="radio" id="npcmode_0" class="btn-check" name="npcmode" value="0" checked><label for="npcmode_0" class="btn btn-secondary"> 불가 </label>
|
||||
<input type="radio" id="npcmode_2" class="btn-check" name="npcmode" value="2"><label for="npcmode_2" class="btn btn-secondary"> 선택 생성 가능 </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="reserve_open" class="col-sm-3 col-form-label">오픈 예약</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="reserve_open" id="reserve_open" placeholder="YYYY-MM-DD hh:mm" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-form-label" id="autorun_set_label">휴식 턴 시 장수 턴</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="checkbox" id="autorun_develop" class="autorun_user_chk btn-check" data-key="develop" name="autorun_user[]" value="develop"><label class="btn btn-secondary" for="autorun_develop">내정</label>
|
||||
<input type="checkbox" id="autorun_warp" class="autorun_user_chk btn-check" data-key="warp" name="autorun_user[]" value="warp"><label class="btn btn-secondary" for="autorun_warp">순간이동</label>
|
||||
<input type="checkbox" id="autorun_recruit" class="autorun_user_chk btn-check" data-key="recruit" name="autorun_user[]" value="recruit"><label class="btn btn-secondary" for="autorun_recruit">징병</label>
|
||||
<input type="checkbox" id="autorun_recruit_high" class="autorun_user_chk btn-check" data-key="recruit_high" name="autorun_user[]" value="recruit_high"><label class="btn btn-secondary" for="autorun_recruit_high">모병</label>
|
||||
<input type="checkbox" id="autorun_train" class="autorun_user_chk btn-check" data-key="train" name="autorun_user[]" value="train"><label class="btn btn-secondary" for="autorun_train">훈사</label>
|
||||
<input type="checkbox" id="autorun_battle" class="autorun_user_chk btn-check" data-key="battle" name="autorun_user[]" value="battle"><label class="btn btn-secondary" for="autorun_battle">출병</label>
|
||||
<input type="checkbox" id="autorun_chief" class="autorun_user_chk btn-check" data-key="chief" name="autorun_user[]" value="chief"><label class="btn btn-secondary" for="autorun_chief">기본 사령턴</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 offset-sm-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">유효 시간
|
||||
</div>
|
||||
<select class="custom-select" name="autorun_user_minutes" id="autorun_user_minutes">
|
||||
<option value="0" selected>꺼짐</option>
|
||||
<option value="43200">항상</option>
|
||||
<option value="10">10분</option>
|
||||
<option value="20">20분</option>
|
||||
<option value="30">30분</option>
|
||||
<option value="60">1시간</option>
|
||||
<option value="120">2시간</option>
|
||||
<option value="180">3시간</option>
|
||||
<option value="240">4시간</option>
|
||||
<option value="360">6시간</option>
|
||||
<option value="480">8시간</option>
|
||||
<option value="600">10시간</option>
|
||||
<option value="720">12시간</option>
|
||||
<option value="1440">24시간</option>
|
||||
<option value="2160">36시간</option>
|
||||
<option value="2880">48시간</option>
|
||||
<option value="3600">60시간</option>
|
||||
<option value="4320">72시간</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="join_mode" class="col-sm-3 col-form-label">임관 모드</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="join_mode" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input class="btn-check" id="join_mode_full" type="radio" name="join_mode" value="full" checked><label class="btn btn-secondary" for="join_mode_full">일반</label>
|
||||
<input class="btn-check" id="join_mode_onlyRandom" type="radio" name="join_mode" value="onlyRandom"><label class="btn btn-secondary" for="join_mode_onlyRandom">랜덤 임관</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="pre_reserve_open" class="col-sm-3 col-form-label">가오픈 예약</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="pre_reserve_open" id="pre_reserve_open" placeholder="YYYY-MM-DD hh:mm" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="show_img_level" class="col-sm-3 col-form-label">이미지 표기</label>
|
||||
<div class="col-sm-9">
|
||||
<div id="show_img_level" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<input type="radio" id="show_img_level_0" class="btn-check" name="show_img_level" value="0"><label for="show_img_level_0" class="btn btn-secondary">안함</label>
|
||||
<input type="radio" id="show_img_level_1" class="btn-check" name="show_img_level" value="1"><label for="show_img_level_1" class="btn btn-secondary">전콘</label>
|
||||
<input type="radio" id="show_img_level_2" class="btn-check" name="show_img_level" value="2"><label for="show_img_level_2" class="btn btn-secondary">전콘, 병종</label>
|
||||
<input type="radio" id="show_img_level_3" class="btn-check" name="show_img_level" value="3" checked><label for="show_img_level_3" class="btn btn-secondary">전콘, 병종, NPC</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<input type="submit" class="btn btn-primary btn-lg btn-block login-button" value="리셋 개시">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="tournament_trig" class="col-sm-3 col-form-label"><span class="text-nowrap">토너먼트 자동 시작</span> <span class="text-nowrap">경기 단위</span></label>
|
||||
<div class="col-sm-9" id="tournament_trig">
|
||||
<div id="tournament_trig" class="btn-group-toggle btn-group flex-wrap" data-toggle="buttons">
|
||||
<input type="radio" class="btn-check" id="tournament_trig_0" name="tournament_trig" value="0"><label for="tournament_trig_0" class="btn btn-secondary w-25">안함</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_1" name="tournament_trig" value="1"><label for="tournament_trig_1" class="btn btn-secondary w-25">12분(총 5일)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_2" name="tournament_trig" value="2"><label for="tournament_trig_2" class="btn btn-secondary w-25">7분(총 10시간)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_3" name="tournament_trig" value="3"><label for="tournament_trig_3" class="btn btn-secondary w-25">3분(총 4시간)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_4" name="tournament_trig" value="4" checked><label for="tournament_trig_4" class="btn btn-secondary w-25">1분(총 82분)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_5" name="tournament_trig" value="5"><label for="tournament_trig_5" class="btn btn-secondary w-25">30초(총 41분)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_6" name="tournament_trig" value="6"><label for="tournament_trig_6" class="btn btn-secondary w-25">15초(총 21분)</label>
|
||||
<input type="radio" class="btn-check" id="tournament_trig_7" name="tournament_trig" value="7"><label for="tournament_trig_7" class="btn btn-secondary w-25">5초(총 7분)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="reserve_open" class="col-sm-3 col-form-label">오픈 예약</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="reserve_open" id="reserve_open" placeholder="YYYY-MM-DD hh:mm" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="pre_reserve_open" class="col-sm-3 col-form-label">가오픈 예약</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="pre_reserve_open" id="pre_reserve_open" placeholder="YYYY-MM-DD hh:mm" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9 d-grid">
|
||||
<input type="submit" class="btn btn-primary btn-lg btn-block login-button" value="리셋 개시">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
<h4 class="card-header">시나리오 정보</h4>
|
||||
<table class="table table-striped">
|
||||
<colgroup>
|
||||
<col style="width:100px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>설정</th>
|
||||
<th>값</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>시작 연도</th>
|
||||
<td><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>NPC 수</th>
|
||||
<td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>국가</th>
|
||||
<td><span id="scenario_nation"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<!--GAME 폼 끝-->
|
||||
|
||||
</div>
|
||||
<h4 class="card-header">시나리오 정보</h4>
|
||||
<table class="table table-striped">
|
||||
<colgroup><col style="width:100px;"><col></colgroup>
|
||||
<thead>
|
||||
<tr><th>설정</th><th>값</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th>시작 연도</th><td ><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small></td></tr>
|
||||
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr>
|
||||
<tr><th>국가</th><td><span id="scenario_nation"></span></td></tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="2">
|
||||
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div><!--GAME 폼 끝-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+82
-76
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -6,108 +7,113 @@ include "func.php";
|
||||
|
||||
$session = Session::requireLogin();
|
||||
|
||||
if($session->userGrade < 5){
|
||||
if ($session->userGrade < 5) {
|
||||
die('관리자 아님');
|
||||
}
|
||||
if($session->userGrade == 5){
|
||||
if ($session->userGrade == 5) {
|
||||
die('DB 리셋 권한을 가지고 있지 않습니다.');
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/install_db.js')?>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('css/install.css')?>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/install_db.js') ?>
|
||||
<?= WebUtil::printCSS('css/normalize.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/install.css') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" style="min-width:720px;">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-8" >
|
||||
<div class="card" id="db_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<?php if(class_exists('\\sammo\\DB')): ?>
|
||||
<div class="form-group row">
|
||||
<label for="full_reset" class="col-sm-3 col-form-label">이전 DB 초기화</label>
|
||||
<div class="col-sm-9" style="display: inline-flex;">
|
||||
<div id="full_reset" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="full_reset" value="1">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="full_reset" value="0" checked>N
|
||||
</label>
|
||||
<div class="col col-lg-8">
|
||||
<div class="card" id="db_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<?php if (class_exists('\\sammo\\DB')) : ?>
|
||||
<div class="form-group row">
|
||||
<label for="full_reset" class="col-sm-3 col-form-label">이전 DB 초기화</label>
|
||||
<div class="col-sm-9" style="display: inline-flex;">
|
||||
<div id="full_reset" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="full_reset" value="1">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="full_reset" value="0" checked>N
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<input type="hidden" name="full_reset" value="0">
|
||||
<?php endif; ?>
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-3 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="full_reset" value="0">
|
||||
<?php endif; ?>
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-3 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-3 col-form-label">DB포트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-3 col-form-label">DB포트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-3 col-form-label">DB계정</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
|
||||
<small>관리 DB의 계정과는 다른 계정을 권장합니다.</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-3 col-form-label">DB계정</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정" />
|
||||
<small>관리 DB의 계정과는 다른 계정을 권장합니다.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-3 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-3 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-3 col-form-label">DB명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo_che)"/>
|
||||
<small>관리 DB와는 다른 DB를 사용해야합니다.</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-3 col-form-label">DB명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo_che)" />
|
||||
<small>관리 DB와는 다른 DB를 사용해야합니다.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--DB 폼 끝-->
|
||||
|
||||
</div>
|
||||
</div><!--DB 폼 끝-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+4
-5
@@ -20,13 +20,12 @@ include "func.php";
|
||||
'serverID' => UniqueConst::$serverID
|
||||
]) ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/recent_map.js') ?>
|
||||
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
|
||||
<?= WebUtil::printCSS('css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
<style>
|
||||
html {
|
||||
@@ -53,7 +52,7 @@ include "func.php";
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= WebUtil::printJS('dist_js/recent_map.js') ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -9,7 +9,7 @@ $input-color: #303030;
|
||||
|
||||
@import "./variables.scss";
|
||||
@import "./bootswatch_custom_variables.scss";
|
||||
@import "../../node_modules/bootstrap5/scss/bootstrap.scss";
|
||||
@import "/node_modules/bootstrap/scss/bootstrap.scss";
|
||||
@import "./bootswatch_custom.scss";
|
||||
@import "./bootstrap_sammo.scss";
|
||||
@import "./vue-multiselect.scss";
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./bootstrap5.scss";
|
||||
@import "./common/bootstrap5.scss";
|
||||
|
||||
html * {
|
||||
max-height: 1000000px;
|
||||
|
||||
@@ -52,7 +52,10 @@ input::-webkit-input-placeholder {
|
||||
}
|
||||
|
||||
.login_btn_group {
|
||||
margin-top: 5px;
|
||||
margin-top: 4px;
|
||||
>.btn{
|
||||
padding: 0.3rem 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.login-register {
|
||||
@@ -108,11 +111,11 @@ input::-webkit-input-placeholder {
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
margin-top: 5px;
|
||||
background-image: url('../oauth_kakao/kakao_login_join.png');
|
||||
background-image: url('/oauth_kakao/kakao_login_join.png');
|
||||
}
|
||||
|
||||
#btn_kakao_login:hover {
|
||||
background-image: url('../oauth_kakao/kakao_login_join_ov.png');
|
||||
background-image: url('/oauth_kakao/kakao_login_join_ov.png');
|
||||
}
|
||||
|
||||
#bottom_box .container {
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
@import "./break_500px.scss";
|
||||
@import "./bootstrap5.scss";
|
||||
@import "./common/break_500px.scss";
|
||||
@import "./common/bootstrap5.scss";
|
||||
|
||||
body {
|
||||
color: white;
|
||||
|
||||
+137
-129
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -9,9 +10,9 @@ $userID = Session::getUserID();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$admin = $gameStor->getValues(['npcmode', 'maxgeneral','show_img_level']);
|
||||
$admin = $gameStor->getValues(['npcmode', 'maxgeneral', 'show_img_level']);
|
||||
|
||||
if($admin['npcmode']!=2) {
|
||||
if ($admin['npcmode'] != 2) {
|
||||
header('location:..');
|
||||
die();
|
||||
}
|
||||
@@ -26,98 +27,104 @@ shuffle($nationList);
|
||||
$nationList = Util::convertArrayToDict($nationList, 'nation');
|
||||
//NOTE: join 안할것임
|
||||
$scoutMsgs = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'scout_msg');
|
||||
foreach($scoutMsgs as $nationID=>$scoutMsg){
|
||||
foreach ($scoutMsgs as $nationID => $scoutMsg) {
|
||||
$nationList[$nationID]['scoutmsg'] = $scoutMsg;
|
||||
}
|
||||
|
||||
$characterAll = [];//선택용
|
||||
$charInfoText = [];//구버전 생성용 ㅜ
|
||||
foreach(getCharacterList(false) as $id=>[$name, $info]){
|
||||
$characterAll[$name] = ['name'=>$name,'info'=>$info];
|
||||
$characterAll = []; //선택용
|
||||
$charInfoText = []; //구버전 생성용 ㅜ
|
||||
foreach (getCharacterList(false) as $id => [$name, $info]) {
|
||||
$characterAll[$name] = ['name' => $name, 'info' => $info];
|
||||
$charInfoText[$id] = $info;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 장수 선택</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024'" />
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('../css/config.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/select_general_from_pool.css')?>
|
||||
<title><?= UniqueConst::$serverName ?>: 장수 선택</title>
|
||||
<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/config.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/select_general_from_pool.css') ?>
|
||||
|
||||
<script>
|
||||
var hasGeneralID = <?=$generalID===null?'false':'true'?>;
|
||||
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
||||
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
||||
var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
||||
var cards = {};
|
||||
var currentGeneralInfo = null;
|
||||
<script>
|
||||
var hasGeneralID = <?= $generalID === null ? 'false' : 'true' ?>;
|
||||
var defaultStatTotal = <?= GameConst::$defaultStatTotal ?>;
|
||||
var defaultStatMin = <?= GameConst::$defaultStatMin ?>;
|
||||
var defaultStatMax = <?= GameConst::$defaultStatMax ?>;
|
||||
var cards = {};
|
||||
var currentGeneralInfo = null;
|
||||
|
||||
var characterInfo = <?=Json::encode($characterAll)?>;
|
||||
var charInfoText = <?=Json::encode($charInfoText)?>;
|
||||
var validCustomOption = <?=Json::encode(GameConst::$generalPoolAllowOption)?>;
|
||||
</script>
|
||||
var characterInfo = <?= Json::encode($characterAll) ?>;
|
||||
var charInfoText = <?= Json::encode($charInfoText) ?>;
|
||||
var validCustomOption = <?= Json::encode(GameConst::$generalPoolAllowOption) ?>;
|
||||
</script>
|
||||
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/join.js')?>
|
||||
<?=WebUtil::printJS('dist_js/select_general_from_pool.js')?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/join.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/select_general_from_pool.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<?php
|
||||
if ($gencount>= $admin['maxgeneral']) {
|
||||
if ($gencount >= $admin['maxgeneral']) {
|
||||
?>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
alert('더 이상 등록할 수 없습니다.');
|
||||
history.go(-1);
|
||||
</script>
|
||||
</body>
|
||||
<body>
|
||||
<script>
|
||||
alert('더 이상 등록할 수 없습니다.');
|
||||
history.go(-1);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?=backButton()?></div>
|
||||
<table style="width:100%;" class="bg0 with_border">
|
||||
<tr><td><?=info(0)?></td></tr>
|
||||
</table>
|
||||
<div class="container">
|
||||
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div>
|
||||
<table style="width:100%;" class="bg0 with_border">
|
||||
<tr>
|
||||
<td><?= info(0) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?=getInvitationList($nationList)?>
|
||||
<?= getInvitationList($nationList) ?>
|
||||
|
||||
<div class="bg0">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;">장수 선택</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center;">
|
||||
<small id="valid_until">(<span id="valid_until_text"></span>까지 유효)</small><small id="outdate_token">- 만료 -</small><br>
|
||||
<form class="card_holder">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg0">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;">장수 선택</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center;">
|
||||
<small id="valid_until">(<span id="valid_until_text"></span>까지 유효)</small><small id="outdate_token">- 만료 -</small><br>
|
||||
<form class="card_holder">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg0" id="create_plate">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;margin-top:10px;">장수 생성</div>
|
||||
<div class="with_border legacy_layout" style="display:flex">
|
||||
<div style='flex:1;' id='left_pad'>
|
||||
장수를<br>선택해주세요!
|
||||
</div><div style='flex:4;'>
|
||||
<form id='custom_form'>
|
||||
<table class='tb_layout' style='width:100%;text-align:left;'>
|
||||
<?php
|
||||
if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
|
||||
$imageTemp = GetImageURL($member['imgsvr']);
|
||||
echo "
|
||||
<div class="bg0" id="create_plate">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;margin-top:10px;">장수 생성</div>
|
||||
<div class="with_border legacy_layout" style="display:flex">
|
||||
<div style='flex:1;' id='left_pad'>
|
||||
장수를<br>선택해주세요!
|
||||
</div>
|
||||
<div style='flex:4;'>
|
||||
<form id='custom_form'>
|
||||
<table class='tb_layout' style='width:100%;text-align:left;'>
|
||||
<?php
|
||||
if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
|
||||
$imageTemp = GetImageURL($member['imgsvr']);
|
||||
echo "
|
||||
<tr class='custom_picture'>
|
||||
<td align=right class='bg1'>전콘 사용 여부</td>
|
||||
<td width=64 height=64>
|
||||
@@ -128,67 +135,68 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr class='custom_personality'>
|
||||
<td align=right class='bg1'>성격</td>
|
||||
<td colspan=2 style='text-align:left;'>
|
||||
<select id="selChar" name=character size=1 maxlength=15 style=color:white;background-color:black;>
|
||||
<option selected value='Random'>????</option>
|
||||
<?php foreach(GameConst::$availablePersonality as $personalityID): ?>
|
||||
<?php $personalityName = buildPersonalityClass($personalityID)->getName(); ?>
|
||||
<option value='<?=$personalityID?>'><?=$personalityName?></option>
|
||||
<?php endforeach; ?>
|
||||
</select> <span id="charInfoText"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>통솔</td>
|
||||
<td colspan=2><input type="number" name="leadership" id="leadership" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>무력</td>
|
||||
<td colspan=2><input type="number" name="strength" id="strength" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>지력</td>
|
||||
<td colspan=2><input type="number" name="intel" id="intel" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>능력치 조정</td>
|
||||
<td colspan=2>
|
||||
<input type=button value=랜덤형 onclick=abilityRand()>
|
||||
<input type=button value=통솔무력형 onclick=abilityLeadpow()>
|
||||
<input type=button value=통솔지력형 onclick=abilityLeadint()>
|
||||
<input type=button value=무력지력형 onclick=abilityPowint()>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=center colspan=3>
|
||||
<font color=orange>모든 능력치는 ( <?=GameConst::$defaultStatMin?> <= 능력치 <= <?=GameConst::$defaultStatMax?> ) 사이로 잡으셔야 합니다.<br>
|
||||
그 외의 능력치는 가입되지 않습니다.</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=3>
|
||||
<span class='custom_stat'>능력치의 총합은 <?=GameConst::$defaultStatTotal?>입니다. 가입후 0~10의 능력치 보너스를 받게 됩니다.<br></span>
|
||||
임의의 도시에서 재야로 시작하며 건국과 임관은 게임 내에서 실행합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right style='width:200px;'><input type=submit id='build_general' name=join value=장수생성></td>
|
||||
<td colspan=2><input type=reset name=reset value=다시입력></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg0">
|
||||
<div class="with_border legacy_layout"><?=backButton()?></div>
|
||||
<div class="with_border legacy_layout"><?=banner()?></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
?>
|
||||
<tr class='custom_personality'>
|
||||
<td align=right class='bg1'>성격</td>
|
||||
<td colspan=2 style='text-align:left;'>
|
||||
<select id="selChar" name=character size=1 maxlength=15 style=color:white;background-color:black;>
|
||||
<option selected value='Random'>????</option>
|
||||
<?php foreach (GameConst::$availablePersonality as $personalityID) : ?>
|
||||
<?php $personalityName = buildPersonalityClass($personalityID)->getName(); ?>
|
||||
<option value='<?= $personalityID ?>'><?= $personalityName ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select> <span id="charInfoText"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>통솔</td>
|
||||
<td colspan=2><input type="number" name="leadership" id="leadership" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>무력</td>
|
||||
<td colspan=2><input type="number" name="strength" id="strength" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>지력</td>
|
||||
<td colspan=2><input type="number" name="intel" id="intel" value="50"></td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=right class='bg1'>능력치 조정</td>
|
||||
<td colspan=2>
|
||||
<input type=button value=랜덤형 onclick=abilityRand()>
|
||||
<input type=button value=통솔무력형 onclick=abilityLeadpow()>
|
||||
<input type=button value=통솔지력형 onclick=abilityLeadint()>
|
||||
<input type=button value=무력지력형 onclick=abilityPowint()>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='custom_stat'>
|
||||
<td align=center colspan=3>
|
||||
<font color=orange>모든 능력치는 ( <?= GameConst::$defaultStatMin ?> <= 능력치 <=<?= GameConst::$defaultStatMax ?> ) 사이로 잡으셔야 합니다.<br>
|
||||
그 외의 능력치는 가입되지 않습니다.</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=3>
|
||||
<span class='custom_stat'>능력치의 총합은 <?= GameConst::$defaultStatTotal ?>입니다. 가입후 0~10의 능력치 보너스를 받게 됩니다.<br></span>
|
||||
임의의 도시에서 재야로 시작하며 건국과 임관은 게임 내에서 실행합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right style='width:200px;'><input type=submit id='build_general' name=join value=장수생성></td>
|
||||
<td colspan=2><input type=reset name=reset value=다시입력></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg0">
|
||||
<div class="with_border legacy_layout"><?= backButton() ?></div>
|
||||
<div class="with_border legacy_layout"><?= banner() ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+105
-100
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -11,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
list($npcmode, $maxgeneral) = $gameStor->getValuesAsArray(['npcmode', 'maxgeneral']);
|
||||
|
||||
if($npcmode!=1) {
|
||||
if ($npcmode != 1) {
|
||||
header('location:..');
|
||||
die();
|
||||
}
|
||||
@@ -23,127 +24,131 @@ shuffle($nationList);
|
||||
$nationList = Util::convertArrayToDict($nationList, 'nation');
|
||||
//NOTE: join 안할것임
|
||||
$scoutMsgs = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'scout_msg');
|
||||
foreach($scoutMsgs as $nationID=>$scoutMsg){
|
||||
foreach ($scoutMsgs as $nationID => $scoutMsg) {
|
||||
$nationList[$nationID]['scoutmsg'] = $scoutMsg;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: NPC빙의</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('../css/config.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/select_npc.css')?>
|
||||
<title><?= UniqueConst::$serverName ?>: NPC빙의</title>
|
||||
<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/config.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/select_npc.css') ?>
|
||||
|
||||
<script>
|
||||
var specialInfo =
|
||||
<?php
|
||||
$specialAll = [];
|
||||
foreach(SpecialityHelper::getSpecialDomesticList() as $specialID=>$specialObj){
|
||||
$name = $specialObj->getName();
|
||||
$info = $specialObj->getInfo();
|
||||
$specialAll[$name] = $info;
|
||||
}
|
||||
foreach(SpecialityHelper::getSpecialWarList() as $specialID=>$specialObj){
|
||||
$name = $specialObj->getName();
|
||||
$info = $specialObj->getInfo();
|
||||
$specialAll[$name] = $info;
|
||||
}
|
||||
$specialAll['-'] = '없음';
|
||||
echo Json::encode($specialAll);
|
||||
?>
|
||||
;
|
||||
var characterInfo =
|
||||
<?php
|
||||
$characterAll = [];
|
||||
foreach(getCharacterList(false) as $id=>[$name, $info]){
|
||||
$characterAll[$name] = $info;
|
||||
}
|
||||
echo Json::encode($characterAll);
|
||||
?>
|
||||
;
|
||||
</script>
|
||||
<script>
|
||||
var specialInfo =
|
||||
<?php
|
||||
$specialAll = [];
|
||||
foreach (SpecialityHelper::getSpecialDomesticList() as $specialID => $specialObj) {
|
||||
$name = $specialObj->getName();
|
||||
$info = $specialObj->getInfo();
|
||||
$specialAll[$name] = $info;
|
||||
}
|
||||
foreach (SpecialityHelper::getSpecialWarList() as $specialID => $specialObj) {
|
||||
$name = $specialObj->getName();
|
||||
$info = $specialObj->getInfo();
|
||||
$specialAll[$name] = $info;
|
||||
}
|
||||
$specialAll['-'] = '없음';
|
||||
echo Json::encode($specialAll);
|
||||
?>;
|
||||
var characterInfo =
|
||||
<?php
|
||||
$characterAll = [];
|
||||
foreach (getCharacterList(false) as $id => [$name, $info]) {
|
||||
$characterAll[$name] = $info;
|
||||
}
|
||||
echo Json::encode($characterAll);
|
||||
?>;
|
||||
</script>
|
||||
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/select_npc.js')?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/select_npc.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<?php
|
||||
if ($gencount>= $maxgeneral) {
|
||||
if ($gencount >= $maxgeneral) {
|
||||
?>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
alert('더 이상 등록할 수 없습니다.');
|
||||
history.go(-1);
|
||||
</script>
|
||||
</body>
|
||||
<body>
|
||||
<script>
|
||||
alert('더 이상 등록할 수 없습니다.');
|
||||
history.go(-1);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?=backButton()?></div>
|
||||
<table style="width:100%;" class="bg0 with_border">
|
||||
<tr><td><?=info(0)?></td></tr>
|
||||
</table>
|
||||
<div class="container">
|
||||
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div>
|
||||
<table style="width:100%;" class="bg0 with_border">
|
||||
<tr>
|
||||
<td><?= info(0) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?=getInvitationList($nationList)?>
|
||||
<?= getInvitationList($nationList) ?>
|
||||
|
||||
<div class="bg0">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;">장수 빙의</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center;">
|
||||
<small id="valid_until">(<span id="valid_until_text"></span>까지 유효)</small><small id="outdate_token">- 만료 -</small><br>
|
||||
<form class="card_holder">
|
||||
</form>
|
||||
</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center; padding-top:20px; padding-bottom:20px;">
|
||||
<button type="button" id="btn_pick_more" disabled="disabled" class="with_skin with_border">다른 장수 보기</button><button type="button" id="btn_load_general_list" class="with_skin with_border" style='margin-left:2ch;'>장수 목록 보기</button><br>
|
||||
</div>
|
||||
<div class="bg0">
|
||||
<div class="bg1 with_border legacy_layout font1" style="text-align:center;font-weight:bold;">장수 빙의</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center;">
|
||||
<small id="valid_until">(<span id="valid_until_text"></span>까지 유효)</small><small id="outdate_token">- 만료 -</small><br>
|
||||
<form class="card_holder">
|
||||
</form>
|
||||
</div>
|
||||
<div class="with_border legacy_layout" style="text-align:center; padding-top:20px; padding-bottom:20px;">
|
||||
<button type="button" id="btn_pick_more" disabled="disabled" class="with_skin with_border">다른 장수 보기</button><button type="button" id="btn_load_general_list" class="with_skin with_border" style='margin-left:2ch;'>장수 목록 보기</button><br>
|
||||
</div>
|
||||
|
||||
<table style='width:970px;table-layout: fixed;display:none; margin-bottom:20px;' class="tb_layout bg0" id='tb_general_list'>
|
||||
<thead>
|
||||
<tr class='bg1'>
|
||||
<th style='width:64px;'>얼 굴</td>
|
||||
<th style='width:140px;'>이 름</td>
|
||||
<th style='width:40px;'>연령</td>
|
||||
<th style='width:40px;'>성격</td>
|
||||
<th style='width:80px;'>특기</td>
|
||||
<th style='width:45px;'>레 벨</td>
|
||||
<th style='width:140px;'>국 가</td>
|
||||
<th style='width:50px;'>명 성</td>
|
||||
<th style='width:50px;'>계 급</td>
|
||||
<th style='width:75px;'>관 직</td>
|
||||
<th style='width:60px;'>종능</td>
|
||||
<th style='width:45px;'>통솔</td>
|
||||
<th style='width:45px;'>무력</td>
|
||||
<th style='width:45px;'>지력</td>
|
||||
<th style='width:45px;'>삭턴</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='general_list'>
|
||||
</tbody>
|
||||
<tfoot id='row_print_more' style='display:none;'>
|
||||
<tr>
|
||||
<td colspan="15"><button type="button" class="with_skin with_border" id="btn_print_more" style="width:100%;">장수 더 보기</button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="with_border legacy_layout"><?=backButton()?></div>
|
||||
<div class="with_border legacy_layout"><?=banner()?></div>
|
||||
</div>
|
||||
</div>
|
||||
<table style='width:970px;table-layout: fixed;display:none; margin-bottom:20px;' class="tb_layout bg0" id='tb_general_list'>
|
||||
<thead>
|
||||
<tr class='bg1'>
|
||||
<th style='width:64px;'>얼 굴</td>
|
||||
<th style='width:140px;'>이 름</td>
|
||||
<th style='width:40px;'>연령</td>
|
||||
<th style='width:40px;'>성격</td>
|
||||
<th style='width:80px;'>특기</td>
|
||||
<th style='width:45px;'>레 벨</td>
|
||||
<th style='width:140px;'>국 가</td>
|
||||
<th style='width:50px;'>명 성</td>
|
||||
<th style='width:50px;'>계 급</td>
|
||||
<th style='width:75px;'>관 직</td>
|
||||
<th style='width:60px;'>종능</td>
|
||||
<th style='width:45px;'>통솔</td>
|
||||
<th style='width:45px;'>무력</td>
|
||||
<th style='width:45px;'>지력</td>
|
||||
<th style='width:45px;'>삭턴</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='general_list'>
|
||||
</tbody>
|
||||
<tfoot id='row_print_more' style='display:none;'>
|
||||
<tr>
|
||||
<td colspan="15"><button type="button" class="with_skin with_border" id="btn_print_more" style="width:100%;">장수 더 보기</button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="with_border legacy_layout"><?= backButton() ?></div>
|
||||
<div class="with_border legacy_layout"><?= banner() ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
+127
-76
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -30,94 +31,144 @@ if ($permission < 1) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 외교부</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<!--<?=WebUtil::printCSS('../e_lib/tui.editor/tui-editor.min.css')?>-->
|
||||
<!--<?=WebUtil::printCSS('../e_lib/tui.editor/tui-editor-contents.min.css')?>-->
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('../css/config.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?=WebUtil::printCSS('css/diplomacy.css')?>
|
||||
<script>
|
||||
var permissionLevel = <?=$permission?>; //
|
||||
</script>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/diplomacy.js')?>
|
||||
<title><?= UniqueConst::$serverName ?>: 외교부</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
|
||||
<!--<?= WebUtil::printCSS('../e_lib/tui.editor/tui-editor.min.css') ?>-->
|
||||
<!--<?= WebUtil::printCSS('../e_lib/tui.editor/tui-editor-contents.min.css') ?>-->
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('../css/config.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printCSS('css/diplomacy.css') ?>
|
||||
<script>
|
||||
var permissionLevel = <?= $permission ?>; //
|
||||
</script>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/diplomacy.js') ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||
<tr><td style='text-align:left;'>외 교 부<br><?=backButton()?></td></tr>
|
||||
</table>
|
||||
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td style='text-align:left;'>외 교 부<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id='newLetter' class='bg0' style='display:none;'>
|
||||
<thead>
|
||||
<tr><td colspan='2' class='newLetterHeader'>새 외교문서 작성</td>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th class='bg1'>이전 문서</th><td><select id='inputPrevNo'></select></td></tr>
|
||||
<tr><th class='bg1'>대상 국가</th><td><select id='inputDestNation'></select></td></tr>
|
||||
<tr><th class='bg1'>내용(국가 내 공개)</th><td><textarea id='inputBrief' class='autosize'></textarea></td></tr>
|
||||
<tr><th class='bg1'>내용(외교권자 전용)</th><td><textarea id='inputDetail' class='autosize'></textarea></td></tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class='letterActionPlate'><th class='bg1'>동작</th><td>
|
||||
<button type='button' id='btnSend'>전송</button>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div id='letters'></div>
|
||||
|
||||
<!-- 설계미스. template와 shadowdom으로 변경 -->
|
||||
<div id='letterTemplate' style='display:none;'>
|
||||
<table class='letterFrame bg0'>
|
||||
<table id='newLetter' class='bg0' style='display:none;'>
|
||||
<thead>
|
||||
<tr><td colspan='2' class='letterHeader'><span class='letterNationName'></span>국과의 외교 문서<span class='letterDate'>2099-12-31 23:59:59</span></td>
|
||||
<tr>
|
||||
<td colspan='2' class='newLetterHeader'>새 외교문서 작성</td>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th class='bg1'>문서 번호</th><td><span class='letterNo'></span></td></tr>
|
||||
<tr><th class='bg1'>이전 문서</th><td><span class='letterPrevNo'></span></td></tr>
|
||||
<tr><th class='bg1'>상태</th><td><span class='letterStatus'></span><span class='letterStatusOpt'></span></td></tr>
|
||||
<tr><th class='bg1'>내용(국가 내 공개)</th><td><div class='letterBrief'></div></td></tr>
|
||||
<tr><th class='bg1'>내용(외교권자 전용)</th><td><div class='letterDetail'></div></td></tr>
|
||||
<tr>
|
||||
<th class='bg1'>이전 문서</th>
|
||||
<td><select id='inputPrevNo'></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>대상 국가</th>
|
||||
<td><select id='inputDestNation'></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>내용(국가 내 공개)</th>
|
||||
<td><textarea id='inputBrief' class='autosize'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>내용(외교권자 전용)</th>
|
||||
<td><textarea id='inputDetail' class='autosize'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><th class='bg1'>서명인</th><td class='letterSignerPlate'>
|
||||
<div class='letterSrc'>
|
||||
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
|
||||
<div class="signerNation"> </div>
|
||||
<div class="signerName"> </div>
|
||||
</div><div class='letterDest'>
|
||||
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
|
||||
<div class="signerNation"> </div>
|
||||
<div class="signerName"> </div>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr class='letterActionPlate' style='display:none;'><th class='bg1'>동작</th><td>
|
||||
<button type='button' class='btnAgree' style='display:none;'>승인</button>
|
||||
<button type='button' class='btnDisagree' style='display:none;'>거부</button>
|
||||
<button type='button' class='btnRollback' style='display:none;'>회수</button>
|
||||
<button type='button' class='btnDestroy' style='display:none;'>파기</button>
|
||||
<button type='button' class='btnRenew'>추가 문서 작성</button>
|
||||
</td></tr>
|
||||
<tr class='letterActionPlate'>
|
||||
<th class='bg1'>동작</th>
|
||||
<td>
|
||||
<button type='button' id='btnSend'>전송</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||
<tr><td style='text-align:left;'>
|
||||
<?=backButton()?><br>
|
||||
<?=banner()?>
|
||||
</td></tr>
|
||||
</table>
|
||||
<div id='letters'></div>
|
||||
|
||||
<!-- 설계미스. template와 shadowdom으로 변경 -->
|
||||
<div id='letterTemplate' style='display:none;'>
|
||||
<table class='letterFrame bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan='2' class='letterHeader'><span class='letterNationName'></span>국과의 외교 문서<span class='letterDate'>2099-12-31 23:59:59</span></td>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='bg1'>문서 번호</th>
|
||||
<td><span class='letterNo'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>이전 문서</th>
|
||||
<td><span class='letterPrevNo'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>상태</th>
|
||||
<td><span class='letterStatus'></span><span class='letterStatusOpt'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>내용(국가 내 공개)</th>
|
||||
<td>
|
||||
<div class='letterBrief'></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='bg1'>내용(외교권자 전용)</th>
|
||||
<td>
|
||||
<div class='letterDetail'></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class='bg1'>서명인</th>
|
||||
<td class='letterSignerPlate'>
|
||||
<div class='letterSrc'>
|
||||
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
|
||||
<div class="signerNation"> </div>
|
||||
<div class="signerName"> </div>
|
||||
</div>
|
||||
<div class='letterDest'>
|
||||
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
|
||||
<div class="signerNation"> </div>
|
||||
<div class="signerName"> </div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='letterActionPlate' style='display:none;'>
|
||||
<th class='bg1'>동작</th>
|
||||
<td>
|
||||
<button type='button' class='btnAgree' style='display:none;'>승인</button>
|
||||
<button type='button' class='btnDisagree' style='display:none;'>거부</button>
|
||||
<button type='button' class='btnRollback' style='display:none;'>회수</button>
|
||||
<button type='button' class='btnDestroy' style='display:none;'>파기</button>
|
||||
<button type='button' class='btnRenew'>추가 문서 작성</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td style='text-align:left;'>
|
||||
<?= backButton() ?><br>
|
||||
<?= banner() ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Vendored
-663
@@ -1,663 +0,0 @@
|
||||
// Type definitions for Bootstrap 4.6
|
||||
// Project: https://github.com/twbs/bootstrap/, https://getbootstrap.com
|
||||
// Definitions by: denisname <https://github.com/denisname>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
import * as Popper from "popper.js";
|
||||
|
||||
export as namespace Bootstrap;
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Some Types and Interfaces
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
export type Placement = "auto" | "top" | "bottom" | "left" | "right";
|
||||
|
||||
export type Trigger = "click" | "hover" | "focus" | "manual" |
|
||||
"click hover" | "click focus" | "hover focus" |
|
||||
"click hover focus";
|
||||
|
||||
export interface Delay {
|
||||
show: number;
|
||||
hide: number;
|
||||
}
|
||||
|
||||
export interface TooltipInstance<T extends TooltipOption> {
|
||||
config: T;
|
||||
element: Element;
|
||||
tip: HTMLElement;
|
||||
}
|
||||
|
||||
export interface OffsetsExtend {
|
||||
popper?: Partial<Popper.Offset> | undefined;
|
||||
reference?: Partial<Popper.Offset> | undefined;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Options Interfaces
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
export interface CarouselOption {
|
||||
/**
|
||||
* The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
|
||||
*
|
||||
* @default 5000
|
||||
*/
|
||||
interval?: false | number | undefined;
|
||||
|
||||
/**
|
||||
* Whether the carousel should react to keyboard events.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
keyboard?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Use to easily control the position of the carousel. It accepts the keywords prev or next, which alters the slide position
|
||||
* relative to its current position. Alternatively, use `data-slide-to` to pass a raw slide index to the carousel.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
slide?: "next" | "prev" | false | undefined;
|
||||
|
||||
/**
|
||||
* If set to "hover", pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`.
|
||||
* If set to false, hovering over the carousel won't pause it.
|
||||
*
|
||||
* On touch-enabled devices, when set to "hover", cycling will pause on `touchend` (once the user finished interacting with the carousel)
|
||||
* for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.
|
||||
*
|
||||
* @default "hover"
|
||||
*/
|
||||
pause?: "hover" | false | undefined;
|
||||
|
||||
/**
|
||||
* Autoplays the carousel after the user manually cycles the first item.
|
||||
* If `carousel`, autoplays the carousel on load.
|
||||
* @default false
|
||||
*/
|
||||
ride?: 'carousel' | boolean | undefined;
|
||||
|
||||
/**
|
||||
* Whether the carousel should cycle continuously or have hard stops.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
wrap?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Whether the carousel should support left/right swipe interactions on touchscreen devices.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
touch?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface CollapseOption {
|
||||
/**
|
||||
* If parent is provided, then all collapsible elements under the specified parent will be closed when
|
||||
* this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class).
|
||||
* The attribute has to be set on the target collapsible area.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
parent?: string | JQuery | Element | undefined;
|
||||
|
||||
/**
|
||||
* Toggles the collapsible element on invocation.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
toggle?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface DropdownOption {
|
||||
/**
|
||||
* Offset of the dropdown relative to its target.
|
||||
* For more information refer to Popper.js's offset docs.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
offset?: number | string | ((this: DropdownOption, offset: OffsetsExtend) => OffsetsExtend) | undefined;
|
||||
|
||||
/**
|
||||
* Allow Dropdown to flip in case of an overlapping on the reference element.
|
||||
* For more information refer to Popper.js's flip docs.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
flip?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Overflow constraint boundary of the dropdown menu.
|
||||
* Accepts the values of 'viewport', 'window', 'scrollParent', or an HTMLElement reference (JavaScript only).
|
||||
* For more information refer to Popper.js's preventOverflow docs.
|
||||
*
|
||||
* @default "scrollParent"
|
||||
*/
|
||||
boundary?: Popper.Boundary | HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* Reference element of the dropdown menu. Accepts the values of 'toggle', 'parent', or an HTMLElement reference.
|
||||
* For more information refer to Popper.js's referenceObject docs.
|
||||
*
|
||||
* @default "toggle"
|
||||
*/
|
||||
reference?: "toggle" | "parent" | HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* By default, we use Popper.js for dynamic positioning. Disable this with 'static'.
|
||||
*
|
||||
* @default "dynamic"
|
||||
*/
|
||||
display?: "dynamic" | "static" | undefined;
|
||||
}
|
||||
|
||||
export interface ModalOption {
|
||||
/**
|
||||
* Includes a modal-backdrop element.
|
||||
* Alternatively, specify `static` for a backdrop which doesn't close the modal on click.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
backdrop?: boolean | "static" | undefined;
|
||||
|
||||
/**
|
||||
* Closes the modal when escape key is pressed.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
keyboard?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Puts the focus on the modal when initialized.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
focus?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Shows the modal when initialized.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
show?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface PopoverOption extends TooltipOption {
|
||||
/**
|
||||
* Default content value if `data-content` attribute isn't present.
|
||||
* If a function is given, it will be called with its `this` reference
|
||||
* set to the element that the popover is attached to.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
content?: string | Element | ((this: Element) => string | Element) | undefined;
|
||||
}
|
||||
|
||||
export interface ScrollspyOption {
|
||||
/**
|
||||
* Finds which section the spied element is in:
|
||||
* * `auto` will choose the best method get scroll coordinates.
|
||||
* * `offset` will use jQuery offset method to get scroll coordinates.
|
||||
* * `position` will use jQuery position method to get scroll coordinates.
|
||||
*
|
||||
* @default "auto"
|
||||
*/
|
||||
method?: "auto" | "offset" | "position" | undefined;
|
||||
|
||||
/**
|
||||
* Pixels to offset from top when calculating position of scroll.
|
||||
*
|
||||
* @default 10
|
||||
*/
|
||||
offset?: number | undefined;
|
||||
|
||||
/**
|
||||
* A selector of the parent element or the parent element itself
|
||||
* of any Bootstrap `.nav` or `.list-group` component.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
target?: string | JQuery<Element> | Element | undefined;
|
||||
}
|
||||
|
||||
export interface ToastOption {
|
||||
/**
|
||||
* Apply a CSS fade transition to the toast.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
animation?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Auto hide the toast.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
autohide?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Delay hiding the toast in millisecond.
|
||||
*
|
||||
* @default 500
|
||||
*/
|
||||
delay?: number | undefined;
|
||||
}
|
||||
|
||||
export interface TooltipOption {
|
||||
/**
|
||||
* Apply a CSS fade transition to the tooltip or popover.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
animation?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Appends the tooltip or popover to a specific element. Example: `container: 'body'`.
|
||||
* This option is particularly useful in that it allows you to position the tooltip or popover
|
||||
* in the flow of the document near the triggering element - which will prevent
|
||||
* it from floating away from the triggering element during a window resize.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
container?: string | Element | false | undefined;
|
||||
|
||||
/**
|
||||
* Delay showing and hiding the tooltip or popover (ms) - does not apply to manual trigger type.
|
||||
* If a number is supplied, delay is applied to both hide/show.
|
||||
* Object structure is: `delay: { "show": 500, "hide": 100 }`.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
delay?: number | Delay | undefined;
|
||||
|
||||
/**
|
||||
* Allow HTML in the tooltip or popover.
|
||||
* If true, HTML tags will be rendered in the tooltip or popover.
|
||||
* If false, jQuery's text method will be used to insert content into the DOM.
|
||||
* Use text if you're worried about XSS attacks.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
html?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* How to position the tooltip or popover - auto | top | bottom | left | right.
|
||||
* When "auto" is specified, it will dynamically reorient the tooltip or popover.
|
||||
*
|
||||
* When a function is used to determine the placement, it is called with
|
||||
* the tooltip or popover DOM node as its first argument and the triggering element DOM node as its second.
|
||||
* The `this` context is set to the tooltip or popover instance.
|
||||
*
|
||||
* @default tooltip: "top", popover: "right"
|
||||
*/
|
||||
placement?: Placement | ((this: TooltipInstance<this>, node: HTMLElement, trigger: Element) => Placement) | undefined;
|
||||
|
||||
/**
|
||||
* If a selector is provided, tooltip or popover objects will be delegated to the specified targets.
|
||||
* In practice, this is used to enable dynamic HTML content to have popovers added.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
selector?: string | false | undefined;
|
||||
|
||||
/**
|
||||
* Base HTML to use when creating the tooltip or popover.
|
||||
* The tooltip's (resp., popover's) title will be injected into the `.tooltip-inner` (resp., `.popover-header`).
|
||||
* The `.arrow` will become the tooltip's (resp., popover's) arrow.
|
||||
* The outermost wrapper element should have the `.tooltip` (resp., .popover) class and `role="tooltip"`.
|
||||
*
|
||||
* @default '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
* @default '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
|
||||
*/
|
||||
template?: string | undefined;
|
||||
|
||||
/**
|
||||
* Default title value if title attribute isn't present.
|
||||
* If a function is given, it will be called with its `this` reference set to the element
|
||||
* that the tooltip or popover is attached to.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
title?: string | Element | ((this: Element) => string | Element) | undefined;
|
||||
|
||||
/**
|
||||
* How tooltip or popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.
|
||||
* 'manual' indicates that the tooltip will be triggered programmatically; this value cannot be combined with any other trigger.
|
||||
* 'hover' should only be used if alternative methods for conveying the same information for keyboard users is present.
|
||||
*
|
||||
* @default tooltip: "hover focus", popover: "click"
|
||||
*/
|
||||
trigger?: Trigger | undefined;
|
||||
|
||||
/**
|
||||
* Offset of the tooltip or popover relative to its target.
|
||||
* For more information refer to Popper.js's offset docs.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
offset?: number | string | undefined;
|
||||
|
||||
/**
|
||||
* Allow to specify which position Popper will use on fallback.
|
||||
* For more information refer to Popper.js's behavior docs.
|
||||
*
|
||||
* @default "flip"
|
||||
*/
|
||||
fallbackPlacement?: Popper.Behavior | ReadonlyArray<Popper.Behavior> | undefined;
|
||||
|
||||
/**
|
||||
* Add classes to the tooltip when it is shown. Note that these classes will be added in addition to any classes specified in the template.
|
||||
* To add multiple classes, separate them with spaces: 'a b'.
|
||||
* You can also pass a function that should return a single string containing additional class names.
|
||||
* @default ''
|
||||
*/
|
||||
customClass?: string | (() => string) | undefined;
|
||||
|
||||
/**
|
||||
* Overflow constraint boundary of the tooltip or popover.
|
||||
* Accepts the values of 'viewport', 'window', 'scrollParent',
|
||||
* or an HTMLElement reference (JavaScript only).
|
||||
* For more information refer to Popper.js's preventOverflow docs.
|
||||
*
|
||||
* @default "scrollParent"
|
||||
*/
|
||||
boundary?: Popper.Boundary | HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* Enable or disable the sanitization. If activated 'template', 'content' and 'title' options will be sanitized.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
sanitize?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Object which contains allowed attributes and tags.
|
||||
*/
|
||||
whiteList?: {[key: string]: string[]} | undefined;
|
||||
|
||||
/**
|
||||
* Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.
|
||||
*
|
||||
* @default null
|
||||
*/
|
||||
sanitizeFn?: null | ((input: string) => string) | undefined;
|
||||
|
||||
/**
|
||||
* To change Bootstrap's default Popper.js config,
|
||||
* see {@link https://popper.js.org/docs/v1/ Popper.js's configuration}
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
popperConfig?: null | object | undefined;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Events
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
export interface CarouselEventHandler<TElement> extends JQuery.TriggeredEvent<TElement, undefined, HTMLElement, HTMLElement> {
|
||||
/**
|
||||
* The carousel dom element.
|
||||
*/
|
||||
target: HTMLElement; // overridden only for better JsDoc
|
||||
|
||||
/**
|
||||
* The direction in which the carousel is sliding.
|
||||
*/
|
||||
direction: "left" | "right";
|
||||
|
||||
/**
|
||||
* The DOM element that is being slid into place as the active item.
|
||||
*/
|
||||
relatedTarget: HTMLElement;
|
||||
|
||||
/**
|
||||
* The index of the current item.
|
||||
*/
|
||||
from: number;
|
||||
|
||||
/**
|
||||
* The index of the next item.
|
||||
*/
|
||||
to: number;
|
||||
}
|
||||
|
||||
export interface DropdownsEventHandler<TElement> extends JQuery.TriggeredEvent<TElement, undefined, HTMLElement, HTMLElement> {
|
||||
/**
|
||||
* The the dropdown's toggle and the dropdown menu container (the `.dropdown` element).
|
||||
*/
|
||||
target: HTMLElement; // overridden only for better JsDoc
|
||||
|
||||
/**
|
||||
* The toggling anchor element.
|
||||
*/
|
||||
relatedTarget: HTMLElement;
|
||||
}
|
||||
|
||||
export interface ModalEventHandler<TElement> extends JQuery.TriggeredEvent<TElement, undefined, HTMLElement, HTMLElement> {
|
||||
/**
|
||||
* The modal dom element.
|
||||
*/
|
||||
target: HTMLElement; // overridden only for better JsDoc
|
||||
|
||||
/**
|
||||
* For `show.bs.modal` and `shown.bs.modal` is the clicked element, when caused by a _click_.
|
||||
* Otherwise is undefined.
|
||||
*/
|
||||
relatedTarget: HTMLElement | undefined;
|
||||
}
|
||||
|
||||
export interface TapEventHandler<TElement> extends JQuery.TriggeredEvent<TElement, undefined, HTMLElement, HTMLElement> {
|
||||
/**
|
||||
* * For `show.bs.tab` and `shown.bs.tab`, is the newly activated tab.
|
||||
* * For `hide.bs.tab`, is the current active tab.
|
||||
* * For `hidden.bs.tab`, is the previous active tab.
|
||||
*/
|
||||
target: HTMLElement; // overridden only for better JsDoc
|
||||
|
||||
/**
|
||||
* * For `show.bs.tab` and `shown.bs.tab`, is the previous active tab.
|
||||
* * For `hide.bs.tab`, is the new soon-to-be-active tab.
|
||||
* * For `hidden.bs.tab`, is the new active tab.
|
||||
*/
|
||||
relatedTarget: HTMLElement;
|
||||
}
|
||||
|
||||
export type AlertEvent = "close.bs.alert" | "closed.bs.alert";
|
||||
export type CarouselEvent = "slide.bs.carousel" | "slid.bs.carousel";
|
||||
export type CollapseEvent = "show.bs.collapse" | "shown.bs.collapse" | "hide.bs.collapse" | "hidden.bs.collapse";
|
||||
export type DropdownEvent = "show.bs.dropdown" | "shown.bs.dropdown" | "hide.bs.dropdown" | "hidden.bs.dropdown";
|
||||
export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal" | "hidePrevented.bs.modal";
|
||||
export type PopoverEvent = "show.bs.popover" | "shown.bs.popover" | "hide.bs.popover" | "hidden.bs.popover" | "inserted.bs.popover";
|
||||
export type ScrollspyEvent = "activate.bs.scrollspy";
|
||||
export type TapEvent = "show.bs.tab" | "shown.bs.tab" | "hide.bs.tab" | "hidden.bs.tab";
|
||||
export type ToastEvent = "show.bs.toast" | "shown.bs.toast" | "hide.bs.toast" | "hidden.bs.toast";
|
||||
export type TooltipEvent = "show.bs.tooltip" | "shown.bs.tooltip" | "hide.bs.tooltip" | "hidden.bs.tooltip" | "inserted.bs.tooltip";
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// jQuery
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
declare global {
|
||||
interface JQuery<TElement = HTMLElement> {
|
||||
/**
|
||||
* If no _method_ is specified, makes an alert listen for click events on descendant elements which have the `data-dismiss="alert"` attribute.
|
||||
* (Not necessary when using the data-api's auto-initialization.)
|
||||
* Otherwise, call the method on the alert element:
|
||||
* * `close` – Closes an alert by removing it from the DOM. If the `.fade` and `.show` classes are present on the element, the alert will fade out before it is removed.
|
||||
* * `dispose` – Destroys an element's alert.
|
||||
*/
|
||||
alert(action?: "close" | "dispose"): this;
|
||||
|
||||
/**
|
||||
* Call a method on the button element:
|
||||
* * `toggle` – Toggles push state. Gives the button the appearance that it has been activated.
|
||||
* * `dispose` – Destroys an element's button.
|
||||
*/
|
||||
button(action: "toggle" | "dispose"): this;
|
||||
|
||||
/**
|
||||
* Call a method on the carousel element:
|
||||
* * `cycle` – Cycles through the carousel items from left to right.
|
||||
* * `pause` – Stops the carousel from cycling through items.
|
||||
* * _number_ – Cycles the carousel to a particular frame (0 based, similar to an array).
|
||||
* * `prev` – Cycles to the previous item.
|
||||
* * `next` – Cycles to the next item.
|
||||
* * `dispose` – Destroys an element's carousel.
|
||||
*
|
||||
* Returns to the caller before the target item has been shown (i.e. before the `slid.bs.carousel` event occurs).
|
||||
*/
|
||||
carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this;
|
||||
/**
|
||||
* Initializes the carousel and starts cycling through items.
|
||||
*/
|
||||
carousel(options?: CarouselOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the collapsible element:
|
||||
* * `toggle` – Toggles a collapsible element to shown or hidden.
|
||||
* * `show` – Shows a collapsible element.
|
||||
* * `hide` – Hides a collapsible element.
|
||||
* * `dispose` – Destroys an element's collapse.
|
||||
*
|
||||
* Returns to the caller before the collapsible element has actually been shown or hidden (i.e. before the `shown.bs.collapse` or `hidden.bs.collapse` event occurs).
|
||||
*/
|
||||
collapse(action: "toggle" | "show" | "hide" | "dispose"): this;
|
||||
/**
|
||||
* Activates a content as a collapsible element.
|
||||
*/
|
||||
collapse(options?: CollapseOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the dropdown element:
|
||||
* * `toggle` – Toggles the dropdown menu of a given navbar or tabbed navigation.
|
||||
* * `show` – Shows the dropdown menu of a given navbar or tabbed navigation.
|
||||
* * `hide` – Hides the dropdown menu of a given navbar or tabbed navigation.
|
||||
* * `update` – Updates the position of an element's dropdown.
|
||||
* * `dispose` – Destroys an element's dropdown.
|
||||
*/
|
||||
dropdown(action: "toggle" | "show" | "hide" | "update" | "dispose"): this;
|
||||
/**
|
||||
* Toggle contextual overlays for displaying lists of links.
|
||||
*
|
||||
* The data-api, `data-toggle="dropdown"` is always required to be present on the dropdown's trigger element.
|
||||
*/
|
||||
dropdown(options?: DropdownOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the modal element:
|
||||
* * `toggle` – Manually toggles a modal.
|
||||
* * `show` – Manually opens a modal.
|
||||
* * `hide` – Manually hides a modal.
|
||||
* * `handleUpdate` – Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears).
|
||||
* * `dispose` – Destroys an element's modal.
|
||||
*
|
||||
* Returns to the caller before the modal has actually been shown or hidden (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs).
|
||||
*/
|
||||
modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this;
|
||||
/**
|
||||
* Activates a content as a modal.
|
||||
*/
|
||||
modal(options?: ModalOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the popover element:
|
||||
* * `show` – Reveals an element's popover. Popovers whose both title and content are zero-length are never displayed.
|
||||
* * `hide` – Hides an element's popover.
|
||||
* * `toggle` – Toggles an element's popover.
|
||||
* * `dispose` – Hides and destroys an element's popover.
|
||||
* Popovers that use delegation (which are created using the `selector` option) cannot be individually destroyed on descendant trigger elements.
|
||||
* * `enable` – Gives an element's popover the ability to be shown. Popovers are enabled by default.
|
||||
* * `disable` – Removes the ability for an element's popover to be shown. The popover will only be able to be shown if it is re-enabled.
|
||||
* * `toggleEnabled` – Toggles the ability for an element's popover to be shown or hidden.
|
||||
* * `update` – Updates the position of an element's popover.
|
||||
*
|
||||
* Returns to the caller before the popover has actually been shown or hidden (i.e. before the `shown.bs.popover` or `hidden.bs.popover` event occurs).
|
||||
* This is considered a "manual" triggering of the popover.
|
||||
*/
|
||||
popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this;
|
||||
/**
|
||||
* Initializes popovers for an element collection.
|
||||
*/
|
||||
popover(options?: PopoverOption): this;
|
||||
|
||||
// tslint:disable:jsdoc-format
|
||||
/**
|
||||
* Call a method on the scrollspy element:
|
||||
* * `refresh` – When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh, see example.
|
||||
* * `dispose` – Destroys an element's scrollspy.
|
||||
*
|
||||
* @example
|
||||
```javascript
|
||||
$('[data-spy="scroll"]').each(function () {
|
||||
var $spy = $(this).scrollspy('refresh')
|
||||
})
|
||||
```
|
||||
*/
|
||||
// tslint:enable:jsdoc-format
|
||||
scrollspy(action: "refresh" | "dispose"): this;
|
||||
/**
|
||||
* Add scrollspy behavior to a topbar navigation.
|
||||
*/
|
||||
scrollspy(options?: ScrollspyOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the list item or tab element:
|
||||
* * `show` – Selects the given list item or tab and shows its associated pane.
|
||||
* Any other list item or tab that was previously selected becomes unselected and its associated pane is hidden.
|
||||
* * `dispose` – Destroys an element's tab.
|
||||
*
|
||||
* Returns to the caller before the tab pane has actually been shown (i.e. before the `shown.bs.tab` event occurs).
|
||||
*/
|
||||
tab(action: "show" | "dispose"): this;
|
||||
|
||||
/**
|
||||
* Call a method on the toast element:
|
||||
* * `show` – Reveals an element's toast. You have to manually call this method, instead your toast won't show.
|
||||
* * `hide` – Hides an element's toast. You have to manually call this method if you made `autohide` to false.
|
||||
* * `dispose` – Hides an element's toast. Your toast will remain on the DOM but won't show anymore.
|
||||
*
|
||||
* Returns to the caller before the toast has actually been shown or hidden (i.e. before the `shown.bs.toast` or `hidden.bs.toast` event occurs).
|
||||
*/
|
||||
toast(action: "show" | "hide" | "dispose"): this;
|
||||
/**
|
||||
* Attaches a toast handler to an element collection.
|
||||
*/
|
||||
toast(options?: ToastOption): this;
|
||||
|
||||
/**
|
||||
* Call a method on the tooltip element:
|
||||
* * `show` – Reveals an element's tooltip. Tooltips with zero-length titles are never displayed.
|
||||
* * `hide` – Hides an element's tooltip.
|
||||
* * `toggle` – Toggles an element's tooltip.
|
||||
* * `dispose` – Hides and destroys an element's tooltip.
|
||||
* Tooltips that use delegation (which are created using `selector` option) cannot be individually destroyed on descendant trigger elements.
|
||||
* * `enable` – Gives an element's tooltip the ability to be shown. Tooltips are enabled by default.
|
||||
* * `disable` – Removes the ability for an element's tooltip to be shown. The tooltip will only be able to be shown if it is re-enabled.
|
||||
* * `toggleEnabled` – Toggles the ability for an element's tooltip to be shown or hidden.
|
||||
* * `update` – Updates the position of an element's tooltip.
|
||||
*
|
||||
* Returns to the caller before the tooltip has actually been shown or hidden (i.e. before the `shown.bs.tooltip` or `hidden.bs.tooltip` event occurs).
|
||||
* This is considered a "manual" triggering of the tooltip.
|
||||
*/
|
||||
tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this;
|
||||
/**
|
||||
* Attaches a tooltip handler to an element collection.
|
||||
*/
|
||||
tooltip(options?: TooltipOption): this;
|
||||
|
||||
on(events: CarouselEvent, handler: JQuery.EventHandlerBase<TElement, CarouselEventHandler<TElement>>): this;
|
||||
on(events: DropdownEvent, handler: JQuery.EventHandlerBase<TElement, DropdownsEventHandler<TElement>>): this;
|
||||
on(events: ModalEvent, handler: JQuery.EventHandlerBase<TElement, ModalEventHandler<TElement>>): this;
|
||||
on(events: TapEvent, handler: JQuery.EventHandlerBase<TElement, TapEventHandler<TElement>>): this;
|
||||
on(
|
||||
events: AlertEvent | CollapseEvent | PopoverEvent | ScrollspyEvent | ToastEvent | TooltipEvent,
|
||||
handler: JQuery.EventHandler<TElement>
|
||||
): this;
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -60,18 +60,18 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import "../scss/bootstrap5.scss";
|
||||
import "../scss/game_bg.scss";
|
||||
import "@scss/common/bootstrap5.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
import "../../css/config.css";
|
||||
|
||||
import { defineComponent, onMounted, reactive, ref } from "vue";
|
||||
import TopBackBar from "./components/TopBackBar.vue";
|
||||
import BoardArticle from "./components/BoardArticle.vue";
|
||||
import { convertFormData } from "./util/convertFormData";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import BoardArticle from "@/components/BoardArticle.vue";
|
||||
import { convertFormData } from "@util/convertFormData";
|
||||
import axios from "axios";
|
||||
import { InvalidResponse } from "./defs";
|
||||
import { autoResizeTextarea } from "./util/autoResizeTextarea";
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { InvalidResponse } from "@/defs";
|
||||
import { autoResizeTextarea } from "@util/autoResizeTextarea";
|
||||
import { unwrap } from "@util/unwrap";
|
||||
export type BoardResponse = {
|
||||
result: true;
|
||||
articles: Record<number, BoardArticleItem>;
|
||||
|
||||
+8
-8
@@ -294,11 +294,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import "../scss/bootstrap5.scss";
|
||||
import "../scss/game_bg.scss";
|
||||
import "@scss/common/bootstrap5.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
|
||||
import { defineComponent } from "vue";
|
||||
import TopBackBar from "./components/TopBackBar.vue";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import {
|
||||
CTable,
|
||||
CTableBody,
|
||||
@@ -306,18 +306,18 @@ import {
|
||||
CTableHeaderCell,
|
||||
CTableDataCell,
|
||||
} from "@coreui/vue/src/components/table";
|
||||
import { getIconPath } from "./util/getIconPath";
|
||||
import { isBrightColor } from "./util/isBrightColor";
|
||||
import { getIconPath } from "@util/getIconPath";
|
||||
import { isBrightColor } from "@util/isBrightColor";
|
||||
import {
|
||||
abilityLeadint,
|
||||
abilityLeadpow,
|
||||
abilityPowint,
|
||||
abilityRand,
|
||||
} from "./util/generalStats";
|
||||
} from "@util/generalStats";
|
||||
import { clone, shuffle, sum } from "lodash";
|
||||
import axios from "axios";
|
||||
import { InvalidResponse } from "./defs";
|
||||
import NumberInputWithInfo from "./components/NumberInputWithInfo.vue";
|
||||
import { InvalidResponse } from "@/defs";
|
||||
import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue";
|
||||
|
||||
declare const nationList: {
|
||||
nation: number;
|
||||
|
||||
+10
-10
@@ -459,8 +459,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import "../scss/bootstrap5.scss";
|
||||
import "../scss/game_bg.scss";
|
||||
import "@scss/common/bootstrap5.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
|
||||
import { defineComponent } from "vue";
|
||||
import {
|
||||
@@ -470,17 +470,17 @@ import {
|
||||
NPCChiefActions,
|
||||
NPCGeneralActions,
|
||||
ToastType,
|
||||
} from "./defs";
|
||||
import NumberInputWithInfo from "./components/NumberInputWithInfo.vue";
|
||||
} from "@/defs";
|
||||
import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue";
|
||||
import { cloneDeep, isEqual, last } from "lodash";
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { convertFormData } from "./util/convertFormData";
|
||||
import { unwrap } from "@util/unwrap";
|
||||
import { convertFormData } from "@util/convertFormData";
|
||||
import axios from "axios";
|
||||
import { NPCPriorityBtnHelpMessage } from "./helpTexts";
|
||||
import { NPCPriorityBtnHelpMessage } from "@/helpTexts";
|
||||
import draggable from "vuedraggable";
|
||||
import MyToast from "./components/MyToast.vue";
|
||||
import TopBackBar from "./components/TopBackBar.vue";
|
||||
import { convertIDArray } from "./util/convertIDArray";
|
||||
import MyToast from "@/components/MyToast.vue";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import { convertIDArray } from "@util/convertIDArray";
|
||||
|
||||
declare const nationID: number;
|
||||
|
||||
|
||||
+11
-14
@@ -56,9 +56,6 @@
|
||||
Math.min(maxTurn, viewMaxTurn)
|
||||
)"
|
||||
:key="turnIdx"
|
||||
height="28"
|
||||
:id="`command_${turnIdx}`"
|
||||
:class="turnList.has(turnIdx) ? 'pressed' : ''"
|
||||
>
|
||||
<div class="idx_pad center d-grid" @click="toggleTurn(turnIdx)">
|
||||
<b-button
|
||||
@@ -206,13 +203,13 @@ import addMinutes from "date-fns/esm/addMinutes";
|
||||
import { range } from "lodash";
|
||||
import { stringifyUrl } from "query-string";
|
||||
import { defineComponent } from "vue";
|
||||
import { formatTime } from "./util/formatTime";
|
||||
import { joinYearMonth } from "./util/joinYearMonth";
|
||||
import { mb_strwidth } from "./util/mb_strwidth";
|
||||
import { parseTime } from "./util/parseTime";
|
||||
import { parseYearMonth } from "./util/parseYearMonth";
|
||||
import { sammoAPI } from "./util/sammoAPI";
|
||||
import { filter초성withAlphabet } from "./util/filter초성withAlphabet";
|
||||
import { formatTime } from "@util/formatTime";
|
||||
import { joinYearMonth } from "@util/joinYearMonth";
|
||||
import { mb_strwidth } from "@util/mb_strwidth";
|
||||
import { parseTime } from "@util/parseTime";
|
||||
import { parseYearMonth } from "@util/parseYearMonth";
|
||||
import { sammoAPI } from "@util/sammoAPI";
|
||||
import { filter초성withAlphabet } from "@util/filter초성withAlphabet";
|
||||
|
||||
type commandItem = {
|
||||
value: string;
|
||||
@@ -547,10 +544,10 @@ export default defineComponent({
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "../scss/break_500px.scss";
|
||||
@import "../scss/variables.scss";
|
||||
@import "../scss/bootswatch_custom_variables.scss";
|
||||
@import "../../node_modules/bootstrap5/scss/bootstrap-utilities.scss";
|
||||
@import "@scss/common/break_500px.scss";
|
||||
@import "@scss/common/variables.scss";
|
||||
@import "@scss/common/bootswatch_custom_variables.scss";
|
||||
@import "bootstrap/scss/bootstrap-utilities.scss";
|
||||
|
||||
.commandPad {
|
||||
background-color: $gray-900;
|
||||
|
||||
+21
-14
@@ -1,17 +1,15 @@
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import $ from 'jquery';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
import download from 'downloadjs';
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { unwrap } from "@util/unwrap";
|
||||
import { isInteger } from 'lodash';
|
||||
import { combineArray, errUnknown, getNpcColor } from './common_legacy';
|
||||
import { isBrightColor } from "./util/isBrightColor";
|
||||
import { numberWithCommas } from "./util/numberWithCommas";
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { BasicGeneralListResponse, InvalidResponse } from './defs';
|
||||
import { formatTime } from './util/formatTime';
|
||||
import { combineArray, errUnknown, getNpcColor } from '@/common_legacy';
|
||||
import { isBrightColor } from "@util/isBrightColor";
|
||||
import { numberWithCommas } from "@util/numberWithCommas";
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { BasicGeneralListResponse, InvalidResponse } from '@/defs';
|
||||
import { formatTime } from '@util/formatTime';
|
||||
import { Modal } from 'bootstrap';
|
||||
|
||||
type CityAttackerInfo = {
|
||||
level: number,
|
||||
@@ -126,6 +124,8 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
let modalImport: Modal|undefined = undefined;
|
||||
|
||||
$(function ($) {
|
||||
|
||||
|
||||
@@ -225,7 +225,10 @@ $(function ($) {
|
||||
|
||||
const $modal = $('#importModal');
|
||||
$modal.data('target', $card);
|
||||
$modal.modal('show');
|
||||
if(!modalImport){
|
||||
modalImport = new Modal($modal[0]);
|
||||
}
|
||||
modalImport.show();
|
||||
});
|
||||
|
||||
$('.btn-general-save').on('click', function () {
|
||||
@@ -962,13 +965,15 @@ $(function ($) {
|
||||
const $card = $modal.data('target');
|
||||
importGeneralInfo($card, data.general);
|
||||
|
||||
$modal.modal('hide');
|
||||
if(modalImport){
|
||||
modalImport.hide();
|
||||
}
|
||||
}, errUnknown);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#importModal').on('show.bs.modal', function () {
|
||||
unwrap(document.querySelector('#importModal')).addEventListener('show.bs.modal', function () {
|
||||
if (!initGeneralList) {
|
||||
const $list = $('#modalSelector');
|
||||
|
||||
@@ -1011,7 +1016,9 @@ $(function ($) {
|
||||
}).then(function (data: BasicGeneralListResponse | InvalidResponse) {
|
||||
if (!data.result) {
|
||||
alert(data.reason);
|
||||
$('#importModal').modal('hide');
|
||||
if(modalImport){
|
||||
modalImport.hide();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import $ from 'jquery';
|
||||
import axios from 'axios';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
|
||||
$(function($){
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
+4
-7
@@ -1,12 +1,9 @@
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import $ from 'jquery';
|
||||
import axios from 'axios';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import 'bootstrap';
|
||||
import 'select2/dist/js/select2.full.js'
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@ import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
import { range } from 'lodash';
|
||||
import { addMinutes } from 'date-fns';
|
||||
import { errUnknown, getNpcColor } from './common_legacy';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { unwrap_any } from "./util/unwrap_any";
|
||||
import { parseTime } from './util/parseTime';
|
||||
import { formatTime } from './util/formatTime';
|
||||
import { errUnknown, getNpcColor } from '@/common_legacy';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { unwrap } from "@util/unwrap";
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { unwrap_any } from "@util/unwrap_any";
|
||||
import { parseTime } from '@util/parseTime';
|
||||
import { formatTime } from '@util/formatTime';
|
||||
import { stringifyUrl } from 'query-string';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import { exportWindow } from "./util/exportWindow";
|
||||
import { activateFlip, errUnknown, errUnknownToast, quickReject, initTooltip } from "./common_legacy";
|
||||
import { isBrightColor } from "./util/isBrightColor";
|
||||
import { getIconPath } from "./util/getIconPath";
|
||||
import { mb_strwidth } from "./util/mb_strwidth";
|
||||
import { TemplateEngine } from "./util/TemplateEngine";
|
||||
import { escapeHtml } from "./legacy/escapeHtml";
|
||||
import { nl2br } from "./util/nl2br";
|
||||
import { exportWindow } from "@util/exportWindow";
|
||||
import { activateFlip, errUnknown, errUnknownToast, quickReject, initTooltip } from "@/common_legacy";
|
||||
import { isBrightColor } from "@util/isBrightColor";
|
||||
import { getIconPath } from "@util/getIconPath";
|
||||
import { mb_strwidth } from "@util/mb_strwidth";
|
||||
import { TemplateEngine } from "@util/TemplateEngine";
|
||||
import { escapeHtml } from "@/legacy/escapeHtml";
|
||||
import { nl2br } from "@util/nl2br";
|
||||
import jQuery from "jquery";
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
|
||||
import "../scss/common_legacy.scss";
|
||||
import "@scss/common_legacy.scss";
|
||||
|
||||
exportWindow(jQuery, '$');
|
||||
exportWindow(jQuery, 'jQuery');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import $ from "jquery";
|
||||
import axios from "axios";
|
||||
import { Tooltip } from "bootstrap";
|
||||
import { trim } from "lodash";
|
||||
|
||||
/**
|
||||
* object의 array를 id를 key로 삼는 object로 재 변환
|
||||
@@ -185,15 +186,16 @@ export function initTooltip($obj?: JQuery<HTMLElement>): void {
|
||||
if (!tooltipClassText) {
|
||||
tooltipClassText = '';
|
||||
}
|
||||
const template = `<div class="tooltip ${tooltipClassText}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>`;
|
||||
const template = `<div class="tooltip ${tooltipClassText}" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>`;
|
||||
|
||||
$objTooltip.tooltip({
|
||||
title: function () {
|
||||
return $.trim($(this).find('.tooltiptext').html());
|
||||
const oTooltip = new Tooltip(this, {
|
||||
title: function(){
|
||||
return trim(this.querySelector('.tooltiptext')?.innerHTML);
|
||||
},
|
||||
template: template,
|
||||
html: true
|
||||
}).tooltip('show');
|
||||
});
|
||||
oTooltip.show();
|
||||
|
||||
$objTooltip.data('setObjTooltip', true);
|
||||
});
|
||||
|
||||
@@ -50,12 +50,12 @@
|
||||
</table>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { BoardArticleItem } from "../Board.vue";
|
||||
import BoardComment from "./BoardComment.vue";
|
||||
import { BoardArticleItem } from "@/Board.vue";
|
||||
import BoardComment from "@/components/BoardComment.vue";
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import axios from "axios";
|
||||
import { convertFormData } from "../util/convertFormData";
|
||||
import { InvalidResponse } from "../defs";
|
||||
import { convertFormData } from "@util/convertFormData";
|
||||
import { InvalidResponse } from "@/defs";
|
||||
export default defineComponent({
|
||||
name: "BoardArticle",
|
||||
components: {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</tr>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { BoardCommentItem } from "../Board.vue";
|
||||
import { BoardCommentItem } from "@/Board.vue";
|
||||
import { defineComponent, PropType } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import "../../scss/game_bg.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
|
||||
export default defineComponent({
|
||||
name: "TopBackBar",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import { ToastType } from "../defs";
|
||||
import { ToastType } from "@/defs";
|
||||
import { CToaster, CToast, CToastHeader, CToastBody } from "@coreui/vue/src/components/toast";
|
||||
|
||||
export default defineComponent({
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import "../../scss/game_bg.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
|
||||
export default defineComponent({
|
||||
name: "TopBackBar",
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');
|
||||
import 'bootstrap';
|
||||
import 'select2/dist/js/select2.full.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { reloadWorldMap } from "./map";
|
||||
import { unwrap_any } from "./util/unwrap_any";
|
||||
import { reloadWorldMap } from "@/map";
|
||||
import { unwrap_any } from "@util/unwrap_any";
|
||||
|
||||
export function defaultSelectCityByMap(): void {
|
||||
const $target = $("#destCityID");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { reloadWorldMap } from "./map";
|
||||
import { unwrap_any } from "./util/unwrap_any";
|
||||
import { reloadWorldMap } from "@/map";
|
||||
import { unwrap_any } from "@util/unwrap_any";
|
||||
|
||||
export function defaultSelectNationByMap(): void{
|
||||
const $target = $("#destNationID");
|
||||
|
||||
+4
-7
@@ -1,14 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
import 'summernote/dist/summernote-bs4';
|
||||
import 'summernote/dist/summernote-bs4.css';
|
||||
import './summernote-image-flip';
|
||||
import './summernote-ko-KR';
|
||||
import { activateFlip } from './common_legacy';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import '@/summernote-image-flip';
|
||||
import '@/summernote-ko-KR';
|
||||
import { activateFlip } from '@/common_legacy';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
|
||||
declare const editable: boolean;
|
||||
|
||||
|
||||
+8
-11
@@ -1,17 +1,14 @@
|
||||
import $ from 'jquery';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import axios from 'axios';
|
||||
import { isBrightColor } from "./util/isBrightColor";
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { isBrightColor } from "@util/isBrightColor";
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { isString } from 'lodash';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { InvalidResponse, NationStaticItem } from './defs';
|
||||
import { escapeHtml } from './legacy/escapeHtml';
|
||||
import { nl2br } from './util/nl2br';
|
||||
import { unwrap } from './util/unwrap';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { InvalidResponse, NationStaticItem } from '@/defs';
|
||||
import { escapeHtml } from '@/legacy/escapeHtml';
|
||||
import { nl2br } from '@util/nl2br';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import 'bootstrap';
|
||||
import 'select2/dist/js/select2.full.js'
|
||||
import { LoadingData } from 'select2';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import $ from 'jquery';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
|
||||
type UserItem = {
|
||||
val: string,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import $ from 'jquery';
|
||||
import { unwrap } from './util/unwrap';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import axios from 'axios';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
|
||||
type KingdomGeneral = {
|
||||
html: JQuery<HTMLElement>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from "axios";
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { RuntimeError } from "./util/RuntimeError";
|
||||
import { unwrap } from "@util/unwrap";
|
||||
import { RuntimeError } from "@util/RuntimeError";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import { isNumber } from 'lodash';
|
||||
import { TemplateEngine } from '../util/TemplateEngine';
|
||||
import { InvalidResponse } from '../defs';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '../util/unwrap_any';
|
||||
import { convertFormData } from '../util/convertFormData';
|
||||
import { exportWindow } from '../util/exportWindow';
|
||||
import { TemplateEngine } from '@util/TemplateEngine';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
import '@/gateway/common';
|
||||
|
||||
type UserEntry = {
|
||||
userID: string,
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { exportWindow } from '../util/exportWindow';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
import axios from 'axios';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from '../defs';
|
||||
import { convertFormData } from '../util/convertFormData';
|
||||
import { TemplateEngine } from "../util/TemplateEngine";
|
||||
import { unwrap_any } from '../util/unwrap_any';
|
||||
import { unwrap } from '../util/unwrap';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { TemplateEngine } from "@util/TemplateEngine";
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import '@/gateway/common';
|
||||
|
||||
type ServerUpdateResponse = {
|
||||
result: true,
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
import 'bootstrap';
|
||||
import "@scss/common/bootstrap5.scss";
|
||||
@@ -1,16 +1,14 @@
|
||||
import { exportWindow } from '../util/exportWindow';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
import $ from 'jquery';
|
||||
exportWindow($, '$');
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import axios from 'axios';
|
||||
import 'bootstrap';
|
||||
import { initTooltip } from '../common_legacy';
|
||||
import { TemplateEngine } from "../util/TemplateEngine";
|
||||
import { InvalidResponse } from '../defs';
|
||||
import { getDateTimeNow } from '../util/getDateTimeNow';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { loadPlugin as loadAdminPlugin } from './admin_server';
|
||||
import { initTooltip } from '@/common_legacy';
|
||||
import { TemplateEngine } from '@util/TemplateEngine';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { getDateTimeNow } from '@util/getDateTimeNow';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { loadPlugin as loadAdminPlugin } from '@/gateway/admin_server';
|
||||
import '@/gateway/common';
|
||||
|
||||
|
||||
declare const isAdmin: boolean;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
|
||||
import $ from 'jquery';
|
||||
import axios from 'axios';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from '../defs';
|
||||
import { JQValidateForm, NamedRules } from '../util/jqValidateForm';
|
||||
import { convertFormData } from '../util/convertFormData';
|
||||
import { unwrap_any } from '../util/unwrap_any';
|
||||
import { mb_strwidth } from '../util/mb_strwidth';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { JQValidateForm, NamedRules } from '@util/jqValidateForm';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { mb_strwidth } from '@util/mb_strwidth';
|
||||
import { isString } from 'lodash';
|
||||
import { sha512 } from 'js-sha512';
|
||||
import '@/gateway/common';
|
||||
|
||||
async function changeInstallMode() {
|
||||
let result: {
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import $ from 'jquery';
|
||||
import axios from 'axios';
|
||||
import { JQValidateForm, NamedRules } from '../util/jqValidateForm';
|
||||
import { convertFormData } from '../util/convertFormData';
|
||||
import { InvalidResponse } from '../defs';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '../util/unwrap_any';
|
||||
import { JQValidateForm, NamedRules } from '@util/jqValidateForm';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { sha512 } from 'js-sha512';
|
||||
import { isString } from 'lodash';
|
||||
import { mb_strwidth } from '../util/mb_strwidth';
|
||||
import { mb_strwidth } from '@util/mb_strwidth';
|
||||
import '@/gateway/common';
|
||||
|
||||
|
||||
$(async function () {
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
+43
-32
@@ -1,18 +1,17 @@
|
||||
import $ from 'jquery';
|
||||
import 'popper.js';
|
||||
import Popper from 'popper.js';
|
||||
(window as unknown as { Popper: unknown }).Popper = Popper;
|
||||
import 'bootstrap';
|
||||
import { JQValidateForm, NamedRules } from '../util/jqValidateForm';
|
||||
import { JQValidateForm, NamedRules } from '@util/jqValidateForm';
|
||||
import axios from 'axios';
|
||||
import { convertFormData } from '../util/convertFormData';
|
||||
import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '../util/unwrap_any';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { sha512 } from 'js-sha512';
|
||||
import { unwrap } from '../util/unwrap';
|
||||
import { InvalidResponse } from '../defs';
|
||||
import internal from 'stream';
|
||||
import { delay } from '../util/delay';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { delay } from '@util/delay';
|
||||
import { Modal } from 'bootstrap';
|
||||
import '@/gateway/common';
|
||||
|
||||
import '@scss/gateway/login.scss';
|
||||
|
||||
type LoginResponse = {
|
||||
result: true,
|
||||
@@ -55,6 +54,8 @@ declare global {
|
||||
declare const kakao_oauth_client_id: string;
|
||||
declare const kakao_oauth_redirect_uri: string;
|
||||
|
||||
let modalOTP: Modal | undefined = undefined;
|
||||
|
||||
let oauthMode: string | null = null;
|
||||
|
||||
const TOKEN_VERSION = 1;
|
||||
@@ -78,7 +79,7 @@ function getToken(): [number, string] | undefined {
|
||||
return token;
|
||||
}
|
||||
|
||||
function resetToken(){
|
||||
function resetToken() {
|
||||
localStorage.removeItem(LOGIN_TOKEN_KEY);
|
||||
}
|
||||
|
||||
@@ -95,12 +96,12 @@ async function tryAutoLogin() {
|
||||
path: ["Login", "ReqNonce"]
|
||||
});
|
||||
|
||||
if(!result){
|
||||
if (!result) {
|
||||
//api 에러.
|
||||
return;
|
||||
}
|
||||
|
||||
if(!result.data.result){
|
||||
if (!result.data.result) {
|
||||
resetToken();
|
||||
return;
|
||||
}
|
||||
@@ -111,31 +112,31 @@ async function tryAutoLogin() {
|
||||
const _loginResult = await axios.post<AutoLoginResponse>('api.php', {
|
||||
path: ["Login", "LoginByToken"],
|
||||
args: {
|
||||
'hashedToken':hashedToken,
|
||||
'token_id':tokenID,
|
||||
'hashedToken': hashedToken,
|
||||
'token_id': tokenID,
|
||||
}
|
||||
});
|
||||
|
||||
if(!_loginResult){
|
||||
if (!_loginResult) {
|
||||
return;
|
||||
}
|
||||
|
||||
const loginResult = _loginResult.data;
|
||||
if(!loginResult.result){
|
||||
if(!loginResult.silent){
|
||||
if (!loginResult.result) {
|
||||
if (!loginResult.silent) {
|
||||
alert(loginResult.reason);
|
||||
}
|
||||
console.error(loginResult.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
if(loginResult.nextToken){
|
||||
if (loginResult.nextToken) {
|
||||
regNextToken(loginResult.nextToken);
|
||||
}
|
||||
window.location.href = "./";
|
||||
|
||||
}
|
||||
catch(e){
|
||||
catch (e) {
|
||||
console.error(e);
|
||||
return;
|
||||
}
|
||||
@@ -229,10 +230,14 @@ async function doLoginUsingOAuth() {
|
||||
return;
|
||||
}
|
||||
|
||||
const $modal = $('#modalOTP').modal() as unknown as JQuery;
|
||||
$modal.on('shown.bs.modal', function () {
|
||||
$('#otp_code').trigger('focus');
|
||||
});
|
||||
const modalEl = unwrap(document.querySelector('#modalOTP'))
|
||||
if (!modalOTP) {
|
||||
modalOTP = new Modal(modalEl);
|
||||
modalEl.addEventListener('shown.bs.modal', function () {
|
||||
unwrap(document.querySelector<HTMLElement>('#otp_code')).focus();
|
||||
});
|
||||
}
|
||||
modalOTP.show();
|
||||
}
|
||||
|
||||
function postOAuthResult(mode: string) {
|
||||
@@ -265,7 +270,7 @@ $(async function ($) {
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
//로그인 먼저 해볼 것
|
||||
if(getToken()){
|
||||
if (getToken()) {
|
||||
void tryAutoLogin();
|
||||
await delay(100);
|
||||
}
|
||||
@@ -339,10 +344,14 @@ $(async function ($) {
|
||||
return;
|
||||
}
|
||||
|
||||
const $modal = $('#modalOTP').modal() as unknown as JQuery;
|
||||
$modal.on('shown.bs.modal', function () {
|
||||
$('#otp_code').trigger('focus');
|
||||
});
|
||||
const modalEl = unwrap(document.querySelector('#modalOTP'))
|
||||
if (!modalOTP) {
|
||||
modalOTP = new Modal(modalEl);
|
||||
modalEl.addEventListener('shown.bs.modal', function () {
|
||||
unwrap(document.querySelector<HTMLElement>('#otp_code')).focus();
|
||||
});
|
||||
}
|
||||
modalOTP.show();
|
||||
});
|
||||
|
||||
$('#otp_form').on('submit', async function (e) {
|
||||
@@ -376,7 +385,9 @@ $(async function ($) {
|
||||
alert(result.reason);
|
||||
|
||||
if (result.reset) {
|
||||
$('#modalOTP').modal('hide')
|
||||
if (modalOTP) {
|
||||
modalOTP.hide();
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
+14
-14
@@ -1,18 +1,16 @@
|
||||
import { setAxiosXMLHttpRequest } from "../util/setAxiosXMLHttpRequest";
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import $ from 'jquery';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
import axios from 'axios';
|
||||
import { subDays } from 'date-fns';
|
||||
import { getDateTimeNow } from "../util/getDateTimeNow";
|
||||
import { getDateTimeNow } from '@util/getDateTimeNow';
|
||||
import { sha512 } from "js-sha512";
|
||||
import { convertFormData } from "../util/convertFormData";
|
||||
import { InvalidResponse } from "../defs";
|
||||
import { unwrap } from "../util/unwrap";
|
||||
import { parseTime } from "../util/parseTime";
|
||||
import { formatTime } from "../util/formatTime";
|
||||
import { exportWindow } from "../util/exportWindow";
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import { parseTime } from '@util/parseTime';
|
||||
import { formatTime } from '@util/formatTime';
|
||||
import '@/gateway/common';
|
||||
import { Modal } from 'bootstrap';
|
||||
|
||||
type ResultUserInfo = {
|
||||
result: true,
|
||||
@@ -131,14 +129,16 @@ function showAdjustServerModal(serverList: [string, string][]) {
|
||||
$form.append($item);
|
||||
}
|
||||
|
||||
const $modal = $('#chooseServer');
|
||||
$modal.modal({
|
||||
const modalEl = unwrap(document.querySelector('#chooseServer'));
|
||||
const modal = new Modal(modalEl, {
|
||||
backdrop: 'static'
|
||||
});
|
||||
$modal.on('hidden.bs.modal', function () {
|
||||
|
||||
modalEl.addEventListener('hidden.bs.modal', function () {
|
||||
location.reload();
|
||||
return;
|
||||
});
|
||||
modal.show();
|
||||
|
||||
$("#modal-apply").off("click").on("click", async function () {
|
||||
const events: Promise<unknown>[] = [];
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import $ from 'jquery';
|
||||
import { stringifyUrl } from 'query-string';
|
||||
import { initTooltip } from './common_legacy';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');
|
||||
import { initTooltip } from '@/common_legacy';
|
||||
import 'bootstrap';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
|
||||
$(function ($) {
|
||||
$('#by_scenario').on('change', function (e) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { NPCChiefActions, NPCGeneralActions } from "./defs";
|
||||
import { NPCChiefActions, NPCGeneralActions } from "@/defs";
|
||||
|
||||
export const NPCPriorityBtnHelpMessage: {
|
||||
[v in NPCChiefActions | NPCGeneralActions]: string;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import './map';
|
||||
import '@/map';
|
||||
|
||||
declare const startYear:number;
|
||||
declare const startMonth:number;
|
||||
|
||||
@@ -259,13 +259,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import "../scss/bootstrap5.scss";
|
||||
import "../scss/game_bg.scss";
|
||||
import TopBackBar from "./components/TopBackBar.vue";
|
||||
import "@scss/common/bootstrap5.scss";
|
||||
import "@scss/game_bg.scss";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import _ from "lodash";
|
||||
import { InvalidResponse } from "./defs";
|
||||
import { InvalidResponse } from "@/defs";
|
||||
import axios from "axios";
|
||||
import NumberInputWithInfo from "./components/NumberInputWithInfo.vue";
|
||||
import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue";
|
||||
|
||||
type InheritanceType =
|
||||
| "previous"
|
||||
|
||||
+5
-7
@@ -1,13 +1,11 @@
|
||||
import $ from "jquery";
|
||||
import Popper from 'popper.js';
|
||||
(window as unknown as {Popper:unknown}).Popper = Popper;//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
import { setAxiosXMLHttpRequest } from "./util/setAxiosXMLHttpRequest";
|
||||
import { setAxiosXMLHttpRequest } from "@util/setAxiosXMLHttpRequest";
|
||||
import axios from "axios";
|
||||
import { InvalidResponse } from "./defs";
|
||||
import { JQValidateForm, NamedRules } from "./util/jqValidateForm";
|
||||
import { convertFormData } from "./util/convertFormData";
|
||||
import { exportWindow } from "./util/exportWindow";
|
||||
import { InvalidResponse } from "@/defs";
|
||||
import { JQValidateForm, NamedRules } from "@util/jqValidateForm";
|
||||
import { convertFormData } from "@util/convertFormData";
|
||||
import { exportWindow } from "@util/exportWindow";
|
||||
|
||||
type ResponseScenarioItem = {
|
||||
year?: number,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
import axios from 'axios';
|
||||
import jQuery from 'jquery';
|
||||
import { JQValidateForm, NamedRules } from './util/jqValidateForm';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { JQValidateForm, NamedRules } from '@util/jqValidateForm';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
|
||||
jQuery(async function ($) {
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
+9
-11
@@ -1,21 +1,19 @@
|
||||
import $ from 'jquery';
|
||||
import Popper from 'popper.js';
|
||||
exportWindow(Popper, 'Popper');//XXX: 왜 popper를 이렇게 불러야 하는가?
|
||||
import 'bootstrap';
|
||||
import { activateFlip, initTooltip } from './common_legacy';
|
||||
import './msg.ts';
|
||||
import './map.ts';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import { activateFlip, initTooltip } from '@/common_legacy';
|
||||
import '@/msg.ts';
|
||||
import '@/map.ts';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
|
||||
import { scrollHardTo } from './util/scrollHardTo';
|
||||
import { scrollHardTo } from '@util/scrollHardTo';
|
||||
|
||||
exportWindow(scrollHardTo, 'scrollHardTo');
|
||||
exportWindow($, '$');
|
||||
|
||||
import '../scss/main.scss';
|
||||
import { unwrap } from './util/unwrap';
|
||||
import { auto500px } from './util/auto500px';
|
||||
import { htmlReady } from './util/htmlReady';
|
||||
import '@scss/main.scss';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import { auto500px } from '@util/auto500px';
|
||||
import { htmlReady } from '@util/htmlReady';
|
||||
|
||||
$(function ($) {
|
||||
$('.refreshPage').click(function () {
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
import { extend, isNumber } from 'lodash';
|
||||
import { convColorValue, convertDictById, stringFormat } from './common_legacy';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { unwrap } from "./util/unwrap";
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import { convColorValue, convertDictById, stringFormat } from '@/common_legacy';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { unwrap } from "@util/unwrap";
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
|
||||
declare const serverNick: string;
|
||||
declare const serverID: string;
|
||||
|
||||
+12
-12
@@ -1,20 +1,20 @@
|
||||
|
||||
import $ from 'jquery';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { getDateTimeNow } from './util/getDateTimeNow';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { getDateTimeNow } from '@util/getDateTimeNow';
|
||||
import axios from 'axios';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { isBrightColor } from "./util/isBrightColor";
|
||||
import { unwrap } from './util/unwrap';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { isBrightColor } from "@util/isBrightColor";
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import _ from 'lodash';
|
||||
import { addMinutes } from 'date-fns';
|
||||
import { parseTime } from './util/parseTime';
|
||||
import { formatTime } from './util/formatTime';
|
||||
import { TemplateEngine } from './util/TemplateEngine';
|
||||
import { isNotNull } from './util/isNotNull';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { exportWindow } from './util/exportWindow';
|
||||
import { parseTime } from '@util/parseTime';
|
||||
import { formatTime } from '@util/formatTime';
|
||||
import { TemplateEngine } from '@util/TemplateEngine';
|
||||
import { isNotNull } from '@util/isNotNull';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { exportWindow } from '@util/exportWindow';
|
||||
|
||||
const messageTemplate = `<div
|
||||
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>"
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
import { InvalidResponse } from './defs';
|
||||
import { convertFormData } from './util/convertFormData';
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
import { unwrap } from './util/unwrap';
|
||||
import { unwrap_any } from './util/unwrap_any';
|
||||
import { InvalidResponse } from '@/defs';
|
||||
import { convertFormData } from '@util/convertFormData';
|
||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||
import { unwrap } from '@util/unwrap';
|
||||
import { unwrap_any } from '@util/unwrap_any';
|
||||
|
||||
|
||||
type LogResponse = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user