forked from devsam/core
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6282445f7d | ||
|
|
bf244533f7 | ||
|
|
5ebfaf24ee | ||
|
|
0c0283dc02 | ||
|
|
375b08be87 | ||
|
|
cbc8f94b0a | ||
|
|
bdac8d163d | ||
|
|
1f61f37841 | ||
|
|
51d523ae72 | ||
|
|
3f9e4962e6 | ||
|
|
f8fc4fe56b | ||
|
|
fb64b7e412 | ||
|
|
3209cfbc45 | ||
|
|
8a99476136 | ||
|
|
eb80f8d111 | ||
|
|
afde3ce54d | ||
|
|
c4b61fec17 | ||
|
|
0b74abf300 | ||
|
|
e6c3c9f1d4 | ||
|
|
4e7560b4ed | ||
|
|
542491b278 | ||
|
|
d36439355d | ||
|
|
4a80815b39 | ||
|
|
6dc57f2566 | ||
|
|
07e8511ce1 | ||
|
|
8e927831f5 | ||
|
|
2c533d2ab3 | ||
|
|
38208750e7 | ||
|
|
df14d7c306 | ||
|
|
b3612db7d2 | ||
|
|
8d90da659e | ||
|
|
f8ddbc0622 | ||
|
|
673b7054aa | ||
|
|
1472cbf257 | ||
|
|
d806935c58 | ||
|
|
6b56eb79e1 | ||
|
|
d2aea16744 | ||
|
|
bb800f032e | ||
|
|
64b9f9443e | ||
|
|
fd2d3a0e06 | ||
|
|
08d678bdb8 | ||
|
|
418007e572 | ||
|
|
4a1bccdf75 | ||
|
|
00c0b59e9d | ||
|
|
ac82c8ff0b | ||
|
|
f4bef8a090 | ||
|
|
d8a1055bff | ||
|
|
d672ce4d80 | ||
|
|
43ec361d03 | ||
|
|
c3c99c5f76 | ||
|
|
eb1e1421ab | ||
|
|
e8a1d87919 | ||
|
|
921ba6811d | ||
|
|
906dd241b4 | ||
|
|
3f0cd2ad64 | ||
|
|
41420d1954 | ||
|
|
6e5a72b170 | ||
|
|
4b19e6aec8 | ||
|
|
58572cbc36 | ||
|
|
096d5766bf | ||
|
|
f5c5b56492 | ||
|
|
69c69d63e6 | ||
|
|
3fd8b21867 | ||
|
|
8660e8cd85 | ||
|
|
8458f725f2 | ||
|
|
366678c965 | ||
|
|
336b5668db | ||
|
|
55886269ea | ||
|
|
0b3698595b | ||
|
|
05e43a39db | ||
|
|
5737ad3db2 | ||
|
|
4ac174eb9a | ||
|
|
895eec10b4 | ||
|
|
e0d891e89a | ||
|
|
adf7734b85 | ||
|
|
5362be9c21 | ||
|
|
847ece52f2 | ||
|
|
851c59d22c | ||
|
|
0669534bba | ||
|
|
05db47e62a | ||
|
|
4a0e608d1c | ||
|
|
45fe73af86 | ||
|
|
4d9fcd657f | ||
|
|
a057deb0fe | ||
|
|
4766210a7d | ||
|
|
fd26aae6d3 | ||
|
|
c5c092cc8e | ||
|
|
58c0a21d90 | ||
|
|
8dc567f966 | ||
|
|
942b2752f5 | ||
|
|
b9259353f4 | ||
|
|
86c614dd40 | ||
|
|
1a010a16a9 | ||
|
|
d5b5726b1e | ||
|
|
d06f3b6bdf | ||
|
|
97a28f716c | ||
|
|
f54bdfcea0 | ||
|
|
5958c4b0ba | ||
|
|
7c3db881c7 | ||
|
|
51ee2e1b2c | ||
|
|
baa813004b | ||
|
|
86b5269d3d | ||
|
|
860e6dacac | ||
|
|
22025bd89e | ||
|
|
ed9301455d | ||
|
|
35df84e059 | ||
|
|
62deebf310 | ||
|
|
7ed4bd5c01 | ||
|
|
c8eb9332b4 | ||
|
|
1df55f9168 | ||
|
|
b726c6aa96 | ||
|
|
0a71962652 | ||
|
|
160946ef74 | ||
|
|
1dc67317dc | ||
|
|
08f4a2e8bf | ||
|
|
11ffdaa8f7 | ||
|
|
0f853303a4 | ||
|
|
d225eb9b16 | ||
|
|
d926e4b8bc | ||
|
|
3e2df1d4d8 | ||
|
|
d670dbf081 | ||
|
|
f510a312e3 | ||
|
|
19c44e3d31 | ||
|
|
d0848aee67 | ||
|
|
f4b4b6811c | ||
|
|
fecb3f1f7b | ||
|
|
4c924c0763 | ||
|
|
f1e8d70554 | ||
|
|
7d11bc152e | ||
|
|
fdf0a3135a | ||
|
|
3a1a455c48 | ||
|
|
3a786e835b | ||
|
|
c70181132f | ||
|
|
538615a1f5 | ||
|
|
aa20a60a1c | ||
|
|
69fa1dac6c | ||
|
|
3ab349af6e | ||
|
|
97ac7deb2f | ||
|
|
3230cafb9f | ||
|
|
394284d8de | ||
|
|
6323b174c6 | ||
|
|
3d3e0e5139 | ||
|
|
ffc7d4bacc | ||
|
|
598236a1d2 | ||
|
|
69207519bd | ||
|
|
022eb1012f | ||
|
|
0a9c59f91e | ||
|
|
7ebb22b892 | ||
|
|
3dc7fc6f14 | ||
|
|
90dea7517b | ||
|
|
eae48f9564 | ||
|
|
dd7afba5f5 | ||
|
|
73357b6777 | ||
|
|
53df6bbcc6 | ||
|
|
9871559227 | ||
|
|
9cbead1ddc | ||
|
|
6402028c17 | ||
|
|
76bd65cf53 | ||
|
|
6e4113de11 | ||
|
|
12f37f76c7 | ||
|
|
acd77b2c0a | ||
|
|
f4fb4ec00d | ||
|
|
46ae4669ea | ||
|
|
67b2dbfe98 | ||
|
|
4f3b39fbfa | ||
|
|
a28fc52309 | ||
|
|
d5f0d60794 | ||
|
|
72e65587df | ||
|
|
b4d4d90784 | ||
|
|
3f81fb759d | ||
|
|
d995b39e02 | ||
|
|
3bd09a1aa4 | ||
|
|
a6ff951c98 | ||
|
|
604b1557e8 | ||
|
|
279bd5c71a | ||
|
|
97dfb02ab6 | ||
|
|
32c7b02303 | ||
|
|
e135835e61 | ||
|
|
7ed9a8075c | ||
|
|
ead8110fb4 | ||
|
|
586b1b6c15 | ||
|
|
e1727c8d80 | ||
|
|
7bd8a7ff35 | ||
|
|
de48651ae7 | ||
|
|
9902e07be0 | ||
|
|
5e4b38895e | ||
|
|
38bbbf261a | ||
|
|
def0a52578 | ||
|
|
4f1f87bda0 | ||
|
|
15f9faa2fa | ||
|
|
7257491d8b | ||
|
|
c19b2a9ebe | ||
|
|
54e7fd0293 | ||
|
|
21f3a2082b | ||
|
|
f647eb5a7b | ||
|
|
d7b1db0081 | ||
|
|
11511316d1 | ||
|
|
95a93c2c44 | ||
|
|
815ce10c25 | ||
|
|
5f13bfe8a1 | ||
|
|
5cd494c00a | ||
|
|
5a0a8bedc1 | ||
|
|
3b9884160b | ||
|
|
5b2b01328a | ||
|
|
e5b51dcd16 | ||
|
|
4d8b816acf | ||
|
|
fa109c1b0b | ||
|
|
b987fce627 | ||
|
|
b072cc3266 | ||
|
|
366b40ea90 | ||
|
|
3d3daa205d | ||
|
|
665ebbd11a | ||
|
|
52a5a7697d | ||
|
|
97a38d516a | ||
|
|
e89475bf52 | ||
|
|
90a78b05ce | ||
|
|
8c6eff15f0 | ||
|
|
824c58b391 | ||
|
|
b97500430c | ||
|
|
bacafc67c9 | ||
|
|
f23ebcdc2d | ||
|
|
edbe8e3561 | ||
|
|
05d1e33b30 | ||
|
|
96b60ce0f5 | ||
|
|
6174bc7ffd | ||
|
|
3bd022e03a | ||
|
|
b0cc5b0b60 | ||
|
|
5493f70458 | ||
|
|
323b3d9d16 | ||
|
|
1b0742ad2a | ||
|
|
2eb7217f49 | ||
|
|
b6f5a286b0 | ||
|
|
66c496fb10 | ||
|
|
56ca588c1e | ||
|
|
e2b09caff3 | ||
|
|
a5b4a4c59f | ||
|
|
a70312a90a | ||
|
|
6c6a3238cb | ||
|
|
9af10d4bcb | ||
|
|
f6e1b4611e | ||
|
|
7bc762d357 | ||
|
|
8edf1da92b | ||
|
|
a18baf2ffe | ||
|
|
2d41bf8f2f | ||
|
|
334778bdae | ||
|
|
1b46a06eee | ||
|
|
1e860e9443 | ||
|
|
0b973672d2 | ||
|
|
868ed85c7f | ||
|
|
6f2a24ec66 | ||
|
|
e5d5899a15 | ||
|
|
243473a97d | ||
|
|
28d71b8ce2 | ||
|
|
1acbf90261 | ||
|
|
94229f84a3 | ||
|
|
cead74238a | ||
|
|
73c60ea94c | ||
|
|
73638da4db | ||
|
|
bc218b73e1 | ||
|
|
aac6632f4b | ||
|
|
fdba3fdc74 | ||
|
|
21bb61ec82 | ||
|
|
ce1203d64d | ||
|
|
56daf15c8e | ||
|
|
96faa924d8 | ||
|
|
ee8854451c | ||
|
|
0975e925a9 |
@@ -3,12 +3,9 @@
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"browsers": [
|
||||
"last 2 versions"
|
||||
]
|
||||
},
|
||||
"modules":false
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": 3,
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'],
|
||||
overrides: [{
|
||||
files: ['*.ts', '*.tsx', "*.vue"],
|
||||
}],
|
||||
plugins: [
|
||||
"@typescript-eslint",
|
||||
|
||||
],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
'plugin:vue/essential',
|
||||
'@vue/typescript',
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
"vue/no-multiple-template-root": "off",
|
||||
"vue/no-v-for-template-key": "off",
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
ignorePatterns: ['*.test.ts', '.eslintrc.js', 'webpack.config.js', '*.js'],
|
||||
overrides: [{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
}],
|
||||
plugins: [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
}
|
||||
}
|
||||
+13
@@ -33,9 +33,17 @@ d_pic/*.png
|
||||
d_pic/*.webp
|
||||
d_pic/uploaded_image
|
||||
|
||||
*/dist_misc/*
|
||||
*/dist_js/*
|
||||
*/dist_css/*
|
||||
/dist_misc/*
|
||||
/dist_js/*
|
||||
/dist_css/*
|
||||
|
||||
d_setting/*.php
|
||||
*/d_setting/*.php
|
||||
*/d_setting/templates/*.php
|
||||
!*.orig.php
|
||||
|
||||
*/data/file_cache
|
||||
|
||||
@@ -52,3 +60,8 @@ test.php
|
||||
phpinfo.php
|
||||
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||
*.sqlite3
|
||||
|
||||
ingame/js/*
|
||||
ingame/css/*
|
||||
gateway/js/*
|
||||
gateway/css/*
|
||||
|
||||
+46
-29
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
return [
|
||||
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
|
||||
// `'7.4'`, `null`.
|
||||
// `'7.4'`, `'8.0'`, `'8.1'`, `null`.
|
||||
// If this is set to `null`,
|
||||
// then Phan assumes the PHP version which is closest to the minor version
|
||||
// of the php executable used to execute Phan.
|
||||
@@ -15,20 +15,34 @@ return [
|
||||
// Note that the **only** effect of choosing `'5.6'` is to infer
|
||||
// that functions removed in php 7.0 exist.
|
||||
// (See `backward_compatibility_checks` for additional options)
|
||||
"target_php_version" => '7.3',
|
||||
'backward_compatibility_checks ' => false,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_NORMAL,
|
||||
"target_php_version" => '8.0',
|
||||
'backward_compatibility_checks ' => true,
|
||||
'minimum_severity' => \Phan\Issue::SEVERITY_NORMAL,
|
||||
|
||||
'file_list' => [
|
||||
'f_config/config.php',
|
||||
'hwe/_119_b.php',
|
||||
'hwe/_119.php',
|
||||
'hwe/a_bestGeneral.php',
|
||||
'hwe/a_emperior.php',
|
||||
'hwe/_admin1.php',
|
||||
'hwe/_admin1_submit.php',
|
||||
'hwe/_admin2.php',
|
||||
'hwe/_admin2_submit.php',
|
||||
'hwe/_admin4.php',
|
||||
'hwe/_admin4_submit.php',
|
||||
'hwe/_admin5.php',
|
||||
'hwe/_admin5_submit.php',
|
||||
'hwe/_admin7.php',
|
||||
'hwe/_admin8.php',
|
||||
'hwe/_admin_force_rehall.php',
|
||||
'hwe/a_emperior_detail.php',
|
||||
'hwe/a_emperior.php',
|
||||
'hwe/a_genList.php',
|
||||
'hwe/a_hallOfFame.php',
|
||||
'hwe/a_history.php',
|
||||
'hwe/a_kingdomList.php',
|
||||
'hwe/a_npcList.php',
|
||||
'hwe/api.php',
|
||||
'hwe/a_status.php',
|
||||
'hwe/a_traffic.php',
|
||||
'hwe/a_vote.php',
|
||||
@@ -53,7 +67,6 @@ return [
|
||||
'hwe/c_dipcenter.php',
|
||||
'hwe/c_tournament.php',
|
||||
'hwe/c_vote.php',
|
||||
'hwe/func.php',
|
||||
'hwe/func_auction.php',
|
||||
'hwe/func_command.php',
|
||||
'hwe/func_converter.php',
|
||||
@@ -62,16 +75,15 @@ return [
|
||||
'hwe/func_legacy.php',
|
||||
'hwe/func_map.php',
|
||||
'hwe/func_message.php',
|
||||
'hwe/func.php',
|
||||
'hwe/func_process.php',
|
||||
'hwe/func_string.php',
|
||||
'hwe/func_template.php',
|
||||
'hwe/func_time_event.php',
|
||||
'hwe/func_tournament.php',
|
||||
'hwe/index.php',
|
||||
'hwe/install.php',
|
||||
'hwe/install_db.php',
|
||||
'hwe/join.php',
|
||||
'hwe/join_post.php',
|
||||
'hwe/install.php',
|
||||
'hwe/j_adjust_icon.php',
|
||||
'hwe/j_autoreset.php',
|
||||
'hwe/j_basic_info.php',
|
||||
@@ -86,20 +98,25 @@ return [
|
||||
'hwe/j_diplomacy_respond_letter.php',
|
||||
'hwe/j_diplomacy_rollback_letter.php',
|
||||
'hwe/j_diplomacy_send_letter.php',
|
||||
'hwe/j_export_simulator_object.php',
|
||||
'hwe/j_general_log_old.php',
|
||||
'hwe/j_general_set_permission.php',
|
||||
'hwe/j_general_turn.php',
|
||||
'hwe/j_get_basic_general_list.php',
|
||||
'hwe/j_getChiefTurn.php',
|
||||
'hwe/j_get_city_list.php',
|
||||
'hwe/j_get_general_list.php',
|
||||
'hwe/j_get_nation_general_list.php',
|
||||
'hwe/j_get_reserved_command.php',
|
||||
'hwe/j_get_select_npc_token.php',
|
||||
'hwe/j_get_select_pool.php',
|
||||
'hwe/j_image_upload.php',
|
||||
'hwe/j_install.php',
|
||||
'hwe/j_install_db.php',
|
||||
'hwe/j_install.php',
|
||||
'hwe/j_load_scenarios.php',
|
||||
'hwe/j_map.php',
|
||||
'hwe/j_map_history.php',
|
||||
'hwe/j_map.php',
|
||||
'hwe/j_map_recent.php',
|
||||
'hwe/j_msg_contact_list.php',
|
||||
'hwe/j_msg_decide_opt.php',
|
||||
'hwe/j_msg_delete.php',
|
||||
@@ -107,31 +124,30 @@ return [
|
||||
'hwe/j_msg_get_recent.php',
|
||||
'hwe/j_msg_submit.php',
|
||||
'hwe/j_myBossInfo.php',
|
||||
'hwe/j_raise_event.php',
|
||||
'hwe/j_select_npc.php',
|
||||
'hwe/j_select_picked_general.php',
|
||||
'hwe/j_server_basic_info.php',
|
||||
'hwe/j_set_chief_command.php',
|
||||
'hwe/j_set_general_command.php',
|
||||
'hwe/j_set_my_setting.php',
|
||||
'hwe/j_set_npc_control.php',
|
||||
'hwe/j_simulate_battle.php',
|
||||
'hwe/j_troop.php',
|
||||
'hwe/j_update_picked_general.php',
|
||||
'hwe/j_vacation.php',
|
||||
'hwe/lib.php',
|
||||
'hwe/process_war.php',
|
||||
'hwe/proc.php',
|
||||
'hwe/readme.php',
|
||||
'hwe/recent_map.php',
|
||||
'hwe/select_general_from_pool.php',
|
||||
'hwe/select_npc.php',
|
||||
'hwe/t_board.php',
|
||||
'hwe/t_diplomacy.php',
|
||||
'hwe/_119.php',
|
||||
'hwe/_119_b.php',
|
||||
'hwe/_admin1.php',
|
||||
'hwe/_admin1_submit.php',
|
||||
'hwe/_admin2.php',
|
||||
'hwe/_admin2_submit.php',
|
||||
'hwe/_admin4.php',
|
||||
'hwe/_admin4_submit.php',
|
||||
'hwe/_admin5.php',
|
||||
'hwe/_admin5_submit.php',
|
||||
'hwe/_admin7.php',
|
||||
'hwe/_admin8.php',
|
||||
'hwe/_admin_force_rehall.php',
|
||||
'hwe/v_board.php',
|
||||
'hwe/v_inheritPoint.php',
|
||||
'hwe/v_join.php',
|
||||
'hwe/v_NPCControl.php',
|
||||
],
|
||||
|
||||
// A list of directories that should be parsed for class and
|
||||
@@ -142,9 +158,9 @@ return [
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
'hwe/d_setting',
|
||||
'hwe/sammo',
|
||||
'd_setting',
|
||||
'hwe/d_setting',
|
||||
'hwe/sammo',
|
||||
'd_setting',
|
||||
'src/sammo',
|
||||
'src/kakao',
|
||||
'vendor'
|
||||
@@ -168,6 +184,7 @@ return [
|
||||
|
||||
'suppress_issue_types' => [
|
||||
'PhanUnreferencedUseNormal',
|
||||
'PhanTypeArraySuspiciousNullable',
|
||||
],
|
||||
|
||||
// A list of plugin files to execute.
|
||||
@@ -184,4 +201,4 @@ return [
|
||||
'PregRegexCheckerPlugin',
|
||||
'PrintfCheckerPlugin',
|
||||
],
|
||||
];
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>닫혀 있습니다.</title>
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
window.location = window.location+'/../';
|
||||
window.location.href = '../';
|
||||
}, 5000);
|
||||
</script>
|
||||
<style>
|
||||
@@ -13,7 +13,7 @@
|
||||
background-color:black;
|
||||
color:yellow;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2020 Hide_D, 62che
|
||||
Copyright (c) 2021 Hide_D, 62che
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -5,22 +5,24 @@
|
||||
|
||||
## 요구사항
|
||||
|
||||
* Apache2
|
||||
* <code>mpm_event</code> 권장
|
||||
* PHP 7.3 이상
|
||||
* <code>php-fpm</code> 권장
|
||||
* Apache2 또는 nginx
|
||||
* Apache2인 경우 `mpm_event` 권장
|
||||
* PHP 8.0 이상
|
||||
* `php-fpm` 권장
|
||||
* php에서 curl, pdo-sqlite을 실행가능해야 합니다.
|
||||
* mysqli, mysqlnd
|
||||
* gd
|
||||
* mbstring
|
||||
* NodeJS 14 이상
|
||||
* 내부의 git을 통해 upgrade 때 `webpack build` 용도로 필요합니다.
|
||||
* MariaDB 10.2.1 이상
|
||||
* 현재 MySQL은 지원하지 않습니다.
|
||||
* <code>git</code>
|
||||
* <code>curl</code>
|
||||
* `git`
|
||||
* `curl`
|
||||
|
||||
Linux는 Ubuntu 18.04, 20.04, Windows는 Windows 10에서 XAMPP, WSL2를 사용한 환경에서 테스트되었습니다.
|
||||
Linux는 Ubuntu 18.04, 20.04, Windows는 WSL2를 사용한 환경에서 테스트되었습니다.
|
||||
|
||||
Docker를 이용한 설치는 테스트버전만 제공됩니다.
|
||||
Docker를 이용한 설치도 제공하고 있습니다.
|
||||
|
||||
## Docker를 이용한 설치
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
require(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
if (!class_exists('\\sammo\\RootDB')) {
|
||||
Json::dieWithReason('No DB');
|
||||
}
|
||||
|
||||
APIHelper::launch(dirname(__FILE__));
|
||||
+5
-4
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
"php": "8.0"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
@@ -16,7 +16,6 @@
|
||||
"sergeytsalkov/meekrodb": "^2.3",
|
||||
"league/plates": "^3.3",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"scssphp/scssphp": "^1.0",
|
||||
"monolog/monolog": "^1.23",
|
||||
"firephp/firephp-core": "^0.4.0",
|
||||
"vlucas/valitron": "^1.4",
|
||||
@@ -28,7 +27,9 @@
|
||||
"catfan/medoo": "^1.5",
|
||||
"phan/phan": "*",
|
||||
"erusev/parsedown-extra": "^0.8.1",
|
||||
"nette/caching": "^3.0"
|
||||
"nette/caching": "^3.0",
|
||||
"illuminate/database": "^8.61",
|
||||
"illuminate/events": "^8.61"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -49,5 +50,5 @@
|
||||
"f_config/config.php"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Generated
+1133
-162
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "2aeb036fc53a6fdc343bd2707d4697ee",
|
||||
"content-hash": "94cfbcb22b9f475e421ad5009391006f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brandonwamboldt/utilphp",
|
||||
@@ -122,16 +122,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.2.5",
|
||||
"version": "3.2.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
|
||||
"reference": "83e511e247de329283478496f7a1e114c9517506"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
|
||||
"reference": "83e511e247de329283478496f7a1e114c9517506",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -183,7 +183,7 @@
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.2.5"
|
||||
"source": "https://github.com/composer/semver/tree/3.2.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -199,7 +199,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-24T12:41:47+00:00"
|
||||
"time": "2021-10-25T11:34:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
@@ -265,6 +265,97 @@
|
||||
],
|
||||
"time": "2021-07-31T17:03:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/inflector",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/inflector.git",
|
||||
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
|
||||
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^8.2",
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"phpstan/phpstan-phpunit": "^0.12",
|
||||
"phpstan/phpstan-strict-rules": "^0.12",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
|
||||
"vimeo/psalm": "^4.10"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Inflector\\": "lib/Doctrine/Inflector"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.",
|
||||
"homepage": "https://www.doctrine-project.org/projects/inflector.html",
|
||||
"keywords": [
|
||||
"inflection",
|
||||
"inflector",
|
||||
"lowercase",
|
||||
"manipulation",
|
||||
"php",
|
||||
"plural",
|
||||
"singular",
|
||||
"strings",
|
||||
"uppercase",
|
||||
"words"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/inflector/issues",
|
||||
"source": "https://github.com/doctrine/inflector/tree/2.0.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpdoctrine",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-22T20:16:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.7.4",
|
||||
@@ -579,16 +670,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -600,7 +691,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -616,10 +707,25 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
@@ -628,22 +734,36 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
||||
"source": "https://github.com/guzzle/promises/tree/1.5.1"
|
||||
},
|
||||
"time": "2021-03-07T09:25:29+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-22T20:56:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -680,13 +800,34 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
@@ -703,9 +844,514 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
|
||||
},
|
||||
"time": "2021-04-26T09:17:50+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-05T13:56:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/bus",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/bus.git",
|
||||
"reference": "be400399687b97d5558a224e970060fd5d5f2735"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/bus/zipball/be400399687b97d5558a224e970060fd5d5f2735",
|
||||
"reference": "be400399687b97d5558a224e970060fd5d5f2735",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/collections": "^8.0",
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/pipeline": "^8.0",
|
||||
"illuminate/support": "^8.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/queue": "Required to use closures when chaining jobs (^7.0)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Bus\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Bus package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-10-21T19:19:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/collections",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/collections.git",
|
||||
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/collections/zipball/05f286ec5fd2dd286e8384577047efc375c8954c",
|
||||
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/macroable": "^8.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/var-dumper": "Required to use the dump method (^5.1.4)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Support\\": ""
|
||||
},
|
||||
"files": [
|
||||
"helpers.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Collections package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-10-22T18:01:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/container",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/container.git",
|
||||
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/container/zipball/ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
|
||||
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^8.0",
|
||||
"php": "^7.3|^8.0",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/container-implementation": "1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Container\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Container package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-09-15T14:32:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
|
||||
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"psr/container": "^1.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Contracts\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Contracts package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-10-22T18:01:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/database",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/database.git",
|
||||
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/database/zipball/43c7ffb6299ae55b000b286cf1278afd268ef29f",
|
||||
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"illuminate/collections": "^8.0",
|
||||
"illuminate/container": "^8.0",
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/macroable": "^8.0",
|
||||
"illuminate/support": "^8.0",
|
||||
"php": "^7.3|^8.0",
|
||||
"symfony/console": "^5.1.4"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).",
|
||||
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
|
||||
"illuminate/console": "Required to use the database commands (^8.0).",
|
||||
"illuminate/events": "Required to use the observers with Eloquent (^8.0).",
|
||||
"illuminate/filesystem": "Required to use the migrations (^8.0).",
|
||||
"illuminate/pagination": "Required to paginate the result set (^8.0).",
|
||||
"symfony/finder": "Required to use Eloquent model factories (^5.1.4)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Database\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Database package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"keywords": [
|
||||
"database",
|
||||
"laravel",
|
||||
"orm",
|
||||
"sql"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-10-29T19:46:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/events",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/events.git",
|
||||
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/events/zipball/b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
|
||||
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/bus": "^8.0",
|
||||
"illuminate/collections": "^8.0",
|
||||
"illuminate/container": "^8.0",
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/macroable": "^8.0",
|
||||
"illuminate/support": "^8.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Events\\": ""
|
||||
},
|
||||
"files": [
|
||||
"functions.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Events package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-09-15T14:32:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/macroable",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/macroable.git",
|
||||
"reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05",
|
||||
"reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Support\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Macroable package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2020-10-27T15:20:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/pipeline",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/pipeline.git",
|
||||
"reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/pipeline/zipball/23aeff5b26ae4aee3f370835c76bd0f4e93f71d2",
|
||||
"reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/support": "^8.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Pipeline\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Pipeline package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-03-26T18:39:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/support",
|
||||
"version": "v8.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/support.git",
|
||||
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/support/zipball/a8851b7001530d3c11626a81449ed9b63dd10db7",
|
||||
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/inflector": "^1.4|^2.0",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"illuminate/collections": "^8.0",
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/macroable": "^8.0",
|
||||
"nesbot/carbon": "^2.53.1",
|
||||
"php": "^7.3|^8.0",
|
||||
"voku/portable-ascii": "^1.4.8"
|
||||
},
|
||||
"conflict": {
|
||||
"tightenco/collect": "<5.5.33"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/filesystem": "Required to use the composer class (^8.0).",
|
||||
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).",
|
||||
"ramsey/uuid": "Required to use Str::uuid() (^4.2.2).",
|
||||
"symfony/process": "Required to use the composer class (^5.1.4).",
|
||||
"symfony/var-dumper": "Required to use the dd function (^5.1.4).",
|
||||
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Support\\": ""
|
||||
},
|
||||
"files": [
|
||||
"helpers.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Support package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-10-29T13:34:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
@@ -902,6 +1548,101 @@
|
||||
],
|
||||
"time": "2021-05-28T08:32:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.54.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/eed83939f1aed3eee517d03a33f5ec587ac529b5",
|
||||
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.1.8 || ^8.0",
|
||||
"symfony/polyfill-mbstring": "^1.0",
|
||||
"symfony/polyfill-php80": "^1.16",
|
||||
"symfony/translation": "^3.4 || ^4.0 || ^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "^2.0 || ^3.0",
|
||||
"doctrine/orm": "^2.7",
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"kylekatarnls/multi-tester": "^2.0",
|
||||
"phpmd/phpmd": "^2.9",
|
||||
"phpstan/extension-installer": "^1.0",
|
||||
"phpstan/phpstan": "^0.12.54",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.14",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"bin": [
|
||||
"bin/carbon"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-3.x": "3.x-dev",
|
||||
"dev-master": "2.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Carbon\\Laravel\\ServiceProvider"
|
||||
]
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Carbon\\": "src/Carbon/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Brian Nesbitt",
|
||||
"email": "brian@nesbot.com",
|
||||
"homepage": "https://markido.com"
|
||||
},
|
||||
{
|
||||
"name": "kylekatarnls",
|
||||
"homepage": "https://github.com/kylekatarnls"
|
||||
}
|
||||
],
|
||||
"description": "An API extension for DateTime that supports 281 different languages.",
|
||||
"homepage": "https://carbon.nesbot.com",
|
||||
"keywords": [
|
||||
"date",
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/briannesbitt/Carbon/issues",
|
||||
"source": "https://github.com/briannesbitt/Carbon"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/Carbon",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-01T21:22:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "netresearch/jsonmapper",
|
||||
"version": "v4.0.0",
|
||||
@@ -1093,20 +1834,20 @@
|
||||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v3.2.2",
|
||||
"version": "v3.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
|
||||
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e",
|
||||
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2 <8.1"
|
||||
"php": ">=7.2 <8.2"
|
||||
},
|
||||
"conflict": {
|
||||
"nette/di": "<3.0.6"
|
||||
@@ -1172,9 +1913,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v3.2.2"
|
||||
"source": "https://github.com/nette/utils/tree/v3.2.5"
|
||||
},
|
||||
"time": "2021-03-03T22:53:25+00:00"
|
||||
"time": "2021-09-20T10:50:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pguardiario/phpuri",
|
||||
@@ -1206,16 +1947,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phan/phan",
|
||||
"version": "5.0.0",
|
||||
"version": "5.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phan/phan.git",
|
||||
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
|
||||
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||
"url": "https://api.github.com/repos/phan/phan/zipball/d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
|
||||
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1232,7 +1973,7 @@
|
||||
"symfony/console": "^3.2|^4.0|^5.0",
|
||||
"symfony/polyfill-mbstring": "^1.11.0",
|
||||
"symfony/polyfill-php80": "^1.20.0",
|
||||
"tysonandre/var_representation_polyfill": "^0.0.2"
|
||||
"tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.0"
|
||||
@@ -1279,9 +2020,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phan/phan/issues",
|
||||
"source": "https://github.com/phan/phan/tree/5.0.0"
|
||||
"source": "https://github.com/phan/phan/tree/5.2.1"
|
||||
},
|
||||
"time": "2021-08-01T18:17:28+00:00"
|
||||
"time": "2021-09-15T00:08:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-extended/php-system",
|
||||
@@ -1430,16 +2171,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "5.2.2",
|
||||
"version": "5.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
|
||||
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
|
||||
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1450,7 +2191,8 @@
|
||||
"webmozart/assert": "^1.9.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~1.3.2"
|
||||
"mockery/mockery": "~1.3.2",
|
||||
"psalm/phar": "^4.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -1480,22 +2222,22 @@
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
|
||||
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
|
||||
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
|
||||
},
|
||||
"time": "2020-09-03T19:13:55+00:00"
|
||||
"time": "2021-10-19T17:43:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
|
||||
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
|
||||
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1503,7 +2245,8 @@
|
||||
"phpdocumentor/reflection-common": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-tokenizer": "*"
|
||||
"ext-tokenizer": "*",
|
||||
"psalm/phar": "^4.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -1529,26 +2272,26 @@
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
|
||||
},
|
||||
"time": "2020-09-17T18:55:26+00:00"
|
||||
"time": "2021-10-02T14:08:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
"php": ">=7.4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -1577,9 +2320,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
||||
},
|
||||
"time": "2021-03-05T17:36:06+00:00"
|
||||
"time": "2021-11-05T16:50:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
@@ -1684,6 +2427,57 @@
|
||||
},
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/simple-cache",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/simple-cache.git",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\SimpleCache\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for simple caching",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching",
|
||||
"psr",
|
||||
"psr-16",
|
||||
"simple-cache"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/simple-cache/tree/master"
|
||||
},
|
||||
"time": "2017-10-23T01:57:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
@@ -1730,23 +2524,23 @@
|
||||
},
|
||||
{
|
||||
"name": "sabre/event",
|
||||
"version": "5.1.2",
|
||||
"version": "5.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sabre-io/event.git",
|
||||
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
|
||||
"reference": "d7da22897125d34d7eddf7977758191c06a74497"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
|
||||
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
|
||||
"url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
|
||||
"reference": "d7da22897125d34d7eddf7977758191c06a74497",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2.16.1",
|
||||
"friendsofphp/php-cs-fixer": "~2.17.1",
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
||||
},
|
||||
@@ -1792,80 +2586,7 @@
|
||||
"issues": "https://github.com/sabre-io/event/issues",
|
||||
"source": "https://github.com/fruux/sabre-event"
|
||||
},
|
||||
"time": "2020-10-03T11:02:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "scssphp/scssphp",
|
||||
"version": "v1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4",
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4",
|
||||
"sass/sass-spec": "*",
|
||||
"squizlabs/php_codesniffer": "~3.5",
|
||||
"symfony/phpunit-bridge": "^5.1",
|
||||
"twbs/bootstrap": "~5.0",
|
||||
"twbs/bootstrap4": "4.6.0",
|
||||
"zurb/foundation": "~6.5"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
|
||||
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ScssPhp\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anthon Pang",
|
||||
"email": "apang@softwaredevelopment.ca",
|
||||
"homepage": "https://github.com/robocoder"
|
||||
},
|
||||
{
|
||||
"name": "Cédric Morin",
|
||||
"email": "cedric@yterium.com",
|
||||
"homepage": "https://github.com/Cerdic"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://scssphp.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/scssphp/scssphp/issues",
|
||||
"source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
|
||||
},
|
||||
"time": "2021-07-02T16:28:10+00:00"
|
||||
"time": "2021-11-04T06:51:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sergeytsalkov/meekrodb",
|
||||
@@ -1917,16 +2638,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v5.3.6",
|
||||
"version": "v5.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
|
||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1996,7 +2717,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.6"
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2012,7 +2733,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-27T19:10:22+00:00"
|
||||
"time": "2021-10-26T09:30:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
@@ -2083,16 +2804,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.4.27",
|
||||
"version": "v4.4.33",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
|
||||
"reference": "567d29b1bc6e3937652054dafc069151d17824a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
|
||||
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/567d29b1bc6e3937652054dafc069151d17824a9",
|
||||
"reference": "567d29b1bc6e3937652054dafc069151d17824a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2141,7 +2862,7 @@
|
||||
"semaphore"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/lock/tree/v4.4.27"
|
||||
"source": "https://github.com/symfony/lock/tree/v4.4.33"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2157,7 +2878,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-23T15:41:52+00:00"
|
||||
"time": "2021-10-05T20:27:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@@ -2889,16 +3610,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/string",
|
||||
"version": "v5.3.3",
|
||||
"version": "v5.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/string.git",
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
|
||||
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
|
||||
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2952,7 +3673,7 @@
|
||||
"utf8"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/string/tree/v5.3.3"
|
||||
"source": "https://github.com/symfony/string/tree/v5.3.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2968,20 +3689,193 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-27T11:44:38+00:00"
|
||||
"time": "2021-10-27T18:21:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tysonandre/var_representation_polyfill",
|
||||
"version": "0.0.2",
|
||||
"name": "symfony/translation",
|
||||
"version": "v5.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
|
||||
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa",
|
||||
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php80": "^1.16",
|
||||
"symfony/translation-contracts": "^2.3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/config": "<4.4",
|
||||
"symfony/dependency-injection": "<5.0",
|
||||
"symfony/http-kernel": "<5.0",
|
||||
"symfony/twig-bundle": "<5.0",
|
||||
"symfony/yaml": "<4.4"
|
||||
},
|
||||
"provide": {
|
||||
"symfony/translation-implementation": "2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/config": "^4.4|^5.0",
|
||||
"symfony/console": "^4.4|^5.0",
|
||||
"symfony/dependency-injection": "^5.0",
|
||||
"symfony/finder": "^4.4|^5.0",
|
||||
"symfony/http-kernel": "^5.0",
|
||||
"symfony/intl": "^4.4|^5.0",
|
||||
"symfony/polyfill-intl-icu": "^1.21",
|
||||
"symfony/service-contracts": "^1.1.2|^2",
|
||||
"symfony/yaml": "^4.4|^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log-implementation": "To use logging capability in translator",
|
||||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"Resources/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Translation\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v5.3.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-10T06:43:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation-contracts.git",
|
||||
"reference": "95c812666f3e91db75385749fe219c5e494c7f95"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95",
|
||||
"reference": "95c812666f3e91db75385749fe219c5e494c7f95",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/translation-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Contracts\\Translation\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Generic abstractions related to translation",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"abstractions",
|
||||
"contracts",
|
||||
"decoupling",
|
||||
"interfaces",
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation-contracts/tree/v2.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-23T23:28:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tysonandre/var_representation_polyfill",
|
||||
"version": "0.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
|
||||
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a",
|
||||
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2992,6 +3886,9 @@
|
||||
"phan/phan": "^4.0",
|
||||
"phpunit/phpunit": "^8.5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-var_representation": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -3010,16 +3907,16 @@
|
||||
"name": "Tyson Andre"
|
||||
}
|
||||
],
|
||||
"description": "Polyfill for var_representation",
|
||||
"description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export",
|
||||
"keywords": [
|
||||
"var_export",
|
||||
"var_representation"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues",
|
||||
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.0.2"
|
||||
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.1"
|
||||
},
|
||||
"time": "2021-06-26T18:55:02+00:00"
|
||||
"time": "2021-08-16T00:12:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
@@ -3080,6 +3977,80 @@
|
||||
],
|
||||
"time": "2021-07-08T16:18:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "voku/portable-ascii",
|
||||
"version": "1.5.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/voku/portable-ascii.git",
|
||||
"reference": "80953678b19901e5165c56752d087fc11526017c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c",
|
||||
"reference": "80953678b19901e5165c56752d087fc11526017c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.0 || ~7.0 || ~9.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Use Intl for transliterator_transliterate() support"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"voku\\": "src/voku/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Lars Moelleken",
|
||||
"homepage": "http://www.moelleken.org/"
|
||||
}
|
||||
],
|
||||
"description": "Portable ASCII library - performance optimized (ascii) string functions for php.",
|
||||
"homepage": "https://github.com/voku/portable-ascii",
|
||||
"keywords": [
|
||||
"ascii",
|
||||
"clean",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/voku/portable-ascii/issues",
|
||||
"source": "https://github.com/voku/portable-ascii/tree/1.5.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.me/moelleken",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/voku",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/portable-ascii",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/voku",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-12T00:07:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.10.0",
|
||||
@@ -3203,7 +4174,7 @@
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
"php": "8.0"
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
||||
+70
-1
@@ -128,5 +128,74 @@ input::-webkit-input-placeholder {
|
||||
}
|
||||
|
||||
#running_map {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
|
||||
#map-subframe {
|
||||
display: none;
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
@media only screen and (min-width : 360px) {
|
||||
#map-subframe {
|
||||
display: block;
|
||||
transform: scale(calc(330 / 700));
|
||||
transform-origin: 350px 0px;
|
||||
margin-bottom: -400px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width : 440px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(410 / 700));
|
||||
margin-bottom: -300px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width : 480px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(450 / 700));
|
||||
margin-bottom: -250px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width : 520px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(490 / 700));
|
||||
margin-bottom: -200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width : 576px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(546 / 700));
|
||||
margin-bottom: -150px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width : 640px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(600/700));
|
||||
margin-bottom: -100px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width : 700px) {
|
||||
#map-subframe {
|
||||
transform: scale(calc(670 / 700));
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width : 730px) {
|
||||
#map-subframe {
|
||||
transform: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
+41
-16
@@ -15,35 +15,35 @@ ini_set("session.gc_maxlifetime", '604800'); // seconds
|
||||
function getFriendlyErrorType($type)
|
||||
{
|
||||
switch ($type) {
|
||||
case E_ERROR: // 1 //
|
||||
case E_ERROR: // 1 //
|
||||
return 'E_ERROR';
|
||||
case E_WARNING: // 2 //
|
||||
case E_WARNING: // 2 //
|
||||
return 'E_WARNING';
|
||||
case E_PARSE: // 4 //
|
||||
case E_PARSE: // 4 //
|
||||
return 'E_PARSE';
|
||||
case E_NOTICE: // 8 //
|
||||
case E_NOTICE: // 8 //
|
||||
return 'E_NOTICE';
|
||||
case E_CORE_ERROR: // 16 //
|
||||
case E_CORE_ERROR: // 16 //
|
||||
return 'E_CORE_ERROR';
|
||||
case E_CORE_WARNING: // 32 //
|
||||
case E_CORE_WARNING: // 32 //
|
||||
return 'E_CORE_WARNING';
|
||||
case E_COMPILE_ERROR: // 64 //
|
||||
case E_COMPILE_ERROR: // 64 //
|
||||
return 'E_COMPILE_ERROR';
|
||||
case E_COMPILE_WARNING: // 128 //
|
||||
case E_COMPILE_WARNING: // 128 //
|
||||
return 'E_COMPILE_WARNING';
|
||||
case E_USER_ERROR: // 256 //
|
||||
case E_USER_ERROR: // 256 //
|
||||
return 'E_USER_ERROR';
|
||||
case E_USER_WARNING: // 512 //
|
||||
case E_USER_WARNING: // 512 //
|
||||
return 'E_USER_WARNING';
|
||||
case E_USER_NOTICE: // 1024 //
|
||||
case E_USER_NOTICE: // 1024 //
|
||||
return 'E_USER_NOTICE';
|
||||
case E_STRICT: // 2048 //
|
||||
case E_STRICT: // 2048 //
|
||||
return 'E_STRICT';
|
||||
case E_RECOVERABLE_ERROR: // 4096 //
|
||||
case E_RECOVERABLE_ERROR: // 4096 //
|
||||
return 'E_RECOVERABLE_ERROR';
|
||||
case E_DEPRECATED: // 8192 //
|
||||
case E_DEPRECATED: // 8192 //
|
||||
return 'E_DEPRECATED';
|
||||
case E_USER_DEPRECATED: // 16384 //
|
||||
case E_USER_DEPRECATED: // 16384 //
|
||||
return 'E_USER_DEPRECATED';
|
||||
}
|
||||
return "{$type}";
|
||||
@@ -134,7 +134,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
|
||||
getExceptionTraceAsString($e)
|
||||
);
|
||||
}
|
||||
set_error_handler("\sammo\logErrorByCustomHandler");
|
||||
set_error_handler("\\sammo\\logErrorByCustomHandler");
|
||||
|
||||
|
||||
function logExceptionByCustomHandler(\Throwable $e)
|
||||
@@ -151,3 +151,28 @@ function logExceptionByCustomHandler(\Throwable $e)
|
||||
throw $e;
|
||||
}
|
||||
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
||||
|
||||
function getAPIExecutorClass($path){
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\API\\';
|
||||
if(is_string($path)){
|
||||
}
|
||||
else if(is_array($path)){
|
||||
$path = join('\\', $path);
|
||||
}
|
||||
else{
|
||||
throw new \InvalidArgumentException("{$path}는 올바른 API 지시자가 아님");
|
||||
}
|
||||
|
||||
$classPath = str_replace('/', '\\', $basePath.$path);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
return $classPath;
|
||||
}
|
||||
throw new \InvalidArgumentException("{$path}는 올바른 API 경로가 아님");
|
||||
}
|
||||
|
||||
function buildAPIExecutorClass($type, string $rootPath, array $args):\sammo\BaseAPI{
|
||||
$class = getAPIExecutorClass($type);
|
||||
return new $class($rootPath, $args);
|
||||
}
|
||||
+22
-25
@@ -11,12 +11,9 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>설치</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||
<?=WebUtil::printJS('../js/common.js')?>
|
||||
<?=WebUtil::printJS('../js/install.js')?>
|
||||
<?=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')?>
|
||||
</head>
|
||||
@@ -29,13 +26,13 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<div class="card" id="db_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
</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"
|
||||
<input type="text" class="form-control" name="db_host" id="db_host"
|
||||
placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,11 +40,11 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<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">
|
||||
@@ -55,11 +52,11 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
</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"
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw"
|
||||
placeholder="DB비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,7 +64,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="db_name" id="db_name"
|
||||
placeholder="DB명(예:sammo)"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,7 +72,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="serv_host" id="serv_host"
|
||||
placeholder="접속경로(예:http://www.example.com)"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,7 +80,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
|
||||
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/icons" />
|
||||
</div>
|
||||
@@ -92,7 +89,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
|
||||
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/game" />
|
||||
</div>
|
||||
@@ -101,7 +98,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
|
||||
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
|
||||
value="" />
|
||||
<div class="input-group-append">
|
||||
@@ -115,7 +112,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
|
||||
placeholder="카카오톡 API의 Rest Key"
|
||||
value="" />
|
||||
</div>
|
||||
@@ -124,7 +121,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
|
||||
placeholder="카카오톡 API의 Admin Key"
|
||||
value="" />
|
||||
</div>
|
||||
@@ -133,7 +130,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
<button type="submit"
|
||||
<button type="submit"
|
||||
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +141,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<div class="card" id="admin_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(관리자 생성)
|
||||
</h3>
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="admin_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
@@ -155,11 +152,11 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
</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"
|
||||
<input type="password" class="form-control" name="password" id="password"
|
||||
placeholder="비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -167,7 +164,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
|
||||
placeholder="비밀번호 확인"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -175,7 +172,7 @@ require(__DIR__.'/../vendor/autoload.php');
|
||||
<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"
|
||||
<input type="text" class="form-control" name="nickname" id="nickname"
|
||||
placeholder="닉네임" value="운영자"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ CREATE TABLE `member_log` (
|
||||
INDEX `action` (`member_no`, `action_type`, `date`),
|
||||
INDEX `member` (`member_no`, `date`)
|
||||
)
|
||||
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
###################
|
||||
# KV storage
|
||||
@@ -72,4 +72,19 @@ CREATE TABLE if not exists `storage` (
|
||||
UNIQUE INDEX `key` (`namespace`, `key`)
|
||||
)
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=MyISAM
|
||||
ENGINE=Aria;
|
||||
|
||||
CREATE TABLE `login_token` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` INT(11) NOT NULL,
|
||||
`base_token` VARCHAR(20) NOT NULL COLLATE 'utf8mb4_general_ci',
|
||||
`reg_ip` VARCHAR(40) NOT NULL COLLATE 'utf8mb4_general_ci',
|
||||
`reg_date` DATETIME NOT NULL,
|
||||
`expire_date` DATETIME NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `by_token` (`base_token`),
|
||||
INDEX `by_date` (`user_id`, `expire_date`)
|
||||
)
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=Aria
|
||||
;
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace kakao;
|
||||
|
||||
// @suppress PhanRedefineClass
|
||||
class KakaoKey{
|
||||
const REST_KEY = '_tK_REST_API_KEY_';
|
||||
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
|
||||
namespace sammo;
|
||||
|
||||
//https://hub.packtpub.com/eloquent-without-laravel/
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
use Illuminate\Container\Container;
|
||||
|
||||
class RootDB
|
||||
{
|
||||
private static $uDB = null;
|
||||
private static ?Capsule $uIlluminate = null;
|
||||
|
||||
private static $host = '_tK_host_';
|
||||
private static $user = '_tK_user_';
|
||||
@@ -12,6 +18,8 @@ class RootDB
|
||||
private static $dbName = '_tK_dbName_';
|
||||
private static $port = _tK_port_;
|
||||
private static $encoding = 'utf8mb4';
|
||||
private static $collation = 'utf8mb4_general_ci';
|
||||
|
||||
|
||||
private static $globalSalt = '_tK_globalSalt_';
|
||||
|
||||
@@ -19,6 +27,29 @@ class RootDB
|
||||
{
|
||||
}
|
||||
|
||||
public static function illuminate(): Capsule
|
||||
{
|
||||
if(self::$uIlluminate !== null){
|
||||
return self::$uIlluminate;
|
||||
}
|
||||
$capsule = new Capsule;
|
||||
|
||||
$capsule->addConnection([
|
||||
'driver' => 'mysql',
|
||||
'host' => self::$host,
|
||||
'database' => self::$dbName,
|
||||
'username' => self::$user,
|
||||
'password' => self::$password,
|
||||
'charset' => self::$encoding,
|
||||
'collation' => self::$collation,
|
||||
], 'root');
|
||||
|
||||
$capsule->setEventDispatcher(new Dispatcher(new Container));
|
||||
$capsule->bootEloquent();
|
||||
self::$uIlluminate = $capsule;
|
||||
return $capsule;
|
||||
}
|
||||
|
||||
/**
|
||||
* DB 객체 생성
|
||||
*
|
||||
|
||||
@@ -6,38 +6,33 @@
|
||||
|
||||
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
|
||||
|
||||
/* 레거시. */
|
||||
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
||||
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
||||
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
||||
|
||||
.map_detail .map_title{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
||||
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
||||
url('_tK_gameImagePath_/rtitle.jpg') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_spring .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/spring.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_summer .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/summer.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_fall .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/fall.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_winter .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/winter.gif') no-repeat right;
|
||||
}
|
||||
|
||||
|
||||
@@ -342,6 +342,7 @@ switch ($btn) {
|
||||
}
|
||||
break;
|
||||
case "랜덤턴":
|
||||
$turnterm = $gameStor->turnterm;
|
||||
foreach ($genlist as $generalID) {
|
||||
$turntime = getRandTurn($turnterm);
|
||||
$db->update('general', [
|
||||
|
||||
+2
-2
@@ -99,7 +99,7 @@ $sel2[$type2] = "selected";
|
||||
</table>
|
||||
|
||||
<table align=center width=1600 class="tb_layout bg0">
|
||||
<tr id=bg1>
|
||||
<tr class='bg1'>
|
||||
<td align=center>국명</td>
|
||||
<td align=center>접률</td>
|
||||
<td align=center>단접</td>
|
||||
@@ -278,7 +278,7 @@ from city where nation=%i', $nation['nation']);
|
||||
</table>
|
||||
|
||||
<table align=center width=1760 class="tb_layout bg0">
|
||||
<tr id=bg1>
|
||||
<tr class='bg1'>
|
||||
<td width=30 align=center>년</td>
|
||||
<td width=30 align=center>월</td>
|
||||
<td width=50 align=center>국가수</td>
|
||||
|
||||
+9
-9
@@ -52,9 +52,9 @@ if ($reqArgType === 0) {
|
||||
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
|
||||
} else if ($reqArgType === 2) {
|
||||
$generalBasicList = $db->query(
|
||||
'SELECT no, name, nation, npc, turntime, value as %b
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
'SELECT no, name, nation, npc, turntime, value as %b
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
WHERE rank_data.type = %s',
|
||||
$reqQueryType,
|
||||
$reqQueryType
|
||||
@@ -117,10 +117,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
|
||||
</table>
|
||||
<table width=1000 align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50% align=center id=bg1>
|
||||
<td width=50% align=center class='bg1'>
|
||||
<font color=skyblue size=3>장 수 정 보</font>
|
||||
</td>
|
||||
<td width=50% align=center id=bg1>
|
||||
<td width=50% align=center class='bg1'>
|
||||
<font color=orange size=3>-</font>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -133,10 +133,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>
|
||||
<td align=center class='bg1'>
|
||||
<font color=skyblue size=3>개인 기록</font>
|
||||
</td>
|
||||
<td align=center id=bg1>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 기록</font>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -149,10 +149,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>
|
||||
<td align=center class='bg1'>
|
||||
<font color=skyblue size=3>장수 열전</font>
|
||||
</td>
|
||||
<td align=center id=bg1>
|
||||
<td align=center class='bg1'>
|
||||
<font color=orange size=3>전투 결과</font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+4
-4
@@ -49,10 +49,10 @@ $sel[$type] = "selected";
|
||||
<table width=1000 align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
||||
<tr>
|
||||
<td width=130 align=center id=bg1>국 가 명</td>
|
||||
<td width=130 align=center id=bg1>국 가 명</td>
|
||||
<td width=80 align=center id=bg1>상 태</td>
|
||||
<td width=60 align=center id=bg1>기 간</td>
|
||||
<td width=130 align=center class='bg1'>국 가 명</td>
|
||||
<td width=130 align=center class='bg1'>국 가 명</td>
|
||||
<td width=80 align=center class='bg1'>상 태</td>
|
||||
<td width=60 align=center class='bg1'>기 간</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
+16
-18
@@ -29,10 +29,9 @@ $templates = new \League\Plates\Engine(__DIR__.'/templates');
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -74,7 +73,7 @@ $types = [
|
||||
}
|
||||
$v['nationName'] = '???';
|
||||
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
$v['name'] = '???';
|
||||
$v['name'] = '???';
|
||||
$v['ownerName'] = null;
|
||||
$v['bgColor'] = GameConst::$basecolor4;
|
||||
$v['fgColor'] = newColor($v['bgColor']);
|
||||
@@ -123,9 +122,9 @@ $types = [
|
||||
$v['value'] = 0;
|
||||
}
|
||||
else{
|
||||
$v['value'] = $v['ttw']/max(1, $totalCnt);
|
||||
$v['value'] = $v['ttw']/max(1, $totalCnt);
|
||||
}
|
||||
return $v;
|
||||
return $v;
|
||||
}],
|
||||
["통 솔 전 승 률", "percent", function($v){
|
||||
$totalCnt = $v['tlw']+$v['tld']+$v['tll'];
|
||||
@@ -135,7 +134,7 @@ $types = [
|
||||
else{
|
||||
$v['value'] = $v['tlw']/max(1, $totalCnt);
|
||||
}
|
||||
return $v;
|
||||
return $v;
|
||||
}],
|
||||
["일 기 토 승 률", "percent", function($v){
|
||||
$totalCnt = $v['tsw']+$v['tsd']+$v['tsl'];
|
||||
@@ -155,7 +154,7 @@ $types = [
|
||||
else{
|
||||
$v['value'] = $v['tiw']/max(1, $totalCnt);
|
||||
}
|
||||
|
||||
|
||||
return $v;
|
||||
}],
|
||||
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
|
||||
@@ -174,17 +173,17 @@ $types = [
|
||||
|
||||
$generals = [];
|
||||
foreach($db->query(
|
||||
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
|
||||
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
|
||||
experience, dedication,
|
||||
dex1, dex2, dex3, dex4, dex5,
|
||||
horse, weapon, book, item
|
||||
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']];
|
||||
|
||||
|
||||
if(key_exists('picture', $general)){
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
@@ -265,7 +264,7 @@ foreach($generals as $general){
|
||||
else{
|
||||
$itemOwners[$itemClassName] = [$general];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +279,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
|
||||
continue;
|
||||
}
|
||||
$itemClass = buildItemClass($itemClassName);
|
||||
|
||||
|
||||
if($itemClass->isBuyable()){
|
||||
continue;
|
||||
}
|
||||
@@ -288,7 +287,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
|
||||
$info = $itemClass->getInfo();
|
||||
$name = $itemClass->getName();
|
||||
|
||||
|
||||
|
||||
if($info){
|
||||
$name = $templates->render('tooltip', [
|
||||
'text'=>$name,
|
||||
@@ -323,7 +322,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
|
||||
$itemRanker[] = $card;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$itemNameType,
|
||||
'generals'=>$itemRanker
|
||||
@@ -337,4 +336,3 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+17
-17
@@ -16,9 +16,9 @@ increaseRefresh("왕조일람", 1);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -70,9 +70,9 @@ foreach($emperiors as $emperior){
|
||||
<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>
|
||||
|
||||
|
||||
<?php if($emperior['server_id']): ?>
|
||||
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button type='button'>역사 보기</button></a>
|
||||
<?php endif ?>
|
||||
@@ -84,33 +84,33 @@ foreach($emperiors as $emperior){
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center width=80>국 력</td>
|
||||
<td class='bg1' align=center width=80>국 력</td>
|
||||
<td align=center width=170><?=$emperior['power']?></td>
|
||||
<td id=bg1 align=center width=80>장 수</td>
|
||||
<td class='bg1' align=center width=80>장 수</td>
|
||||
<td align=center width=170><?=$emperior['gennum']?></td>
|
||||
<td id=bg1 align=center width=80>속 령</td>
|
||||
<td class='bg1' align=center width=80>속 령</td>
|
||||
<td align=center width=170><?=$emperior['citynum']?></td>
|
||||
<td id=bg1 align=center width=80>성 향</td>
|
||||
<td class='bg1' align=center width=80>성 향</td>
|
||||
<td align=center width=170><?=$emperior['type']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>황 제</td>
|
||||
<td class='bg1' align=center>황 제</td>
|
||||
<td align=center><?=$emperior['l12name']?></td>
|
||||
<td id=bg1 align=center>승 상</td>
|
||||
<td class='bg1' align=center>승 상</td>
|
||||
<td align=center><?=$emperior['l11name']?></td>
|
||||
<td id=bg1 align=center>표 기 장 군</td>
|
||||
<td class='bg1' align=center>표 기 장 군</td>
|
||||
<td align=center><?=$emperior['l10name']?></td>
|
||||
<td id=bg1 align=center>사 공</td>
|
||||
<td class='bg1' align=center>사 공</td>
|
||||
<td align=center><?=$emperior['l9name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>거 기 장 군</td>
|
||||
<td class='bg1' align=center>거 기 장 군</td>
|
||||
<td align=center><?=$emperior['l8name']?></td>
|
||||
<td id=bg1 align=center>태 위</td>
|
||||
<td class='bg1' align=center>태 위</td>
|
||||
<td align=center><?=$emperior['l7name']?></td>
|
||||
<td id=bg1 align=center>위 장 군</td>
|
||||
<td class='bg1' align=center>위 장 군</td>
|
||||
<td align=center><?=$emperior['l6name']?></td>
|
||||
<td id=bg1 align=center>사 도</td>
|
||||
<td class='bg1' align=center>사 도</td>
|
||||
<td align=center><?=$emperior['l5name']?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+28
-31
@@ -26,9 +26,6 @@ $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::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
@@ -57,25 +54,25 @@ if($emperior):
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
||||
<td class='bg1' width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['nation_count']?></td>
|
||||
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
||||
<td class='bg1' width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['gen_count']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>등 장 국 가</td>
|
||||
<td class='bg1' align=center>등 장 국 가</td>
|
||||
<td colspan=5><?=$emperior['nation_name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>국가별 성향</td>
|
||||
<td class='bg1' align=center>국가별 성향</td>
|
||||
<td colspan=5><?=$emperior['nation_hist']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>장 수 성 격</td>
|
||||
<td class='bg1' align=center>장 수 성 격</td>
|
||||
<td colspan=5><?=$emperior['personal_hist']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>장 수 특 기</td>
|
||||
<td class='bg1' align=center>장 수 특 기</td>
|
||||
<td colspan=5><?=$emperior['special_hist']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -84,75 +81,75 @@ if($emperior):
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 width=98 align=center>국 력</td>
|
||||
<td class='bg1' width=98 align=center>국 력</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['power']?></td>
|
||||
<td id=bg1 width=98 align=center>성 향</td>
|
||||
<td class='bg1' width=98 align=center>성 향</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['type']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 width=98 align=center>장 수</td>
|
||||
<td class='bg1' width=98 align=center>장 수</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['gennum']?></td>
|
||||
<td id=bg1 width=98 align=center>속 령</td>
|
||||
<td class='bg1' width=98 align=center>속 령</td>
|
||||
<td align=center width=398 colspan=2><?=$emperior['citynum']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>총 인 구</td>
|
||||
<td class='bg1' align=center>총 인 구</td>
|
||||
<td align=center colspan=2><?=$emperior['pop']?></td>
|
||||
<td id=bg1 align=center>인 구 율</td>
|
||||
<td class='bg1' align=center>인 구 율</td>
|
||||
<td align=center colspan=2><?=$emperior['poprate']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>국 고</td>
|
||||
<td class='bg1' align=center>국 고</td>
|
||||
<td align=center colspan=2><?=$emperior['gold']?></td>
|
||||
<td id=bg1 align=center>병 량</td>
|
||||
<td class='bg1' align=center>병 량</td>
|
||||
<td align=center colspan=2><?=$emperior['rice']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>황 제</td>
|
||||
<td class='bg1' align=center>황 제</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l12name']?></td>
|
||||
<td id=bg1 align=center>승 상</td>
|
||||
<td class='bg1' align=center>승 상</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l11name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>위 장 군</td>
|
||||
<td class='bg1' align=center>위 장 군</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l10name']?></td>
|
||||
<td id=bg1 align=center>사 공</td>
|
||||
<td class='bg1' align=center>사 공</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l9name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>표 기 장 군</td>
|
||||
<td class='bg1' align=center>표 기 장 군</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l8name']?></td>
|
||||
<td id=bg1 align=center>태 위</td>
|
||||
<td class='bg1' align=center>태 위</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l7name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>거 기 장 군</td>
|
||||
<td class='bg1' align=center>거 기 장 군</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l6name']?></td>
|
||||
<td id=bg1 align=center>사 도</td>
|
||||
<td class='bg1' align=center>사 도</td>
|
||||
<td width=64> </td>
|
||||
<td width=332><?=$emperior['l5name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>오 호 장 군</td>
|
||||
<td class='bg1' align=center>오 호 장 군</td>
|
||||
<td colspan=5><?=$emperior['tiger']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>건 안 칠 자</td>
|
||||
<td class='bg1' align=center>건 안 칠 자</td>
|
||||
<td colspan=5><?=$emperior['eagle']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
|
||||
<td class='bg1' align=center>장 수 들<br>(공헌도 순서)</td>
|
||||
<td colspan=5><?=$emperior['gen']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>역 사 기 록</td>
|
||||
<td class='bg1' align=center>역 사 기 록</td>
|
||||
<td colspan=5><?=formatHistoryToHTML(Json::decode($emperior['history']))?></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -178,7 +175,7 @@ if($showServers){
|
||||
$nation['levelName'] = getNationLevel($nation['level']);
|
||||
/** @var int[]|null $nationGenerals */
|
||||
$nationGenerals = $nation['generals'];
|
||||
|
||||
|
||||
if($nationGenerals){
|
||||
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
|
||||
|
||||
@@ -203,7 +200,7 @@ if($showServers){
|
||||
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
|
||||
$nation += Json::decode($nation['aux']);
|
||||
}
|
||||
|
||||
|
||||
echo $templates->render('oldNation', $nation);
|
||||
}
|
||||
}
|
||||
|
||||
+20
-21
@@ -46,10 +46,9 @@ if($gameStor->isunited){
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -110,21 +109,21 @@ $generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special
|
||||
echo"
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=64 align=center id=bg1>얼 굴</td>
|
||||
<td width=140 align=center id=bg1>이 름</td>
|
||||
<td width=45 align=center id=bg1>연령</td>
|
||||
<td width=45 align=center id=bg1>성격</td>
|
||||
<td width=80 align=center id=bg1>특기</td>
|
||||
<td width=45 align=center id=bg1>레 벨</td>
|
||||
<td width=140 align=center id=bg1>국 가</td>
|
||||
<td width=55 align=center id=bg1>명 성</td>
|
||||
<td width=55 align=center id=bg1>계 급</td>
|
||||
<td width=75 align=center id=bg1>관 직</td>
|
||||
<td width=45 align=center id=bg1>통솔</td>
|
||||
<td width=45 align=center id=bg1>무력</td>
|
||||
<td width=45 align=center id=bg1>지력</td>
|
||||
<td width=45 align=center id=bg1>삭턴</td>
|
||||
<td width=70 align=center id=bg1>벌점</td>
|
||||
<td width=64 align=center class='bg1'>얼 굴</td>
|
||||
<td width=140 align=center class='bg1'>이 름</td>
|
||||
<td width=45 align=center class='bg1'>연령</td>
|
||||
<td width=45 align=center class='bg1'>성격</td>
|
||||
<td width=80 align=center class='bg1'>특기</td>
|
||||
<td width=45 align=center class='bg1'>레 벨</td>
|
||||
<td width=140 align=center class='bg1'>국 가</td>
|
||||
<td width=55 align=center class='bg1'>명 성</td>
|
||||
<td width=55 align=center class='bg1'>계 급</td>
|
||||
<td width=75 align=center class='bg1'>관 직</td>
|
||||
<td width=45 align=center class='bg1'>통솔</td>
|
||||
<td width=45 align=center class='bg1'>무력</td>
|
||||
<td width=45 align=center class='bg1'>지력</td>
|
||||
<td width=45 align=center class='bg1'>삭턴</td>
|
||||
<td width=70 align=center class='bg1'>벌점</td>
|
||||
</tr>";
|
||||
foreach($generalList as $general){
|
||||
$nation = $nationname[$general['nation']];
|
||||
@@ -149,7 +148,7 @@ foreach($generalList as $general){
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
@@ -167,8 +166,8 @@ foreach($generalList as $general){
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr data-general-id='{$general['no']}'
|
||||
data-general-wounded='{$general['injury']}'
|
||||
<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']}'
|
||||
|
||||
+9
-13
@@ -28,7 +28,7 @@ $scenarioList = (function(){
|
||||
|
||||
|
||||
|
||||
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
|
||||
if($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx]??[])){
|
||||
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
|
||||
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
|
||||
}
|
||||
@@ -50,12 +50,9 @@ else{
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJs('dist_js/hallOfFame.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -64,14 +61,14 @@ else{
|
||||
<tr><td>
|
||||
시나리오 검색 : <select id="by_scenario" name="by_scenario">
|
||||
<?php foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value=""
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value=""
|
||||
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
|
||||
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
|
||||
<?php foreach($subScenarioList as $info): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value="<?=$info['scenario']?>"
|
||||
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
|
||||
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
|
||||
@@ -136,7 +133,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
|
||||
$general['bgColor'] = $general['color'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!key_exists('fgColor', $general)){
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
}
|
||||
@@ -175,4 +172,3 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+5
-8
@@ -99,13 +99,10 @@ $nations = Json::decode($history['nations']);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 연감</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<?=WebUtil::printJS('js/history.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')?>
|
||||
@@ -139,7 +136,7 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
|
||||
</td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 height=520 class='tb_layout bg0'>
|
||||
<thead><tr><th colspan=5 align=center id=bg1>중 원 지 도</th></tr></thead>
|
||||
<thead><tr><th colspan=5 align=center class='bg1'>중 원 지 도</th></tr></thead>
|
||||
<tbody>
|
||||
<tr height=520>
|
||||
<td width=698>
|
||||
@@ -169,13 +166,13 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th colspan=5 align=center id=bg1>중 원 정 세</th></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 id=bg1>장 수 동 향</th></tr>
|
||||
<tr><th colspan=5 align=center class='bg1'>장 수 동 향</th></tr>
|
||||
<tr>
|
||||
<td colspan=5 valign=top>
|
||||
<?=formatHistoryToHTML(Json::decode($history['global_action']))?>
|
||||
|
||||
+13
-14
@@ -25,10 +25,9 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
|
||||
<?=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')?>
|
||||
@@ -48,7 +47,7 @@ $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'];
|
||||
|
||||
|
||||
if(!key_exists('generals', $nations[$nationID])){
|
||||
$nations[$nationID]['generals'] = [];
|
||||
}
|
||||
@@ -92,13 +91,13 @@ foreach ($nations as $nation) {
|
||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=80 align=center id=bg1>성 향</td>
|
||||
<td width=80 align=center class='bg1'>성 향</td>
|
||||
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
||||
<td width=80 align=center id=bg1>작 위</td>
|
||||
<td width=80 align=center class='bg1'>작 위</td>
|
||||
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
|
||||
<td width=80 align=center id=bg1>국 력</td>
|
||||
<td width=80 align=center class='bg1'>국 력</td>
|
||||
<td width=170 align=center>{$nation['power']}</td>
|
||||
<td width=80 align=center id=bg1>장수 / 속령</td>
|
||||
<td width=80 align=center class='bg1'>장수 / 속령</td>
|
||||
<td width=170 align=center>{$nation['gennum']} / ".count($nation['cities']??[])."</td>
|
||||
";
|
||||
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
|
||||
@@ -113,9 +112,9 @@ foreach ($nations as $nation) {
|
||||
}
|
||||
echo "</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>외교권자</td><td colspan=5>";
|
||||
<td align=center class='bg1'>외교권자</td><td colspan=5>";
|
||||
echo join(', ', $ambassadors);
|
||||
echo "</td><td align=center id=bg1>조언자</td><td align=center >";
|
||||
echo "</td><td align=center class='bg1'>조언자</td><td align=center >";
|
||||
echo count($auditors).'명';
|
||||
echo "</td></tr>
|
||||
<tr>
|
||||
@@ -160,9 +159,9 @@ echo "
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=center> </td>
|
||||
<td width=123 align=center id=bg1>장 수</td>
|
||||
<td width=123 align=center class='bg1'>장 수</td>
|
||||
<td width=123 align=center>{$nations[0]['gennum']}</td>
|
||||
<td width=123 align=center id=bg1>속 령</td>
|
||||
<td width=123 align=center class='bg1'>속 령</td>
|
||||
<td width=123 align=center>".count($nations[0]['cities']??[])."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -177,7 +176,7 @@ echo"
|
||||
<td colspan=5> 장수 일람 : ";
|
||||
foreach($nations[0]['generals'] as $general) {
|
||||
$generalText = getColoredName($general['name'], $general['npc']);
|
||||
echo "{$generalText}, ";
|
||||
echo "{$generalText}, ";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
|
||||
+15
-15
@@ -26,9 +26,9 @@ $sel[$type] = "selected";
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -93,18 +93,18 @@ else{
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=102 align=center id=bg1>희생된 장수</td>
|
||||
<td width=102 align=center id=bg1>악령 이름</td>
|
||||
<td width=68 align=center id=bg1>레벨</td>
|
||||
<td width=118 align=center id=bg1>국가</td>
|
||||
<td width=68 align=center id=bg1>성격</td>
|
||||
<td width=88 align=center id=bg1>특기</td>
|
||||
<td width=68 align=center id=bg1>종능</td>
|
||||
<td width=68 align=center id=bg1>통솔</td>
|
||||
<td width=68 align=center id=bg1>무력</td>
|
||||
<td width=68 align=center id=bg1>지력</td>
|
||||
<td width=78 align=center id=bg1>명성</td>
|
||||
<td width=78 align=center id=bg1>계급</td>
|
||||
<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>
|
||||
|
||||
+3
-5
@@ -27,12 +27,11 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<?=WebUtil::printJS('dist_js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
@@ -80,4 +79,3 @@ $(function(){
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+16
-16
@@ -52,9 +52,9 @@ if ($admin['maxonline'] < $curonline) {
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -92,7 +92,7 @@ span.out_bar{
|
||||
<table align=center width=1016>
|
||||
<tr><td align=left>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=4 align=center id=bg2><font size=5>접 속 량</font></td></tr>
|
||||
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 량</font></td></tr>
|
||||
<?php
|
||||
$refresh[] = $admin['refresh'];
|
||||
foreach($refresh as $i=>$value){
|
||||
@@ -101,8 +101,8 @@ foreach($refresh as $i=>$value){
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||
<td width=2 align=center id=bg1></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>
|
||||
@@ -111,15 +111,15 @@ foreach($refresh as $i=>$value){
|
||||
<?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 id=bg1></td></tr>
|
||||
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
|
||||
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?=$admin['maxrefresh']?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ foreach($refresh as $i=>$value){
|
||||
</td>
|
||||
<td align=right>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr><td colspan=4 align=center id=bg2><font size=5>접 속 자</font></td></tr>
|
||||
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 자</font></td></tr>
|
||||
<?php
|
||||
$online[] = $curonline;
|
||||
foreach($online as $i=>$value){
|
||||
@@ -136,8 +136,8 @@ foreach($online as $i=>$value){
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||
<td width=2 align=center id=bg1></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>
|
||||
@@ -146,22 +146,22 @@ foreach($online as $i=>$value){
|
||||
<?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 id=bg1></td></tr>
|
||||
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
|
||||
<tr>
|
||||
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
|
||||
<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 id=bg2><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr>
|
||||
<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'] = '접속자 총합';
|
||||
|
||||
+13
-13
@@ -12,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
increaseRefresh("설문조사", 1);
|
||||
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin |= $session->userGrade >= 5;
|
||||
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
|
||||
|
||||
@@ -28,9 +28,9 @@ $vote = $admin['vote']?:['-'];
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -60,7 +60,7 @@ function captureKey(e) {
|
||||
</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 id=bg2><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
|
||||
<tr><td colspan=3 align=center class='bg2'><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
|
||||
<?php
|
||||
|
||||
if ($isVoteAdmin) {
|
||||
@@ -76,7 +76,7 @@ if ($isVoteAdmin) {
|
||||
$vote_title = Tag2Code($vote_title);
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=2 width=148 align=center id=bg1>제 목</td>
|
||||
<td colspan=2 width=148 align=center class='bg1'>제 목</td>
|
||||
<td width=848 align=left> {$vote_title}</td>
|
||||
</tr>
|
||||
";
|
||||
@@ -151,7 +151,7 @@ echo "
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=4 align=center id=bg1>댓 글</td>
|
||||
<td colspan=4 align=center class='bg1'>댓 글</td>
|
||||
</tr>
|
||||
";
|
||||
for ($i=0; $i < $commentCount; $i++) {
|
||||
@@ -180,7 +180,7 @@ if ($me['no'] > 0) {
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=3 align=center id=bg2><font size=5>
|
||||
<tr><td colspan=3 align=center class='bg2'><font size=5>
|
||||
전 체 통 계
|
||||
<?php
|
||||
if ($isVoteAdmin) {
|
||||
@@ -238,8 +238,8 @@ if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if($per == 0): ?>
|
||||
@@ -303,7 +303,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
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){
|
||||
@@ -312,7 +312,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
else{
|
||||
$percentage = round($voteCount / $memCount * 100, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -336,7 +336,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
|
||||
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
?>
|
||||
<?php if($per == 0): ?>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
APIHelper::launch(dirname(__FILE__));
|
||||
+14
-14
@@ -49,9 +49,9 @@ if ($msg2 == "") {
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -59,12 +59,12 @@ if ($msg2 == "") {
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>거 래 장<br><?=closeButton()?></td></tr>
|
||||
<tr><td align=center id=bg2><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></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 id=bg1>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>판매자</td>
|
||||
@@ -118,18 +118,18 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center id=bg1>등록결과</td>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>입찰등록</td>
|
||||
<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 id=bg1>거래등록</td>
|
||||
<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>턴 후
|
||||
물품: 쌀
|
||||
@@ -152,7 +152,7 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
|
||||
<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 id=bg1>
|
||||
<tr align=center class='bg1'>
|
||||
<td width=68>거래번호</td>
|
||||
<td width=48>선택</td>
|
||||
<td width=98>구매자</td>
|
||||
@@ -205,18 +205,18 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
|
||||
}
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center id=bg1>등록결과</td>
|
||||
<td align=center class='bg1'>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>입찰등록</td>
|
||||
<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 id=bg1>거래등록</td>
|
||||
<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>턴 후
|
||||
물품: 쌀
|
||||
@@ -237,11 +237,11 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td align=center id=bg2><font size=5>최 근 기 록</font></td></tr>
|
||||
<tr><td align=center class='bg2'><font size=5>최 근 기 록</font></td></tr>
|
||||
<tr><td>
|
||||
<?=getAuctionLogRecent(20)?>
|
||||
</td></tr>
|
||||
<tr><td align=center id=bg2><font size=5>도 움 말</font></td></tr>
|
||||
<tr><td align=center class='bg2'><font size=5>도 움 말</font></td></tr>
|
||||
<tr><td>
|
||||
<font color=white size=2>
|
||||
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
|
||||
|
||||
+13
-13
@@ -87,10 +87,10 @@ 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
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
WHERE rank_data.type = %s AND general.nation = %i',
|
||||
$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
|
||||
);
|
||||
}
|
||||
@@ -120,9 +120,9 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -153,8 +153,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
||||
</table>
|
||||
<table width=1000 align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50% align=center id=bg1><font color=skyblue size=3>장 수 정 보</font></td>
|
||||
<td width=50% align=center id=bg1><font color=orange size=3>장 수 열 전</font></td>
|
||||
<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>
|
||||
@@ -165,8 +165,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
|
||||
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
|
||||
<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>
|
||||
@@ -178,8 +178,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
||||
</tr>
|
||||
<?php if($showGeneral->getNPCType() > 1 || $permission >= 2): ?>
|
||||
<tr>
|
||||
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
|
||||
<td align=center id=bg1><font color=orange size=3> </font></td>
|
||||
<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>
|
||||
|
||||
+10
-11
@@ -63,10 +63,9 @@ if($str3){
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 베팅장</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/betting.js')?>
|
||||
<?=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')?>
|
||||
@@ -79,7 +78,7 @@ if($str3){
|
||||
<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 id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</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>
|
||||
@@ -311,7 +310,7 @@ for ($i=0; $i < 16; $i++) {
|
||||
else{
|
||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
@@ -393,8 +392,8 @@ if ($admin['tournament'] == 6) {
|
||||
<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 id=bg2><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
|
||||
<tr align=center><td colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
|
||||
<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
|
||||
|
||||
@@ -430,7 +429,7 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
|
||||
<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 id=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>
|
||||
<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";
|
||||
@@ -446,8 +445,8 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
|
||||
$result = -($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
|
||||
if($result !== 0) return $result;
|
||||
$result = -(
|
||||
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
|
||||
<=>
|
||||
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
|
||||
<=>
|
||||
($rhs->getRankVar($winColumn)+$rhs->getRankVar($drawColumn)+$rhs->getRankVar($loseColumn))
|
||||
);
|
||||
if($result !== 0) return $result;
|
||||
|
||||
@@ -15,12 +15,9 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/chiefCenter.js')?>
|
||||
<?=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')?>
|
||||
@@ -108,4 +105,3 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+14
-13
@@ -16,7 +16,11 @@ $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']);
|
||||
$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,11 +33,9 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/currentCity.js')?>
|
||||
<?=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')?>
|
||||
@@ -229,7 +231,7 @@ $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',
|
||||
'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]
|
||||
){
|
||||
@@ -268,7 +270,7 @@ foreach($generals as $general){
|
||||
|
||||
$isNPC = $general['npc']>1;
|
||||
$wounded = $general['injury'];
|
||||
|
||||
|
||||
|
||||
$name = $general['name'];
|
||||
$nameText = formatName($name, $general['npc']);
|
||||
@@ -325,7 +327,7 @@ foreach($generals as $general){
|
||||
else{
|
||||
$turnText = '';
|
||||
}
|
||||
|
||||
|
||||
$generalsFormat[] = [
|
||||
'ourGeneral'=>$ourGeneral,
|
||||
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
|
||||
@@ -377,7 +379,7 @@ $genTotal = 0;
|
||||
|
||||
|
||||
foreach($generalsFormat as $general){
|
||||
if($general['nation'] == 0){
|
||||
if(!$general['nation'] || !$myNation['nation']){
|
||||
continue;
|
||||
}
|
||||
if($general['nation'] != $myNation['nation']){
|
||||
@@ -407,7 +409,7 @@ foreach($generalsFormat as $general){
|
||||
}
|
||||
|
||||
$chkDef = false;
|
||||
|
||||
|
||||
if($minTrain >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
@@ -424,7 +426,7 @@ foreach($generalsFormat as $general){
|
||||
$chkDef = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -520,4 +522,3 @@ foreach($generalsFormat as $general){
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+11
-14
@@ -55,20 +55,17 @@ $nationStor->cacheValues(['notice', 'scout_msg']);
|
||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||
<script>
|
||||
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>;
|
||||
var nationMsg = <?=Json::encode($nationStor->notice??'')?>;
|
||||
var scoutmsg = <?=Json::encode($nationStor->scout_msg??'')?>;
|
||||
var storedData = <?=Json::encode([
|
||||
"nationMsg"=>$nationStor->notice??'',
|
||||
"scoutMsg"=>$nationStor->scout_msg??''
|
||||
])?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/summernote-bs4.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/lang/summernote-ko-KR.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/plugin/image-sammo/summernote-image-flip.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/dipcenter.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')?>
|
||||
<?=WebUtil::printCSS('css/dipcenter.css')?>
|
||||
@@ -116,14 +113,14 @@ foreach($nationsList as $staticNation):
|
||||
0 => "<font color=red>교 전</font>",
|
||||
1 => "<font color=magenta>선포중</font>",
|
||||
2 => "통 상",
|
||||
7 => "<font color=green>불가침</font>",
|
||||
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;
|
||||
|
||||
|
||||
$dipTermText = $diplomacyState['term'].'개월';
|
||||
$dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月";
|
||||
}
|
||||
@@ -200,12 +197,12 @@ if ($budgetricediff > 0) {
|
||||
</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'>
|
||||
<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>
|
||||
|
||||
+11
-12
@@ -31,8 +31,8 @@ foreach($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation !=
|
||||
|
||||
$realConflict = [];
|
||||
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
|
||||
$cityID,
|
||||
$cityName,
|
||||
$cityID,
|
||||
$cityName,
|
||||
$rawConflict
|
||||
])
|
||||
{
|
||||
@@ -62,7 +62,7 @@ foreach($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you
|
||||
if(!key_exists($me, $diplomacyList)){
|
||||
$diplomacyList[$me] = [];
|
||||
}
|
||||
|
||||
|
||||
$diplomacyList[$me][$you] = $state;
|
||||
}
|
||||
|
||||
@@ -90,12 +90,11 @@ $neutralStateCharMap = [
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<?=WebUtil::printJS('dist_js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
@@ -163,9 +162,9 @@ else{
|
||||
<table class='tb_layout bg0' style='width:100%;'>
|
||||
<?php foreach($conflict as $item): ?>
|
||||
<tr>
|
||||
<td
|
||||
<td
|
||||
width=130
|
||||
align=right
|
||||
align=right
|
||||
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
|
||||
><?=$item['name']?> </td>
|
||||
<td width=48 align=right><?=(float)$item['percent']?> % </td>
|
||||
@@ -175,14 +174,14 @@ else{
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr><td colspan=2 height=5 id=bg1></td></tr>
|
||||
<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'>
|
||||
|
||||
+5
-5
@@ -56,9 +56,9 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -105,7 +105,7 @@ $generals = $db->query(
|
||||
$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',
|
||||
'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]
|
||||
){
|
||||
@@ -157,7 +157,7 @@ foreach ($generals as &$general) {
|
||||
$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){
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
$generalID = $session->generalID;
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$me = General::createGeneralObjFromDB($generalID);
|
||||
|
||||
|
||||
$pointHelpText = [
|
||||
'sum' => '다음 플레이에서 사용할 수 있는 총 포인트입니다.',
|
||||
'new' => '이번 플레이에서 얻은 총 포인트입니다.',
|
||||
'previous' => '이전에 물려받은 포인트입니다.',
|
||||
'lived_month' => '살아남은 기간입니다. (1개월 단위)',
|
||||
'max_belong' => '가장 오래 임관했던 국가의 연도입니다.',
|
||||
'max_domestic_critical' => '성공한 내정 중 최대 연속값입니다.',
|
||||
'snipe_combat' => '유리한 상성을 가지고 전투했습니다.',
|
||||
'combat' => '전투 횟수입니다.',
|
||||
'sabotage' => '계략 성공 횟수입니다.',
|
||||
'unifier' => '천통에 기여한 포인트입니다. <br>각 국의 군주, 천통 수뇌, 천통 군주가 받습니다.',
|
||||
'dex' => '총 숙련도합입니다.',
|
||||
'tournament' => '토너먼트 입상 포인트입니다.',
|
||||
'betting' => '성공적인 베팅을 했습니다. <br>수익율과 베팅 성공 횟수를 따릅니다.',
|
||||
];
|
||||
$items = [];
|
||||
foreach(array_keys(General::INHERITANCE_KEY) as $key){
|
||||
$items[$key] = $me->getInheritancePoint($key)??0;
|
||||
}
|
||||
?>
|
||||
<!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') ?>
|
||||
<?= WebUtil::printCSS('css/inheritPoint.css') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
|
||||
<?= WebUtil::printJS('js/common.js') ?>
|
||||
<?= WebUtil::printJS('js/inheritPoint.js') ?>
|
||||
<script>
|
||||
var items = <?=Json::encode($items)?>;
|
||||
var helpText = <?=Json::encode($pointHelpText)?>;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="formStart()">
|
||||
|
||||
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td style='text-align:left;'>유산 관리<br><?= backButton() ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="container" class="tb_layout bg0" style="width:1000px;margin:auto;border:solid 1px #888888;">
|
||||
<div id='inheritance_list'>
|
||||
<div id="inherit_sum" class='inherit_item'>
|
||||
<div class="row">
|
||||
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>총 포인트</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control inherit_value" readonly id="inherit_sum_value" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:right">
|
||||
<small class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inherit_previous" class='inherit_item'>
|
||||
<div class="row">
|
||||
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>기존 포인트</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control inherit_value" readonly id="inherit_previous_value" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:right">
|
||||
<small class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inherit_new" class='inherit_item'>
|
||||
<div class="row">
|
||||
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>신규 포인트</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control inherit_value" readonly id="inherit_new_value" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:right">
|
||||
<small class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:100%; padding:0 10px"><hr style="border-top:1px solid #888888;"></div>
|
||||
<?php foreach (General::INHERITANCE_KEY as $key => [$type, $multiplier, $name]) : ?>
|
||||
<?php if ($key == 'previous') {
|
||||
continue;
|
||||
} ?>
|
||||
<div id="inherit_<?= $key ?>" class='inherit_item inherit_template_item'>
|
||||
<div class="row">
|
||||
<label id="inherit_<?= $key ?>_head" class='inherit_head col-sm-6 col-form-label'><?= $name ?></label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control inherit_value" readonly id="inherit_<?= $key ?>_value" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:right">
|
||||
<small class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+32
-33
@@ -33,11 +33,10 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/bossInfo.js')?>
|
||||
<?=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')?>
|
||||
@@ -48,7 +47,7 @@ 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);
|
||||
@@ -112,8 +111,8 @@ $level = Util::convertArrayToDict(
|
||||
);
|
||||
|
||||
|
||||
$tigers = $db->query('SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
$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
|
||||
);// 오호장군
|
||||
@@ -122,9 +121,9 @@ $tigerstr = join(', ', array_map(function($arr){
|
||||
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',
|
||||
$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){
|
||||
@@ -146,10 +145,10 @@ for($i=12; $i >= $lv; $i-=2) {
|
||||
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']??0);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td>
|
||||
<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 id=bg1><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></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>
|
||||
@@ -158,11 +157,11 @@ for($i=12; $i >= $lv; $i-=2) {
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>오호장군【승전】</td>
|
||||
<td width=98 align=center class='bg1'>오호장군【승전】</td>
|
||||
<td colspan=5><?=$tigerstr?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>건안칠자【계략】</td>
|
||||
<td width=98 align=center class='bg1'>건안칠자【계략】</td>
|
||||
<td colspan=5><?=$eaglestr?></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -170,7 +169,7 @@ for($i=12; $i >= $lv; $i-=2) {
|
||||
<tr><td colspan=6 height=5></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>대상 장수</td>
|
||||
<td width=498 align=right class='bg1'>대상 장수</td>
|
||||
<td width=498>
|
||||
<?php
|
||||
|
||||
@@ -212,9 +211,9 @@ 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 id=bg1>".getOfficerLevelText(12, $nation['level'])."</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 id=bg1>{$officerLevelText}</td>
|
||||
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
|
||||
<td width=398>
|
||||
";
|
||||
|
||||
@@ -240,7 +239,7 @@ if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
|
||||
if(key_exists(11, $level)){
|
||||
echo "{$level[11]['name']} 【".CityConst::byID($level[11]['city'])->name."】";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
@@ -251,11 +250,11 @@ for($i=10; $i >= $lv; $i--) {
|
||||
if($i % 2 == 0) { echo "<tr>"; }
|
||||
$officerLevelText = getOfficerLevelText($i, $nation['level']);
|
||||
echo "
|
||||
<td width=98 align=right id=bg1>{$officerLevelText}</td>
|
||||
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
|
||||
<td width=398>
|
||||
";
|
||||
|
||||
|
||||
|
||||
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $i)) {
|
||||
echo "
|
||||
<select id='genlist_{$i}' size=1 style=color:white;background-color:black;>
|
||||
@@ -295,13 +294,13 @@ if($meLevel == 12):
|
||||
<tr><td colspan='4' height='5'></td></tr>
|
||||
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr>
|
||||
<tr>
|
||||
<td width=98 align=right id=bg1>외교권자</td>
|
||||
<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 id=bg1>조언자</td>
|
||||
<td width=98 align=right class='bg1'>조언자</td>
|
||||
<td width=398>
|
||||
<select id="selectAuditor" multiple="multiple">
|
||||
</select>
|
||||
@@ -320,7 +319,7 @@ if($meLevel >= 5) {
|
||||
echo "
|
||||
<tr><td colspan=5 align=center bgcolor=orange>도 시 관 직 임 명</td></tr>
|
||||
<tr>
|
||||
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
<td colspan=2>
|
||||
<select id='citylist_4' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
@@ -367,7 +366,7 @@ if($meLevel >= 5) {
|
||||
</tr>";
|
||||
$officerLevelText = getOfficerLevelText(3, $nation['level']);
|
||||
echo "<tr>
|
||||
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
<td colspan=2>
|
||||
<select id='citylist_3' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
@@ -413,7 +412,7 @@ if($meLevel >= 5) {
|
||||
</tr>";
|
||||
$officerLevelText = getOfficerLevelText(2, $nation['level']);
|
||||
echo "<tr>
|
||||
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
|
||||
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
|
||||
<td colspan=2>
|
||||
<select id='citylist_2' size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
@@ -462,10 +461,10 @@ if($meLevel >= 5) {
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td width=158 align=center id=bg1 colspan=2><font size=4>도 시</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>태 수 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>군 사 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>종 사 (사관) 【현재도시】</font></td>
|
||||
<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>
|
||||
<td width=278 align=center class='bg1'><font size=4>군 사 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center class='bg1'><font size=4>종 사 (사관) 【현재도시】</font></td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
@@ -495,15 +494,15 @@ foreach($db->query('SELECT city,name,level,region,officer_set from city where na
|
||||
$cityOfficerList = $officerList[$cityID]??[];
|
||||
?>
|
||||
<?php if($region != $city['region']): ?>
|
||||
<tr><td colspan=5 height=3 id=bg1></td></tr>
|
||||
<tr><td colspan=5 id=bg1><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr>
|
||||
<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)):
|
||||
<?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>
|
||||
|
||||
+18
-22
@@ -37,13 +37,10 @@ $sel = [$type => "selected"];
|
||||
<title><?=UniqueConst::$serverName?>: 세력도시</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/ext.expand_city.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/extExpandCity.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -129,10 +126,10 @@ foreach($cityList as $city){
|
||||
];
|
||||
|
||||
$cityOfficerList = $officerList[$cityID]??[];
|
||||
foreach($cityOfficerList as $cityOfficer){
|
||||
foreach($cityOfficerList as $cityOfficer){
|
||||
$officerName[$cityOfficer['officer_level']] = getColoredName($cityOfficer['name'], $cityOfficer['npc']);
|
||||
}
|
||||
|
||||
|
||||
if ($type == 10 && $city['region'] != $region) {
|
||||
echo "<br>";
|
||||
$region = $city['region'];
|
||||
@@ -151,41 +148,41 @@ foreach($cityList as $city){
|
||||
<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 id=bg1>주민</td>
|
||||
<td align=center width=46 class='bg1'>주민</td>
|
||||
<td align=center width=140>{$city['pop']}/{$city['pop_max']}</td>
|
||||
<td align=center width=46 id=bg1>농업</td>
|
||||
<td align=center width=46 class='bg1'>농업</td>
|
||||
<td align=center width=140>{$city['agri']}/{$city['agri_max']}</td>
|
||||
<td align=center width=46 id=bg1>상업</td>
|
||||
<td align=center width=46 class='bg1'>상업</td>
|
||||
<td align=center width=140>{$city['comm']}/{$city['comm_max']}</td>
|
||||
<td align=center width=46 id=bg1>치안</td>
|
||||
<td align=center width=46 class='bg1'>치안</td>
|
||||
<td align=center width=140>{$city['secu']}/{$city['secu_max']}</td>
|
||||
<td align=center width=46 id=bg1>수비</td>
|
||||
<td align=center width=46 class='bg1'>수비</td>
|
||||
<td align=center width=140>{$city['def']}/{$city['def_max']}</td>
|
||||
<td align=center width=46 id=bg1>성벽</td>
|
||||
<td align=center width=46 class='bg1'>성벽</td>
|
||||
<td align=center width=140>{$city['wall']}/{$city['wall_max']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>민심</td>
|
||||
<td align=center class='bg1'>민심</td>
|
||||
<td align=center>".round($city['trust'], 1)."</td>
|
||||
<td align=center id=bg1>시세</td>
|
||||
<td align=center class='bg1'>시세</td>
|
||||
<td align=center>{$city['trade']}%</td>
|
||||
<td align=center id=bg1>인구</td>
|
||||
<td align=center class='bg1'>인구</td>
|
||||
<td align=center>".round($city['pop']/$city['pop_max']*100, 2)." %</td>
|
||||
<td align=center id=bg1>태수</td>
|
||||
<td align=center class='bg1'>태수</td>
|
||||
<td align=center>";
|
||||
echo $officerName[4];
|
||||
echo "</td>
|
||||
<td align=center id=bg1>군사</td>
|
||||
<td align=center class='bg1'>군사</td>
|
||||
<td align=center>";
|
||||
echo $officerName[3];
|
||||
echo "</td>
|
||||
<td align=center id=bg1>종사</td>
|
||||
<td align=center class='bg1'>종사</td>
|
||||
<td align=center>";
|
||||
echo $officerName[2];
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>장수</td>
|
||||
<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) {
|
||||
@@ -209,4 +206,3 @@ foreach($cityList as $city){
|
||||
</body>
|
||||
<div id="helper_genlist" style="display:none;"></div>
|
||||
</html>
|
||||
|
||||
|
||||
+18
-19
@@ -47,9 +47,9 @@ if($gameStor->isunited){
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -104,21 +104,21 @@ $generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special
|
||||
echo"
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=64 align=center id=bg1>얼 굴</td>
|
||||
<td width=98 align=center id=bg1>이 름</td>
|
||||
<td width=78 align=center id=bg1>관 직</td>
|
||||
<td width=68 align=center id=bg1>계 급</td>
|
||||
<td width=68 align=center id=bg1>명 성</td>
|
||||
<td width=68 align=center id=bg1>봉 록</td>
|
||||
<td width=48 align=center id=bg1>통솔</td>
|
||||
<td width=48 align=center id=bg1>무력</td>
|
||||
<td width=48 align=center id=bg1>지력</td>
|
||||
<td width=68 align=center id=bg1>자 금</td>
|
||||
<td width=68 align=center id=bg1>군 량</td>
|
||||
<td width=48 align=center id=bg1>성 격</td>
|
||||
<td width=78 align=center id=bg1>특 기</td>
|
||||
<td width=48 align=center id=bg1>사 관</td>
|
||||
<td width=70 align=center id=bg1>벌점</td>
|
||||
<td width=64 align=center class='bg1'>얼 굴</td>
|
||||
<td width=98 align=center class='bg1'>이 름</td>
|
||||
<td width=78 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=48 align=center class='bg1'>통솔</td>
|
||||
<td width=48 align=center class='bg1'>무력</td>
|
||||
<td width=48 align=center class='bg1'>지력</td>
|
||||
<td width=68 align=center class='bg1'>자 금</td>
|
||||
<td width=68 align=center class='bg1'>군 량</td>
|
||||
<td width=48 align=center class='bg1'>성 격</td>
|
||||
<td width=78 align=center class='bg1'>특 기</td>
|
||||
<td width=48 align=center class='bg1'>사 관</td>
|
||||
<td width=70 align=center class='bg1'>벌점</td>
|
||||
</tr>";
|
||||
foreach($generalList as $general){
|
||||
|
||||
@@ -183,4 +183,3 @@ foreach($generalList as $general){
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+23
-24
@@ -27,9 +27,9 @@ if($nationID == 0) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.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')?>
|
||||
@@ -96,57 +96,57 @@ if ($budgetricediff > 0) {
|
||||
<td colspan=8 align=center style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'>【<?=$nation['name']?>】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>총주민</td>
|
||||
<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 id=bg1>총병사</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 id=bg1>국 력</td>
|
||||
<td width=98 align=center class='bg1'>국 력</td>
|
||||
<td width=298 align=center colspan=3><?=$nation['power']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>국 고</td>
|
||||
<td align=center class='bg1'>국 고</td>
|
||||
<td align=center><?=number_format($nation['gold'])?></td>
|
||||
<td align=center id=bg1>병 량</td>
|
||||
<td align=center class='bg1'>병 량</td>
|
||||
<td align=center><?=number_format($nation['rice'])?></td>
|
||||
<td align=center id=bg1>세 율</td>
|
||||
<td align=center class='bg1'>세 율</td>
|
||||
<td align=center colspan=3><?=$nation['rate']?> %</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>세금/단기</td>
|
||||
<td align=center class='bg1'>세금/단기</td>
|
||||
<td align=center>+<?=number_format($goldIncome)?> / +<?=number_format($warIncome)?></td>
|
||||
<td align=center id=bg1>세곡/둔전</td>
|
||||
<td align=center class='bg1'>세곡/둔전</td>
|
||||
<td align=center>+<?=number_format($riceIncome)?> / +<?=number_format($wallIncome)?></td>
|
||||
<td align=center id=bg1>지급률</td>
|
||||
<td align=center class='bg1'>지급률</td>
|
||||
<td align=center colspan=3><?=$nation['bill']?> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>수입/지출</td>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center id=bg1>수입/지출</td>
|
||||
<td align=center class='bg1'>수입/지출</td>
|
||||
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center id=bg1>속 령</td>
|
||||
<td align=center class='bg1'>속 령</td>
|
||||
<td width=98 align=center><?=count($cityList)?></td>
|
||||
<td width=98 align=center id=bg1>장 수</td>
|
||||
<td width=98 align=center class='bg1'>장 수</td>
|
||||
<td width=98 align=center><?=$nation['gennum']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>국고 예산</td>
|
||||
<td align=center class='bg1'>국고 예산</td>
|
||||
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=center id=bg1>병량 예산</td>
|
||||
<td align=center class='bg1'>병량 예산</td>
|
||||
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
|
||||
<td align=center id=bg1>기술력</td>
|
||||
<td align=center class='bg1'>기술력</td>
|
||||
<td align=center><?=number_format(floor($nation['tech']))?></td>
|
||||
<td align=center id=bg1>작 위</td>
|
||||
<td align=center class='bg1'>작 위</td>
|
||||
<td align=center><?=getNationLevel($nation['level'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top id=bg1> 속령일람 :</td>
|
||||
<td align=center valign=top class='bg1'> 속령일람 :</td>
|
||||
<td colspan=7><?=join(', ', $cityNames)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top id=bg1>국가열전</td>
|
||||
<td colspan=7 id=bg0><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
|
||||
<td align=center valign=top class='bg1'>국가열전</td>
|
||||
<td colspan=7 class='bg0'><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
@@ -158,4 +158,3 @@ if ($budgetricediff > 0) {
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+8
-9
@@ -51,10 +51,10 @@ $use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
|
||||
<script>
|
||||
var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/myPage.js')?>
|
||||
<?=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')?>
|
||||
@@ -123,8 +123,8 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1><font color=skyblue size=3>개인 기록</font></td>
|
||||
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
|
||||
<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>
|
||||
@@ -141,8 +141,8 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1><font color=skyblue size=3>장수 열전</font></td>
|
||||
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
|
||||
<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>
|
||||
@@ -162,4 +162,3 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,421 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$gameStor->cacheValues(['autorun_user', 'develcost']);
|
||||
|
||||
increaseRefresh("NPC 정책", 1);
|
||||
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no, npc, nation, city, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$nationID = $me['nation'];
|
||||
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,tech,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$permission = checkSecretPermission($me);
|
||||
if ($permission < 0) {
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
} else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
$nationStor->cacheValues(['npc_nation_policy', 'npc_general_policy']);
|
||||
$gameStor->cacheAll();
|
||||
|
||||
$general = new General($me, null, null, $nation, $gameStor->year, $gameStor->month, false);
|
||||
|
||||
$rawServerPolicy = $gameStor->getValue('npc_nation_policy') ?? [];
|
||||
$rawNationPolicy = $nationStor->getValue('npc_nation_policy') ?? [];
|
||||
$rawServerGeneralPolicy = $gameStor->getValue('npc_general_policy') ?? [];
|
||||
$rawNationGeneralPolicy = $nationStor->getValue('npc_general_policy') ?? [];
|
||||
|
||||
$defaultNationPolicy = ($rawServerPolicy['values'] ?? []) + AutorunNationPolicy::$defaultPolicy;
|
||||
$currentNationPolicy = ($rawNationPolicy['values'] ?? []) + $defaultNationPolicy;
|
||||
|
||||
$defaultNationPriority = $rawServerPolicy['priority'] ?? (AutorunNationPolicy::$defaultPriority);
|
||||
$currentNationPriority = $rawNationPolicy['priority'] ?? $defaultNationPriority;
|
||||
|
||||
$defaultGeneralActionPriority = $rawServerGeneralPolicy['priority'] ?? (AutorunGeneralPolicy::$default_priority);
|
||||
$currentGeneralActionPriority = $rawNationGeneralPolicy['priority'] ?? $defaultGeneralActionPriority;
|
||||
|
||||
$autoPolicyVariable = [];
|
||||
if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
|
||||
$autoPolicyVariable['reqHumanWarUrgentRice'] = $currentNationPolicy['reqHumanWarUrgentRice'];
|
||||
}
|
||||
if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
|
||||
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
|
||||
}
|
||||
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
|
||||
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true));
|
||||
|
||||
|
||||
?>
|
||||
<!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 ?>: 임시 NPC 정책</title>
|
||||
<script>
|
||||
var nationID = <?= $nationID ?>;
|
||||
|
||||
var defaultNationPolicy = <?= Json::encode($defaultNationPolicy) ?>;
|
||||
var currentNationPolicy = <?= Json::encode($currentNationPolicy) ?>;
|
||||
|
||||
var defaultNationPriority = <?= Json::encode($defaultNationPriority) ?>;
|
||||
var currentNationPriority = <?= Json::encode($currentNationPriority) ?>;
|
||||
var availableNationPriorityItems = <?= Json::encode(AutorunNationPolicy::$defaultPriority) ?>;
|
||||
|
||||
var defaultGeneralActionPriority = <?= Json::encode($defaultGeneralActionPriority) ?>;
|
||||
var currentGeneralActionPriority = <?= Json::encode($currentGeneralActionPriority) ?>;
|
||||
var availableGeneralActionPriorityItems = <?= Json::encode(AutorunGeneralPolicy::$default_priority) ?>;
|
||||
|
||||
var btnHelpMessage = {
|
||||
'불가침제의': '군주가 NPC이고, 타국에서 원조를 받았을 때,<br>세입(금/쌀) 대비 원조량에 따라 불가침제의를 합니다.',
|
||||
'선전포고': '군주가 NPC이고, 전쟁중이 아닐 때,<br>주변국중 하나를 골라 선포합니다.<br><br>선포 시점은 다음을 참고합니다.<br>- 인구율<br>- 도시내정률<br>- NPC전투장권장 금 충족률<br>- NPC전투장권장 쌀 충족률<br><br>국력이 낮은 국가를 조금 더 선호합니다.',
|
||||
'천도': '인구가 많은 곳을 찾아 천도를 시도합니다.<br>영토의 가운데를 선호합니다.<br><br>도시 인구가 충분하다면, 굳이 천도하지는 않습니다.',
|
||||
'유저장긴급포상': '금/쌀이 부족한 유저전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 적어지더라도 시도합니다.',
|
||||
'부대전방발령': '(작동하지 않음)<br>전투 부대를 접경으로 발령합니다.<br>수도->시작점->도착점 경로를 따릅니다.',
|
||||
'유저장구출발령': '아군 영토에 있지 않은 유저장을 아군 영토로 발령합니다.<br>곧 집합하는 부대에 탑승한 경우는 제외합니다.',
|
||||
'유저장후방발령': '유저전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
|
||||
'부대유저장후방발령': '접경에 위치한 부대에 탑승한 유저전투장 중에,<br>- 병력이 충분하지 않고,<br>- 첫 턴이 징병턴이며,<br>- 부대장 집합 턴 사이라면,<br>인구가 충분한 후방도시로 발령합니다.<br><br>부대장의 위치와 유저장의 위치가 다르다면 발령하지 않습니다.',
|
||||
'유저장전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
|
||||
'유저장포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>유저전투장과 유저내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
|
||||
'부대후방발령': '(작동하지 않음)<br>후방 부대가 위치한 도시의 인구가 충분하지 않을 경우,<br>인구가 충분한 도시로 발령합니다.',
|
||||
'부대구출발령': '전투 부대, 후방 부대가 아닌 부대가 아군 영토에 있지 않을 때,<br>전방 도시 중 하나를 골라 발령합니다.',
|
||||
'NPC긴급포상': '금/쌀이 부족한 NPC전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 \'약간\' 적어지더라도 시도합니다.',
|
||||
'NPC구출발령': '아군 영토에 있지 않은 NPC장을 아군 영토로 발령합니다.',
|
||||
'NPC후방발령': 'NPC전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
|
||||
'NPC포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>NPC전투장과 NPC내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
|
||||
'NPC전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
|
||||
'유저장내정발령': '내정중인 유저장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
|
||||
'NPC내정발령': '내정중인 NPC장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
|
||||
'NPC몰수': '국고가 부족하다면 NPC에게서 몰수합니다. 내정NPC장은 국고가 부족하지 않아도 몰수합니다.',
|
||||
|
||||
'NPC사망대비': 'NPC의 사망까지 5턴 이내인 경우, 헌납합니다.<br>헌납할 금쌀이 없다면 물자조달을 수행합니다.',
|
||||
'귀환': '아국 도시에 있지 않다면 귀환합니다.',
|
||||
'금쌀구매': '전쟁 중에 금쌀의 비율이 크게 차이난다면 금쌀을 거래하여 비슷하게 맞춥니다.<br>금쌀 비율이 적절하는지 판단하는데 살상률을 포함합니다.<br>NPC는 상인이 없어도 금쌀을 구매할 수 있습니다.<br><br>또는 금쌀 한쪽이 지나치게 적은 경우에는 내정 중에도 금쌀을 거래합니다.',
|
||||
'출병': '충분한 병력과 충분한 훈련/사기를 가지고 있는 경우 출병합니다.<br>접경이 여럿인 경우 무작위로 선택합니다.<br><br>타국과 전쟁중인 경우 공백지로는 출병하지 않습니다.',
|
||||
'긴급내정': '전쟁중에 민심이 70 미만이거나,<br>인구가 제자리 징병이 가능하지 않을 정도로 적을 경우,<br>일정확률로 주민선정과 정착장려를 수행합니다.<br><br>통솔이 높을 수록 수행할 확률이 높습니다.',
|
||||
'전투준비': '충분한 병력을 가지고 있지만 훈련과 사기가 부족한 경우 훈련과 사기진작을 수행합니다.',
|
||||
'전방워프': '전투장이 충분한 병력을 가지고 있다면 전방으로 이동합니다.',
|
||||
'NPC헌납': '국고가 부족한데 NPC전쟁장이 충분한 금쌀(권장량 대비 1.5배)을 가지고 있다면 일부를 헌납합니다. <br>NPC내정장은 국고가 넉넉하더라도 충분한 금쌀을 가지고 있다면 권장량만 유지하고 헌납합니다.',
|
||||
'징병': '전쟁 중 병력을 소진하였다면 재 징병합니다.<br><br>기존에 사용한 병종군 중에서 사용가능한 병종을 랜덤하게 선택합니다.<br>고급 병종을 선택할 확률이 조금 더 높습니다.<br><br>NPC의 경우 도시의 인구가 충분하지 않다면 징병을 할 확률이 감소합니다.<br><br>유저장은 최대한 고급병종을 유지하며,<br>유저장 모병이 허용되는 경우 모병을 3회할 수 있다면 모병합니다.',
|
||||
'후방워프': '전쟁 중 병력을 소진하였는데 도시의 인구가 충분하지 않다면,<br>인구가 많은 도시로 이동합니다.',
|
||||
'전쟁내정': '전쟁 중 수행하는 내정입니다.<br>정착장려, 기술연구의 확률이 좀 더 높고,<br>치안강화, 농지개간, 상업투자의 확률이 낮습니다.<br><br>내정이 가능하다 하더라도 전시임을 고려해,<br>30% 확률로 다른 턴을 수행합니다.',
|
||||
'소집해제': '전쟁 중이 아닌 데 병력이 남아있는 경우,<br>3/4 확률로 소집해제합니다.',
|
||||
'일반내정': '도시에서 내정을 수행합니다. 낮은 내정일 수록 수행할 확률이 높습니다.<br>기술 연구는 1등급 이상 뒤쳐지지 않도록 노력합니다.',
|
||||
'내정워프': '도시에서 더이상 내정을 수행할 수 없는 경우,<br>일정확률로 내정이 부족한 다른 도시로 이동합니다.',
|
||||
};
|
||||
</script>
|
||||
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/Sortable.min.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/jquery-sortable.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
|
||||
<?= WebUtil::printJS('../e_lib/jquery_toast/toast.js') ?>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printJS('js/common.js') ?>
|
||||
<?= WebUtil::printJS('js/npc_control.js') ?>
|
||||
|
||||
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/font_awesome/css/all.min.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/jquery_toast/toast.css') ?>
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/npc_control.css') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
|
||||
<div class='tb_layout bg0'>임시 NPC 정책<br>
|
||||
<?= backButton() ?></div>
|
||||
|
||||
<div class='bg1 section_bar'>국가 정책</div>
|
||||
<div class="text-right px-3"><small class="form-text text-muted">
|
||||
최근 설정: <?= $rawNationPolicy['valueSetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['valueSetTime'] ?? '설정 기록 없음' ?>)
|
||||
</small></div>
|
||||
<div class="form_list">
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNationGold" class="col-sm-6 col-form-label">국가 권장 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNationGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNationRice" class="col-sm-6 col-form-label">국가 권장 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNationRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanWarUrgentGold" class="col-sm-6 col-form-label">유저전투장 긴급포상 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">
|
||||
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
|
||||
0이면 보병 6회 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanWarUrgentRice" class="col-sm-6 col-form-label">유저전투장 긴급포상 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanWarRecommandGold" class="col-sm-6 col-form-label">유저전투장 권장 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
||||
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanWarRecommandRice" class="col-sm-6 col-form-label">유저전투장 권장 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
||||
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanDevelGold" class="col-sm-6 col-form-label">유저내정장 권장 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqHumanDevelRice" class="col-sm-6 col-form-label">유저내정장 권장 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNPCWarGold" class="col-sm-6 col-form-label">NPC전투장 권장 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNPCWarGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
||||
0이면 기본 병종 4회(<?= number_format(GameConst::$defaultStatNPCMax * 100) ?> * 4) 징병비를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarGold) ?>입니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNPCWarRice" class="col-sm-6 col-form-label">NPC전투장 권장 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNPCWarRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
||||
0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatNPCMax * 100 * 4) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarRice) ?>입니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNPCDevelGold" class="col-sm-6 col-form-label">NPC내정장 권장 금</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelGold" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.<br>0이면 30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCDevelGold) ?>입니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="reqNPCDevelRice" class="col-sm-6 col-form-label">NPC내정장 권장 쌀</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelRice" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면 헌납합니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="minimumResourceActionAmount" class="col-sm-6 col-form-label">포상/몰수/헌납/삼/팜 최소 단위</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="minimumResourceActionAmount" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">연산결과가 이 단위보다 적다면 수행하지 않습니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="minWarCrew" class="col-sm-6 col-form-label">최소 전투 가능 병력 수</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="minWarCrew" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 적을 때에는 징병을 시도합니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="minNPCRecruitCityPopulation" class="col-sm-6 col-form-label">NPC 최소 징병 가능 인구 수</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="minNPCRecruitCityPopulation" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 낮으면 NPC는 도시에서 징병하지 않고 후방 워프합니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="safeRecruitCityPopulationRatio" class="col-sm-6 col-form-label">제자리 징병 허용 인구율(%)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="percent" id="safeRecruitCityPopulationRatio" min="0" max="100" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면 '충분하다'고 판단합니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="minNPCWarLeadership" class="col-sm-6 col-form-label">NPC 전투 참여 통솔 기준</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="minNPCWarLeadership" min="0" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">이 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.</small></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<label for="properWarTrainAtmos" class="col-sm-6 col-form-label">훈련/사기진작 목표치</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" data-type="integer" id="properWarTrainAtmos" min="0" max="100" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div style='text-align:right;'><small class="form-text text-muted">훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다.</small></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-secondary">
|
||||
전투 부대는 작업중입니다(json양식: {부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br>
|
||||
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br>
|
||||
내정 부대는 작업중입니다(json양식: [부대번호,...])
|
||||
<input type="hidden" value="{}" data-type="json" id="CombatForce">
|
||||
<input type="hidden" value="[]" data-type="json" id="SupportForce">
|
||||
<input type="hidden" value="[]" data-type="json" id="DevelopForce">
|
||||
<input type="hidden" value="true" data-type="json" id="allowNpcAttackCity">
|
||||
<!--allowNpcAttackCity는 현재 게임 내 비활성-->
|
||||
</div>
|
||||
<div class='control_bar' data-type="nationPolicy">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 half_section_left">
|
||||
<div class='bg1 section_bar'>NPC 사령턴 우선순위</div>
|
||||
<div class="float-right px-3"><small class="form-text text-muted">
|
||||
최근 설정: <?= $rawNationPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
|
||||
</small></div>
|
||||
<div class='text-left px-2'><small class="text-muted">예턴이 없거나, 지정되어 있더라도 실패할경우<br>아래 순위에 따라 사령턴을 시도합니다.</small></div>
|
||||
<div class="form_list">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="bg2 sub_bar">비활성</div>
|
||||
<div id="nationPriorityDisabled" class="list-group col" data-type="list">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="bg2 sub_bar">활성</div>
|
||||
<div id="nationPriority" class="list-group col" data-type="list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='control_bar' data-type="nationPriority">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 half_section_right">
|
||||
<div class='bg1 section_bar'>NPC 일반턴 우선순위</div>
|
||||
<div class="float-right px-3"><small class="form-text text-muted">
|
||||
최근 설정: <?= $rawNationGeneralPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationGeneralPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
|
||||
</small></div>
|
||||
<div class='text-left px-2'><small class="text-muted">순위가 높은 것부터 시도합니다. <br>아무것도 실행할 수 없으면 물자조달이나 인재탐색을 합니다.</small></div>
|
||||
<div class="form_list">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="bg2 sub_bar">비활성</div>
|
||||
<div id="generalPriorityDisabled" class="list-group col" data-type="list">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="bg2 sub_bar">활성</div>
|
||||
<div id="generalPriority" class="list-group col" data-type="list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='control_bar' data-type="generalPriority">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+6
-12
@@ -64,7 +64,7 @@ if(!$commandObj->hasPermissionToReserve()){
|
||||
die_redirect();
|
||||
}
|
||||
|
||||
$jsList = $commandObj->getJSFiles();
|
||||
$jsList = $commandObj->getJSPlugins();
|
||||
$cssList = $commandObj->getCSSFiles();
|
||||
?>
|
||||
|
||||
@@ -75,26 +75,19 @@ $cssList = $commandObj->getCSSFiles();
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<?=WebUtil::printJS('js/processing.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>
|
||||
<?php
|
||||
foreach($jsList as $js){
|
||||
print(WebUtil::printJS($js));
|
||||
}
|
||||
?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
@@ -103,6 +96,7 @@ foreach($jsList as $js){
|
||||
<?=WebUtil::printCSS('css/main.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
<?=WebUtil::printCSS('css/processing.css')?>
|
||||
|
||||
<?php
|
||||
foreach($cssList as $css){
|
||||
print(WebUtil::printCSS($css));
|
||||
|
||||
@@ -145,7 +145,7 @@ if($str3){
|
||||
?>
|
||||
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr>
|
||||
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
|
||||
<tr><td colspan=8 align=center id=bg2><font color=magenta size=5>16강 승자전</font></td></tr>
|
||||
<tr><td colspan=8 align=center class='bg2'><font color=magenta size=5>16강 승자전</font></td></tr>
|
||||
<tr><td height=10 colspan=8 align=center></td></tr>
|
||||
<?php
|
||||
|
||||
@@ -398,7 +398,7 @@ if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) {
|
||||
}
|
||||
echo "
|
||||
<tr><td height=10 colspan=8 align=center></td></tr>
|
||||
<tr><td colspan=8 align=center id=bg2><font color=orange size=5>조별 본선 순위</font></td></tr>
|
||||
<tr><td colspan=8 align=center class='bg2'><font color=orange size=5>조별 본선 순위</font></td></tr>
|
||||
<tr>";
|
||||
|
||||
$num = array("一", "二", "三", "四", "五", "六", "七", "八");
|
||||
@@ -409,7 +409,7 @@ for ($i=0; $i < 8; $i++) {
|
||||
<td>
|
||||
<table align=center width=250 class='tb_layout bg0'>
|
||||
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
|
||||
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</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>";
|
||||
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</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>";
|
||||
|
||||
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
|
||||
foreach($generalList as $k=>$general) {
|
||||
@@ -427,7 +427,7 @@ if ($admin['tournament'] == 4 || $admin['tournament'] == 5) {
|
||||
printFighting($admin['tournament'], $admin['phase']);
|
||||
}
|
||||
echo "
|
||||
<tr><td colspan=8 align=center id=bg2><font color=yellow size=5>조별 예선 순위</font></td></tr>
|
||||
<tr><td colspan=8 align=center class='bg2'><font color=yellow size=5>조별 예선 순위</font></td></tr>
|
||||
<tr>";
|
||||
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
@@ -436,7 +436,7 @@ for ($i=0; $i < 8; $i++) {
|
||||
<td>
|
||||
<table align=center width=250 class='tb_layout bg0'>
|
||||
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
|
||||
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</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>";
|
||||
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</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>";
|
||||
|
||||
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
|
||||
foreach($generalList as $k=>$general) {
|
||||
|
||||
+10
-11
@@ -44,7 +44,7 @@ if($troops){
|
||||
$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',
|
||||
'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]
|
||||
){
|
||||
@@ -53,10 +53,10 @@ if($troops){
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
|
||||
foreach($troopLeaders as $troopLeader){
|
||||
$imageTemp = GetImageURL($troopLeader['imgsvr']);
|
||||
|
||||
|
||||
$troopLeader['pictureFullPath'] = "$imageTemp/{$troopLeader['picture']}";
|
||||
$troopLeader['cityText'] = CityConst::byID($troopLeader['city'])->name;
|
||||
|
||||
@@ -85,15 +85,14 @@ uasort($troops, function($lhs, $rhs){
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/troop.js')?>
|
||||
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||
<?=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')?>
|
||||
<?=WebUtil::printCSS('css/troops.css')?>
|
||||
<?=WebUtil::printCSS('dist_css/troop.css')?>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -195,7 +194,7 @@ foreach ($troops as $troopNo=>$troop) {
|
||||
<br>
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=80 id=bg1>부 대 명</td>
|
||||
<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>
|
||||
@@ -210,6 +209,6 @@ foreach ($troops as $troopNo=>$troop) {
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?=WebUtil::printJS('dist_js/troop.js')?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -50,17 +50,13 @@ else{
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/battle_simulator.css')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/download2.js')?>
|
||||
<?=WebUtil::printJS('js/common.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('js/battle_simulator.js')?>
|
||||
<?=WebUtil::printJS('dist_js/battle_simulator.js')?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
@@ -123,7 +119,7 @@ var nation = <?=Json::encode($nation)?>;
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(GameConst::$availableNationType as $typeID): ?>
|
||||
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
|
||||
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?=$typeID?>"><?=$nationTypeClass->getName()?> (<?=$nationTypeClass::$pros?>, <?=$nationTypeClass::$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -163,10 +159,10 @@ var nation = <?=Json::encode($nation)?>;
|
||||
<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>
|
||||
@@ -198,7 +194,7 @@ var nation = <?=Json::encode($nation)?>;
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(GameConst::$availableNationType as $typeID): ?>
|
||||
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
|
||||
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
|
||||
<option value="<?=$typeID?>"><?=$nationTypeObj->getName()?> (<?=$nationTypeObj::$pros?>, <?=$nationTypeObj::$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -305,7 +301,7 @@ var nation = <?=Json::encode($nation)?>;
|
||||
<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>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
@@ -484,7 +480,7 @@ var nation = <?=Json::encode($nation)?>;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
|
||||
+1
-2
@@ -7,7 +7,7 @@ include "func.php";
|
||||
|
||||
$btn = Util::getPost('btn');
|
||||
$msg = Util::getPost('msg');
|
||||
$scoutmsg = Util::getPost('scoutmsg');
|
||||
$scoutmsg = Util::getPost('scoutMsg');
|
||||
$rate = Util::getPost('rate', 'int');
|
||||
$bill = Util::getPost('bill', 'int');
|
||||
$secretlimit = Util::getPost('secretlimit', 'int');
|
||||
@@ -75,4 +75,3 @@ if($btn == "국가방침 수정") {
|
||||
}
|
||||
|
||||
header('location:b_dipcenter.php');
|
||||
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin |= $session->userGrade >= 5;
|
||||
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
@@ -24,7 +24,7 @@ $admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votec
|
||||
|
||||
$generalID = Session::getGeneralID();
|
||||
|
||||
$general = General::createGeneralObjFromDB($generalID, ['vote','horse','weapon','book','item','npc'], 2);
|
||||
$general = General::createGeneralObjFromDB($generalID, ['vote','horse','weapon','book','item','npc','imgsvr','picture','aux'], 2);
|
||||
|
||||
if($btn == "투표" && $general->getVar('vote') == 0 && $sel > 0) {
|
||||
$develcost = $admin['develcost'] * 5;
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#newArticle{
|
||||
width:1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.titleInput{
|
||||
width:100%;
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
margin:1px 5px;
|
||||
}
|
||||
|
||||
.contentInput{
|
||||
width:100%;
|
||||
min-height:3em;
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
padding:1px 5px;
|
||||
}
|
||||
|
||||
.articleFrame{
|
||||
width:1000px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.commentText{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.authorName, .comment .author{
|
||||
width:110px;
|
||||
font-size:85%;
|
||||
}
|
||||
|
||||
.date{
|
||||
width:125px;
|
||||
font-size:85%;
|
||||
}
|
||||
|
||||
.text{
|
||||
text-align:left;
|
||||
padding:1px 5px;
|
||||
}
|
||||
|
||||
.submitComment{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.commentText{
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
padding:1px 5px;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#inheritance_list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.inherit_padding{
|
||||
width: 33%;
|
||||
padding: 10px 2px;
|
||||
}
|
||||
|
||||
.inherit_item{
|
||||
width: 33%;
|
||||
padding: 10px 2px;
|
||||
}
|
||||
|
||||
.col-form-label{
|
||||
text-align:right;
|
||||
padding-right:2ch;
|
||||
}
|
||||
|
||||
.inherit_value{
|
||||
text-align: right;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
.section_bar{
|
||||
text-align:center;
|
||||
border:0.5px solid #aaa;
|
||||
padding-right:0;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
.sub_bar{
|
||||
text-align:center;
|
||||
border:0.5px solid #aaa;
|
||||
margin-left:-5px;
|
||||
margin-right:-5px;
|
||||
}
|
||||
|
||||
.reset_btn{
|
||||
width:15ch;
|
||||
}
|
||||
|
||||
.submit_btn{
|
||||
margin-left:1em;
|
||||
width:15ch;
|
||||
}
|
||||
|
||||
.control_bar{
|
||||
margin-top:8pt;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.col-form-label{
|
||||
text-align:right;
|
||||
padding-right:2ch;
|
||||
}
|
||||
|
||||
.form_list{
|
||||
padding:8pt;
|
||||
}
|
||||
|
||||
.half_section_left{
|
||||
padding-right:0;
|
||||
border-right:0.5px solid #aaa;
|
||||
}
|
||||
.half_section_right{
|
||||
padding-left:0;
|
||||
|
||||
}
|
||||
|
||||
.popover{
|
||||
max-width:100%;
|
||||
}
|
||||
@@ -1,8 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
class DB{
|
||||
//https://hub.packtpub.com/eloquent-without-laravel/
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
use Illuminate\Container\Container;
|
||||
|
||||
class DB
|
||||
{
|
||||
private static $uDB = null;
|
||||
private static ?Capsule $uIlluminate = null;
|
||||
|
||||
private static $host = '_tK_host_';
|
||||
private static $user = '_tK_user_';
|
||||
@@ -10,11 +18,36 @@ class DB{
|
||||
private static $dbName = '_tK_dbName_';
|
||||
private static $port = _tK_port_;
|
||||
private static $encoding = 'utf8mb4';
|
||||
private static $collation = 'utf8mb4_general_ci';
|
||||
|
||||
private static $prefix = '_tK_prefix_';
|
||||
|
||||
private function __construct(){
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public static function illuminate(): Capsule
|
||||
{
|
||||
if(self::$uIlluminate !== null){
|
||||
return self::$uIlluminate;
|
||||
}
|
||||
$capsule = new Capsule;
|
||||
|
||||
$capsule->addConnection([
|
||||
'driver' => 'mysql',
|
||||
'host' => self::$host,
|
||||
'database' => self::$dbName,
|
||||
'username' => self::$user,
|
||||
'password' => self::$password,
|
||||
'charset' => self::$encoding,
|
||||
'collation' => self::$collation,
|
||||
]);
|
||||
|
||||
$capsule->setEventDispatcher(new Dispatcher(new Container));
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
self::$uIlluminate = $capsule;
|
||||
return $capsule;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -23,12 +56,14 @@ class DB{
|
||||
* @return \MeekroDB
|
||||
* @suppress PhanTypeMismatchProperty
|
||||
*/
|
||||
public static function db(){
|
||||
if(self::$uDB === null){
|
||||
self::$uDB = new \MeekroDB(self::$host,self::$user,self::$password,self::$dbName,self::$port,self::$encoding);
|
||||
public static function db()
|
||||
{
|
||||
if (self::$uDB === null) {
|
||||
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
|
||||
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
|
||||
self::$uDB->error_handler= function(){};
|
||||
self::$uDB->error_handler = function () {
|
||||
};
|
||||
self::$uDB->throw_exception_on_error = true;
|
||||
self::$uDB->throw_exception_on_nonsql_error = true;
|
||||
}
|
||||
@@ -39,4 +74,4 @@ class DB{
|
||||
{
|
||||
return self::$prefix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class VersionGit extends VersionGitDynamic {
|
||||
}
|
||||
//{"version":"dynamic","hash":"dynamic"}
|
||||
@@ -2,8 +2,15 @@
|
||||
namespace sammo;
|
||||
|
||||
class VersionGit{
|
||||
public static $version = '_tK_verionGit_';
|
||||
static function getVersion()
|
||||
{
|
||||
return '_tK_verionGit_';
|
||||
}
|
||||
|
||||
static function getHash(){
|
||||
return '_tK_hash_';
|
||||
}
|
||||
|
||||
private function __construct(){}
|
||||
}
|
||||
//{"version":"_tK_verionGit_"}
|
||||
//{"version":"_tK_verionGit_","hash":"_tK_hash_"}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<div class="buttonPlate bg1">
|
||||
<div>
|
||||
<a href="a_status.php" target="_blank"><button class="toolbarButton">세력도</button></a>
|
||||
<a href="a_kingdomList.php" target="_blank"><button class="toolbarButton">세력일람</button></a>
|
||||
<a href="a_genList.php" target="_blank"><button class="toolbarButton">장수일람</button></a>
|
||||
<a href="a_bestGeneral.php" target="_blank"><button class="toolbarButton">명장일람</button></a>
|
||||
<a href="a_history.php" target="_blank"><button class="toolbarButton">연감</button></a>
|
||||
<a href="a_hallOfFame.php" target="_blank"><button class="toolbarButton">명예의전당</button></a>
|
||||
<a href="a_emperior.php" target="_blank"><button class="toolbarButton">왕조일람</button></a>
|
||||
<a href="a_traffic.php" target="_blank"><button class="toolbarButton">접속량정보</button></a>
|
||||
<a href="a_status.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력도</button></a>
|
||||
<a href="a_kingdomList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력일람</button></a>
|
||||
<a href="a_genList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">장수일람</button></a>
|
||||
<a href="a_bestGeneral.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명장일람</button></a>
|
||||
<a href="a_history.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">연감</button></a>
|
||||
<a href="a_hallOfFame.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명예의전당</button></a>
|
||||
<a href="a_emperior.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">왕조일람</button></a>
|
||||
<a href="a_traffic.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">접속량정보</button></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/bbs/board" target="_blank"><button class="toolbarButton2">삼모게시판</button></a>
|
||||
<a href="/bbs/tip" target="_blank"><button class="toolbarButton">팁/강좌</button></a>
|
||||
<a href="/bbs/news" target="_blank"><button class="toolbarButton">삼국 일보</button></a>
|
||||
<a href="/bbs/history2" target="_blank"><button class="toolbarButton">개인 열전</button></a>
|
||||
<a href="/bbs/history3" target="_blank"><button class="toolbarButton">국가 열전</button></a>
|
||||
<a href="/bbs/patch" target="_blank"><button class="toolbarButton">패치 내역</button></a>
|
||||
<a href="../i_other/help.php" target="_blank"><button class="toolbarButton">튜토리얼</button></a>
|
||||
<a href="<?=$site?>" target="_blank"><button class="toolbarButton"><?=$call?></button></a>
|
||||
<a href="/bbs/board" target="_blank"><button type="button" class="toolbarButton2">삼모게시판</button></a>
|
||||
<a href="/bbs/tip" target="_blank"><button type="button" class="toolbarButton">팁/강좌</button></a>
|
||||
<a href="/bbs/news" target="_blank"><button type="button" class="toolbarButton">삼국 일보</button></a>
|
||||
<a href="/bbs/history2" target="_blank"><button type="button" class="toolbarButton">개인 열전</button></a>
|
||||
<a href="/bbs/history3" target="_blank"><button type="button" class="toolbarButton">국가 열전</button></a>
|
||||
<a href="/bbs/patch" target="_blank"><button type="button" class="toolbarButton">패치 내역</button></a>
|
||||
<a href="battle_simulator.php" target="_blank"><button type="button" class="toolbarButton">전투 시뮬레이터</button></a>
|
||||
<a href="<?=$site?>" target="_blank" class="open-window"><button type="button" class="toolbarButton"><?=$call?></button></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+350
-83
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace sammo;
|
||||
|
||||
use DateTime;
|
||||
use sammo\Event\Action;
|
||||
|
||||
require_once 'process_war.php';
|
||||
@@ -21,10 +22,10 @@ require_once('func_command.php');
|
||||
|
||||
/**
|
||||
* nationID를 이용하여 국가의 '어지간해선' 변경되지 않는 정보(이름, 색, 성향, 규모, 수도)를 반환해줌
|
||||
*
|
||||
*
|
||||
* @param int|null $nationID 국가 코드, -1인 경우 전체, null인 경우 수행하지 않음. 0인 경우에는 재야임
|
||||
* @param bool $forceRefresh 강제 갱신 여부
|
||||
*
|
||||
*
|
||||
* @return array|null nationID에 해당하는 국가가 있을 경우 array 반환. 그외의 경우 null
|
||||
*/
|
||||
function getNationStaticInfo($nationID, $forceRefresh = false)
|
||||
@@ -189,7 +190,7 @@ function myNationInfo(General $generalObj)
|
||||
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
|
||||
|
||||
$nationID = $generalObj->getNationID();
|
||||
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation = %i', $nationID)??getNationStaticInfo(0);
|
||||
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation = %i', $nationID) ?? getNationStaticInfo(0);
|
||||
$city = $db->queryFirstRow(
|
||||
'SELECT COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop_max) as maxpop from city where nation=%i',
|
||||
$nationID
|
||||
@@ -198,16 +199,16 @@ function myNationInfo(General $generalObj)
|
||||
|
||||
$topChiefs = Util::convertArrayToDict($db->query('SELECT officer_level, no, name, npc FROM general WHERE nation = %i AND officer_level >= 11', $nationID), 'officer_level');
|
||||
|
||||
$level12Name = key_exists(12, $topChiefs)?getColoredName($topChiefs[12]['name'], $topChiefs[12]['npc']):'-';
|
||||
$level11Name = key_exists(11, $topChiefs)?getColoredName($topChiefs[11]['name'], $topChiefs[11]['npc']):'-';
|
||||
$level12Name = key_exists(12, $topChiefs) ? getColoredName($topChiefs[12]['name'], $topChiefs[12]['npc']) : '-';
|
||||
$level11Name = key_exists(11, $topChiefs) ? getColoredName($topChiefs[11]['name'], $topChiefs[11]['npc']) : '-';
|
||||
|
||||
$impossibleStrategicCommandLists = [];
|
||||
$strategicCommandLists = GameConst::$availableChiefCommand['전략'];
|
||||
$yearMonth = Util::joinYearMonth($admin['year'], $admin['month']);
|
||||
foreach($strategicCommandLists as $command){
|
||||
foreach ($strategicCommandLists as $command) {
|
||||
$cmd = buildNationCommandClass($command, $generalObj, $admin, new LastTurn());
|
||||
$nextAvailableTurn = $cmd->getNextAvailableTurn();
|
||||
if($nextAvailableTurn > $yearMonth){
|
||||
if ($nextAvailableTurn > $yearMonth) {
|
||||
$impossibleStrategicCommandLists[] = [$cmd->getName(), $nextAvailableTurn - $yearMonth];
|
||||
}
|
||||
}
|
||||
@@ -239,28 +240,28 @@ function myNationInfo(General $generalObj)
|
||||
<tr>
|
||||
<td class='bg1 center'><b>총주민</b></td>
|
||||
<td class='center'>";
|
||||
echo $nationID===0 ? "해당 없음" : "{$city['totpop']}/{$city['maxpop']}";
|
||||
echo $nationID === 0 ? "해당 없음" : "{$city['totpop']}/{$city['maxpop']}";
|
||||
echo "</td>
|
||||
<td class='bg1 center'><b>총병사</b></td>
|
||||
<td class='center'>";
|
||||
echo $nationID===0 ? "해당 없음" : "{$general['totcrew']}/{$general['maxcrew']}";
|
||||
echo $nationID === 0 ? "해당 없음" : "{$general['totcrew']}/{$general['maxcrew']}";
|
||||
echo "</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1 center'><b>국 고</b></td>
|
||||
<td class='center'>";
|
||||
echo $nationID===0 ? "해당 없음" : "{$nation['gold']}";
|
||||
echo $nationID === 0 ? "해당 없음" : "{$nation['gold']}";
|
||||
echo "</td>
|
||||
<td class='bg1 center'><b>병 량</b></td>
|
||||
<td class='center'>";
|
||||
echo $nationID===0 ? "해당 없음" : "{$nation['rice']}";
|
||||
echo $nationID === 0 ? "해당 없음" : "{$nation['rice']}";
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1 center'><b>지급률</b></td>
|
||||
<td class='center'>";
|
||||
if ($nationID===0) {
|
||||
if ($nationID === 0) {
|
||||
echo "해당 없음";
|
||||
} else {
|
||||
echo $nation['bill'] == 0 ? "0 %" : "{$nation['bill']} %";
|
||||
@@ -269,7 +270,7 @@ function myNationInfo(General $generalObj)
|
||||
</td>
|
||||
<td class='bg1 center'><b>세 율</b></td>
|
||||
<td class='center'>";
|
||||
if ($nationID===0) {
|
||||
if ($nationID === 0) {
|
||||
echo "해당 없음";
|
||||
} else {
|
||||
echo $nation['rate'] == 0 ? "0 %" : "{$nation['rate']} %";
|
||||
@@ -285,7 +286,7 @@ function myNationInfo(General $generalObj)
|
||||
|
||||
$nation['tech'] = "$techCall / {$nation['tech']}";
|
||||
|
||||
if ($nationID===0) {
|
||||
if ($nationID === 0) {
|
||||
$nation['strategic_cmd_limit'] = "<font color=white>해당 없음</font>";
|
||||
$nation['surlimit'] = "<font color=white>해당 없음</font>";
|
||||
$nation['scout'] = "<font color=white>해당 없음</font>";
|
||||
@@ -294,20 +295,20 @@ function myNationInfo(General $generalObj)
|
||||
} else {
|
||||
if ($nation['strategic_cmd_limit'] != 0) {
|
||||
$nation['strategic_cmd_limit'] = "<font color=red>{$nation['strategic_cmd_limit']}턴</font>";
|
||||
} else if($impossibleStrategicCommandLists) {
|
||||
} else if ($impossibleStrategicCommandLists) {
|
||||
$nation['strategic_cmd_limit'] = "<font color=yellow>가 능</font>";
|
||||
} else{
|
||||
} else {
|
||||
$nation['strategic_cmd_limit'] = "<font color=limegreen>가 능</font>";
|
||||
}
|
||||
|
||||
if($impossibleStrategicCommandLists){
|
||||
if ($impossibleStrategicCommandLists) {
|
||||
$text = [];
|
||||
foreach($impossibleStrategicCommandLists as [$cmdName, $remainTurn]){
|
||||
foreach ($impossibleStrategicCommandLists as [$cmdName, $remainTurn]) {
|
||||
$text[] = "{$cmdName}: {$remainTurn}턴 뒤";
|
||||
}
|
||||
$nation['strategic_cmd_limit'] = $templates->render('tooltip', [
|
||||
'text'=>'<span style="text-decoration:underline dashed;">'.$nation['strategic_cmd_limit'].'</span>',
|
||||
'info'=>'<span class="text-left d-inline-block">'.join('<br>', $text).'</span>',
|
||||
'text' => '<span style="text-decoration:underline dashed;">' . $nation['strategic_cmd_limit'] . '</span>',
|
||||
'info' => '<span class="text-left d-inline-block">' . join('<br>', $text) . '</span>',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -336,11 +337,11 @@ function myNationInfo(General $generalObj)
|
||||
<tr>
|
||||
<td style='text-align:center;' class='bg1'><b>속 령</b></td>
|
||||
<td style='text-align:center;'>";
|
||||
echo $nationID===0 ? "-" : "{$city['cnt']}";
|
||||
echo $nationID === 0 ? "-" : "{$city['cnt']}";
|
||||
echo "</td>
|
||||
<td style='text-align:center;' class='bg1'><b>장 수</b></td>
|
||||
<td style='text-align:center;'>";
|
||||
echo $nationID===0 ? "-" : "{$general['cnt']}";
|
||||
echo $nationID === 0 ? "-" : "{$general['cnt']}";
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -348,7 +349,7 @@ function myNationInfo(General $generalObj)
|
||||
<td style='text-align:center;'>{$nation['power']}</td>
|
||||
<td style='text-align:center;' class='bg1'><b>기술력</b></td>
|
||||
<td style='text-align:center;'>";
|
||||
echo $nationID===0 ? "-" : "{$nation['tech']}";
|
||||
echo $nationID === 0 ? "-" : "{$nation['tech']}";
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -903,17 +904,16 @@ function nationMsg(General $general)
|
||||
$db = DB::db();
|
||||
$nationID = $general->getNationID();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
|
||||
return $nationStor->notice??'';
|
||||
|
||||
return $nationStor->notice ?? '';
|
||||
}
|
||||
|
||||
function banner()
|
||||
{
|
||||
|
||||
return sprintf(
|
||||
'<font size=2>%s %s / %s</font>',
|
||||
GameConst::$title,
|
||||
VersionGit::$version,
|
||||
VersionGit::getVersion(),
|
||||
GameConst::$banner
|
||||
);
|
||||
}
|
||||
@@ -1006,7 +1006,7 @@ function increaseRefresh($type = "", $cnt = 1)
|
||||
$isunited = $gameStor->isunited;
|
||||
$opentime = $gameStor->opentime;
|
||||
|
||||
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::DatetimeNow()) {
|
||||
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::now()) {
|
||||
$db->update('general', [
|
||||
'lastrefresh' => $date,
|
||||
'con' => $db->sqleval('con + %i', $cnt),
|
||||
@@ -1227,14 +1227,14 @@ function updateOnline()
|
||||
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s AND npc < 2', $before5Min);
|
||||
$onlineNum = count($onlineUser);
|
||||
$onlineNationUsers = Util::arrayGroupBy($onlineUser, 'nation');
|
||||
|
||||
uasort($onlineNationUsers, function(array $lhs, array $rhs){
|
||||
return -(count($lhs)<=>count($rhs));
|
||||
|
||||
uasort($onlineNationUsers, function (array $lhs, array $rhs) {
|
||||
return - (count($lhs) <=> count($rhs));
|
||||
});
|
||||
|
||||
$onlineNation = [];
|
||||
$onlineNation = [];
|
||||
|
||||
foreach($onlineNationUsers as $nationID=>$rawOnlineUser){
|
||||
foreach ($onlineNationUsers as $nationID => $rawOnlineUser) {
|
||||
$nationName = getNationStaticInfo($nationID)['name'];
|
||||
$onlineNation[] = "【{$nationName}】";
|
||||
$userList = join(', ', Util::squeezeFromArray($rawOnlineUser, 'name'));
|
||||
@@ -1256,9 +1256,12 @@ function addAge()
|
||||
//나이와 호봉 증가
|
||||
$db->update('general', [
|
||||
'age' => $db->sqleval('age+1'),
|
||||
'belong' => $db->sqleval('belong+1')
|
||||
], true);
|
||||
|
||||
$db->update('general', [
|
||||
'belong' => $db->sqleval('belong+1')
|
||||
], 'nation != 0');
|
||||
|
||||
[$startYear, $year, $month] = $gameStor->getValuesAsArray(['startyear', 'year', 'month']);
|
||||
|
||||
if ($year >= $startYear + 3) {
|
||||
@@ -1266,7 +1269,7 @@ function addAge()
|
||||
$generalID = $general['no'];
|
||||
$special = SpecialityHelper::pickSpecialDomestic(
|
||||
$general,
|
||||
(Json::decode($general['aux'])['prev_types_special'])??[]
|
||||
(Json::decode($general['aux'])['prev_types_special']) ?? []
|
||||
);
|
||||
$specialClass = buildGeneralSpecialDomesticClass($special);
|
||||
$specialText = $specialClass->getName();
|
||||
@@ -1283,16 +1286,25 @@ function addAge()
|
||||
|
||||
foreach ($db->query('SELECT no,name,nation,leadership,strength,intel,npc,dex1,dex2,dex3,dex4,dex5,aux from general where specage2<=age and special2=%s', GameConst::$defaultSpecialWar) as $general) {
|
||||
$generalID = $general['no'];
|
||||
$special2 = SpecialityHelper::pickSpecialWar(
|
||||
$general,
|
||||
(Json::decode($general['aux'])['prev_types_special2'])??[]
|
||||
);
|
||||
$generalAux = Json::decode($general['aux']);
|
||||
|
||||
$updateVars = [];
|
||||
if (key_exists('inheritSpecificSpecialWar', $generalAux)) {
|
||||
$special2 = $generalAux['inheritSpecificSpecialWar'];
|
||||
unset($generalAux['inheritSpecificSpecialWar']);
|
||||
$updateVars['aux'] = Json::encode($generalAux);
|
||||
} else {
|
||||
$special2 = SpecialityHelper::pickSpecialWar(
|
||||
$general,
|
||||
($generalAux['prev_types_special2']) ?? []
|
||||
);
|
||||
}
|
||||
|
||||
$specialClass = buildGeneralSpecialWarClass($special2);
|
||||
$specialText = $specialClass->getName();
|
||||
|
||||
$db->update('general', [
|
||||
'special2' => $special2
|
||||
], 'no=%i', $general['no']);
|
||||
$updateVars['special2'] = $special2;
|
||||
$db->update('general', $updateVars, 'no=%i', $general['no']);
|
||||
|
||||
$logger = new ActionLogger($generalID, $general['nation'], $year, $month);
|
||||
|
||||
@@ -1336,17 +1348,29 @@ function triggerTournament()
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$admin = $gameStor->getValues(['tournament', 'tnmt_trig']);
|
||||
[$tournament, $tnmt_trig, $tnmt_pattern] = $gameStor->getValuesAsArray(['tournament', 'tnmt_trig', 'tnmt_pattern']);
|
||||
|
||||
//현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
|
||||
if ($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
|
||||
$type = rand() % 5; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
||||
//전력전 40%, 통, 일, 설 각 20%
|
||||
if ($type > 3) {
|
||||
$type = 0;
|
||||
}
|
||||
startTournament($admin['tnmt_trig'], $type);
|
||||
if($tournament != 0){
|
||||
return;
|
||||
}
|
||||
if($tnmt_trig == 0){
|
||||
return;
|
||||
}
|
||||
if(!Util::randBool(0.4)){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!$tnmt_pattern){
|
||||
// 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
||||
//전력전 40%, 통, 일, 설 각 20%
|
||||
$tnmt_pattern = [0, 0, 1, 2, 3];
|
||||
shuffle($tnmt_pattern);
|
||||
}
|
||||
|
||||
$tnmt_type = array_pop($tnmt_pattern);
|
||||
$gameStor->setValue('tnmt_pattern', $tnmt_pattern);
|
||||
startTournament($tnmt_trig, $tnmt_type);
|
||||
}
|
||||
|
||||
function CheckHall($no)
|
||||
@@ -1538,15 +1562,15 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
||||
$occupiedUnique = [];
|
||||
|
||||
$invalidItemType = [];
|
||||
foreach(array_keys(GameConst::$allItems) as $itemType){
|
||||
$ownItem = $general->getItems()[$itemType]??null;
|
||||
if($ownItem !== null && !$ownItem->isBuyable()){
|
||||
foreach (array_keys(GameConst::$allItems) as $itemType) {
|
||||
$ownItem = $general->getItems()[$itemType] ?? null;
|
||||
if ($ownItem !== null && !$ownItem->isBuyable()) {
|
||||
$invalidItemType[$itemType] = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (array_keys(GameConst::$allItems) as $itemType) {
|
||||
if(key_exists($itemType, $invalidItemType)){
|
||||
if (key_exists($itemType, $invalidItemType)) {
|
||||
continue;
|
||||
}
|
||||
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
|
||||
@@ -1562,11 +1586,11 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
||||
}
|
||||
|
||||
foreach (GameConst::$allItems as $itemType => $itemCategories) {
|
||||
if(key_exists($itemType, $invalidItemType)){
|
||||
if (key_exists($itemType, $invalidItemType)) {
|
||||
continue;
|
||||
}
|
||||
foreach ($itemCategories as $itemCode => $cnt) {
|
||||
if($cnt == 0){
|
||||
if ($cnt == 0) {
|
||||
continue;
|
||||
}
|
||||
if (!key_exists($itemCode, $occupiedUnique)) {
|
||||
@@ -1582,9 +1606,19 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
||||
}
|
||||
|
||||
if (!$availableUnique) {
|
||||
if ($general->getAuxVar('inheritRandomUnique')) {
|
||||
$general->setAuxVar('inheritRandomUnique', null);
|
||||
$general->increaseInheritancePoint('previous', GameConst::$inheritItemRandomPoint);
|
||||
$userLogger = new UserLogger($general->getVar('owner'));
|
||||
$userLogger->push(sprintf("얻을 유니크가 없어 %d 포인트 반환", GameConst::$inheritItemRandomPoint), "inheritPoint");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($general->getAuxVar('inheritRandomUnique')) {
|
||||
$general->setAuxVar('inheritRandomUnique', null);
|
||||
}
|
||||
|
||||
[$itemType, $itemCode] = Util::choiceRandomUsingWeightPair($availableUnique);
|
||||
|
||||
$nationName = $general->getStaticNation()['name'];
|
||||
@@ -1608,6 +1642,207 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
||||
return true;
|
||||
}
|
||||
|
||||
function rollbackInheritUniqueTrial(General $general, string $itemKey, string $reason)
|
||||
{
|
||||
|
||||
$ownerID = $general->getVar('owner');
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
$itemTrials = $general->getAuxVar('inheritUniqueTrial');
|
||||
LogText("선택유니크 롤백:{$ownerID}", [$itemKey, $itemTrials]);
|
||||
unset($itemTrials[$itemKey]);
|
||||
if(count($itemTrials) == 0){
|
||||
$itemTrials = null;
|
||||
}
|
||||
$general->setAuxVar('inheritUniqueTrial', $itemTrials);
|
||||
|
||||
|
||||
$trialStor = KVStorage::getStorage($db, "ut_{$itemKey}");
|
||||
$ownTrial = $trialStor->getValue("u{$ownerID}");
|
||||
|
||||
$itemObj = buildItemClass($itemKey);
|
||||
$itemName = $itemObj->getName();
|
||||
|
||||
if ($ownTrial) {
|
||||
//두 값이 general, KVStorage 둘다 있고, 이중에선 KVStorage 값을 기준으로 하자 따르자
|
||||
[,, $amount] = $ownTrial;
|
||||
$trialStor->deleteValue("u{$ownerID}");
|
||||
$general->increaseInheritancePoint('previous', $amount);
|
||||
LogText("선택유니크 롤백포인트:{$ownerID}", $amount);
|
||||
|
||||
$userLogger = new UserLogger($ownerID);
|
||||
$userLogger->push("{$itemName} 입찰에 사용한 {$amount} 포인트 반환", "inheritPoint");
|
||||
}
|
||||
|
||||
//메시지
|
||||
|
||||
$staticNation = $general->getStaticNation();
|
||||
|
||||
$unlimited = new \DateTime('9999-12-31');
|
||||
$src = new MessageTarget(0, '', 0, 'System', '#000000');
|
||||
$dest = new MessageTarget($general->getID(), $general->getName(), $general->getNationID(), $staticNation['name'], $staticNation['color'], GetImageURL($general->getVar('imgsvr'), $general->getVar('picture')));
|
||||
$josaUl = JosaUtil::pick($itemName, '을');
|
||||
$msg = new Message(
|
||||
Message::MSGTYPE_PRIVATE,
|
||||
$src,
|
||||
$dest,
|
||||
"{$itemName}{$josaUl} 얻지 못했습니다. {$reason}",
|
||||
new DateTime(),
|
||||
$unlimited,
|
||||
[]
|
||||
);
|
||||
|
||||
$general->applyDB($db);
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
function tryRollbackInheritUniqueItem(General $general): void
|
||||
{
|
||||
tryInheritUniqueItem($general, 'Rollback', true);
|
||||
}
|
||||
|
||||
function tryInheritUniqueItem(General $general, string $acquireType = '아이템', bool $justRollback = false): bool
|
||||
{
|
||||
$ownerID = $general->getVar('owner');
|
||||
if (!$ownerID) {
|
||||
LogText("선택유니크 실패???: {$ownerID}", $general->getName());
|
||||
return false;
|
||||
}
|
||||
|
||||
$itemTrials = $general->getAuxVar('inheritUniqueTrial') ?? [];
|
||||
arsort($itemTrials);
|
||||
LogText("선택유니크항목: {$ownerID}", $itemTrials);
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
$ownTarget = null;
|
||||
$ownType = null;
|
||||
|
||||
foreach ($itemTrials as $itemKey => $amount) {
|
||||
$availableItemTypes = [];
|
||||
$reasons = [];
|
||||
foreach (GameConst::$allItems as $itemType => $itemList) {
|
||||
//아직은 그런 경우는 없지만 동일 유니크를 여러 부위에 장착할 수 있을지도 모름
|
||||
if (!key_exists($itemKey, $itemList)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ownItem = $general->getItem($itemType);
|
||||
if ($ownItem->getRawClassName() == $itemKey) {
|
||||
$reasons[] = '이미 그 유니크를 가지고 있습니다.';
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
if (!$ownItem->isBuyable()) {
|
||||
$reasons[] = '이미 다른 유니크를 가지고 있습니다.';
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
$availableCnt = $itemList[$itemKey];
|
||||
$occupiedCnt = $db->queryFirstField('SELECT count(*) FROM general WHERE %b = %s', $itemType, $itemKey);
|
||||
if ($occupiedCnt >= $availableCnt) {
|
||||
$reasons[] = '그 유니크는 모두 점유되었습니다.';
|
||||
continue;
|
||||
}
|
||||
$availableItemTypes[] = $itemType;
|
||||
}
|
||||
|
||||
if (!$availableItemTypes) {
|
||||
rollbackInheritUniqueTrial($general, $itemKey, join(' ', $reasons));
|
||||
continue;
|
||||
}
|
||||
$reasons = [];
|
||||
|
||||
$itemType = Util::choiceRandom($availableItemTypes);
|
||||
|
||||
$trialStor = KVStorage::getStorage($db, "ut_{$itemKey}"); //혹시 itemKey의 크기가 37이 넘을 수 있을까?
|
||||
$anyTrials = $trialStor->getAll();
|
||||
if (!$anyTrials) {
|
||||
//순서가 꼬였던 모양, 실제 값은 storage를 우선시하자
|
||||
rollbackInheritUniqueTrial($general, $itemKey, '절차상의 오류입니다.');
|
||||
continue;
|
||||
}
|
||||
|
||||
//XXX: 정렬할 필요 없지 않나?
|
||||
usort($anyTrials, function ($lhsTrial, $rhsTrial) {
|
||||
[,, $lhsAmount] = $lhsTrial;
|
||||
[,, $rhsAmount] = $rhsTrial;
|
||||
return $rhsAmount <=> $lhsAmount; //큰 값이 앞에 오도록
|
||||
});
|
||||
|
||||
LogText("선택유니크상태 {$ownerID} {$itemKey}", $anyTrials);
|
||||
|
||||
//공동 1등인데 본인이 있을 수도 있다.
|
||||
[,, $topAmount] = $anyTrials[0];
|
||||
if ($amount < $topAmount) {
|
||||
$compAmount = $topAmount / $amount;
|
||||
if ($compAmount > 2.0) {
|
||||
$compText = '엄청난 차이로 ';
|
||||
} else if ($compAmount > 1.2) {
|
||||
$compText = '큰 차이로 ';
|
||||
} else if ($compAmount > 1.05) {
|
||||
$compText = '';
|
||||
} else {
|
||||
$compText = '아슬아슬한 차이로 ';
|
||||
}
|
||||
rollbackInheritUniqueTrial($general, $itemKey, "{$compText}상위 입찰한 장수가 있습니다.");
|
||||
continue;
|
||||
}
|
||||
|
||||
//내가 1위다
|
||||
if ($ownTarget !== null) {
|
||||
//이미 다른 아이템을 얻기로 되어있다.
|
||||
continue;
|
||||
}
|
||||
$ownTarget = $itemKey;
|
||||
$ownType = $itemType;
|
||||
}
|
||||
unset($itemKey);
|
||||
unset($itemType);
|
||||
|
||||
if ($ownTarget === null) {
|
||||
return false;
|
||||
}
|
||||
if ($justRollback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LogText("선택유니크획득{$ownerID}", $ownTarget);
|
||||
|
||||
$trialStor = KVStorage::getStorage($db, "ut_{$ownTarget}");
|
||||
$trialStor->deleteValue("u{$ownerID}");
|
||||
|
||||
//rollbackInheritUniqueTrial 과정 때문에 새로 받아와야함
|
||||
$itemTrials = $general->getAuxVar('inheritUniqueTrial');
|
||||
unset($itemTrials[$ownTarget]);
|
||||
$general->setAuxVar('inheritUniqueTrial', $itemTrials);
|
||||
|
||||
$nationName = $general->getStaticNation()['name'];
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
$itemObj = buildItemClass($ownTarget);
|
||||
$itemName = $itemObj->getName();
|
||||
$itemRawName = $itemObj->getRawName();
|
||||
$josaUl = JosaUtil::pick($itemRawName, '을');
|
||||
|
||||
|
||||
$general->setVar($ownType, $ownTarget);
|
||||
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$logger->pushGeneralActionLog("<C>{$itemName}</>{$josaUl} 습득했습니다!");
|
||||
$logger->pushGeneralHistoryLog("<C>{$itemName}</>{$josaUl} 습득");
|
||||
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <C>{$itemName}</>{$josaUl} 습득했습니다!");
|
||||
$logger->pushGlobalHistoryLog("<C><b>【{$acquireType}】</b></><D><b>{$nationName}</b></>의 <Y>{$generalName}</>{$josaYi} <C>{$itemName}</>{$josaUl} 습득했습니다!");
|
||||
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function tryUniqueItemLottery(General $general, string $acquireType = '아이템'): bool
|
||||
{
|
||||
$db = DB::db();
|
||||
@@ -1617,25 +1852,48 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($general->getNPCType() > 6) {
|
||||
return false;
|
||||
$itemTypeCnt = count(GameConst::$allItems);
|
||||
|
||||
[$startYear, $year] = $gameStor->getValuesAsArray(['startyear', 'year']);
|
||||
$relYear = $year - $startYear;
|
||||
$maxTrialCountByYear = 1;
|
||||
foreach(GameConst::$maxUniqueItemLimit as $tmpVals){
|
||||
[$targetYear, $targetTrialCnt] = $tmpVals;
|
||||
if($relYear < $targetYear){
|
||||
break;
|
||||
}
|
||||
$maxTrialCountByYear = $targetTrialCnt;
|
||||
}
|
||||
|
||||
$itemTypeCnt = count(GameConst::$allItems);
|
||||
$trialCnt = $itemTypeCnt;
|
||||
$trialCnt = Util::valueFit($itemTypeCnt, null, $maxTrialCountByYear);
|
||||
$maxCnt = $itemTypeCnt;
|
||||
|
||||
foreach ($general->getItems() as $item) {
|
||||
if (!$item->isBuyable()) {
|
||||
$trialCnt -= 1;
|
||||
$maxCnt -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if($trialCnt <= 0){
|
||||
if ($trialCnt <= 0) {
|
||||
LogText("{$general->getName()}, {$general->getID()} 모든 아이템", $trialCnt);
|
||||
if ($general->getAuxVar('inheritRandomUnique')) {
|
||||
$general->setAuxVar('inheritRandomUnique', null);
|
||||
$general->increaseInheritancePoint('previous', GameConst::$inheritItemRandomPoint);
|
||||
$userLogger = new UserLogger($general->getVar('owner'));
|
||||
$userLogger->push(sprintf("유니크를 얻을 공간이 없어 %d 포인트 반환", GameConst::$inheritItemRandomPoint), "inheritPoint");
|
||||
}
|
||||
tryRollbackInheritUniqueItem($general);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$inheritUnique = $general->getAuxVar('inheritUniqueTrial');
|
||||
if ($acquireType != '설문조사' && $inheritUnique && count($inheritUnique)) {
|
||||
$trialResult = tryInheritUniqueItem($general, $acquireType);
|
||||
if ($trialResult) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$scenario = $gameStor->scenario;
|
||||
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
|
||||
@@ -1654,23 +1912,30 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
|
||||
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
|
||||
}
|
||||
|
||||
$prob = Util::valueFit($prob, null, 1 / 4);//최대치 감소
|
||||
$prob = Util::valueFit($prob, null, 1 / 4); //최대치 감소
|
||||
$result = false;
|
||||
|
||||
$prob /= sqrt(2);
|
||||
$moreProb = pow(2, 1 / 4);
|
||||
|
||||
if ($general->getAuxVar('inheritRandomUnique')) {
|
||||
//포인트로 랜덤 유니크 획득
|
||||
$prob = 1;
|
||||
}
|
||||
|
||||
foreach(Util::range($trialCnt) as $_idx){
|
||||
foreach (Util::range($maxCnt) as $_idx) {
|
||||
if (Util::randBool($prob)) {
|
||||
$result = true;
|
||||
break;
|
||||
}
|
||||
$prob *= $moreProb;
|
||||
}
|
||||
if(!$result){
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob);
|
||||
if (!$result) {
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$maxCnt}", $prob);
|
||||
return false;
|
||||
}
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob);
|
||||
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$maxCnt}", $prob);
|
||||
|
||||
return giveRandomUniqueItem($general, $acquireType);
|
||||
}
|
||||
|
||||
@@ -1682,7 +1947,7 @@ function getAdmin()
|
||||
}
|
||||
|
||||
/** @return General[] */
|
||||
function deleteNation(General $lord, bool $applyDB):array
|
||||
function deleteNation(General $lord, bool $applyDB): array
|
||||
{
|
||||
$lordID = $lord->getID();
|
||||
$nationID = $lord->getNationID();
|
||||
@@ -1691,7 +1956,7 @@ function deleteNation(General $lord, bool $applyDB):array
|
||||
|
||||
$db = DB::db();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
|
||||
|
||||
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nationID);
|
||||
$nationName = $nation['name'];
|
||||
|
||||
@@ -1700,17 +1965,18 @@ function deleteNation(General $lord, bool $applyDB):array
|
||||
$josaUn = JosaUtil::pick($nationName, '은');
|
||||
$logger->pushGlobalHistoryLog("<R><b>【멸망】</b></><D><b>{$nationName}</b></>{$josaUn} <R>멸망</>했습니다.");
|
||||
|
||||
|
||||
|
||||
$nationGeneralList = General::createGeneralObjListFromDB(
|
||||
$db->queryFirstColumn(
|
||||
'SELECT `no` FROM general WHERE nation=%i AND no != %i',
|
||||
$nationID,
|
||||
$lordID
|
||||
),
|
||||
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'belong', 'aux'], 1
|
||||
),
|
||||
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'belong', 'aux'],
|
||||
1
|
||||
);
|
||||
$nationGeneralList[$lordID] = $lord;
|
||||
|
||||
|
||||
$nation['generals'] = array_keys($nationGeneralList);
|
||||
$nation['aux'] = Json::decode($nation['aux']);
|
||||
$nation['msg'] = $nationStor->notice;
|
||||
@@ -1723,11 +1989,12 @@ function deleteNation(General $lord, bool $applyDB):array
|
||||
$destroyHistoryLog = "<D><b>{$nationName}</b></>{$josaYi} <R>멸망</>";
|
||||
|
||||
// 전 장수 재야로
|
||||
foreach($nationGeneralList as $general){
|
||||
$general->setAuxVar('max_belong',
|
||||
foreach ($nationGeneralList as $general) {
|
||||
$general->setAuxVar(
|
||||
'max_belong',
|
||||
max(
|
||||
$general->getVar('belong'),
|
||||
$general->getAuxVar('max_belong')??0
|
||||
$general->getAuxVar('max_belong') ?? 0
|
||||
)
|
||||
);
|
||||
$general->setVar('belong', 0);
|
||||
@@ -1740,7 +2007,7 @@ function deleteNation(General $lord, bool $applyDB):array
|
||||
$logger->pushGeneralActionLog($destroyLog, ActionLogger::PLAIN);
|
||||
$logger->pushGeneralHistoryLog($destroyHistoryLog);
|
||||
|
||||
if($applyDB){
|
||||
if ($applyDB) {
|
||||
$general->applyDB($db);
|
||||
}
|
||||
}
|
||||
@@ -1888,7 +2155,7 @@ function searchDistance(int $from, int $maxDist = 99, bool $distForm = false)
|
||||
* @param $from 기준 도시 코드
|
||||
* @param $to 대상 도시 코드
|
||||
* @param array|null $linkNationList 경로에 해당하는 국가 리스트, null인 경우 제한 없음
|
||||
* @return null|int 거리.
|
||||
* @return null|int 거리.
|
||||
*/
|
||||
function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
|
||||
{
|
||||
@@ -1902,7 +2169,7 @@ function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
|
||||
|
||||
if ($linkNationList !== null) {
|
||||
$db = DB::db();
|
||||
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
|
||||
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
|
||||
$allowedCityList = [];
|
||||
foreach ($db->queryFirstColumn(
|
||||
'SELECT city FROM city WHERE nation IN %li',
|
||||
@@ -1965,7 +2232,7 @@ function searchDistanceListToDest(int $from, int $to, array $linkNationList)
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
|
||||
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
|
||||
$allowedCityList = [];
|
||||
foreach ($db->queryAllLists(
|
||||
'SELECT city, nation FROM city WHERE nation IN %li',
|
||||
@@ -2159,7 +2426,7 @@ function getRandTurn($term, ?\DateTimeInterface $baseDateTime = null)
|
||||
$randSecond = Util::randRangeInt(0, 60 * $term - 1);
|
||||
$randFraction = Util::randRangeInt(0, 999999) / 1000000; //6자리 소수
|
||||
|
||||
return $baseDateTime->add(TimeUtil::secondsToDateInterval($randSecond + $randFraction))->format('Y-m-d H:i:s');
|
||||
return TimeUtil::format($baseDateTime->add(TimeUtil::secondsToDateInterval($randSecond + $randFraction)), true);
|
||||
}
|
||||
|
||||
function getRandTurn2($term, ?\DateTimeInterface $baseDateTime = null)
|
||||
@@ -2174,5 +2441,5 @@ function getRandTurn2($term, ?\DateTimeInterface $baseDateTime = null)
|
||||
$randSecond = Util::randRangeInt(0, 60 * $term - 1);
|
||||
$randFraction = Util::randRangeInt(0, 999999) / 1000000; //6자리 소수
|
||||
|
||||
return $baseDateTime->sub(TimeUtil::secondsToDateInterval($randSecond + $randFraction))->format('Y-m-d H:i:s');
|
||||
return $baseDateTime->sub(TimeUtil::secondsToDateInterval($randSecond + $randFraction))->format('Y-m-d H:i:s.u');
|
||||
}
|
||||
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
@@ -6,7 +6,7 @@ use sammo\Command\BaseCommand;
|
||||
|
||||
/**
|
||||
* Value Converter
|
||||
*
|
||||
*
|
||||
* Side effect 없이 값의 변환만을 수행하는 함수들의 모음.
|
||||
* (단, autoload, 정적 변수 초기화는 허용)
|
||||
*/
|
||||
@@ -175,7 +175,7 @@ function buildNationTypeClass(?string $type):BaseNation{
|
||||
return $cache[$type];
|
||||
}
|
||||
$class = getNationTypeClass($type);
|
||||
|
||||
|
||||
$obj = new $class();
|
||||
$cache[$type]= $obj;
|
||||
return $obj;
|
||||
@@ -241,7 +241,7 @@ function buildItemClass(?string $type):BaseItem{
|
||||
return $cache[$type];
|
||||
}
|
||||
$class = getItemClass($type);
|
||||
|
||||
|
||||
$obj = new $class();
|
||||
$cache[$type]= $obj;
|
||||
return $obj;
|
||||
@@ -276,7 +276,7 @@ function buildGeneralSpecialDomesticClass(?string $type):BaseSpecial{
|
||||
return $cache[$type];
|
||||
}
|
||||
$class = getGeneralSpecialDomesticClass($type);
|
||||
|
||||
|
||||
$obj = new $class();
|
||||
$cache[$type]= $obj;
|
||||
return $obj;
|
||||
@@ -311,7 +311,7 @@ function buildGeneralSpecialWarClass(?string $type):BaseSpecial{
|
||||
return $cache[$type];
|
||||
}
|
||||
$class = getGeneralSpecialWarClass($type);
|
||||
|
||||
|
||||
$obj = new $class();
|
||||
$cache[$type]= $obj;
|
||||
return $obj;
|
||||
@@ -391,8 +391,8 @@ function getGeneralPoolClass(string $type){
|
||||
|
||||
/**
|
||||
* @param \MeekroDB $db
|
||||
* @param int $owner
|
||||
* @param int $pickCnt
|
||||
* @param int $owner
|
||||
* @param int $pickCnt
|
||||
* @param null|string $prefix
|
||||
* @return AbsGeneralPool[]
|
||||
*/
|
||||
@@ -538,8 +538,8 @@ function getExpLevel($experience) {
|
||||
|
||||
function getDedLevel($dedication) {
|
||||
$level = Util::valueFit(
|
||||
ceil(sqrt($dedication) / 10),
|
||||
0,
|
||||
ceil(sqrt($dedication) / 10),
|
||||
0,
|
||||
GameConst::$maxDedLevel
|
||||
);
|
||||
|
||||
@@ -572,7 +572,7 @@ function getCost(int $armtype) : int {
|
||||
function getTechLevel($tech):int{
|
||||
return Util::valueFit(
|
||||
floor($tech / 1000),
|
||||
0,
|
||||
0,
|
||||
GameConst::$maxTechLevel
|
||||
);
|
||||
}
|
||||
@@ -583,7 +583,7 @@ function TechLimit($startYear, $year, $tech) : bool {
|
||||
|
||||
$relMaxTech = Util::valueFit(
|
||||
floor($relYear / 5) + 1,
|
||||
1,
|
||||
1,
|
||||
GameConst::$maxTechLevel
|
||||
);
|
||||
|
||||
|
||||
+94
-48
@@ -167,14 +167,15 @@ function checkSupply()
|
||||
}
|
||||
}
|
||||
|
||||
function updateGeneralNumber(){
|
||||
function updateGeneralNumber()
|
||||
{
|
||||
$db = DB::db();
|
||||
foreach($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]){
|
||||
if($nationID === 0){
|
||||
foreach ($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]) {
|
||||
if ($nationID === 0) {
|
||||
continue;
|
||||
}
|
||||
$db->update('nation', [
|
||||
'gennum'=>$gennum
|
||||
'gennum' => $gennum
|
||||
], 'nation=%i', $nationID);
|
||||
}
|
||||
refreshNationStaticInfo();
|
||||
@@ -370,7 +371,11 @@ function postUpdateMonthly()
|
||||
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop_max+agri_max+comm_max+secu_max+wall_max+def_max)/100
|
||||
) from city where nation=A.nation and supply=1
|
||||
))
|
||||
+(select sum(leadership+strength+intel) from general where nation=A.nation)
|
||||
+(select SUM((ra.value + 1000)/(rb.value + 1000)*(CASE WHEN g.`npc` < 2 THEN 1.5 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)*2 + (SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/2)
|
||||
FROM general AS g
|
||||
LEFT JOIN `rank_data` AS ra ON g.`no` = ra.general_id AND ra.`type` = \'killcrew_person\'
|
||||
LEFT JOIN `rank_data` AS rb ON g.`no` = rb.general_id AND rb.`type` = \'deathcrew_person\'
|
||||
WHERE g.nation = A.nation)
|
||||
+(select round(sum(dex1+dex2+dex3+dex4+dex5)/1000) from general where nation=A.nation)
|
||||
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
|
||||
+(select round(avg(connect)) from general where nation=A.nation)
|
||||
@@ -386,7 +391,7 @@ function postUpdateMonthly()
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
$genNum[$nationID] = $nation['gennum'];
|
||||
|
||||
$powerValues = $maxPowerValues[$nationID]??[];
|
||||
$powerValues = $maxPowerValues[$nationID] ?? [];
|
||||
|
||||
//약간의 랜덤치 부여 (95% ~ 105%)
|
||||
|
||||
@@ -405,7 +410,7 @@ function postUpdateMonthly()
|
||||
}
|
||||
|
||||
// 전쟁기한 세팅
|
||||
foreach($db->query('SELECT me, you, dead, term FROM diplomacy WHERE state = 0') as $dip) {
|
||||
foreach ($db->query('SELECT me, you, dead, term FROM diplomacy WHERE state = 0') as $dip) {
|
||||
$genCount = $genNum[$dip['me']];
|
||||
// 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산
|
||||
// 4000 / 10 * 0.25 = 100
|
||||
@@ -420,7 +425,7 @@ function postUpdateMonthly()
|
||||
}
|
||||
|
||||
//개전국 로그
|
||||
foreach($db->query('SELECT me, you FROM diplomacy WHERE state = 1 AND term <= 1 AND me < you') as $dip){
|
||||
foreach ($db->query('SELECT me, you FROM diplomacy WHERE state = 1 AND term <= 1 AND me < you') as $dip) {
|
||||
$nation1 = getNationStaticInfo($dip['me']);
|
||||
$name1 = $nation1['name'];
|
||||
$nation2 = getNationStaticInfo($dip['you']);
|
||||
@@ -432,14 +437,13 @@ function postUpdateMonthly()
|
||||
}
|
||||
//휴전국 로그
|
||||
$stopWarList = [];
|
||||
foreach($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$me, $you]){
|
||||
if($me < $you){
|
||||
foreach ($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$me, $you]) {
|
||||
if ($me < $you) {
|
||||
$key = "{$me}_{$you}";
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$key = "{$you}_{$me}";
|
||||
}
|
||||
if(!key_exists($key, $stopWarList)){
|
||||
if (!key_exists($key, $stopWarList)) {
|
||||
$stopWarList[$key] = true;
|
||||
continue;
|
||||
}
|
||||
@@ -455,8 +459,8 @@ function postUpdateMonthly()
|
||||
|
||||
$globalLogger->pushGlobalHistoryLog("<R><b>【휴전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <S>휴전</>합니다.");
|
||||
$db->update('diplomacy', [
|
||||
'state'=>2,
|
||||
'term'=>0,
|
||||
'state' => 2,
|
||||
'term' => 0,
|
||||
], '(me=%i AND you=%i) OR (you=%i AND me=%i)', $me, $you, $me, $you);
|
||||
}
|
||||
|
||||
@@ -464,17 +468,17 @@ function postUpdateMonthly()
|
||||
|
||||
//사상자 초기화, 외교 기한-1
|
||||
$db->update('diplomacy', [
|
||||
'dead'=>$db->sqleval('if(state!=0, 0, dead)'),
|
||||
'term'=>$db->sqleval('greatest(0, term-1)'),
|
||||
'dead' => $db->sqleval('if(state!=0, 0, dead)'),
|
||||
'term' => $db->sqleval('greatest(0, term-1)'),
|
||||
], true);
|
||||
//불가침 끝나면 통상으로
|
||||
$db->update('diplomacy', [
|
||||
'state'=>2,
|
||||
'state' => 2,
|
||||
], 'state = 7 AND term = 0');
|
||||
//선포 끝나면 교전으로
|
||||
$db->update('diplomacy', [
|
||||
'state'=>0,
|
||||
'term'=>6,
|
||||
'state' => 0,
|
||||
'term' => 6,
|
||||
], 'state = 1 AND term = 0');
|
||||
|
||||
//초반이후 방랑군 자동 해체
|
||||
@@ -567,8 +571,8 @@ function updateNationState()
|
||||
|
||||
$updateVals = [
|
||||
'level' => $nationlevel,
|
||||
'gold'=>$db->sqleval('gold + %i', $nationlevel*1000),
|
||||
'rice'=>$db->sqleval('rice + %i', $nationlevel*1000),
|
||||
'gold' => $db->sqleval('gold + %i', $nationlevel * 1000),
|
||||
'rice' => $db->sqleval('rice + %i', $nationlevel * 1000),
|
||||
];
|
||||
|
||||
switch ($nationlevel) {
|
||||
@@ -623,15 +627,26 @@ function updateNationState()
|
||||
$nation['nation'],
|
||||
$targetKillTurn
|
||||
);
|
||||
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc'], 2);
|
||||
$chiefObj = null;
|
||||
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc', 'aux'], 2);
|
||||
$chiefID = null;
|
||||
|
||||
$uniqueLotteryWeightList = [];
|
||||
|
||||
[$startYear, $year] = $gameStor->getValuesAsArray(['startyear', 'year']);
|
||||
$relYear = $year - $startYear;
|
||||
$maxTrialCountByYear = 1;
|
||||
foreach (GameConst::$maxUniqueItemLimit as $tmpVals) {
|
||||
[$targetYear, $targetTrialCnt] = $tmpVals;
|
||||
if ($relYear < $targetYear) {
|
||||
break;
|
||||
}
|
||||
$maxTrialCountByYear = $targetTrialCnt;
|
||||
}
|
||||
foreach ($nationGenList as $nationGen) {
|
||||
if ($nationGen->getVar('officer_level') == 12) {
|
||||
$chiefObj = $nationGen;
|
||||
$chiefID = $nationGen->getID();
|
||||
}
|
||||
$trialCnt = count(GameConst::$allItems);
|
||||
$trialCnt = min($maxTrialCountByYear, count(GameConst::$allItems));
|
||||
|
||||
foreach ($nationGen->getItems() as $item) {
|
||||
if (!$item->isBuyable()) {
|
||||
@@ -654,7 +669,7 @@ function updateNationState()
|
||||
}
|
||||
|
||||
$score *= $trialCnt;
|
||||
|
||||
|
||||
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
|
||||
}
|
||||
|
||||
@@ -670,8 +685,10 @@ function updateNationState()
|
||||
$winnerObj->applyDB($db);
|
||||
}
|
||||
|
||||
if($chiefObj){
|
||||
if ($chiefID) {
|
||||
$chiefObj = General::createGeneralObjFromDB($chiefID, ['belong', 'npc', 'aux'], 2);
|
||||
$chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff);
|
||||
$chiefObj->applyDB($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -694,14 +711,14 @@ function updateNationState()
|
||||
$lastAssemblerID += 1;
|
||||
$npcObj = new Scenario\GeneralBuilder(
|
||||
sprintf('부대장%4d', $lastAssemblerID),
|
||||
0,
|
||||
false,
|
||||
null,
|
||||
$nation['nation']
|
||||
);
|
||||
$npcObj->setAffinity(999)->setStat(10, 10, 10)
|
||||
->setSpecialSingle('척사')->setEgo('che_은둔')
|
||||
->setKillturn(70)->setGoldRice(0, 0)
|
||||
->setNPCType(5)->fillRemainSpecAsZero($admin);
|
||||
->setSpecialSingle('척사')->setEgo('che_은둔')
|
||||
->setKillturn(70)->setGoldRice(0, 0)
|
||||
->setNPCType(5)->fillRemainSpecAsZero($admin);
|
||||
$npcObj->build($admin);
|
||||
$npcID = $npcObj->getGeneralID();
|
||||
|
||||
@@ -745,7 +762,7 @@ function checkStatistic()
|
||||
];
|
||||
|
||||
$avgGeneral = $db->queryFirstRow(
|
||||
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
|
||||
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
|
||||
max(dex1+dex2+dex3+dex4) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
|
||||
FROM general'
|
||||
);
|
||||
@@ -990,9 +1007,9 @@ function checkEmperior()
|
||||
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
|
||||
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
|
||||
|
||||
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
|
||||
if($genObj->getNationID() == $nationID){
|
||||
if($genObj->getVar('officer_level') > 4){
|
||||
foreach (General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj) {
|
||||
if ($genObj->getNationID() == $nationID) {
|
||||
if ($genObj->getVar('officer_level') > 4) {
|
||||
$genObj->increaseInheritancePoint('unifier', 2000);
|
||||
};
|
||||
}
|
||||
@@ -1008,7 +1025,7 @@ function checkEmperior()
|
||||
|
||||
[$totalPop, $totalMaxPop] = $db->queryFirstList('SELECT SUM(pop), SUM(pop_max) FROM city');
|
||||
$pop = "{$totalPop} / {$totalMaxPop}";
|
||||
$poprate = round($totalPop / $totalMaxPop * 100, 2). " %";
|
||||
$poprate = round($totalPop / $totalMaxPop * 100, 2) . " %";
|
||||
|
||||
$chiefs = Util::convertArrayToDict(
|
||||
$db->query(
|
||||
@@ -1022,8 +1039,8 @@ function checkEmperior()
|
||||
$nation['generals'] = $nationGenerals;
|
||||
|
||||
$tigers = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
'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
|
||||
); // 오호장군
|
||||
@@ -1034,8 +1051,8 @@ function checkEmperior()
|
||||
}, $tigers));
|
||||
|
||||
$eagles = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
'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
|
||||
); // 건안칠자
|
||||
@@ -1052,7 +1069,7 @@ function checkEmperior()
|
||||
$generalLogger->flush();
|
||||
}
|
||||
|
||||
$gen = join(', ', array_column($rawGeneral, 'name'));
|
||||
$gen = join(', ', array_column($rawGeneralList, 'name'));
|
||||
|
||||
$stat = $db->queryFirstRow('SELECT max(nation_count) as nc, max(gen_count) as gc FROM statistic');
|
||||
$genCnt = $db->queryFirstField('SELECT count(*) FROM general');
|
||||
@@ -1150,24 +1167,53 @@ function checkEmperior()
|
||||
LogHistory();
|
||||
}
|
||||
|
||||
function resetInheritanceUser(int $userID){
|
||||
function resetInheritanceUser(int $userID, bool $isRebirth = false): float
|
||||
{
|
||||
$rebirthDegraded = [
|
||||
'dex' => 0.5,
|
||||
];
|
||||
|
||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
||||
$totalPoint = 0;
|
||||
foreach($inheritStor->getAll() as [$value,]){
|
||||
$allPoints = $inheritStor->getAll();
|
||||
if (!$allPoints || count($allPoints) == 0) {
|
||||
//비었으므로 리셋 안함
|
||||
return 0;
|
||||
}
|
||||
if (count($allPoints) == 1 && key_exists('previous', $allPoints)) {
|
||||
//이미 리셋되었으므로 리셋 안함
|
||||
return $allPoints['previous'][0];
|
||||
}
|
||||
|
||||
$userLogger = new UserLogger($userID);
|
||||
|
||||
$previousPoint = ($allPoints['previous'] ?? [0, 0])[0];
|
||||
|
||||
foreach ($allPoints as $key => [$value,]) {
|
||||
if ($isRebirth && key_exists($key, $rebirthDegraded)) {
|
||||
$value *= $rebirthDegraded[$key];
|
||||
}
|
||||
$keyText = General::INHERITANCE_KEY[$key][2];
|
||||
$userLogger->push("{$keyText} 포인트 {$value} 증가", "inheritPoint");
|
||||
$totalPoint += $value;
|
||||
}
|
||||
$totalPoint = Util::toInt($totalPoint);
|
||||
$userLogger->push("포인트 {$previousPoint} => {$totalPoint}", "inheritPoint");
|
||||
$userLogger->flush();
|
||||
|
||||
$inheritStor->resetValues();
|
||||
$inheritStor->setValue('previous', [$totalPoint, null]);
|
||||
return $totalPoint;
|
||||
}
|
||||
|
||||
function updateMaxDomesticCritical(General $general, $score){
|
||||
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical')??0;
|
||||
function updateMaxDomesticCritical(General $general, $score)
|
||||
{
|
||||
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical') ?? 0;
|
||||
$maxDomesticCritical += $score / 2;
|
||||
$general->setAuxVar('max_domestic_critical', $maxDomesticCritical);
|
||||
|
||||
$oldMaxDomesticCritical = $general->getInheritancePoint('max_domestic_critical');
|
||||
if($maxDomesticCritical > $oldMaxDomesticCritical){
|
||||
if ($maxDomesticCritical > $oldMaxDomesticCritical) {
|
||||
$general->setInheritancePoint('max_domestic_critical', $maxDomesticCritical);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-25
@@ -77,12 +77,6 @@ function pushProcessLog($log) {
|
||||
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $log);
|
||||
}
|
||||
|
||||
|
||||
function pushStepLog($log) {
|
||||
$date = date('Y_m_d');
|
||||
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt", $log);
|
||||
}
|
||||
|
||||
function pushLockLog($log) {
|
||||
$date = date('Y_m_d');
|
||||
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
|
||||
@@ -105,15 +99,15 @@ function formatHistoryToHTML(array $history, ?string $type=null):string{
|
||||
$result = [];
|
||||
if($type){
|
||||
foreach($history as $seq=>$item){
|
||||
$result[] = "<div class='log_{$type}' id='log_{$type}_{$seq}' data-seq='{$seq}'>".ConvertLog($item).'</div>';
|
||||
$result[] = "<div class='log_{$type}' id='log_{$type}_{$seq}' data-seq='{$seq}'>".ConvertLog($item).'</div>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
foreach($history as $seq=>$item){
|
||||
$result[] = '<div>'.ConvertLog($item).'</div>';
|
||||
$result[] = '<div>'.ConvertLog($item).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return join('', $result);
|
||||
}
|
||||
|
||||
@@ -242,7 +236,7 @@ function pushGeneralHistoryLog(int $generalID, ?array $history, $year=null, $mon
|
||||
return;
|
||||
}
|
||||
$db = DB::db();
|
||||
|
||||
|
||||
if($year === null || $month === null){
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
@@ -278,7 +272,7 @@ function pushNationHistoryLog(int $nationID, ?array $history, ?int $year=null, ?
|
||||
return;
|
||||
}
|
||||
$db = DB::db();
|
||||
|
||||
|
||||
if($year === null || $month === null){
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
@@ -304,7 +298,7 @@ function pushGlobalHistoryLog(?array $history, $year=null, $month=null) {
|
||||
return;
|
||||
}
|
||||
$db = DB::db();
|
||||
|
||||
|
||||
if($year === null || $month === null){
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
@@ -325,8 +319,8 @@ function getGlobalHistoryLogWithDate(int $year, int $month):array {
|
||||
$db = DB::db();
|
||||
|
||||
$texts = $db->queryFirstColumn(
|
||||
'SELECT `text` from world_history where nation_id = 0 AND year = %i and month = %i order by id desc',
|
||||
$year,
|
||||
'SELECT `text` from world_history where nation_id = 0 AND year = %i and month = %i order by id desc',
|
||||
$year,
|
||||
$month
|
||||
);
|
||||
|
||||
@@ -342,7 +336,7 @@ function pushGlobalActionLog(?array $history, ?int $year=null, ?int $month=null)
|
||||
return;
|
||||
}
|
||||
$db = DB::db();
|
||||
|
||||
|
||||
if($year === null || $month === null){
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
@@ -366,8 +360,8 @@ function getGlobalActionLogWithDate(int $year, int $month):array {
|
||||
$db = DB::db();
|
||||
|
||||
$texts = $db->queryFirstColumn(
|
||||
'SELECT `text` from general_record where general_id = 0 AND log_type = "history" AND year = %i and month = %i order by id desc',
|
||||
$year,
|
||||
'SELECT `text` from general_record where general_id = 0 AND log_type = "history" AND year = %i and month = %i order by id desc',
|
||||
$year,
|
||||
$month
|
||||
);
|
||||
|
||||
@@ -378,8 +372,6 @@ function getGlobalActionLogWithDate(int $year, int $month):array {
|
||||
}
|
||||
|
||||
function LogHistory($isFirst=0) {
|
||||
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Start');
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$obj = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||
@@ -401,16 +393,16 @@ function LogHistory($isFirst=0) {
|
||||
if($map['month'] == 0){
|
||||
$map['month'] = 12;
|
||||
$map['year'] -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$year = $map['year'];
|
||||
$month = $map['month'];
|
||||
|
||||
|
||||
|
||||
$globalHistory = getGlobalHistoryLogWithDate($year, $month);
|
||||
$globalAction = getGlobalActionLogWithDate($year, $month);
|
||||
|
||||
|
||||
$nations = getAllNationStaticInfo();
|
||||
$nations[0] = getNationStaticInfo(0);
|
||||
|
||||
@@ -426,8 +418,6 @@ function LogHistory($isFirst=0) {
|
||||
return -($lhs['power']<=>$rhs['power']);
|
||||
});
|
||||
|
||||
if(STEP_LOG) pushStepLog(TimeUtil::now().', contents collected');
|
||||
|
||||
$db->insert('ng_history', [
|
||||
'server_id' => UniqueConst::$serverID,
|
||||
'year' => $year,
|
||||
@@ -438,6 +428,5 @@ function LogHistory($isFirst=0) {
|
||||
'nations' => Json::encode($nations),
|
||||
]);
|
||||
|
||||
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Finish');
|
||||
return true;
|
||||
}
|
||||
|
||||
+139
-97
@@ -8,8 +8,7 @@ function processTournament() {
|
||||
|
||||
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time']);
|
||||
$now = new \DateTime();
|
||||
$admin['now'] = $now->format('Y-m-d H:i:s');
|
||||
$admin['offset'] = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
|
||||
$offset = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
|
||||
|
||||
//수동일땐 무시
|
||||
if($admin['tnmt_auto'] == 0) { return; }
|
||||
@@ -18,99 +17,102 @@ function processTournament() {
|
||||
$tnmt = $admin['tournament'];
|
||||
$phase = $admin['phase'];
|
||||
|
||||
if($offset < 0){
|
||||
return;
|
||||
}
|
||||
|
||||
//현시간이 스탬프 지나친경우
|
||||
if($admin['offset'] >= 0) {
|
||||
switch($admin['tnmt_auto']) {
|
||||
case 1: $unit = 720; break;
|
||||
case 2: $unit = 420; break;
|
||||
case 3: $unit = 180; break;
|
||||
case 4: $unit = 60; break;
|
||||
case 5: $unit = 30; break;
|
||||
case 6: $unit = 15; break;
|
||||
case 7: $unit = 5; break;
|
||||
default: throw new MustNotBeReachedException();
|
||||
switch($admin['tnmt_auto']) {
|
||||
case 1: $unit = 720; break;
|
||||
case 2: $unit = 420; break;
|
||||
case 3: $unit = 180; break;
|
||||
case 4: $unit = 60; break;
|
||||
case 5: $unit = 30; break;
|
||||
case 6: $unit = 15; break;
|
||||
case 7: $unit = 5; break;
|
||||
default: throw new MustNotBeReachedException();
|
||||
}
|
||||
|
||||
//업데이트 횟수
|
||||
$iter = intdiv($offset, $unit) + 1;
|
||||
|
||||
for($i=0; $i < $iter; $i++) {
|
||||
switch($tnmt) {
|
||||
case 1: //신청 마감
|
||||
fillLowGenAll();
|
||||
$tnmt = 2; $phase = 0;
|
||||
break;
|
||||
case 2: //예선중
|
||||
qualify($type, $tnmt, $phase); $phase++;
|
||||
if($phase >= 56) { $tnmt = 3; $phase = 0; }
|
||||
break;
|
||||
case 3: //추첨중
|
||||
selectionAll($type, $tnmt, $phase); $phase+=8;
|
||||
if($phase >= 32) { $tnmt = 4; $phase = 0; }
|
||||
break;
|
||||
case 4: //본선중
|
||||
finallySingle($type, $tnmt, $phase); $phase++;
|
||||
if($phase >= 6) { $tnmt = 5; $phase = 0; }
|
||||
break;
|
||||
case 5: //배정중
|
||||
final16set();
|
||||
$tnmt = 6; $phase = 0;
|
||||
startBetting();
|
||||
break;
|
||||
case 6: //베팅중
|
||||
$tnmt = 7; $phase = 0;
|
||||
break;
|
||||
case 7: //16강중
|
||||
finalFight($type, $tnmt, $phase, 16); $phase++;
|
||||
if($phase >= 8) { $tnmt = 8; $phase = 0; }
|
||||
break;
|
||||
case 8: //8강중
|
||||
finalFight($type, $tnmt, $phase, 8); $phase++;
|
||||
if($phase >= 4) { $tnmt = 9; $phase = 0; }
|
||||
break;
|
||||
case 9: //4강중
|
||||
finalFight($type, $tnmt, $phase, 4); $phase++;
|
||||
if($phase >= 2) { $tnmt = 10; $phase = 0; }
|
||||
break;
|
||||
case 10: //결승중
|
||||
finalFight($type, $tnmt, $phase, 2);
|
||||
$tnmt = 0; $phase = 0;
|
||||
setGift($type, $tnmt, $phase);
|
||||
$i = $iter;
|
||||
break;
|
||||
}
|
||||
|
||||
//업데이트 횟수
|
||||
$iter = intdiv($admin['offset'], $unit) + 1;
|
||||
//베팅은 무조건 60페이즈후 진행(최대 1시간)
|
||||
if($tnmt == 6) {
|
||||
$betTerm = $unit * 60;
|
||||
if($betTerm > 3600) { $betTerm = 3600; }
|
||||
//처리 초 더한 날짜
|
||||
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm);
|
||||
$gameStor->tournament = $tnmt;
|
||||
$gameStor->phase = $phase;
|
||||
$gameStor->tnmt_time = $dt;
|
||||
return;
|
||||
}
|
||||
|
||||
for($i=0; $i < $iter; $i++) {
|
||||
switch($tnmt) {
|
||||
case 1: //신청 마감
|
||||
fillLowGenAll();
|
||||
$tnmt = 2; $phase = 0;
|
||||
break;
|
||||
case 2: //예선중
|
||||
qualify($type, $tnmt, $phase); $phase++;
|
||||
if($phase >= 56) { $tnmt = 3; $phase = 0; }
|
||||
break;
|
||||
case 3: //추첨중
|
||||
selectionAll($type, $tnmt, $phase); $phase+=8;
|
||||
if($phase >= 32) { $tnmt = 4; $phase = 0; }
|
||||
break;
|
||||
case 4: //본선중
|
||||
finallySingle($type, $tnmt, $phase); $phase++;
|
||||
if($phase >= 6) { $tnmt = 5; $phase = 0; }
|
||||
break;
|
||||
case 5: //배정중
|
||||
final16set();
|
||||
$tnmt = 6; $phase = 0;
|
||||
break;
|
||||
case 6: //베팅중
|
||||
$tnmt = 7; $phase = 0;
|
||||
break;
|
||||
case 7: //16강중
|
||||
finalFight($type, $tnmt, $phase, 16); $phase++;
|
||||
if($phase >= 8) { $tnmt = 8; $phase = 0; }
|
||||
break;
|
||||
case 8: //8강중
|
||||
finalFight($type, $tnmt, $phase, 8); $phase++;
|
||||
if($phase >= 4) { $tnmt = 9; $phase = 0; }
|
||||
break;
|
||||
case 9: //4강중
|
||||
finalFight($type, $tnmt, $phase, 4); $phase++;
|
||||
if($phase >= 2) { $tnmt = 10; $phase = 0; }
|
||||
break;
|
||||
case 10: //결승중
|
||||
finalFight($type, $tnmt, $phase, 2);
|
||||
$tnmt = 0; $phase = 0;
|
||||
setGift($type, $tnmt, $phase);
|
||||
$i = $iter;
|
||||
break;
|
||||
}
|
||||
|
||||
//베팅은 무조건 60페이즈후 진행(최대 1시간)
|
||||
if($tnmt == 6) {
|
||||
$betTerm = $unit * 60;
|
||||
if($betTerm > 3600) { $betTerm = 3600; }
|
||||
//처리 초 더한 날짜
|
||||
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm);
|
||||
if($admin['tnmt_auto'] == 1) {
|
||||
//처리 초 더한 날짜
|
||||
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i);
|
||||
$hr = substr($dt, 11, 2);
|
||||
//지정시간대 넘어가면 중단 20~24시
|
||||
if($hr < 20) {
|
||||
$dt = substr($dt, 0, 11)."20:00:00";
|
||||
$gameStor->tournament = $tnmt;
|
||||
$gameStor->phase = $phase;
|
||||
$gameStor->tnmt_time = $dt;
|
||||
return;
|
||||
}
|
||||
|
||||
if($admin['tnmt_auto'] == 1) {
|
||||
//처리 초 더한 날짜
|
||||
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i);
|
||||
$hr = substr($dt, 11, 2);
|
||||
//지정시간대 넘어가면 중단 20~24시
|
||||
if($hr < 20) {
|
||||
$dt = substr($dt, 0, 11)."20:00:00";
|
||||
$gameStor->tournament = $tnmt;
|
||||
$gameStor->phase = $phase;
|
||||
$gameStor->tnmt_time = $dt;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$second = $unit * $iter;
|
||||
$gameStor->tournament = $tnmt;
|
||||
$gameStor->phase = $phase;
|
||||
$gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
$second = $unit * $iter;
|
||||
$gameStor->tournament = $tnmt;
|
||||
$gameStor->phase = $phase;
|
||||
$gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
function getTournamentTerm() {
|
||||
@@ -173,7 +175,7 @@ function printRow($k, $npc, $name, $abil, $tgame, $win, $draw, $lose, $gd, $gl,
|
||||
if($prmt > 0) { $name = "<font color=orange>".$name."</font>"; }
|
||||
elseif($npc >= 2) { $name = "<font color=cyan>".$name."</font>"; }
|
||||
elseif($npc == 1) { $name = "<font color=skyblue>".$name."</font>"; }
|
||||
echo "<tr align=center><td id=bg2>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
|
||||
echo "<tr align=center><td class='bg2'>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
|
||||
}
|
||||
|
||||
function printFighting($tournament, $phase) {
|
||||
@@ -246,7 +248,7 @@ function startTournament($auto, $type) {
|
||||
}
|
||||
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
|
||||
$gameStor->tnmt_auto = $auto;
|
||||
$gameStor->tnmt_time = (new \DateTimeImmutable())->add(new \DateInterval("PT{$unit}M"))->format('Y-m-d H:i:s');
|
||||
$gameStor->tournament = 1;
|
||||
@@ -296,11 +298,51 @@ function startTournament($auto, $type) {
|
||||
['설전','책사'],
|
||||
][$type];
|
||||
|
||||
$history[] = "<S>◆</>{$admin['year']}년 {$admin['month']}월:{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
|
||||
|
||||
$history[] = "<S>◆</>{$admin['year']}년 {$admin['month']}월:<B><b>【대회】</b></>{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
|
||||
|
||||
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
|
||||
}
|
||||
|
||||
function startBetting(){
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
pushGlobalHistoryLog([
|
||||
"<S>◆</>{$year}년 {$month}월:<B><b>【대회】</b></>우승자를 예상하는 <C>내기</>가 진행중입니다! 호사가의 참여를 기다립니다!"
|
||||
], $year, $month);
|
||||
|
||||
$betGold = 10;
|
||||
|
||||
$npcList = $db->queryFirstColumn('SELECT no FROM general WHERE npc >= 2 AND gold >= (500 + %i)', $betGold);
|
||||
$npcBet = [];
|
||||
$betSum = [
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
];
|
||||
|
||||
foreach($npcList as $npcID){
|
||||
$target = Util::randRangeInt(0, 15);
|
||||
$betSum[$target] += $betGold;
|
||||
$npcBet[] = [$npcID, $target];
|
||||
}
|
||||
|
||||
$db->update('general', [
|
||||
'gold'=>$db->sqleval('gold - %i', $betGold),
|
||||
], 'no IN %li', $npcList);
|
||||
foreach($npcBet as [$npcID, $betTarget]){
|
||||
$targetKey = "bet{$betTarget}";
|
||||
$db->update('betting', [
|
||||
"bet{$betTarget}"=>$db->sqleval('%b + %i', $targetKey, $betGold),
|
||||
], 'general_id = %i', $npcID);
|
||||
}
|
||||
foreach($betSum as $betTarget=>$betSumGold){
|
||||
$targetKey = "bet{$betTarget}";
|
||||
$db->update('betting', [
|
||||
"bet{$betTarget}"=>$db->sqleval('%b + %i', $targetKey, $betSumGold),
|
||||
], 'general_id = 0');
|
||||
}
|
||||
}
|
||||
|
||||
function fillLowGenAll() {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
@@ -785,8 +827,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
$josaYiWinner = JosaUtil::pick($winner['name'], '이');
|
||||
$josaYiRunnerUp = JosaUtil::pick($runnerUp['name'], '이');
|
||||
|
||||
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||
$winnerLogger->pushGlobalHistoryLog("<B><b>【대회】</b></><C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||
$winnerLogger->pushGlobalHistoryLog("<B><b>【대회】</b></><C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||
|
||||
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
|
||||
|
||||
@@ -834,7 +876,7 @@ function setRefund() {
|
||||
$db->update('general', [
|
||||
'gold'=>$db->sqleval('gold + %i', $cost)
|
||||
], 'no IN %li', $generalIDList);
|
||||
|
||||
|
||||
//베팅금 환수
|
||||
$db->update(['general', [
|
||||
'gold'=>$db->sqleval('gold + (SELECT bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 FROM betting WHERE general_id = general.no)')
|
||||
@@ -867,16 +909,16 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
|
||||
if($type == 0) { $turn = 10; }
|
||||
else { $turn = 100; }
|
||||
|
||||
|
||||
|
||||
if($tnmt_type == 1) { $tp = "leadership"; $tp2 = "tl"; }
|
||||
elseif($tnmt_type == 2) { $tp = "strength"; $tp2 = "ts"; }
|
||||
elseif($tnmt_type == 3) { $tp = "intel"; $tp2 = "ti"; }
|
||||
else /*$tnmt_type == 0*/{ $tp = "total"; $tp2 = "tt"; }
|
||||
else /*$tnmt_type == 0*/{ $tp = "total"; $tp2 = "tt"; }
|
||||
|
||||
$e1 = $energy1 = Util::round($gen1[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
|
||||
$e2 = $energy2 = Util::round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
|
||||
|
||||
|
||||
|
||||
|
||||
foreach([$gen1, $gen2] as $gen){
|
||||
$horse = buildItemClass($gen['h']);
|
||||
@@ -888,7 +930,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
|
||||
$itemName = $horse->getName();
|
||||
$itemRawName = $horse->getRawName();
|
||||
switch(rand()%4) {
|
||||
case 0:
|
||||
case 0:
|
||||
$josaYi = JosaUtil::pick($itemRawName, '이');
|
||||
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 포효합니다!"; break;
|
||||
case 1:
|
||||
@@ -1090,7 +1132,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
|
||||
'lose'=>$db->sqleval('lose+1'),
|
||||
'gl'=>$db->sqleval('gl-%i', $gl)
|
||||
], 'grp=%i AND grp_no=%i', $group, $g2);
|
||||
|
||||
|
||||
if($general1['gl'] > $general2['gl']) { $gl1 = 1; $gl2 = 0; }
|
||||
elseif($general1['gl'] == $general2['gl']) { $gl1 = 2; $gl2 = -1; }
|
||||
else { $gl1 = 3; $gl2 = -2; }
|
||||
@@ -1132,7 +1174,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
|
||||
$gen1resKey = 'd';
|
||||
$gen2resKey = 'd';
|
||||
break;
|
||||
default: new MustNotBeReachedException();
|
||||
default: throw new MustNotBeReachedException();
|
||||
}
|
||||
|
||||
$db->update('rank_data', [
|
||||
|
||||
+4
-12
@@ -97,18 +97,10 @@ $serverCnt = $gameStor->server_cnt;
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/linkify/linkify.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/linkify/linkify-string.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/main.js')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<?=WebUtil::printJS('js/msg.js')?>
|
||||
<?=WebUtil::printJS('dist_js/main.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
@@ -295,7 +287,7 @@ else if($session->userGrade == 4){
|
||||
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:70px;font-size:13px;margin-left:1ch;margin-right:2ch;'
|
||||
><input type=button value='▼미루기' id='pushTurn'
|
||||
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;'
|
||||
><input type=button value='▲당기기' id='pullTurn'
|
||||
><input type=button value='▲당기기' id='pullTurn'
|
||||
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;'
|
||||
></td>
|
||||
</tr>
|
||||
@@ -306,7 +298,7 @@ else if($session->userGrade == 4){
|
||||
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;'
|
||||
><input type=button value='갱 신' id='refreshPage'
|
||||
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;'
|
||||
><input type=button value='로비로' onclick="location.replace('../')"
|
||||
><input type=button value='로비로' onclick="location.replace('../')"
|
||||
style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;font-size:13px;
|
||||
>
|
||||
</td>
|
||||
|
||||
+17
-19
@@ -14,7 +14,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
if($session->userGrade < 5 && !$allowReset){
|
||||
die('관리자 아님');
|
||||
@@ -28,11 +28,9 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<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('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/install.js')?>
|
||||
<?=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')?>
|
||||
@@ -47,7 +45,7 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<h3 class="card-header">
|
||||
설치(환경 설정)
|
||||
<!--턴시간, 시간동기화, 시나리오, 상성, 확장장수, NPC유저, 이미지설정-->
|
||||
</h3>
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="game_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
@@ -82,7 +80,7 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
</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;">
|
||||
@@ -93,7 +91,7 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<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월)
|
||||
@@ -106,7 +104,7 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="scenario" size="1" id="scenario_sel">
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -170,30 +168,30 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-form-label">휴식 턴 시 장수 턴</label>
|
||||
<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_develop" id="autorun_develop">내정
|
||||
<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_warp" id="autorun_warp">순간이동
|
||||
<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_recruit" id="autorun_recruit">징병
|
||||
<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_recruit_high" id="autorun_recruit_high">모병
|
||||
<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_train" id="autorun_train">훈사
|
||||
<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_battle" id="autorun_battle">출병
|
||||
<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_chief" id="autorun_chief">기본 사령턴
|
||||
<input type="checkbox" class="autorun_user_chk" data-key="chief" name="autorun_user[]" value="chief">기본 사령턴
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
@@ -368,7 +366,7 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="2">
|
||||
|
||||
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
+7
-9
@@ -21,11 +21,9 @@ if($session->userGrade == 5){
|
||||
<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('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/install_db.js')?>
|
||||
<?=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')?>
|
||||
@@ -39,7 +37,7 @@ if($session->userGrade == 5){
|
||||
<div class="card" id="db_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<?php if(class_exists('\\sammo\\DB')): ?>
|
||||
@@ -53,7 +51,7 @@ if($session->userGrade == 5){
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="full_reset" value="0" checked>N
|
||||
</label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +71,7 @@ if($session->userGrade == 5){
|
||||
<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">
|
||||
@@ -82,7 +80,7 @@ if($session->userGrade == 5){
|
||||
</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">
|
||||
|
||||
@@ -5,9 +5,11 @@ include('lib.php');
|
||||
include 'func.php';
|
||||
|
||||
$result = [
|
||||
"generalID"=>null,
|
||||
"myNationID"=>null,
|
||||
"isChief"=>false
|
||||
"generalID"=>0,
|
||||
"myNationID"=>0,
|
||||
"isChief"=>false,
|
||||
"officerLevel"=>0,
|
||||
"permission"=>0,
|
||||
];
|
||||
$session = Session::requireGameLogin([])->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
@@ -157,6 +157,7 @@ foreach ($customViewColumns as $column => $reqPermission) {
|
||||
$resultColumns[] = $column;
|
||||
}
|
||||
|
||||
$generalList = [];
|
||||
foreach ($rawGeneralList as $rawGeneral) {
|
||||
//General 생성?
|
||||
|
||||
|
||||
@@ -21,9 +21,11 @@ foreach($rawTurn as [$turn_idx, $action, $arg, $brief]){
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
[$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
|
||||
|
||||
$turnTime = $db->queryFirstField('SELECT turntime FROM general WHERE no=%i', $generalID);
|
||||
[$turnTime, $rawGeneralAux] = $db->queryFirstList('SELECT turntime, aux FROM general WHERE no=%i', $generalID);
|
||||
$generalAux = Json::decode($rawGeneralAux??'{}');
|
||||
|
||||
if(cutTurn($turnTime, $turnTerm) > cutTurn($lastExecute, $turnTerm)){
|
||||
//이미 이번달에 실행된 턴이다.
|
||||
@@ -42,5 +44,6 @@ Json::die([
|
||||
'year'=>$year,
|
||||
'month'=>$month,
|
||||
'date'=>TimeUtil::now(true),
|
||||
'turn'=>$commandList
|
||||
'turn'=>$commandList,
|
||||
'autorun_limit'=> $generalAux['autorun_limit']??null,
|
||||
]);
|
||||
+1
-1
@@ -19,7 +19,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
$reserve_open = Util::getPost('reserve_open');
|
||||
if($reserve_open && $reserve_open < date('Y-m-d H:i')){
|
||||
|
||||
@@ -9,7 +9,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
if($session->userGrade < 5 && !$allowReset){
|
||||
Json::die([
|
||||
|
||||
@@ -56,6 +56,6 @@ else{
|
||||
|
||||
|
||||
Json::die([
|
||||
'result' => $result===DiplomaticMessage::ACCEPTED,
|
||||
'result' => $result!==DiplomaticMessage::INVALID,
|
||||
'reason' => $reason
|
||||
]);
|
||||
@@ -32,7 +32,7 @@ $lastMsgGet[] = TimeUtil::now();
|
||||
$session->lastMsgGet = Json::encode($lastMsgGet);
|
||||
|
||||
if($delayTime){
|
||||
sleep(0.2);
|
||||
usleep(200);
|
||||
}
|
||||
$session->setReadOnly();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ else{
|
||||
'name', 'leadership', 'strength', 'intel', 'gold','rice',
|
||||
'troop','officer_level','npc','picture','imgsvr',
|
||||
'permission','penalty','belong', 'crewtype',
|
||||
'experience', 'dedication', 'betray', 'dedlevel', 'explevel', 'makelimit',
|
||||
'experience', 'dedication', 'betray', 'dedlevel', 'explevel', 'makelimit', 'aux',
|
||||
], 1);
|
||||
|
||||
if($general instanceof DummyGeneral){
|
||||
@@ -104,7 +104,7 @@ function do수뇌임명(General $general, int $targetOfficerLevel):?string{
|
||||
if($general->getVar('strength') < GameConst::$chiefStatMin){
|
||||
return '무력이 부족합니다.';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
if($general->getVar('intel') < GameConst::$chiefStatMin){
|
||||
@@ -175,7 +175,7 @@ function do추방(General $general, int $myOfficerLevel):?string{
|
||||
$generalName = $general->getVar('name');
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
|
||||
|
||||
|
||||
//추방할사람이 외교권자이면 불가
|
||||
$permission = checkSecretPermission($general->getRaw());
|
||||
@@ -252,7 +252,7 @@ function do추방(General $general, int $myOfficerLevel):?string{
|
||||
]);
|
||||
|
||||
$src = new MessageTarget(
|
||||
$generalID,
|
||||
$generalID,
|
||||
$generalName,
|
||||
$nationID,
|
||||
$nation['name'],
|
||||
@@ -260,7 +260,7 @@ function do추방(General $general, int $myOfficerLevel):?string{
|
||||
GetImageURL($general->getVar('imgsvr'), $general->getVar('picture'))
|
||||
);
|
||||
$msg = new Message(
|
||||
Message::MSGTYPE_PUBLIC,
|
||||
Message::MSGTYPE_PUBLIC,
|
||||
$src,
|
||||
$src,
|
||||
$str,
|
||||
|
||||
@@ -39,7 +39,7 @@ $db = DB::db();
|
||||
$me = General::createGeneralObjFromDB($generalID);
|
||||
|
||||
|
||||
if($defence_train != $me->getVar('defence_train')){
|
||||
if($defence_train !== $me->getVar('defence_train')){
|
||||
if($defence_train == 999){
|
||||
$me->increaseVar('myset', -1);
|
||||
$me->setVar('defence_train', $defence_train);
|
||||
@@ -53,14 +53,8 @@ if($defence_train != $me->getVar('defence_train')){
|
||||
}
|
||||
|
||||
$me->setAuxVar('use_treatment', Util::valueFit($use_treatment, 10, 100));
|
||||
|
||||
if($use_auto_nation_turn != $me->getAuxVar('use_auto_nation_turn')){
|
||||
$me->setAuxVar('use_auto_nation_turn', $use_auto_nation_turn);
|
||||
}
|
||||
|
||||
if($me->getVar('tnmt') != $tnmt){
|
||||
$me->setVar('tnmt', $tnmt);
|
||||
}
|
||||
$me->setAuxVar('use_auto_nation_turn', $use_auto_nation_turn);
|
||||
$me->setVar('tnmt', $tnmt);
|
||||
|
||||
if($me->getNPCType() == 1 && $detachNPC){
|
||||
$turnterm = $gameStor->turnterm;
|
||||
|
||||
+69
-57
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
@@ -21,18 +22,18 @@ $availableTypes = [
|
||||
'nationPolicy',
|
||||
];
|
||||
|
||||
if(!in_array($type, $availableTypes)){
|
||||
if (!in_array($type, $availableTypes)) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'올바른 타입이 아닙니다.',
|
||||
'result' => false,
|
||||
'reason' => '올바른 타입이 아닙니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
$data = Json::decode($data);
|
||||
if(!$data || !is_array($data)){
|
||||
if (!$data || !is_array($data)) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'올바른 입력이 아닙니다.',
|
||||
'result' => false,
|
||||
'reason' => '올바른 입력이 아닙니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,94 +45,95 @@ $me = $db->queryFirstRow('SELECT no, name, npc, nation, city, officer_level, con
|
||||
$nationID = $me['nation'];
|
||||
if (!$nationID) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'국가에 소속되어있지 않습니다.',
|
||||
'result' => false,
|
||||
'reason' => '국가에 소속되어있지 않습니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
$permission = checkSecretPermission($me);
|
||||
if ($permission < 3) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'권한이 부족합니다. 군주, 외교권자, 조언자가 아닙니다.'
|
||||
'result' => false,
|
||||
'reason' => '권한이 부족합니다. 군주, 외교권자, 조언자가 아닙니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
function applyNationPolicy($policy, $nationID, $generalName):?string{
|
||||
function applyNationPolicy($policy, $nationID, $generalName): ?string
|
||||
{
|
||||
$db = DB::db();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
|
||||
$defaultPolicy = AutorunNationPolicy::$defaultPolicy;
|
||||
$troopCache = null;
|
||||
foreach($db->queryFirstColumn('SELECT troop_leader FROM troop WHERE nation=%i',$nationID) as $troopID){
|
||||
foreach ($db->queryFirstColumn('SELECT troop_leader FROM troop WHERE nation=%i', $nationID) as $troopID) {
|
||||
$troopCache[$troopID] = 'Neutral';
|
||||
}
|
||||
$cityList = CityConst::all();
|
||||
$nationPolicyRoot = $nationStor->npc_nation_policy;
|
||||
$nationPolicy = $nationPolicyRoot['values']??[];
|
||||
foreach($policy as $key=>$val){
|
||||
$nationPolicy = $nationPolicyRoot['values'] ?? [];
|
||||
foreach ($policy as $key => $val) {
|
||||
|
||||
if($key === 'CombatForce'){
|
||||
if(!is_array($val)){
|
||||
return "{$key}는 올바른 정책값이 아닙니다.";
|
||||
if ($key === 'CombatForce') {
|
||||
if (!is_array($val)) {
|
||||
return "{$key}는 올바른 정책값이 아닙니다.";
|
||||
}
|
||||
foreach($val as $troopID=>$troopTarget){
|
||||
if(!key_exists($troopID, $troopCache)){
|
||||
foreach ($val as $troopID => $troopTarget) {
|
||||
if (!key_exists($troopID, $troopCache)) {
|
||||
return "{$troopID}는 국가의 부대가 아닙니다.";
|
||||
}
|
||||
if($troopCache[$troopID] != 'Neutral'){
|
||||
if ($troopCache[$troopID] != 'Neutral') {
|
||||
return "부대({$troopID}는 하나의 역할만 지정할 수 있습니다.";
|
||||
}
|
||||
if(!is_array($troopTarget) || count($troopTarget)!=2){
|
||||
if (!is_array($troopTarget) || count($troopTarget) != 2) {
|
||||
return "{$troopID}의 입력양식이 올바르지 않습니다.";
|
||||
}
|
||||
[$fromCity, $toCity] = $troopCache;
|
||||
if(!key_exists($fromCity, $cityList) || !key_exists($toCity, $cityList)){
|
||||
if (!key_exists($fromCity, $cityList) || !key_exists($toCity, $cityList)) {
|
||||
return "{$troopID}의 도시 {$fromCity}, {$toCity}가 올바른 도시 번호가 아닙니다.";
|
||||
}
|
||||
$troopCache[$troopID]=$key;
|
||||
$troopCache[$troopID] = $key;
|
||||
}
|
||||
$nationPolicy[$key]=$val;
|
||||
$nationPolicy[$key] = $val;
|
||||
continue;
|
||||
}
|
||||
if(in_array($key, ['SupportForce', 'DevelopForce'])){
|
||||
if(!is_array($val)){
|
||||
return "{$key}는 올바른 정책값이 아닙니다.";
|
||||
if (in_array($key, ['SupportForce', 'DevelopForce'])) {
|
||||
if (!is_array($val)) {
|
||||
return "{$key}는 올바른 정책값이 아닙니다.";
|
||||
}
|
||||
foreach($val as $troopID){
|
||||
if(!key_exists($troopID, $troopCache)){
|
||||
foreach ($val as $troopID) {
|
||||
if (!key_exists($troopID, $troopCache)) {
|
||||
return "{$troopID}는 국가의 부대가 아닙니다.";
|
||||
}
|
||||
if($troopCache[$troopID] != 'Neutral'){
|
||||
if ($troopCache[$troopID] != 'Neutral') {
|
||||
return "부대({$troopID}는 하나의 역할만 지정할 수 있습니다.";
|
||||
}
|
||||
$troopCache[$troopID]=$key;
|
||||
$troopCache[$troopID] = $key;
|
||||
}
|
||||
|
||||
$nationPolicy[$key]=array_values($val);
|
||||
$nationPolicy[$key] = array_values($val);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if(!key_exists($key, $defaultPolicy)){
|
||||
if (!key_exists($key, $defaultPolicy)) {
|
||||
return "{$key}는 올바른 정책값이 아닙니다.";
|
||||
}
|
||||
$defaultValue = $defaultPolicy[$key];
|
||||
if(is_numeric($defaultValue) != is_numeric($val)){
|
||||
if (is_numeric($defaultValue) != is_numeric($val)) {
|
||||
return "{$key}는 올바른 값이 아닙니다.";
|
||||
}
|
||||
if(is_integer($defaultValue) != is_integer($val)){
|
||||
if (is_integer($defaultValue) != is_integer($val)) {
|
||||
return "{$key}는 올바른 값이 아닙니다.";
|
||||
}
|
||||
if(is_array($defaultValue) != is_array($val)){
|
||||
if (is_array($defaultValue) != is_array($val)) {
|
||||
return "{$key}는 올바른 값이 아닙니다.";
|
||||
}
|
||||
if(is_integer($val) && $val < 0){
|
||||
if (is_integer($val) && $val < 0) {
|
||||
$val = 0;
|
||||
}
|
||||
$nationPolicy[$key] = $val;
|
||||
}
|
||||
|
||||
|
||||
$nationPolicyRoot['values'] = $nationPolicy;
|
||||
$nationPolicyRoot['valueSetter'] = $generalName;
|
||||
$nationPolicyRoot['valueSetTime'] = TimeUtil::now();
|
||||
@@ -139,14 +141,15 @@ function applyNationPolicy($policy, $nationID, $generalName):?string{
|
||||
return null;
|
||||
}
|
||||
|
||||
function applyNationPriority($priority, $nationID, $generalName):?string{
|
||||
function applyNationPriority($priority, $nationID, $generalName): ?string
|
||||
{
|
||||
$db = DB::db();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
$nationPolicyRoot = $nationStor->npc_nation_policy;
|
||||
|
||||
$defaultPriority = AutorunNationPolicy::$defaultPriority;
|
||||
foreach($priority as $item){
|
||||
if(!in_array($item, $defaultPriority)){
|
||||
foreach ($priority as $item) {
|
||||
if (!in_array($item, $defaultPriority)) {
|
||||
return "{$item}은 올바른 명령이 아닙니다.";
|
||||
}
|
||||
}
|
||||
@@ -157,17 +160,29 @@ function applyNationPriority($priority, $nationID, $generalName):?string{
|
||||
return null;
|
||||
}
|
||||
|
||||
function applyGeneralPriority($priority, $nationID, $generalName):?string{
|
||||
function applyGeneralPriority($priority, $nationID, $generalName): ?string
|
||||
{
|
||||
$db = DB::db();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
$generalPolicyRoot = $nationStor->npc_general_policy;
|
||||
|
||||
$defaultPriority = AutorunGeneralPolicy::$default_priority;
|
||||
foreach($priority as $item){
|
||||
if(!in_array($item, $defaultPriority)){
|
||||
$mustHaveActions = ['출병' => 1];
|
||||
foreach ($priority as $item) {
|
||||
if (key_exists($item, $mustHaveActions)) {
|
||||
$mustHaveActions[$item] = 0;
|
||||
}
|
||||
if (!in_array($item, $defaultPriority)) {
|
||||
return "{$item}은 올바른 명령이 아닙니다.";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($mustHaveActions as $actionKey => $unset) {
|
||||
if ($unset) {
|
||||
return "{$actionKey}은 항상 사용해야 합니다.";
|
||||
}
|
||||
}
|
||||
|
||||
$generalPolicyRoot['priority'] = $priority;
|
||||
$generalPolicyRoot['prioritySetter'] = $generalName;
|
||||
$generalPolicyRoot['prioritySetTime'] = TimeUtil::now();
|
||||
@@ -175,26 +190,23 @@ function applyGeneralPriority($priority, $nationID, $generalName):?string{
|
||||
return null;
|
||||
}
|
||||
|
||||
if($type == 'nationPolicy'){
|
||||
if ($type == 'nationPolicy') {
|
||||
$result = applyNationPolicy($data, $nationID, $me['name']);
|
||||
}
|
||||
else if($type == 'generalPriority'){
|
||||
} else if ($type == 'generalPriority') {
|
||||
$result = applyGeneralPriority($data, $nationID, $me['name']);
|
||||
}
|
||||
else if($type == 'nationPriority'){
|
||||
} else if ($type == 'nationPriority') {
|
||||
$result = applyNationPriority($data, $nationID, $me['name']);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
throw new MustNotBeReachedException();
|
||||
}
|
||||
|
||||
if($result!==null){
|
||||
if ($result !== null) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result,
|
||||
'result' => false,
|
||||
'reason' => $result,
|
||||
]);
|
||||
}
|
||||
Json::die([
|
||||
'result'=>true,
|
||||
'reason'=>'success',
|
||||
]);
|
||||
'result' => true,
|
||||
'reason' => 'success',
|
||||
]);
|
||||
|
||||
-183
@@ -1,183 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::requireLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
if (!$userID) {
|
||||
MessageBox("잘못된 접근입니다!!!");
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//회원 테이블에서 정보확인
|
||||
$member = RootDB::db()->queryFirstRow("select no,name,picture,imgsvr,grade from member where no= %i", $userID);
|
||||
|
||||
if (!$member) {
|
||||
MessageBox("잘못된 접근입니다!!!");
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$admin = $gameStor->getValues(['block_general_create','show_img_level','maxgeneral']);
|
||||
if($admin['block_general_create']){
|
||||
MessageBox("잘못된 접근입니다!!!");
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit(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" />
|
||||
<script>
|
||||
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
||||
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
||||
var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
||||
|
||||
var charInfoText = <?php
|
||||
|
||||
$charInfoText = [];
|
||||
foreach(GameConst::$availablePersonality as $personalityID){
|
||||
$personalityInfo = buildPersonalityClass($personalityID)->getInfo();
|
||||
$charInfoText[$personalityID] = $personalityInfo;
|
||||
}
|
||||
echo Json::encode((object)$charInfoText);
|
||||
?>;
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/join.js')?>
|
||||
|
||||
</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 align=center><?=info(0)?></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
||||
|
||||
if ($gencount >= $admin['maxgeneral']) {
|
||||
echo "<script>alert('더 이상 등록할 수 없습니다.');</script>";
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
$nationList = $db->query('SELECT nation,`name`,color,scout FROM nation');
|
||||
shuffle($nationList);
|
||||
$nationList = Util::convertArrayToDict($nationList, 'nation');
|
||||
//NOTE: join 안할것임
|
||||
$scoutMsgs = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'scout_msg');
|
||||
foreach($scoutMsgs as $nationID=>$scoutMsg){
|
||||
$nationList[$nationID]['scoutmsg'] = $scoutMsg;
|
||||
}
|
||||
|
||||
echo getInvitationList($nationList);
|
||||
?>
|
||||
|
||||
<form id='join_form' name=form1 method=post action=join_post.php>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=3 align=center id=bg1>장수 생성</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>장수명</td>
|
||||
<td colspan=2>
|
||||
<input id="generalName" type=text name=name maxlength=18 size=18 style="color:white;background-color:black;" value="<?=$member['name']?>">(전각 9글자, 반각 18글자 이내)
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
|
||||
$imageTemp = GetImageURL($member['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=right id=bg1>전콘 사용 여부</td>
|
||||
<td width=64 height=64>
|
||||
<img width='64' height='64' src='{$imageTemp}/{$member['picture']}' border='0'>
|
||||
</td>
|
||||
<td>
|
||||
<input type=checkbox name=pic value=1 checked>사용
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td align=center colspan=3>
|
||||
계정관리에서 자신만을 표현할 수 있는 아이콘을 업로드 해보세요!
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>성격</td>
|
||||
<td colspan=2>
|
||||
<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>
|
||||
<td width=498 align=right id=bg1>통솔</td>
|
||||
<td colspan=2><input type="number" name="leadership" id="leadership" value="50"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>무력</td>
|
||||
<td colspan=2><input type="number" name="strength" id="strength" value="50"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>지력</td>
|
||||
<td colspan=2><input type="number" name="intel" id="intel" value="50"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=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>
|
||||
<td align=center colspan=3>
|
||||
<font color=orange>모든 능력치는 ( <?=GameConst::$defaultStatMin?> <= 능력치 <= <?=GameConst::$defaultStatMax?> ) 사이로 잡으셔야 합니다.<br>
|
||||
그 외의 능력치는 가입되지 않습니다.</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=3>
|
||||
능력치의 총합은 <?=GameConst::$defaultStatTotal?>입니다. 가입후 0~10의 능력치 보너스를 받게 됩니다.<br>
|
||||
임의의 도시에서 재야로 시작하며 건국과 임관은 게임 내에서 실행합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right><input type=submit name=join value=장수생성></td>
|
||||
<td colspan=2><input type=reset name=reset value=다시입력></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$v = new Validator($_POST);
|
||||
$v
|
||||
->rule('required', [
|
||||
'name',
|
||||
'leadership',
|
||||
'strength',
|
||||
'intel'
|
||||
])
|
||||
->rule('integer', [
|
||||
'leadership',
|
||||
'strength',
|
||||
'intel',
|
||||
])
|
||||
->rule('stringWidthBetween', 'name', 1, 18)
|
||||
->rule('min', [
|
||||
'leadership',
|
||||
'strength',
|
||||
'intel'
|
||||
], GameConst::$defaultStatMin)
|
||||
->rule('max', [
|
||||
'leadership',
|
||||
'strength',
|
||||
'intel'
|
||||
], GameConst::$defaultStatMax)
|
||||
->rule('in', 'character', array_merge(GameConst::$availablePersonality, ['Random']));
|
||||
|
||||
if (!$v->validate()) {
|
||||
MessageBox($v->errorStr());
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$session = Session::requireLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
//NOTE: 이 페이지에서는 세션에 데이터를 등록하지 않음. 로그인은 이후에.
|
||||
|
||||
$name = Util::getPost('name');
|
||||
$name = htmlspecialchars($name);
|
||||
$name = StringUtil::removeSpecialCharacter($name);
|
||||
$name = WebUtil::htmlPurify($name);
|
||||
$name = StringUtil::textStrip($name);
|
||||
$pic = (int)Util::getPost('pic', 'bool', 0);
|
||||
$character = Util::getPost('character');
|
||||
|
||||
$leadership = Util::getPost('leadership', 'int', 50);
|
||||
$strength = Util::getPost('strength', 'int', 50);
|
||||
$intel = Util::getPost('intel', 'int', 50);
|
||||
|
||||
$join = Util::getPost('join'); //쓸모 없음
|
||||
|
||||
$rootDB = RootDB::db();
|
||||
//회원 테이블에서 정보확인
|
||||
$member = $rootDB->queryFirstRow('SELECT `no`, id, picture, grade, `name`, imgsvr FROM member WHERE no=%i', $userID);
|
||||
|
||||
if (!$member) {
|
||||
MessageBox("잘못된 접근입니다!!!");
|
||||
echo "<script>history.go(-1);</script>";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$gameStor->cacheValues(['year','month','maxgeneral','scenario','show_img_level','turnterm','turntime','genius','npcmode']);
|
||||
########## 동일 정보 존재여부 확인. ##########
|
||||
|
||||
$gencount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2');
|
||||
$oldGeneral = $db->queryFirstField('SELECT `no` FROM general WHERE `owner`=%i', $userID);
|
||||
$oldName = $db->queryFirstField('SELECT `no` FROM general WHERE `name`=%s', $name);
|
||||
|
||||
if ($oldGeneral) {
|
||||
echo("<script>
|
||||
window.alert('이미 등록하셨습니다!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
if ($oldName) {
|
||||
echo("<script>
|
||||
window.alert('이미 있는 장수입니다. 다른 이름으로 등록해 주세요!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
if ($gameStor->maxgeneral <= $gencount) {
|
||||
echo("<script>
|
||||
window.alert('더이상 등록할 수 없습니다!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
if ($name == '') {
|
||||
echo("<script>
|
||||
window.alert('이름이 짧습니다. 다시 가입해주세요!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
if (mb_strwidth($name) > 18) {
|
||||
echo("<script>
|
||||
window.alert('이름이 유효하지 않습니다. 다시 가입해주세요!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
if ($leadership + $strength + $intel > GameConst::$defaultStatTotal) {
|
||||
echo("<script>
|
||||
window.alert('능력치가 ".GameConst::$defaultStatTotal."을 넘어섰습니다. 다시 가입해주세요!')
|
||||
history.go(-1)
|
||||
</script>");
|
||||
exit;
|
||||
}
|
||||
|
||||
$genius = Util::randBool(0.01);
|
||||
// 현재 1%
|
||||
if ($genius && $gameStor->genius > 0) {
|
||||
$gameStor->genius = $gameStor->genius-1;
|
||||
} else {
|
||||
$genius = false;
|
||||
}
|
||||
|
||||
// 공백지에서만 태어나게
|
||||
$city = $db->queryFirstField("select city from city where level>=5 and level<=6 and nation=0 order by rand() limit 0,1");
|
||||
if (!$city) {
|
||||
$city = $db->queryFirstField("select city from city where level>=5 and level<=6 order by rand() limit 0,1");
|
||||
}
|
||||
|
||||
$pleadership = 0;
|
||||
$pstrength = 0;
|
||||
$pintel = 0;
|
||||
foreach(Util::range(Util::randRangeInt(3, 5)) as $statIdx){
|
||||
switch (Util::choiceRandomUsingWeight([$leadership, $strength, $intel])) {
|
||||
case 0:
|
||||
$pleadership++;
|
||||
break;
|
||||
case 1:
|
||||
$pstrength++;
|
||||
break;
|
||||
case 2:
|
||||
$pintel++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$leadership = $leadership + $pleadership;
|
||||
$strength = $strength + $pstrength;
|
||||
$intel = $intel + $pintel;
|
||||
|
||||
$admin = $gameStor->getValues(['scenario', 'turnterm', 'turntime', 'show_img_level', 'startyear', 'year']);
|
||||
$relYear = Util::valueFit($admin['year'] - $admin['startyear'], 0);
|
||||
|
||||
$age = 20 + ($pleadership + $pstrength + $pintel) * 2 - (mt_rand(0, 1));
|
||||
// 아직 남았고 천재등록상태이면 특기 부여
|
||||
if ($genius) {
|
||||
$specage2 = $age;
|
||||
$special2 = SpecialityHelper::pickSpecialWar([
|
||||
'leadership'=>$leadership,
|
||||
'strength'=>$strength,
|
||||
'intel'=>$intel,
|
||||
'dex1'=>0,
|
||||
'dex2'=>0,
|
||||
'dex3'=>0,
|
||||
'dex4'=>0,
|
||||
'dex5'=>0
|
||||
]);
|
||||
} else {
|
||||
$specage2 = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/6 - $relYear / 2), 3) + $age;
|
||||
$special2 = GameConst::$defaultSpecialWar;
|
||||
}
|
||||
//내특
|
||||
$specage = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/12 - $relYear / 2), 3) + $age;
|
||||
$special = GameConst::$defaultSpecialDomestic;
|
||||
|
||||
if ($admin['scenario'] >= 1000) {
|
||||
$specage2 = $age + 3;
|
||||
$specage = $age + 3;
|
||||
}
|
||||
|
||||
if($relYear < 3){
|
||||
$experience = 0;
|
||||
}
|
||||
else{
|
||||
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 4');
|
||||
$targetGenOrder = Util::round($expGenCount * 0.2);
|
||||
$experience = $db->queryFirstField(
|
||||
'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1',
|
||||
$targetGenOrder - 1
|
||||
);
|
||||
$experience *= 0.8;
|
||||
}
|
||||
|
||||
$turntime = getRandTurn($admin['turnterm'], new \DateTimeImmutable($admin['turntime']));
|
||||
|
||||
$now = date('Y-m-d H:i:s');
|
||||
if ($now >= $turntime) {
|
||||
$turntime = addTurn($turntime, $admin['turnterm']);
|
||||
}
|
||||
|
||||
//특회 전콘
|
||||
if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "" && $pic) {
|
||||
$face = $member['picture'];
|
||||
$imgsvr = $member['imgsvr'];
|
||||
} else {
|
||||
$face = "default.jpg";
|
||||
$imgsvr = 0;
|
||||
}
|
||||
|
||||
//성격 랜덤시
|
||||
if (!in_array($character, GameConst::$availablePersonality)){
|
||||
$character = Util::choiceRandom(GameConst::$availablePersonality);
|
||||
}
|
||||
//상성 랜덤
|
||||
$affinity = rand()%150 + 1;
|
||||
|
||||
########## 회원정보 테이블에 입력값을 등록한다. ##########
|
||||
$db->insert('general', [
|
||||
'owner' => $userID,
|
||||
'name' => $name,
|
||||
'owner_name' => $member['name'],
|
||||
'picture' => $face,
|
||||
'imgsvr' => $imgsvr,
|
||||
'nation' => 0,
|
||||
'city' => $city,
|
||||
'troop' => 0,
|
||||
'affinity' => $affinity,
|
||||
'leadership' => $leadership,
|
||||
'strength' => $strength,
|
||||
'intel' => $intel,
|
||||
'experience' => $experience,
|
||||
'dedication' => 0,
|
||||
'gold' => GameConst::$defaultGold,
|
||||
'rice' => GameConst::$defaultRice,
|
||||
'crew' => 0,
|
||||
'train' => 0,
|
||||
'atmos' => 0,
|
||||
'officer_level' => 0,
|
||||
'turntime' => $turntime,
|
||||
'killturn' => 6,
|
||||
'lastconnect' => $now,
|
||||
'lastrefresh' => $now,
|
||||
'crewtype'=>GameUnitConst::DEFAULT_CREWTYPE,
|
||||
'makelimit' => 0,
|
||||
'age' => $age,
|
||||
'startage' => $age,
|
||||
'personal' => $character,
|
||||
'specage' => $specage,
|
||||
'special' => $special,
|
||||
'specage2' => $specage2,
|
||||
'special2' => $special2
|
||||
]);
|
||||
$generalID = $db->insertId();
|
||||
$turnRows = [];
|
||||
foreach(Util::range(GameConst::$maxTurn) as $turnIdx){
|
||||
$turnRows[] = [
|
||||
'general_id'=>$generalID,
|
||||
'turn_idx'=>$turnIdx,
|
||||
'action'=>'휴식',
|
||||
'arg'=>null,
|
||||
'brief'=>'휴식'
|
||||
];
|
||||
}
|
||||
$db->insert('general_turn', $turnRows);
|
||||
|
||||
resetInheritanceUser($userID);
|
||||
|
||||
$rank_data = [];
|
||||
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
|
||||
$rank_data[] = [
|
||||
'general_id'=>$generalID,
|
||||
'nation_id'=>0,
|
||||
'type'=>$rankColumn,
|
||||
'value'=>0
|
||||
];
|
||||
}
|
||||
$db->insert('rank_data', $rank_data);
|
||||
$db->insert('betting', [
|
||||
'general_id'=>$generalID,
|
||||
]);
|
||||
$cityname = CityConst::byID($city)->name;
|
||||
|
||||
$me = [
|
||||
'no'=>$generalID
|
||||
];
|
||||
|
||||
$log = [];
|
||||
$mylog = [];
|
||||
|
||||
$logger = new ActionLogger($generalID, 0, $gameStor->year, $gameStor->month);
|
||||
|
||||
$josaRa = JosaUtil::pick($name, '라');
|
||||
$speicalText = getGeneralSpecialWarName($special2);
|
||||
if ($genius) {
|
||||
|
||||
$logger->pushGlobalActionLog("<G><b>{$cityname}</b></>에서 <Y>{$name}</>{$josaRa}는 기재가 천하에 이름을 알립니다.");
|
||||
$logger->pushGlobalActionLog("<C>{$speicalText}</> 특기를 가진 <C>천재</>의 등장으로 온 천하가 떠들썩합니다.");
|
||||
$logger->pushGlobalHistoryLog("<L><b>【천재】</b></><G><b>{$cityname}</b></>에 천재가 등장했습니다.");
|
||||
} else {
|
||||
$logger->pushGlobalActionLog("<G><b>{$cityname}</b></>에서 <Y>{$name}</>{$josaRa}는 호걸이 천하에 이름을 알립니다.");
|
||||
}
|
||||
|
||||
$logger->pushGeneralHistoryLog("<Y>{$name}</>, <G>{$cityname}</>에서 큰 뜻을 품다.");
|
||||
$logger->pushGeneralActionLog("삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralActionLog("처음 하시는 경우에는 <D>도움말</>을 참고하시고,", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralActionLog("문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralActionLog("부디 즐거운 삼모전 되시길 바랍니다 ^^", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralActionLog("통솔 <C>$pleadership</> 무력 <C>$pstrength</> 지력 <C>$pintel</> 의 보너스를 받으셨습니다.", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralActionLog("연령은 <C>$age</>세로 시작합니다.", ActionLogger::PLAIN);
|
||||
|
||||
if ($genius) {
|
||||
$logger->pushGeneralActionLog("축하합니다! 천재로 태어나 처음부터 <C>{$speicalText}</> 특기를 가지게 됩니다!", ActionLogger::PLAIN);
|
||||
$logger->pushGeneralHistoryLog("<C>{$speicalText}</> 특기를 가진 천재로 탄생.");
|
||||
}
|
||||
|
||||
$logger->flush();
|
||||
|
||||
pushAdminLog(["가입 : {$userID} // {$name} // {$generalID}".getenv("REMOTE_ADDR")]);
|
||||
|
||||
$rootDB->insert('member_log', [
|
||||
'member_no' => $userID,
|
||||
'date'=>TimeUtil::now(),
|
||||
'action_type'=>'make_general',
|
||||
'action'=>Json::encode([
|
||||
'server'=>DB::prefix(),
|
||||
'type'=>'general',
|
||||
'generalID'=>$generalID,
|
||||
'generalName'=>$name
|
||||
])
|
||||
]);
|
||||
|
||||
?>
|
||||
<script>
|
||||
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n위키와 팁/강좌 게시판을 꼭 읽어보세요!');
|
||||
</script>
|
||||
<script>location.replace('./');</script>
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
jQuery(function($){
|
||||
$('.submitBtn').click(function(){
|
||||
var $this = $(this);
|
||||
var target = parseInt($this.data('target'));
|
||||
var amount = $('#target_{0}'.format(target)).val();
|
||||
|
||||
$.post({
|
||||
url:'j_betting.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
target:target,
|
||||
amount:amount
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
return quickReject('베팅을 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
return quickReject('베팅을 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
location.reload();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
-179
@@ -1,179 +0,0 @@
|
||||
|
||||
|
||||
function submitArticle(){
|
||||
var $article = $('#newArticle');
|
||||
var $title = $article.find('.titleInput');
|
||||
var $text = $article.find('.contentInput');
|
||||
var title = $.trim($title.val());
|
||||
var text = $.trim($text.val());
|
||||
|
||||
|
||||
if(!text && !title){
|
||||
return false;
|
||||
}
|
||||
|
||||
$title.val('');
|
||||
$text.val('');
|
||||
|
||||
$.post({
|
||||
url:'j_board_article_add.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
isSecret:isSecretBoard,
|
||||
title:title,
|
||||
text:text
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
$title.val(title);
|
||||
$text.val(text);
|
||||
return quickReject('글을 올리는데 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
$title.val(title);
|
||||
$text.val(text);
|
||||
return quickReject('글을 올리는데 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
return loadArticles().done(drawArticles);
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function submitComment(){
|
||||
var $this = $(this);
|
||||
|
||||
var $article = $this.closest('.articleObj').eq(0);
|
||||
var articleNo = $article.data('no');
|
||||
var $text = $article.find('input.commentText');
|
||||
var text = $.trim($text.val());
|
||||
|
||||
if(!text){
|
||||
return false;
|
||||
}
|
||||
|
||||
$text.val('');
|
||||
|
||||
$.post({
|
||||
url:'j_board_comment_add.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
articleNo:articleNo,
|
||||
text:text
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
$text.val(text);
|
||||
return quickReject('댓글을 다는데 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
$text.val(text);
|
||||
return quickReject('댓글을 다는데 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
return loadArticles().done(drawArticles);
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function drawArticle(idx, articleObj){
|
||||
var $articleFrame = $('#articleTemplate > .articleFrame');
|
||||
var $commentFrame = $($('#commentTemplate').prop('content'));
|
||||
|
||||
var $article = $articleFrame.clone();
|
||||
$article.addClass('articleObj')
|
||||
.data('no', articleObj.no)
|
||||
.data('author', articleObj.general_no);
|
||||
|
||||
|
||||
$article.find('.articleNo').text(articleObj.no);
|
||||
$article.find('.authorName').text(articleObj.author);
|
||||
$article.find('.articleTitle').text(articleObj.title);
|
||||
$article.find('.date').text(articleObj.date);
|
||||
if(articleObj.author_icon){
|
||||
$article.find('.authorIcon').attr('src', articleObj.author_icon);
|
||||
}
|
||||
//$article.find('.text').text(articleObj.text);
|
||||
$article.find('.text').html(nl2br(escapeHtml(articleObj.text)));
|
||||
//TODO: 바꿀 것
|
||||
|
||||
var $articleComment = $article.find('.commentList');
|
||||
|
||||
$.each(articleObj.comment, function(_, commentObj){
|
||||
var $comment = $commentFrame.clone();
|
||||
$comment.find('.author').text(commentObj.author);
|
||||
//$comment.find('.text').text(commentObj.text);
|
||||
$comment.find('.text').html(nl2br(escapeHtml(commentObj.text)));
|
||||
$comment.find('.date').text(commentObj.date);
|
||||
$articleComment.append($comment);
|
||||
});
|
||||
|
||||
$article.find('.submitComment').click(submitComment);
|
||||
$article.find('.commentText').on('keypress', function (e) {
|
||||
if(e.which === 13){
|
||||
$article.find('.submitComment').click();
|
||||
}
|
||||
});
|
||||
$article.find('.inputCommentHeader').click(function(){
|
||||
$article.find('.commentText').focus();
|
||||
})
|
||||
|
||||
var $board = $('#board');
|
||||
|
||||
$board.prepend($article);
|
||||
}
|
||||
|
||||
function drawArticles(articlesObj){
|
||||
var deferred = $.Deferred();
|
||||
if(!articlesObj){
|
||||
return quickReject('받아오는데 실패했습니다.');
|
||||
}
|
||||
if(!articlesObj.result){
|
||||
return quickReject('에러가 발생했습니다. : '+articlesObj.reason);
|
||||
}
|
||||
|
||||
$('.articleObj').detach();//첫 버전이니까 일괄 삭제 일괄 로드
|
||||
$.each(articlesObj.articles, drawArticle);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadArticles(){
|
||||
return $.post({
|
||||
url:'j_board_get_articles.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
isSecret:isSecretBoard, //첫 버전이니까 전체 다 불러오자
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resizeTextarea($obj){
|
||||
$obj.height(1).height($obj.prop('scrollHeight')+12 );
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('textarea.autosize').on('keydown keyup', function(){
|
||||
resizeTextarea($(this));
|
||||
})
|
||||
|
||||
$('#submitArticle').click(submitArticle);
|
||||
|
||||
loadArticles()
|
||||
.then(drawArticles, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,195 +0,0 @@
|
||||
function changePermission(isAmbassador, rawGeneralList) {
|
||||
console.log(isAmbassador);
|
||||
console.log(rawGeneralList);
|
||||
|
||||
var generalList = [];
|
||||
$.each(rawGeneralList, function(idx, value) {
|
||||
generalList.push(parseInt(value.id));
|
||||
})
|
||||
|
||||
$.post({
|
||||
url: 'j_general_set_permission.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
isAmbassador: isAmbassador,
|
||||
genlist: generalList
|
||||
},
|
||||
}).then(function(data) {
|
||||
if (!data) {
|
||||
alert('변경하지 못했습니다.');
|
||||
return false;
|
||||
}
|
||||
if (!data.result) {
|
||||
alert('변경하지 못했습니다. : ' + data.reason);
|
||||
return false;
|
||||
}
|
||||
alert('변경했습니다.');
|
||||
location.reload();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#selectAmbassador').select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "",
|
||||
allowClear: true,
|
||||
language: "ko",
|
||||
width: 300,
|
||||
maximumSelectionLength: 2,
|
||||
containerCss: {
|
||||
display: "inline-block !important;",
|
||||
color: 'white !important'
|
||||
},
|
||||
data: candidateAmbassadors,
|
||||
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
|
||||
$('#selectAuditor').select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "",
|
||||
allowClear: true,
|
||||
language: "ko",
|
||||
width: 300,
|
||||
maximumSelectionLength: 2,
|
||||
containerCss: {
|
||||
display: "inline-block !important;",
|
||||
color: 'white !important'
|
||||
},
|
||||
data: candidateAuditors,
|
||||
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
|
||||
$('#changeAmbassador').click(function() {
|
||||
if (!confirm('외교권자를 변경할까요?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
changePermission(true, $('#selectAmbassador').select2('data'));
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#changeAuditor').click(function() {
|
||||
if (!confirm('조언자를 변경할까요?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
changePermission(false, $('#selectAuditor').select2('data'));
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btn_kick').click(function() {
|
||||
var $kickSelect = $('#genlist_kick option:selected');
|
||||
var generalID = $kickSelect.val();
|
||||
if (!generalID) {
|
||||
alert('장수를 선택해주세요');
|
||||
return false;
|
||||
}
|
||||
var generalName = $kickSelect.data('name');
|
||||
if (!confirm('{0}를 추방하시겠습니까?'.format(generalName))) {
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url: 'j_myBossInfo.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: '추방',
|
||||
destGeneralID: generalID
|
||||
},
|
||||
}).then(function(data) {
|
||||
if (!data) {
|
||||
alert('추방하지 못했습니다.');
|
||||
return false;
|
||||
}
|
||||
if (!data.result) {
|
||||
alert('추방하지 못했습니다. : ' + data.reason);
|
||||
return false;
|
||||
}
|
||||
alert('{0}를 추방했습니다.'.format(generalName));
|
||||
location.reload();
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_appoint').click(function() {
|
||||
var $btn = $(this);
|
||||
var officerLevel = $btn.data('officer_level');
|
||||
var officerLevelText = $btn.data('officer_level_text');
|
||||
var cityID = 0;
|
||||
var cityName = '_';
|
||||
var $generalSelect = $('#genlist_{0} option:selected'.format(officerLevel));
|
||||
var $citySelect = $('#citylist_{0} option:selected'.format(officerLevel));
|
||||
|
||||
var generalID = parseInt($generalSelect.val());
|
||||
var generalName = $generalSelect.data('name');
|
||||
var generalOfficerLevel = $generalSelect.data('officer_level');
|
||||
|
||||
|
||||
if (officerLevel >= 5) {
|
||||
if (generalID == 0) {
|
||||
if (!confirm('{0}직을 비우시겠습니까?'.format(officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
} else if (generalOfficerLevel >= 5) {
|
||||
if (!confirm('이미 수뇌인 {0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!confirm('{0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cityID = $citySelect.val();
|
||||
if (!cityID) {
|
||||
alert('도시를 선택해주세요');
|
||||
return false;
|
||||
}
|
||||
cityName = $citySelect.find('option:selected .name_field').text();
|
||||
|
||||
if (generalID == 0) {
|
||||
if (!confirm('{0} {1}직을 비우시겠습니까?'.format(cityName, officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
} else if (generalOfficerLevel >= 5) {
|
||||
if (!confirm('수뇌인 {0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!confirm('{0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.post({
|
||||
url: 'j_myBossInfo.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: '임명',
|
||||
destGeneralID: generalID,
|
||||
destCityID: cityID,
|
||||
officerLevel: officerLevel
|
||||
},
|
||||
}).then(function(data) {
|
||||
if (!data) {
|
||||
alert('임명하지 못했습니다.');
|
||||
return false;
|
||||
}
|
||||
if (!data.result) {
|
||||
alert('임명하지 못했습니다. : ' + data.reason);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (generalID) {
|
||||
alert('{0}을(를) 임명했습니다.'.format(generalName));
|
||||
} else {
|
||||
alert('관직을 비웠습니다.');
|
||||
}
|
||||
|
||||
location.reload();
|
||||
}, errUnknown);
|
||||
|
||||
})
|
||||
})
|
||||
@@ -1,185 +0,0 @@
|
||||
var filledChiefList = {};
|
||||
|
||||
var chiefTableObj = {};
|
||||
|
||||
function clearTable(){
|
||||
$('.chiefLevelText').html('-');
|
||||
$('.chiefTurnTime, .chiefTurnText, .chiefName').html(' ');
|
||||
}
|
||||
|
||||
function genChiefTableObj(){
|
||||
var objTable = {
|
||||
btns: $('#turnPush,#turnPull,#setCommand')
|
||||
};
|
||||
|
||||
for(var chiefIdx = 5; chiefIdx <= 12; chiefIdx++){
|
||||
var $plate = $('#chief_{0}'.format(chiefIdx));
|
||||
var $officerLevelText = $plate.find('.chiefLevelText');
|
||||
var $name = $plate.find('.chiefName');
|
||||
var turn = [];
|
||||
for(var turnIdx=0;turnIdx<maxChiefTurn;turnIdx++){
|
||||
var $turn = $plate.find('.turn{0}'.format(turnIdx));
|
||||
var $turnTime = $turn.find('.chiefTurnTime');
|
||||
var $turnPad = $turn.find('.chiefTurnPad');
|
||||
var $turnText = $turn.find('.chiefTurnText');
|
||||
turn.push({turnTime:$turnTime,turnPad:$turnPad,turnText:$turnText});
|
||||
}
|
||||
objTable[chiefIdx] = {
|
||||
officerLevelText: $officerLevelText,
|
||||
name: $name,
|
||||
turn: turn
|
||||
};
|
||||
}
|
||||
|
||||
return objTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearChief(chiefIdx){
|
||||
var $plate = $('#chief_{0}'.format(chiefIdx));
|
||||
$plate.find('.chiefLevelText').html('-');
|
||||
$plate.find('.chiefTurnTime, .chiefTurnText, .chiefName').html(' ');
|
||||
}
|
||||
|
||||
function reloadTable(){
|
||||
$.post({
|
||||
url:'j_getChiefTurn.php',
|
||||
dataType:'json',
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
return;
|
||||
}
|
||||
var turnTerm = data.turnTerm;
|
||||
var tmpFilledChiefList = {};
|
||||
|
||||
if(data.isChief){
|
||||
chiefTableObj.btns.css('visibility', 'visible');
|
||||
}
|
||||
else{
|
||||
chiefTableObj.btns.css('visibility', 'hidden');
|
||||
}
|
||||
$.each(data.nationTurnBrief, function(chiefIdx, chiefInfo){
|
||||
tmpFilledChiefList[chiefIdx] = true;
|
||||
filledChiefList[chiefIdx] = true;
|
||||
|
||||
var plateObj = chiefTableObj[chiefIdx];
|
||||
if(chiefInfo.name){
|
||||
var $name = $('<span>{0}</span>'.format(chiefInfo.name));
|
||||
var nameColor = getNpcColor(chiefInfo.npcType);
|
||||
if(nameColor){
|
||||
$name.css('color',nameColor);
|
||||
}
|
||||
plateObj.name.html($name);
|
||||
}
|
||||
else{
|
||||
plateObj.name.html('');
|
||||
}
|
||||
|
||||
plateObj.officerLevelText.text(chiefInfo.officerLevelText);
|
||||
|
||||
if(chiefInfo.turnTime){
|
||||
var turnTimeObj = moment(chiefInfo.turnTime);
|
||||
}
|
||||
else{
|
||||
var turnTimeObj = null;
|
||||
}
|
||||
var turnList = plateObj.turn;
|
||||
$.each(chiefInfo.turn, function(turnIdx, turnText){
|
||||
if(turnTimeObj){
|
||||
turnList[turnIdx].turnTime.text(turnTimeObj.format('HH:mm'));
|
||||
}
|
||||
else{
|
||||
turnList[turnIdx].turnTime.text('');
|
||||
}
|
||||
|
||||
turnList[turnIdx].turnText.html(turnText).css('font-size', '13px');
|
||||
var oWidth = turnList[turnIdx].turnPad.innerWidth();
|
||||
var iWidth = turnList[turnIdx].turnText.outerWidth();
|
||||
if(iWidth > oWidth * 0.95){
|
||||
var newFontSize = 13 * oWidth / iWidth * 0.9;
|
||||
turnList[turnIdx].turnText.css('font-size', '{0}px'.format(newFontSize));
|
||||
}
|
||||
if(turnTimeObj){
|
||||
turnTimeObj = turnTimeObj.add(turnTerm, 'minute');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
for(var idx=5;idx<=12;idx++){
|
||||
if(idx in tmpFilledChiefList){
|
||||
continue;
|
||||
}
|
||||
if(idx in filledChiefList){
|
||||
clearChief(chiefIdx);
|
||||
}
|
||||
}
|
||||
filledChiefList = tmpFilledChiefList;
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
function reserveTurn(turnList, command){
|
||||
console.log(turnList, command);
|
||||
$.post({
|
||||
url:'j_set_chief_command.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:command,
|
||||
turnList:turnList
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
}
|
||||
reloadTable();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
function pushTurn(turnCnt){
|
||||
$.post({
|
||||
url:'j_chief_turn.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
amount:turnCnt
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
}
|
||||
reloadTable();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
chiefTableObj= genChiefTableObj();
|
||||
reloadTable();
|
||||
$('#reloadTable').click(reloadTable);
|
||||
$('#setCommand').click(function(){
|
||||
var turnList = $('#chiefTurnSelector').val().map(function(v){return parseInt(v);});
|
||||
var $command = $('#chiefCommandList option:selected');
|
||||
if($command.data('reqarg')){
|
||||
$.redirect(
|
||||
"b_processing.php", {
|
||||
command: $command.val(),
|
||||
turnList: turnList.join('_'),
|
||||
is_chief: true
|
||||
}, "GET");
|
||||
}
|
||||
else{
|
||||
reserveTurn(turnList, $command.val());
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#turnPush').click(function(){
|
||||
pushTurn(1);
|
||||
});
|
||||
|
||||
$('#turnPull').click(function(){
|
||||
pushTurn(-1);
|
||||
});
|
||||
|
||||
})
|
||||
@@ -1,417 +0,0 @@
|
||||
/**
|
||||
* <>& 등을 html에서도 그대로 보이도록 escape주는 함수
|
||||
* @see https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
||||
* @param {string} string escape하고자 하는 문자열
|
||||
* @returns {string}
|
||||
*/
|
||||
var escapeHtml = (function(string) {
|
||||
var entityMap = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'/': '/',
|
||||
'`': '`',
|
||||
'=': '='
|
||||
};
|
||||
|
||||
return function(string) {
|
||||
return String(string).replace(/[&<>"'`=\/]/g, function(s) {
|
||||
return entityMap[s];
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
/**
|
||||
* 변수가 정수인지 확인하는 함수
|
||||
* @param {*} n 정수인지 확인하기 위한 인자
|
||||
* @return {boolean} 정수인지 여부
|
||||
*/
|
||||
function isInt(n) {
|
||||
return +n === n && !(n % 1);
|
||||
}
|
||||
|
||||
;
|
||||
(function(ns) {
|
||||
//https://gist.github.com/demouth/3217440
|
||||
/**
|
||||
* mb_strwidth
|
||||
* @param String
|
||||
* @return int
|
||||
* @see http://php.net/manual/ja/function.mb-strwidth.php
|
||||
*/
|
||||
var mb_strwidth = function(str) {
|
||||
var i = 0,
|
||||
l = str.length,
|
||||
c = '',
|
||||
length = 0;
|
||||
for (; i < l; i++) {
|
||||
c = str.charCodeAt(i);
|
||||
if (0x0000 <= c && c <= 0x0019) {
|
||||
length += 0;
|
||||
} else if (0x0020 <= c && c <= 0x1FFF) {
|
||||
length += 1;
|
||||
} else if (0x2000 <= c && c <= 0xFF60) {
|
||||
length += 2;
|
||||
} else if (0xFF61 <= c && c <= 0xFF9F) {
|
||||
length += 1;
|
||||
} else if (0xFFA0 <= c) {
|
||||
length += 2;
|
||||
}
|
||||
}
|
||||
return length;
|
||||
};
|
||||
|
||||
/**
|
||||
* mb_strimwidth
|
||||
* @param String
|
||||
* @param int
|
||||
* @param int
|
||||
* @param String
|
||||
* @return String
|
||||
* @see http://www.php.net/manual/ja/function.mb-strimwidth.php
|
||||
*/
|
||||
var mb_strimwidth = function(str, start, width, trimmarker) {
|
||||
if (typeof trimmarker === 'undefined') trimmarker = '';
|
||||
var trimmakerWidth = mb_strwidth(trimmarker),
|
||||
i = start,
|
||||
l = str.length,
|
||||
trimmedLength = 0,
|
||||
trimmedStr = '';
|
||||
for (; i < l; i++) {
|
||||
var charCode = str.charCodeAt(i),
|
||||
c = str.charAt(i),
|
||||
charWidth = mb_strwidth(c),
|
||||
next = str.charAt(i + 1),
|
||||
nextWidth = mb_strwidth(next);
|
||||
trimmedLength += charWidth;
|
||||
trimmedStr += c;
|
||||
if (trimmedLength + trimmakerWidth + nextWidth > width) {
|
||||
trimmedStr += trimmarker;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return trimmedStr;
|
||||
};
|
||||
ns.mb_strwidth = mb_strwidth;
|
||||
ns.mb_strimwidth = mb_strimwidth;
|
||||
})(window);
|
||||
|
||||
/**
|
||||
* object의 array를 id를 key로 삼는 object로 재 변환
|
||||
* @param {Array.{id: Object}} arr id를 가진 object의 array
|
||||
* @returns {Object}
|
||||
*/
|
||||
function convertDictById(arr) {
|
||||
var result = {};
|
||||
arr.forEach(function(v, i) {
|
||||
result[v.id] = v;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* array를 set 형태의 object로 변환
|
||||
* @param {Array} arr 값을 가진 array
|
||||
* @returns {Object}
|
||||
*/
|
||||
function convertSet(arr) {
|
||||
var result = {};
|
||||
arr.forEach(function(v) {
|
||||
result[v] = true;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {0}, {1}, {2}형태로 포맷해주는 함수
|
||||
*/
|
||||
String.prototype.format = function() {
|
||||
var args = arguments;
|
||||
return this.replace(/{(\d+)}/g, function(match, number) {
|
||||
return (typeof args[number] != 'undefined') ? args[number] : match;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function hexToRgb(hex) {
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
}
|
||||
|
||||
|
||||
function isBrightColor(color) {
|
||||
color = hexToRgb(color);
|
||||
if ((color.r * 0.299 + color.g * 0.587 + color.b * 0.114) > 140) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 게임내에서 지원하는 color type만 선택할 수 있도록 해주는 함수
|
||||
* @param {string} color #AAAAAA 또는 AAAAAA 형태로 작성된 RGB hex color string
|
||||
* @returns {string}
|
||||
*/
|
||||
function convColorValue(color) {
|
||||
if (color.charAt(0) == '#') {
|
||||
color = color.substr(1);
|
||||
}
|
||||
color = color.toUpperCase();
|
||||
|
||||
var colorBase = convertSet([
|
||||
'000080', '0000FF', '008000', '008080', '00BFFF', '00FF00', '00FFFF', '20B2AA',
|
||||
'2E8B57', '483D8B', '6495ED', '7B68EE', '7CFC00', '7FFFD4', '800000', '800080',
|
||||
'808000', '87CEEB', 'A0522D', 'A9A9A9', 'AFEEEE', 'BA55D3', 'E0FFFF', 'F5F5DC',
|
||||
'FF0000', 'FF00FF', 'FF6347', 'FFA500', 'FFC0CB', 'FFD700', 'FFDAB9', 'FFFF00',
|
||||
'FFFFFF'
|
||||
]);
|
||||
|
||||
if (!colorBase.hasOwnProperty(color)) {
|
||||
return '000000';
|
||||
}
|
||||
|
||||
return color;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function linkifyStrWithOpt(text) {
|
||||
return linkifyStr(text, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 단순한 Template 함수. <%변수명%>으로 template 가능
|
||||
* @see https://github.com/krasimir/absurd/blob/master/lib/processors/html/helpers/TemplateEngine.js
|
||||
* @param {string} html
|
||||
* @param {object} options
|
||||
* @returns {string}
|
||||
*/
|
||||
var TemplateEngine = function(html, options) {
|
||||
var re = /<%(.+?)%>/g,
|
||||
reExp = /(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,
|
||||
code = 'with(obj) { var r=[];\n',
|
||||
cursor = 0,
|
||||
result,
|
||||
match;
|
||||
var add = function(line, js) {
|
||||
js ? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') :
|
||||
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : '');
|
||||
return add;
|
||||
}
|
||||
options.e = escapeHtml;
|
||||
options.linkifyStr = linkifyStrWithOpt;
|
||||
while (match = re.exec(html)) {
|
||||
add(html.slice(cursor, match.index))(match[1], true);
|
||||
cursor = match.index + match[0].length;
|
||||
}
|
||||
add(html.substr(cursor, html.length - cursor));
|
||||
code = (code + 'return r.join(""); }').replace(/[\r\t\n]/g, ' ');
|
||||
try { result = new Function('obj', code).apply(options, [options]); } catch (err) { console.error("'" + err.message + "'", " in \n\nCode:\n", code, "\n"); }
|
||||
return result;
|
||||
}
|
||||
|
||||
function getIconPath(imgsvr, picture) {
|
||||
// ../d_shared/common_path.js 필요
|
||||
if (!imgsvr) {
|
||||
return pathConfig.sharedIcon + '/' + picture;
|
||||
} else {
|
||||
return pathConfig.root + '/d_pic/' + picture;
|
||||
}
|
||||
}
|
||||
|
||||
function activeFlip($obj) {
|
||||
var $result;
|
||||
if ($obj === undefined) {
|
||||
$result = $('img[data-flip]');
|
||||
} else {
|
||||
$result = $obj.find('img[data-flip]');
|
||||
}
|
||||
|
||||
$result.each(function() {
|
||||
activeFlipItem($(this));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function combineObject(item, columnList) {
|
||||
var newItem = {};
|
||||
for (var columnIdx in columnList) {
|
||||
var columnName = columnList[columnIdx];
|
||||
newItem[columnName] = item[columnIdx];
|
||||
}
|
||||
return newItem;
|
||||
}
|
||||
|
||||
function combineArray(array, columnList) {
|
||||
var result = [];
|
||||
for (var key in array) {
|
||||
var item = array[key];
|
||||
result[key] = combineObject(item, columnList);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function activeFlipItem($img) {
|
||||
var imageList = [];
|
||||
imageList.push($img.attr('src'));
|
||||
$.each($img.data('flip').split(','), function(idx, value) {
|
||||
var value = $.trim(value);
|
||||
if (!value) {
|
||||
return true;
|
||||
}
|
||||
imageList.push(value);
|
||||
});
|
||||
if (imageList.length <= 1) {
|
||||
return;
|
||||
}
|
||||
$img.data('computed_flip_array', imageList);
|
||||
$img.data('computed_flip_idx', 0);
|
||||
|
||||
$img.click(function() {
|
||||
var arr = $img.data('computed_flip_array');
|
||||
var idx = $img.data('computed_flip_idx');
|
||||
idx = (idx + 1) % (arr.length);
|
||||
$img.attr('src', arr[idx]);
|
||||
$img.data('computed_flip_idx', idx);
|
||||
});
|
||||
$img.css('cursor', 'pointer');
|
||||
}
|
||||
|
||||
jQuery(function($) {
|
||||
$('.obj_tooltip').mouseover(function() {
|
||||
var $objTooltip = $(this);
|
||||
if ($objTooltip.data('setObjTooltip')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var tooltipClassText = $objTooltip.data('tooltip-class');
|
||||
if (!tooltipClassText) {
|
||||
tooltipClassText = '';
|
||||
}
|
||||
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
.format(tooltipClassText);
|
||||
|
||||
$objTooltip.tooltip({
|
||||
title: function() {
|
||||
return $.trim($(this).find('.tooltiptext').html());
|
||||
},
|
||||
template: template,
|
||||
html: true
|
||||
}).tooltip('show');
|
||||
|
||||
$objTooltip.data('setObjTooltip', true);
|
||||
});
|
||||
/*each(function(){
|
||||
var $objTooltip = $(this);
|
||||
|
||||
|
||||
});*/
|
||||
|
||||
activeFlip();
|
||||
|
||||
var customCSS = localStorage.getItem('sam_customCSS');
|
||||
if (customCSS) {
|
||||
var $style = $('<style type="text/css"></style>');
|
||||
$style.text(customCSS);
|
||||
$style.appendTo($('head'));
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function errUnknown() {
|
||||
alert('작업을 실패했습니다.');
|
||||
}
|
||||
|
||||
function errUnknownToast() {
|
||||
$.toast({
|
||||
title: '에러!',
|
||||
content: '작업을 실패했습니다.',
|
||||
type: 'danger',
|
||||
delay: 5000
|
||||
});
|
||||
}
|
||||
|
||||
function quickReject(errMsg) {
|
||||
if (errMsg === undefined) {
|
||||
errMsg = '작업을 실패했습니다.';
|
||||
}
|
||||
var deferred = $.Deferred();
|
||||
deferred.reject(errMsg);
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
function nl2br(text) {
|
||||
return text.replace(/\n/g, "<br>");
|
||||
}
|
||||
/*
|
||||
function br2nl (text) {
|
||||
return text.replace(/<\s*\/?br\s*[\/]?>/gi, '\n');
|
||||
}
|
||||
*/
|
||||
|
||||
function getNpcColor(npcType) {
|
||||
if (npcType >= 2) {
|
||||
return 'cyan';
|
||||
}
|
||||
if (npcType == 1) {
|
||||
return 'skyblue';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function initTooltip($obj) {
|
||||
if ($obj === undefined) {
|
||||
$obj = $('.obj_tooltip');
|
||||
} else if (!$obj.hasClass('obj_tooltip')) {
|
||||
$obj = $obj.find('.obj_tooltip');
|
||||
}
|
||||
console.log($obj);
|
||||
|
||||
$obj.each(function() {
|
||||
$target = $(this);
|
||||
|
||||
if ($target.data('installHandler')) {
|
||||
return true;
|
||||
}
|
||||
$target.data('installHandler', true);
|
||||
|
||||
$target.mouseover(function() {
|
||||
var $objTooltip = $(this);
|
||||
if ($objTooltip.data('setObjTooltip')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var tooltipClassText = $objTooltip.data('tooltip-class');
|
||||
if (!tooltipClassText) {
|
||||
tooltipClassText = '';
|
||||
}
|
||||
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
.format(tooltipClassText);
|
||||
|
||||
$objTooltip.tooltip({
|
||||
title: function() {
|
||||
return $.trim($(this).find('.tooltiptext').html());
|
||||
},
|
||||
template: template,
|
||||
html: true
|
||||
}).tooltip('show');
|
||||
|
||||
$objTooltip.data('setObjTooltip', true);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
$(function() {
|
||||
var $target = $("#destCityID");
|
||||
reloadWorldMap({
|
||||
isDetailMap: false,
|
||||
clickableAll: true,
|
||||
neutralView: true,
|
||||
useCachedMap: true,
|
||||
selectCallback: function(city) {
|
||||
var currVal = $target.val();
|
||||
$target.val(city.id).trigger("change");
|
||||
if ($target.val() === null) {
|
||||
$target.val(currVal).trigger("change");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
$(function() {
|
||||
var $target = $("#destNationID");
|
||||
reloadWorldMap({
|
||||
isDetailMap: false,
|
||||
clickableAll: true,
|
||||
neutralView: true,
|
||||
useCachedMap: true,
|
||||
selectCallback: function(city) {
|
||||
var currVal = $target.val();
|
||||
$target.val(city.nationId).trigger("change");
|
||||
if ($target.val() === null) {
|
||||
$target.val(currVal).trigger("change");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,135 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
function guiEditorInit($obj, editable){
|
||||
var $submitBtn = $obj.find('.submit');
|
||||
var $noticeInput = $obj.find('.input_form');
|
||||
var globalVariableName = $noticeInput.data('global');
|
||||
var $editForm = $obj.find('.edit_form');
|
||||
var $cancelEdit = $obj.find('.cancel_edit');
|
||||
|
||||
var editMode = false;
|
||||
|
||||
function enableEditor(){
|
||||
editMode = true;
|
||||
$cancelEdit.show();
|
||||
|
||||
var inputText = window[globalVariableName];
|
||||
if(!inputText || inputText == '<p></p>'){
|
||||
inputText = '<p><br></p>';
|
||||
}
|
||||
|
||||
$editForm.removeClass('viewer').summernote({
|
||||
minHeight:200,
|
||||
maxHeight:null,
|
||||
focus:true,
|
||||
lang:'ko-KR',
|
||||
toolbar: [
|
||||
// [groupName, [list of button]]
|
||||
['do', ['undo', 'redo']],
|
||||
['style', ['bold', 'italic', 'underline', 'clear']],
|
||||
['font2', ['fontname', 'fontsize']],
|
||||
['font', ['strikethrough', 'superscript', 'subscript']],
|
||||
['color', ['color']],
|
||||
['in', ['picture', 'link', 'video', 'table', 'hr']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['height', ['height', 'codeview']]
|
||||
],
|
||||
popover: {
|
||||
image: [
|
||||
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
|
||||
['float', ['floatLeft', 'floatRight', 'floatNone']],
|
||||
['remove', ['removeMedia']],
|
||||
['custom', ['imageFlip']],
|
||||
],
|
||||
},
|
||||
fontNames: ['맑은 고딕', 'Nanum Gothic', 'Nanum Myeongjo', 'Nanum Pen Script', '굴림', '굴림체', '바탕', '바탕체', '궁서', '궁서체'],
|
||||
fontSizes: ['8', '9', '10', '11', '12', '14', '16', '20', '24', '28', '32', '36', '40', '46', '52', '60'],
|
||||
callbacks: {
|
||||
onImageUpload: function(files) {
|
||||
$editForm.summernote('saveRange');
|
||||
if(files.length == 0){
|
||||
alert('업로드된 파일이 없습니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('img', files[0]);
|
||||
$editForm.summernote("pasteHtml", '');
|
||||
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'j_image_upload.php',
|
||||
dataType:'json',
|
||||
contentType: false,
|
||||
processData:false,
|
||||
data:formData
|
||||
}).then(function(result){
|
||||
if(!result.result){
|
||||
alert(result.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log($editForm.summernote('code'));
|
||||
if($editForm.summernote('isEmpty')){
|
||||
|
||||
console.log('haha?');
|
||||
var $img = $('<img>');
|
||||
$img.attr('src', result.path);
|
||||
$editForm.summernote('code', $img);
|
||||
return;
|
||||
}
|
||||
|
||||
$editForm.summernote("insertImage", result.path, result.path);
|
||||
|
||||
},function(){
|
||||
alert('알 수 없는 이유로 아이콘 업로드를 실패했습니다.');
|
||||
});
|
||||
}
|
||||
}
|
||||
}).summernote('code', inputText);
|
||||
}
|
||||
|
||||
function disableEditor(){
|
||||
editMode = false;
|
||||
$editForm.summernote('destroy');
|
||||
$cancelEdit.hide();
|
||||
$editForm.html(window[globalVariableName]).addClass('viewer');
|
||||
activeFlip($editForm);
|
||||
}
|
||||
|
||||
$cancelEdit.hide();
|
||||
$editForm.html(window[globalVariableName]);
|
||||
activeFlip($editForm);
|
||||
if(editable){
|
||||
$submitBtn.prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$submitBtn.prop('disabled', true);
|
||||
}
|
||||
|
||||
$submitBtn.click(function(e){
|
||||
if(!editMode){
|
||||
e.preventDefault();
|
||||
enableEditor();
|
||||
return false;
|
||||
}
|
||||
var text = $editForm.summernote('code');
|
||||
window[globalVariableName] = text;
|
||||
$noticeInput.val(text);
|
||||
});
|
||||
|
||||
$cancelEdit.click(function(e){
|
||||
e.preventDefault();
|
||||
disableEditor();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
guiEditorInit($('#noticeForm'), editable);
|
||||
guiEditorInit($('#scoutMsgForm'), editable);
|
||||
|
||||
})
|
||||
@@ -1,422 +0,0 @@
|
||||
|
||||
|
||||
function submitLetter(){
|
||||
var $brief = $('#inputBrief');
|
||||
var $detail = $('#inputDetail');
|
||||
var $prevNo = $('#inputPrevNo');
|
||||
var $destNation = $('#inputDestNation');
|
||||
var brief = $.trim($brief.val());
|
||||
var detail = $.trim($detail.val());
|
||||
var prevNo = parseInt($prevNo.val());
|
||||
var destNation = parseInt($destNation.val());
|
||||
|
||||
if(prevNo !== null && prevNo < 1){
|
||||
prevNo = null;
|
||||
}
|
||||
|
||||
console.log(brief);
|
||||
if(!brief){
|
||||
return false;
|
||||
}
|
||||
|
||||
$brief.val('');
|
||||
$detail.val('');
|
||||
|
||||
$.post({
|
||||
url:'j_diplomacy_send_letter.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
brief:brief,
|
||||
detail:detail,
|
||||
destNation:destNation,
|
||||
prevNo:prevNo
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
$brief.val(brief);
|
||||
$detail.val(detail);
|
||||
return quickReject('외교 서신을 보내는데 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
$brief.val(brief);
|
||||
$detail.val(detail);
|
||||
return quickReject('외교 서신을 보내는데 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
alert('전송했습니다.');
|
||||
location.reload();
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function repondLetter(letterNo, isAgree, reason){
|
||||
$.post({
|
||||
url:'j_diplomacy_respond_letter.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
letterNo:letterNo,
|
||||
isAgree:isAgree,
|
||||
reason:reason,
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
return quickReject('응답을 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
return quickReject('응답을 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
if(isAgree){
|
||||
alert('승인했습니다.');
|
||||
}
|
||||
else{
|
||||
alert('거부했습니다.');
|
||||
}
|
||||
|
||||
location.reload();
|
||||
return false;
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function rollbackLetter(letterNo){
|
||||
$.post({
|
||||
url:'j_diplomacy_rollback_letter.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
letterNo:letterNo,
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
return quickReject('회수를 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
return quickReject('회수를 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
alert('회수 했습니다.');
|
||||
|
||||
location.reload();
|
||||
return false;
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function destroyLetter(letterNo){
|
||||
$.post({
|
||||
url:'j_diplomacy_destroy_letter.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
letterNo:letterNo,
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
return quickReject('파기를 실패했습니다.');
|
||||
}
|
||||
if(!data.result){
|
||||
return quickReject('파기를 실패했습니다. : '+data.reason);
|
||||
}
|
||||
|
||||
if(data.state == 'activated'){
|
||||
alert('파기를 요청 했습니다.');
|
||||
}
|
||||
else{
|
||||
alert('파기 되었습니다.');
|
||||
}
|
||||
|
||||
location.reload();
|
||||
return false;
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function drawLetter(idx, letterObj){
|
||||
|
||||
if(letterObj.state == 'cancelled'){
|
||||
//TODO: 취소되거나, 대체된 문서도 보여줄 방법을 찾아볼 것
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(letterObj);
|
||||
|
||||
var $letterFrame = $('#letterTemplate > .letterFrame');
|
||||
|
||||
var srcColorFormat = {
|
||||
'background-color':letterObj.src.nationColor,
|
||||
'color':isBrightColor(letterObj.src.nationColor)?'#000000':'#ffffff'
|
||||
};
|
||||
|
||||
var destColorFormat = {
|
||||
'background-color':letterObj.dest.nationColor,
|
||||
'color':isBrightColor(letterObj.dest.nationColor)?'#000000':'#ffffff'
|
||||
};
|
||||
|
||||
var targetNation = letterObj.src.nationID==myNationID?letterObj.dest:letterObj.src;
|
||||
var targetColor = letterObj.src.nationID==myNationID?destColorFormat:srcColorFormat;
|
||||
|
||||
var $letter = $letterFrame.clone();
|
||||
|
||||
if(letterObj.state == 'replaced'){
|
||||
$letter.hide();
|
||||
}
|
||||
|
||||
$letter.addClass('letterObj')
|
||||
.data('no', letterObj.no)
|
||||
.data('brief', letterObj.brief)
|
||||
.data('detail', letterObj.detail)
|
||||
.attr('id', 'letter_'+letterObj.no);
|
||||
|
||||
$letter.find('.letterHeader').css(targetColor);
|
||||
$letter.find('.letterNationName').text(targetNation.nationName);
|
||||
$letter.find('.letterDate').text(letterObj.date);
|
||||
$letter.find('.letterNo').text('#'+letterObj.no);
|
||||
|
||||
var stateText = {
|
||||
'proposed':'제안됨',
|
||||
'activated':'승인됨',
|
||||
'cancelled':'거부됨',
|
||||
'replaced':'대체됨',
|
||||
};
|
||||
|
||||
var stateOptionText = {
|
||||
'try_destroy_src':'송신측의 파기 요청',
|
||||
'try_destroy_dest':'수신측의 파기 요청',
|
||||
}
|
||||
$letter.find('.letterStatus').text(stateText[letterObj.state]);
|
||||
|
||||
if(letterObj.state_opt !== null){
|
||||
$letter.find('.letterStatusOpt').text('('+stateOptionText[letterObj.state_opt]+')');
|
||||
}
|
||||
if(letterObj.prev_no !== null){
|
||||
var $showPrev = $('<a href="#">#{0}</a>'.format(letterObj.prev_no));
|
||||
$showPrev.click(function(){
|
||||
$('#letter_'+letterObj.prev_no).toggle();
|
||||
})
|
||||
$letter.find('.letterPrevNo').html($showPrev);
|
||||
}
|
||||
else{
|
||||
$letter.find('.letterPrevNo').text('신규');
|
||||
}
|
||||
$letter.find('.letterBrief').html(nl2br(escapeHtml(letterObj.brief)));
|
||||
$letter.find('.letterDetail').html(nl2br(escapeHtml(letterObj.detail)));
|
||||
|
||||
$letter.find('.letterSrc .signerImg img.generalIcon').attr('src', letterObj.src.generalIcon);
|
||||
$letter.find('.letterSrc .signerNation').text(letterObj.src.nationName).css(srcColorFormat);
|
||||
$letter.find('.letterSrc .signerName').text(letterObj.src.generalName).css(srcColorFormat);
|
||||
|
||||
if(letterObj.dest.generalName){
|
||||
$letter.find('.letterDest .signerImg img.generalIcon').attr('src', letterObj.dest.generalIcon);
|
||||
$letter.find('.letterDest .signerNation').text(letterObj.dest.nationName).css(destColorFormat);
|
||||
$letter.find('.letterDest .signerName').text(letterObj.dest.generalName).css(destColorFormat);
|
||||
}
|
||||
|
||||
if(letterObj.state == 'proposed' && letterObj.src.nationID != myNationID){
|
||||
$letter.find('.btnAgree').show().click(function(){
|
||||
if(!confirm('승인하시겠습니까?')){
|
||||
return false;
|
||||
}
|
||||
return repondLetter(letterObj.no, true, null);
|
||||
});
|
||||
$letter.find('.btnDisagree').show().click(function(){
|
||||
var reason = prompt('거부하시겠습니까? (이유 [최대 50자])');
|
||||
if(reason === null){
|
||||
return false;
|
||||
}
|
||||
reason = substr.substr(0, 50);
|
||||
return repondLetter(letterObj.no, false, reason);
|
||||
});
|
||||
}
|
||||
|
||||
if(letterObj.state == 'proposed' && letterObj.src.nationID == myNationID){
|
||||
$letter.find('.btnRollback').show().click(function(){
|
||||
if(!confirm('회수하시겠습니까?')){
|
||||
return false;
|
||||
}
|
||||
return rollbackLetter(letterObj.no);
|
||||
});
|
||||
}
|
||||
|
||||
if(letterObj.state == 'activated'){
|
||||
var $btnDestroy = $letter.find('.btnDestroy');
|
||||
if((letterObj.src.nationID==myNationID && letterObj.state_opt == 'try_destroy_src') ||
|
||||
(letterObj.dest.nationID==myNationID && letterObj.state_opt == 'try_destroy_dest')){
|
||||
$btnDestroy.show().prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$btnDestroy.show().click(function(){
|
||||
if(!confirm('본 문서를 파기하겠습니까? (상호 동의 필요)')){
|
||||
return false;
|
||||
}
|
||||
return destroyLetter(letterObj.no);
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$letter.find('.btnRenew').click(function(){
|
||||
var $inputPrevNo = $('#inputPrevNo');
|
||||
$inputPrevNo.val(letterObj.no);
|
||||
$inputPrevNo.trigger('change');
|
||||
})
|
||||
|
||||
|
||||
$('#letters').prepend($letter);
|
||||
}
|
||||
|
||||
function initNewLetterForm(lettersObj){
|
||||
console.log(lettersObj);
|
||||
var nationList = [];
|
||||
$.each(lettersObj.nations, function(idx, nation){
|
||||
nation.id = nation.nation;
|
||||
nation.text = nation.name;
|
||||
nationList.push(nation);
|
||||
})
|
||||
|
||||
var $destNation = $('#inputDestNation').select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "",
|
||||
language: "ko",
|
||||
width:300,
|
||||
containerCss: {
|
||||
display: "inline-block !important;",
|
||||
color: 'white !important'
|
||||
},
|
||||
data:nationList,
|
||||
templateResult: colorNation,
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
|
||||
|
||||
var prevNoList = [{
|
||||
id:0,
|
||||
text:'-새 문서-',
|
||||
nation:null,
|
||||
}];
|
||||
|
||||
$.each(lettersObj.letters, function(idx, letterObj){
|
||||
if(letterObj.state == 'replaced' || letterObj.state == 'cancelled'){
|
||||
return true;
|
||||
}
|
||||
var targetNation = letterObj.src.nationID==myNationID?letterObj.dest:letterObj.src;
|
||||
prevNoList.push({
|
||||
id:letterObj.no,
|
||||
text:'#{0} <{1}>'.format(letterObj.no, targetNation.nationName),
|
||||
nation:targetNation.nationID
|
||||
});
|
||||
});
|
||||
|
||||
var $inputPrevNo = $('#inputPrevNo').select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "",
|
||||
language: "ko",
|
||||
width:300,
|
||||
containerCss: {
|
||||
display: "inline-block !important;",
|
||||
color: 'white !important'
|
||||
},
|
||||
data:prevNoList,
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
$inputPrevNo.on('change', function(e){
|
||||
var data = $inputPrevNo.select2('data')[0];
|
||||
console.log(data);
|
||||
if(data.nation == null){
|
||||
$destNation.prop("disabled", false);
|
||||
}
|
||||
else{
|
||||
$destNation.val(data.nation).prop("disabled", true);
|
||||
var $targetLetter = $('#letter_'+data.id);
|
||||
resizeTextarea($('#inputBrief').val($targetLetter.data('brief')));
|
||||
resizeTextarea($('#inputDetail').val($targetLetter.data('detail')));
|
||||
}
|
||||
});
|
||||
|
||||
$('#btnSend').click(submitLetter);
|
||||
|
||||
$('#newLetter').show();
|
||||
}
|
||||
|
||||
function drawLetters(lettersObj){
|
||||
var deferred = $.Deferred();
|
||||
if(!lettersObj){
|
||||
return quickReject('받아오는데 실패했습니다.');
|
||||
}
|
||||
|
||||
if(!lettersObj.result){
|
||||
return quickReject('에러가 발생했습니다. : '+lettersObj.reason);
|
||||
}
|
||||
|
||||
window.myNationID = lettersObj.myNationID;
|
||||
|
||||
if(permissionLevel == 4){
|
||||
initNewLetterForm(lettersObj);
|
||||
$('.letterActionPlate').show();
|
||||
}
|
||||
|
||||
$('.letterObj').detach();//첫 버전이니까 일괄 삭제 일괄 로드
|
||||
$.each(lettersObj.letters, drawLetter);
|
||||
return true;
|
||||
}
|
||||
|
||||
function loadLetters(){
|
||||
return $.post({
|
||||
url:'j_diplomacy_get_letter.php',
|
||||
dataType:'json', //첫 버전이니까 전체 다 불러오자
|
||||
data:{
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function colorNation(nationInfo){
|
||||
if(!nationInfo.color){
|
||||
return nationInfo.text;
|
||||
}
|
||||
|
||||
var fgColor = isBrightColor(nationInfo.color)?'#000000':'#ffffff';
|
||||
var $nationForm = $('<div>'+nationInfo.text+'</div>').css({
|
||||
'color':fgColor,
|
||||
'background-color':nationInfo.color
|
||||
});
|
||||
return $nationForm;
|
||||
}
|
||||
|
||||
function resizeTextarea($obj){
|
||||
$obj.height(1).height($obj.prop('scrollHeight')+12 );
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
$('textarea.autosize').on('keydown keyup', function(){
|
||||
resizeTextarea($(this));
|
||||
})
|
||||
|
||||
loadLetters()
|
||||
.then(drawLetters, errUnknown)
|
||||
.fail(function(reason){
|
||||
alert(reason);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,899 +0,0 @@
|
||||
|
||||
$(function() {
|
||||
|
||||
var cityList = {};
|
||||
var userList = {};
|
||||
|
||||
var cityGroupOrder = ['하북','중원','서북','서촉','남중','초','오월','동이'];
|
||||
var city규모 = {특:1,대:2,중:3,소:4,이:5,진:6,관:7,수:8};
|
||||
window.cityList = cityList;
|
||||
window.userList = userList;
|
||||
|
||||
var basicPath = document.location.pathname;
|
||||
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||
|
||||
|
||||
|
||||
var mergeSort = function(arr,cmpFunc){
|
||||
|
||||
if(typeof cmpFunc == "undefined"){
|
||||
cmpFunc = function(a,b){
|
||||
if(a<b) return -1;
|
||||
if(a>b) return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
var merge = function(left,right){
|
||||
var retVal=[];
|
||||
|
||||
var leftIdx=0;
|
||||
var rightIdx=0;
|
||||
|
||||
while(leftIdx<left.length && rightIdx<right.length){
|
||||
var cmpVal = cmpFunc(left[leftIdx],right[rightIdx]);
|
||||
|
||||
if(cmpVal<=0){
|
||||
retVal.push(left[leftIdx]);
|
||||
leftIdx++;
|
||||
}
|
||||
else{
|
||||
retVal.push(right[rightIdx]);
|
||||
rightIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
retVal = retVal.concat(left.slice(leftIdx)).concat(right.slice(rightIdx))
|
||||
|
||||
return retVal;
|
||||
};
|
||||
|
||||
var _mergeSort = function(arr){
|
||||
if(arr.length<2){
|
||||
return arr;
|
||||
}
|
||||
|
||||
var middle = Math.floor(arr.length/2);
|
||||
|
||||
var left = arr.slice(0,middle);
|
||||
var right = arr.slice(middle);
|
||||
|
||||
return merge(_mergeSort(left),_mergeSort(right));
|
||||
};
|
||||
|
||||
return _mergeSort(arr);
|
||||
|
||||
};
|
||||
|
||||
window.mergeSort = mergeSort;
|
||||
|
||||
var extDutyWindow = function(userInfo){
|
||||
window.currUser = userInfo;
|
||||
//도시 순서 재구성
|
||||
var subCityGroupList = {};
|
||||
var subCityList = {};
|
||||
|
||||
var tmpOldVal = 0;
|
||||
|
||||
//var callCity = function(num){console.log('city no.'+num+' is clicked!')};
|
||||
|
||||
if($('#ext_win').length==0){
|
||||
|
||||
var $win = $('<div id="ext_win" style="padding:0;" title="관직 임명"><table style="padding:0;margin:0;" cellspacing="0" cellpadding="0" border="0"><tr><td width="700px" style="padding:0;"><iframe id="in_frame" src="map.php?type=1&graphic=1" width="700" height="520" frameborder="0" marginwidth="0" marginheight="0" topmargin="0" scrolling="no"></iframe></td>'+
|
||||
'<td width="305px" style="padding:0;vertical-align:top;height:520px;"><div style="height:520px;width:305px;overflow-y:scroll;overflow-x:hidden;">'+
|
||||
'<table id="inner_table"><thead><tr><th width="35">도시</th><th width="85">태수</th><th width="85">군사</th><th width="85">종사</th></tr></thead><tbody class="content">'+
|
||||
'</tbody></table></div></td></tr></table>'+
|
||||
'<form name="form1" id="fake_form"><span id="user_name"></span> : <select name="double" id="city_select"></select>'+
|
||||
'<div id="duty_radio" style="display:inline;">'+
|
||||
'<input type="radio" id="duty_type1" value="4" name="duty_radio"><label for="duty_type1">태수</label>'+
|
||||
'<input type="radio" id="duty_type2" value="3" name="duty_radio"><label for="duty_type2">군사</label>'+
|
||||
'<input type="radio" id="duty_type3" value="2" name="duty_radio"><label for="duty_type3">종사</label>'+
|
||||
'</div></form></div>');
|
||||
$win.hide();
|
||||
|
||||
$win.css('font-size','9pt');
|
||||
|
||||
|
||||
|
||||
$('#fake_form').css('display','inline');
|
||||
$('body').append($win);
|
||||
|
||||
$('#inner_table').attr('border','1').attr('cellspacing',"0").attr('cellpadding',"0")
|
||||
.attr('bordercolordark',"gray").attr('bordercolorlight',"black").attr('align','center')
|
||||
.css('font-size','13px').css('width','290px');
|
||||
|
||||
$('#inner_table thead tr');
|
||||
|
||||
$('#fake_form').submit(function(){
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#in_frame').load(function(){
|
||||
$('#in_frame').contents().find('div').click(function(){$('#city_select').change();});
|
||||
});
|
||||
|
||||
$("#duty_radio").buttonset();
|
||||
|
||||
var $city_select = $('#city_select');
|
||||
$city_select.css('color','white').css('background-color','black');
|
||||
|
||||
|
||||
$city_select.change(function(event){
|
||||
if($city_select.val()==null){
|
||||
$city_select.val(tmpOldVal);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($city_select.val() == tmpOldVal){
|
||||
return false;
|
||||
}
|
||||
|
||||
tmpOldVal = $city_select.val();
|
||||
//console.log(tmpOldVal);
|
||||
var newInfo = subCityList[tmpOldVal];
|
||||
var cityInfo = newInfo.city;
|
||||
|
||||
var p태수 = cityInfo.p태수 && currUser.p태수;
|
||||
var p군사 = cityInfo.p군사 && currUser.p군사;
|
||||
var p종사 = cityInfo.p종사 && currUser.p종사;
|
||||
|
||||
//console.log(p태수,p군사,p종사);
|
||||
|
||||
$('#duty_type1').button({disabled:!p태수});
|
||||
$('#duty_type2').button({disabled:!p군사});
|
||||
$('#duty_type3').button({disabled:!p종사});
|
||||
|
||||
var $태수 = cityInfo.$태수;
|
||||
var $군사 = cityInfo.$군사;
|
||||
var $종사 = cityInfo.$종사;
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
$win.dialog({
|
||||
autoOpen:false,
|
||||
width:1005,
|
||||
height:680,
|
||||
buttons:{
|
||||
"임명":function(){
|
||||
//console.log("임명!");
|
||||
|
||||
var $checked = $('#duty_radio :radio:checked');
|
||||
|
||||
if($checked.length==0 || $checked.attr('disabled')=='disabled'){
|
||||
alert('직책을 선택해주세요!');
|
||||
return false;
|
||||
}
|
||||
var type = $checked.attr('value');
|
||||
var text = $checked.next().text();
|
||||
var userVal = currUser.val;
|
||||
var userName = currUser.name;
|
||||
var cityVal = $city_select.val();
|
||||
|
||||
var cityInfo = subCityList[cityVal].city;
|
||||
|
||||
$.post(basicPath+'j_myBossInfo.php',{
|
||||
destCityID:cityVal,
|
||||
destGeneralID:userVal,
|
||||
officerLevel:type,
|
||||
action:'임명'
|
||||
},function(rawData){
|
||||
|
||||
cityInfo['p'+text]=false;
|
||||
var $target = cityInfo.users.find('.mode_'+type);
|
||||
$target.prop('disabled',true);
|
||||
$target.css('background','transparent');
|
||||
$target.css('border','0');
|
||||
$target.css('color','');
|
||||
|
||||
cityInfo['$'+text].html(userName);
|
||||
|
||||
$win.dialog("close");
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
"닫기":function(){
|
||||
$win.dialog("close");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//console.log($win.parent());
|
||||
$win.parent().css('font-size','10pt');
|
||||
}
|
||||
|
||||
$('#ext_win').dialog("close").dialog( "option", "position", { my: "center top", at: "center bottom", of: userInfo.$user} );
|
||||
|
||||
var $innerContent = $('#inner_table .content');
|
||||
$innerContent.html('');
|
||||
$("#user_name").html(userInfo.name+'['+userInfo.city+']');
|
||||
|
||||
$('#city_select').html('');
|
||||
|
||||
$.each(cityList,function(idx,cityInfo){
|
||||
var 지역 = cityInfo.지역;
|
||||
|
||||
var p태수 = cityInfo.p태수 && currUser.p태수;
|
||||
var p군사 = cityInfo.p군사 && currUser.p군사;
|
||||
var p종사 = cityInfo.p종사 && currUser.p종사;
|
||||
|
||||
var newInfo = {
|
||||
지역 : 지역,
|
||||
규모 : cityInfo.규모,
|
||||
이름 : cityInfo.이름,
|
||||
val : cityInfo.val,
|
||||
city : cityInfo,
|
||||
p태수 : p태수,
|
||||
p군사 : p군사,
|
||||
p종사 : p종사
|
||||
};
|
||||
|
||||
//console.log(newInfo);
|
||||
|
||||
if(p태수 || p군사 || p종사){
|
||||
if(typeof subCityGroupList[지역] == 'undefined'){
|
||||
subCityGroupList[지역] = [];
|
||||
}
|
||||
subCityGroupList[지역].push(newInfo);
|
||||
subCityList[cityInfo.val] = newInfo;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.each(cityGroupOrder,function(idx,groupName){
|
||||
if(typeof subCityGroupList[groupName] == 'undefined'){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var subList = subCityGroupList[groupName];
|
||||
|
||||
var $group = $('<tr><td colspan="4" style="color:skyblue;">【 '+groupName+' 】</td></tr>');
|
||||
$innerContent.append($group);
|
||||
|
||||
subList.sort(function(a,b){
|
||||
|
||||
var cmp규모 = city규모[a.규모] - city규모[b.규모];
|
||||
if(cmp규모 != 0) return cmp규모;
|
||||
|
||||
return a.이름.localeCompare(b.이름);
|
||||
});
|
||||
var $optgroup = $('<optgroup label=" 【 '+groupName+' 】 " style="color:skyblue;"></optgroup>');
|
||||
|
||||
$.each(subList,function(idx,newInfo){
|
||||
$optgroup.append('<option value="'+newInfo.val+'" style="color:white;">'+newInfo.이름+'</option>');
|
||||
|
||||
var cityInfo = newInfo.city;
|
||||
var $city = $('<tr><td>'+newInfo.이름+'</td></tr>');
|
||||
|
||||
var $태수 = cityInfo.$태수.clone();
|
||||
$city.append($태수);
|
||||
if(!newInfo.p태수){
|
||||
$태수.css('color','red');
|
||||
}
|
||||
else{
|
||||
$태수.click(function(){
|
||||
$('#duty_radio :radio:eq(0)').attr('checked','checked');
|
||||
$('#duty_radio :radio').button('refresh');
|
||||
}).css('cursor','pointer');
|
||||
}
|
||||
|
||||
|
||||
var $군사 = cityInfo.$군사.clone();
|
||||
$city.append($군사);
|
||||
if(!newInfo.p군사)$군사.css('color','red');
|
||||
else{
|
||||
$군사.click(function(){
|
||||
$('#duty_radio :radio:eq(1)').attr('checked','checked');
|
||||
$('#duty_radio :radio').button('refresh');
|
||||
}).css('cursor','pointer');
|
||||
}
|
||||
|
||||
var $종사 = cityInfo.$종사.clone();
|
||||
$city.append($종사);
|
||||
if(!newInfo.p종사)$종사.css('color','red');
|
||||
else{
|
||||
$종사.click(function(){
|
||||
$('#duty_radio :radio:eq(2)').attr('checked','checked');
|
||||
$('#duty_radio :radio').button('refresh');
|
||||
}).css('cursor','pointer');
|
||||
}
|
||||
|
||||
$innerContent.append($city);
|
||||
$city.click(function(){
|
||||
$('#city_select').val(newInfo.val).change();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#city_select').append($optgroup);
|
||||
});
|
||||
|
||||
tmpOldVal = $('#city_select').val();
|
||||
$('#city_select').change();
|
||||
$('#ext_win').dialog("open");
|
||||
};
|
||||
|
||||
var loadDuty = function(){
|
||||
|
||||
try{
|
||||
$('.for_duty').remove();
|
||||
$.get(basicPath+'b_myBossInfo.php',function(rawData){
|
||||
$html = $(rawData);
|
||||
//window.$html = $html;
|
||||
|
||||
var cnt =0;
|
||||
var $tmpTable = $html.filter('#officer_list').eq(0);
|
||||
|
||||
$selects = $tmpTable.find("select");
|
||||
if($selects.length == 0){
|
||||
alert("수뇌가 아닙니다!");
|
||||
return false;
|
||||
}
|
||||
|
||||
var setUserAvailable = function($userList,typeName){
|
||||
$userList.each(function(idx){
|
||||
var $this = $(this);
|
||||
|
||||
var val = $this.val();
|
||||
var name = $.trim($this.text());
|
||||
|
||||
for(var i=name.length-1;i>0;i--){
|
||||
if(name[i]=='【'){
|
||||
name = $.trim(name.substr(0,i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(val == '0'){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(typeof userList[name] != 'undefined'){
|
||||
userList[name].val = val;
|
||||
userList[name][typeName] = true;
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
var setCityAvailiable = function($cityList,typeName){
|
||||
$cityList.each(function(idx){
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
var val = $.trim($this.val());
|
||||
var name = $.trim($this.text());
|
||||
|
||||
cityList[name].val = val;
|
||||
cityList[name][typeName] = true;
|
||||
});
|
||||
}
|
||||
|
||||
$.each(cityList,function(idx,cityInfo){
|
||||
cityInfo.p태수=false;
|
||||
cityInfo.p군사=false;
|
||||
cityInfo.p종사=false;
|
||||
});
|
||||
|
||||
$.each(userList,function(idx,userInfo){
|
||||
userInfo.p태수=false;
|
||||
userInfo.p군사=false;
|
||||
userInfo.p종사=false;
|
||||
});
|
||||
|
||||
setUserAvailable($selects.eq(1).find("option"),"p태수");
|
||||
setUserAvailable($selects.eq(3).find("option"),"p군사");
|
||||
setUserAvailable($selects.eq(5).find("option"),"p종사");
|
||||
|
||||
setCityAvailiable($selects.eq(0).find("option"),"p태수");
|
||||
setCityAvailiable($selects.eq(2).find("option"),"p군사");
|
||||
setCityAvailiable($selects.eq(4).find("option"),"p종사");
|
||||
|
||||
|
||||
$.each(cityList,function(idx,cityInfo){
|
||||
|
||||
//console.log(cityInfo.users.children());
|
||||
|
||||
cityInfo.users.children().each(function(idx){
|
||||
//console.log(this);
|
||||
var $this = $(this);
|
||||
|
||||
var username = $this.data('username');
|
||||
|
||||
var userInfo = userList[username];
|
||||
if(!userInfo){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(userInfo.val == '-1'){
|
||||
return true;
|
||||
}
|
||||
|
||||
$name = $this.find('.nameplate');
|
||||
|
||||
$name.append('<br class="for_duty">');
|
||||
|
||||
|
||||
var addBtn=function($name,cityInfo,userInfo,type,text,warn){
|
||||
|
||||
var enabled = cityInfo['p'+text]&&userInfo['p'+text];
|
||||
var cityVal = cityInfo.val;
|
||||
var $btn = $('<button type="button">'+text.substr(0,1)+'</button>');
|
||||
$btn.addClass('mode_'+type);
|
||||
$btn.addClass('for_duty');
|
||||
|
||||
if(!enabled){
|
||||
$btn.prop('disabled',true);
|
||||
$btn.css('background','transparent');
|
||||
$btn.css('border','0');
|
||||
}
|
||||
else{
|
||||
if(userInfo.is수뇌){
|
||||
$btn.css('color','red');
|
||||
}
|
||||
}
|
||||
|
||||
$btn.css('padding','1px 4px');
|
||||
$btn.css('margin','0');
|
||||
|
||||
$btn.click(function(){
|
||||
if(userInfo.is수뇌){
|
||||
if(!confirm('수뇌입니다. 임명할까요?')){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$.post(basicPath+'j_myBossInfo.php',{
|
||||
destCityID:cityVal,
|
||||
destGeneralID:userInfo.val,
|
||||
officerLevel:type,
|
||||
action:'임명'
|
||||
},function(rawData){
|
||||
|
||||
cityInfo['p'+text]=false;
|
||||
var $target = cityInfo.users.find('.mode_'+type);
|
||||
$target.prop('disabled',true);
|
||||
$target.css('background','transparent');
|
||||
$target.css('border','0');
|
||||
$target.css('color','');
|
||||
|
||||
cityInfo['$'+text].html(userInfo.name);
|
||||
});
|
||||
});
|
||||
|
||||
//console.log($btn);
|
||||
$name.append($btn);
|
||||
};
|
||||
|
||||
addBtn($name,cityInfo,userInfo,4,'태수');
|
||||
addBtn($name,cityInfo,userInfo,3,'군사');
|
||||
addBtn($name,cityInfo,userInfo,2,'종사');
|
||||
|
||||
//특수 버튼!
|
||||
if(userInfo.p태수||userInfo.p군사||userInfo.p종사){
|
||||
var $btn = $('<button type="button">...</button>');
|
||||
$btn.addClass('for_duty');
|
||||
if(userInfo.is수뇌){
|
||||
$btn.css('color','red');
|
||||
}
|
||||
$btn.css('padding','1px 4px');
|
||||
$btn.css('margin','0');
|
||||
|
||||
$btn.click(function(){
|
||||
if(userInfo.is수뇌){
|
||||
if(!confirm('수뇌입니다. 임명할까요?')){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
extDutyWindow(userInfo);
|
||||
});
|
||||
|
||||
$btn.css('border','solid 1px Chocolate').css('background-color','#400000').css('margin-left','4px');
|
||||
$btn.css('line-hight','20px').css('color','GhostWhite').css('padding','2px 2px').css('height','18px').css('line-height','8px');
|
||||
|
||||
//$name.append($btn);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
catch(a){
|
||||
console.log(a);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var loadUser = function(){
|
||||
$.each(cityList,function(idx,val){
|
||||
if(typeof val.users == "undefined"){
|
||||
val.obj.append('<tr><td colspan="12"><table align="center" class="tb_layout cityUser bg0">'+
|
||||
'<thead><tr>'+
|
||||
'<td width="100" align="center" class="bg1">이 름</td><td width="100" align="center" class="bg1">통무지</td><td width="100" align="center" class="bg1">부 대</td><td width="60" align="center" class="bg1">자 금</td>'+
|
||||
'<td width="60" align="center" class="bg1">군 량</td><td width="30" align="center" class="bg1">守</td><td width="60" align="center" class="bg1">병 종</td>'+
|
||||
'<td width="60" align="center" class="bg1">병 사</td><td width="50" align="center" class="bg1">훈련</td><td width="50" align="center" class="bg1">사기</td><td width="150" align="center" class="bg1">명 령</td>'+
|
||||
'<td width="60" align="center" class="bg1">삭턴</td><td width="60" align="center" class="bg1">턴</td>'+
|
||||
'</tr></thead>'+
|
||||
'<tbody class="cityUserBody"></tbody></table></td></tr>');
|
||||
|
||||
val.users = val.obj.find(".cityUserBody");
|
||||
}
|
||||
else{
|
||||
val.users.html("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.get(basicPath+'b_genList.php',function(rawData){
|
||||
var cnt =0;
|
||||
|
||||
var $helper = $('#helper_genlist');
|
||||
$helper.html('').append($.parseHTML(rawData));
|
||||
|
||||
var tmpUsers = $('#general_list tbody tr');
|
||||
|
||||
tmpUsers.each(function(idx){
|
||||
var $this = $(this);
|
||||
|
||||
var $city = $this.children('.i_city');
|
||||
$city.remove();
|
||||
var cityName = $.trim($city.text());
|
||||
|
||||
var $name = $this.children('.i_name');
|
||||
$name.addClass('nameplate');
|
||||
|
||||
var name = $name.find('.t_name').text();
|
||||
|
||||
var $work = $this.children('.i_action');
|
||||
|
||||
var cityInfo = cityList[cityName];
|
||||
if(typeof cityInfo == 'undefined'){
|
||||
return true;
|
||||
}
|
||||
if(cityInfo.warn주민)$work.html($work.html().split('정착 장려').join('<span style="color:yellow;">정착 장려</span>'));
|
||||
if(cityInfo.warn농업)$work.html($work.html().split('농지 개간').join('<span style="color:yellow;">농지 개간</span>'));
|
||||
if(cityInfo.warn상업)$work.html($work.html().split('상업 투자').join('<span style="color:yellow;">상업 투자</span>'));
|
||||
if(cityInfo.warn치안)$work.html($work.html().split('치안 강화').join('<span style="color:yellow;">치안 강화</span>'));
|
||||
if(cityInfo.warn수비)$work.html($work.html().split('수비 강화').join('<span style="color:yellow;">수비 강화</span>'));
|
||||
if(cityInfo.warn성벽)$work.html($work.html().split('성벽 보수').join('<span style="color:yellow;">성벽 보수</span>'));
|
||||
|
||||
|
||||
|
||||
var $stat = $this.children('.i_stat');
|
||||
var stat = $stat.text();
|
||||
|
||||
var is수뇌 = stat.indexOf('+')>=0;
|
||||
|
||||
$this.data('username',name);
|
||||
|
||||
if(cityList[cityName].$태수.text() == name){
|
||||
cityList[cityName].$태수.html('<span style="color:lightgreen">{0}</span>'.format(name));
|
||||
}
|
||||
if(cityList[cityName].$군사.text() == name){
|
||||
cityList[cityName].$군사.html('<span style="color:lightgreen">{0}</span>'.format(name));
|
||||
}
|
||||
if(cityList[cityName].$종사.text() == name){
|
||||
cityList[cityName].$종사.html('<span style="color:lightgreen">{0}</span>'.format(name));
|
||||
}
|
||||
|
||||
userList[name]={
|
||||
$city:cityInfo,
|
||||
city:cityName,
|
||||
$user:$this,
|
||||
name:name,
|
||||
val:'-1',
|
||||
p태수:false,
|
||||
p군사:false,
|
||||
p종사:false,
|
||||
is수뇌:is수뇌
|
||||
};
|
||||
|
||||
if(cityList[cityName]){
|
||||
cityList[cityName].users.append($this);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
if($("#loadDutyBtn").length == 0){
|
||||
|
||||
var $onBossList = $('<button id="loadDutyBtn">인사부 연동</button>');
|
||||
$onBossList.click(function(){
|
||||
loadDuty();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('form').append($onBossList);
|
||||
}
|
||||
|
||||
$('#by_users').show();
|
||||
};
|
||||
|
||||
var mainFunc = function(){
|
||||
//대상 추출
|
||||
window.cityList = {};
|
||||
window.userList = {};
|
||||
|
||||
$("form").each(function(){
|
||||
var $this = $(this);
|
||||
$this.attr('name','p'+$this.attr('name'));
|
||||
});
|
||||
|
||||
$("table").each(function(idx,val){
|
||||
$this = $(this);
|
||||
|
||||
|
||||
if($this.attr('class')=='tb_layout bg2'){
|
||||
$this.addClass('cityInfo');
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
|
||||
window.$tmpTable = $this;
|
||||
var cityInfo = {};
|
||||
|
||||
//이름 추출
|
||||
{
|
||||
|
||||
var titleText = $this.find('tr:eq(0)>td:eq(0)').text();
|
||||
var loc0 = titleText.indexOf("【");
|
||||
var loc1 = titleText.indexOf("|");
|
||||
var loc2 = titleText.indexOf("】");
|
||||
|
||||
var cityLoc = $.trim(titleText.substring(loc0+1,loc1));
|
||||
var citySize = $.trim(titleText.substring(loc1+1,loc2));
|
||||
var cityName = $.trim(titleText.substring(loc2+1));
|
||||
|
||||
cityName = cityName.replace("[","");
|
||||
cityName = cityName.replace("]","");
|
||||
|
||||
$this.data('cityname',cityName);
|
||||
|
||||
cityInfo.지역 = cityLoc;
|
||||
cityInfo.규모 = citySize;
|
||||
cityInfo.이름 = cityName;
|
||||
|
||||
cityInfo.val = '-1';
|
||||
|
||||
cityInfo.p태수 = false;
|
||||
cityInfo.p군사 = false;
|
||||
cityInfo.p종사 = false;
|
||||
|
||||
}
|
||||
|
||||
//주민, 농상치성수
|
||||
|
||||
|
||||
{
|
||||
var $baseTr = $this.find('tr:eq(1)');
|
||||
cityInfo.$주민 = $baseTr.find('td:eq(1)');
|
||||
cityInfo.$농업 = $baseTr.find('td:eq(3)');
|
||||
cityInfo.$상업 = $baseTr.find('td:eq(5)');
|
||||
cityInfo.$치안 = $baseTr.find('td:eq(7)');
|
||||
cityInfo.$수비 = $baseTr.find('td:eq(9)');
|
||||
cityInfo.$성벽 = $baseTr.find('td:eq(11)');
|
||||
|
||||
var tmpVal;
|
||||
|
||||
tmpVal = cityInfo.$주민.text().split('/');
|
||||
cityInfo.주민 = parseInt(tmpVal[0]);
|
||||
cityInfo.max주민 = parseInt(tmpVal[1]);
|
||||
|
||||
tmpVal = cityInfo.$농업.text().split('/');
|
||||
cityInfo.농업 = parseInt(tmpVal[0]);
|
||||
cityInfo.max농업 = parseInt(tmpVal[1]);
|
||||
|
||||
tmpVal = cityInfo.$상업.text().split('/');
|
||||
cityInfo.상업 = parseInt(tmpVal[0]);
|
||||
cityInfo.max상업 = parseInt(tmpVal[1]);
|
||||
|
||||
tmpVal = cityInfo.$치안.text().split('/');
|
||||
cityInfo.치안 = parseInt(tmpVal[0]);
|
||||
cityInfo.max치안 = parseInt(tmpVal[1]);
|
||||
|
||||
tmpVal = cityInfo.$수비.text().split('/');
|
||||
cityInfo.수비 = parseInt(tmpVal[0]);
|
||||
cityInfo.max수비 = parseInt(tmpVal[1]);
|
||||
|
||||
tmpVal = cityInfo.$성벽.text().split('/');
|
||||
cityInfo.성벽 = parseInt(tmpVal[0]);
|
||||
cityInfo.max성벽 = parseInt(tmpVal[1]);
|
||||
|
||||
if (cityInfo.주민>cityInfo.max주민*0.9){ cityInfo.$주민.css('color','lightgreen');}
|
||||
else if (cityInfo.주민>cityInfo.max주민*0.7){ cityInfo.$주민.css('color','yellow');}
|
||||
else { cityInfo.$주민.css('color','orangered');}
|
||||
|
||||
if (cityInfo.농업>cityInfo.max농업*0.8){ cityInfo.$농업.css('color','lightgreen');}
|
||||
else if (cityInfo.농업>cityInfo.max농업*0.4){ cityInfo.$농업.css('color','yellow');}
|
||||
else { cityInfo.$농업.css('color','orangered');}
|
||||
|
||||
if (cityInfo.상업>cityInfo.max상업*0.8){ cityInfo.$상업.css('color','lightgreen');}
|
||||
else if (cityInfo.상업>cityInfo.max상업*0.4){ cityInfo.$상업.css('color','yellow');}
|
||||
else { cityInfo.$상업.css('color','orangered');}
|
||||
|
||||
if (cityInfo.치안>cityInfo.max치안*0.8){ cityInfo.$치안.css('color','lightgreen');}
|
||||
else if (cityInfo.치안>cityInfo.max치안*0.4){ cityInfo.$치안.css('color','yellow');}
|
||||
else { cityInfo.$치안.css('color','orangered');}
|
||||
|
||||
if (cityInfo.수비>cityInfo.max수비*0.6){ cityInfo.$수비.css('color','lightgreen');}
|
||||
else if (cityInfo.수비>cityInfo.max수비*0.3){ cityInfo.$수비.css('color','yellow');}
|
||||
else { cityInfo.$수비.css('color','orangered');}
|
||||
|
||||
if (cityInfo.성벽>cityInfo.max성벽*0.6){ cityInfo.$성벽.css('color','lightgreen');}
|
||||
else if (cityInfo.성벽>cityInfo.max성벽*0.3){ cityInfo.$성벽.css('color','yellow');}
|
||||
else { cityInfo.$성벽.css('color','orangered');}
|
||||
|
||||
|
||||
cityInfo.remain주민 = cityInfo.주민-cityInfo.max주민;
|
||||
cityInfo.remain농업 = cityInfo.농업-cityInfo.max농업;
|
||||
cityInfo.remain상업 = cityInfo.상업-cityInfo.max상업;
|
||||
cityInfo.remain치안 = cityInfo.치안-cityInfo.max치안;
|
||||
cityInfo.remain수비 = cityInfo.수비-cityInfo.max수비;
|
||||
cityInfo.remain성벽 = cityInfo.성벽-cityInfo.max성벽;
|
||||
|
||||
cityInfo.warn주민 = false;
|
||||
cityInfo.warn농업 = false;
|
||||
cityInfo.warn상업 = false;
|
||||
cityInfo.warn치안 = false;
|
||||
cityInfo.warn수비 = false;
|
||||
cityInfo.warn성벽 = false;
|
||||
|
||||
if(cityInfo.remain주민 > -10*2000) cityInfo.warn주민 = true;
|
||||
if(cityInfo.주민 > 0.92*cityInfo.max주민) cityInfo.warn주민 = true;
|
||||
if(cityInfo.remain농업 > -10*100) cityInfo.warn농업 = true;
|
||||
if(cityInfo.remain상업 > -10*100) cityInfo.warn상업 = true;
|
||||
if(cityInfo.remain치안 > -10*100) cityInfo.warn치안 = true;
|
||||
if(cityInfo.remain수비 > -10*70) cityInfo.warn수비 = true;
|
||||
if(cityInfo.remain성벽 > -10*70) cityInfo.warn성벽 = true;
|
||||
|
||||
if(cityInfo.warn농업) cityInfo.$농업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain농업+']</span>');
|
||||
if(cityInfo.warn상업) cityInfo.$상업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain상업+']</span>');
|
||||
if(cityInfo.warn치안) cityInfo.$치안.append('<span class="remain" style="color:yellow;">['+cityInfo.remain치안+']</span>');
|
||||
if(cityInfo.warn수비) cityInfo.$수비.append('<span class="remain" style="color:yellow;">['+cityInfo.remain수비+']</span>');
|
||||
if(cityInfo.warn성벽) cityInfo.$성벽.append('<span class="remain" style="color:yellow;">['+cityInfo.remain성벽+']</span>');
|
||||
|
||||
}
|
||||
|
||||
//태수,군사,종사
|
||||
{
|
||||
var $baseTr = $this.find('tr:eq(2)');
|
||||
cityInfo.$태수 = $baseTr.find('td:eq(7)');
|
||||
cityInfo.$군사 = $baseTr.find('td:eq(9)');
|
||||
cityInfo.$종사 = $baseTr.find('td:eq(11)');
|
||||
}
|
||||
|
||||
//기타
|
||||
{
|
||||
|
||||
cityInfo.userCnt = $this.find('tr:eq(3) td:eq(1)').text().split(',').length -1;
|
||||
}
|
||||
|
||||
cityInfo.obj = $this;
|
||||
cityList[cityInfo.이름] = cityInfo;
|
||||
});
|
||||
|
||||
|
||||
var $onGenList = $('<button type="button">암행부 연동</button>');
|
||||
$onGenList.click(function(){
|
||||
loadUser();
|
||||
return false;
|
||||
});
|
||||
$('form').append($onGenList);
|
||||
|
||||
|
||||
$('table:eq(0) tr:last').after('<tr><td id="sort_more"></td></tr>');
|
||||
|
||||
|
||||
$sort_more = $('#sort_more');
|
||||
$sort_more.html('재 정렬 순서 :');
|
||||
|
||||
var sortIt = function(callback){
|
||||
var arCity = [];
|
||||
$('.cityInfo').each(function(){
|
||||
var $this = $(this);
|
||||
var cityName = $this.data('cityname');
|
||||
|
||||
var cityInfo = cityList[cityName];
|
||||
arCity.push(cityInfo);
|
||||
});
|
||||
|
||||
arCity = mergeSort(arCity,callback);
|
||||
//console.log(arCity);
|
||||
|
||||
var $anchor = $('.anchor');
|
||||
//console.log($anchor);
|
||||
|
||||
$('body > br').remove();
|
||||
|
||||
$('.cityInfo').detach();
|
||||
|
||||
$.each(arCity,function(idx,val){
|
||||
$anchor.before('<br>');
|
||||
$anchor.before(val.obj);
|
||||
});
|
||||
$anchor.before('<br>');
|
||||
|
||||
};
|
||||
|
||||
var $btn;
|
||||
|
||||
$btn = $('<button type="button">도시명</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.이름.localeCompare(b.이름);
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">인구율</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return 1.0*a.주민/a.max주민 - 1.0*b.주민/b.max주민;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 주민</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain주민 - b.remain주민;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 농업</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain농업 - b.remain농업;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 상업</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain상업 - b.remain상업;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 치안</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain치안 - b.remain치안;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 수비</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain수비 - b.remain수비;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">남은 성벽</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return a.remain성벽 - b.remain성벽;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
|
||||
$btn = $('<button type="button">배치 장수 수</button>').click(function(){
|
||||
sortIt(function(a,b){
|
||||
return b.userCnt - a.userCnt;
|
||||
});
|
||||
});
|
||||
$sort_more.append($btn);
|
||||
};
|
||||
|
||||
mainFunc();
|
||||
});
|
||||
@@ -1,263 +0,0 @@
|
||||
$(function(){
|
||||
|
||||
var basicPath = document.location.pathname;
|
||||
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||
var headTbl = $('table:eq(0)');
|
||||
var $userFrame;
|
||||
|
||||
var 국가테이블= $('table:gt(0):lt(-2)');
|
||||
|
||||
var getUserType = function(통,무,지){
|
||||
var 총 = 통+무+지;
|
||||
if(통 < 40){
|
||||
if(무+지 < 40){
|
||||
return "무능";
|
||||
}
|
||||
return "무지";
|
||||
}
|
||||
|
||||
var 최대능력치 = Math.max(통, 무, 지);
|
||||
var 능력치2합 = Math.min(통+무, 무+지, 지+통);
|
||||
if(최대능력치 >= 70 && 능력치2합 >= 최대능력치 * 1.7){
|
||||
return "만능";
|
||||
}
|
||||
|
||||
if(무 >= 60 && 지 < 무*0.8){
|
||||
return "무";
|
||||
}
|
||||
if(지 >= 60 && 무 < 지*0.8){
|
||||
return "지";
|
||||
}
|
||||
if(통 >= 60 && 무 + 지 < 통){
|
||||
return "통";
|
||||
}
|
||||
|
||||
|
||||
|
||||
return "평범";
|
||||
};
|
||||
|
||||
function formatScore(x) {
|
||||
console.log(x);
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
var runAnalysis = function(){
|
||||
var $content = $('#on_mover .content');
|
||||
$.get(basicPath+'a_genList.php',function(rawData){
|
||||
try{
|
||||
var $html = $(rawData);
|
||||
|
||||
var $장수일람 = {};
|
||||
|
||||
var 국가별 = {};
|
||||
var cnt =0;
|
||||
$html.each(function(idx){
|
||||
|
||||
if(this.tagName == "TABLE"){
|
||||
cnt+=1;
|
||||
if(cnt==2){
|
||||
$장수일람 = $(this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
$장수일람.find('tr:gt(0)').each(function(){
|
||||
var 장수 = {};
|
||||
$this = $(this);
|
||||
$tds = $this.find('td');
|
||||
|
||||
var 장수명 = $.trim($tds.eq(1).text());
|
||||
var 국가 = $.trim($tds.eq(6).text());
|
||||
|
||||
var 부상 = $this.data('general-wounded');
|
||||
|
||||
장수.html = $this.clone();
|
||||
장수.장수명 = 장수명;
|
||||
장수.국가 = 국가;
|
||||
장수.벌점 = parseInt($tds.eq(-1).text());
|
||||
장수.통 = parseInt($this.data('general-leadership'));
|
||||
장수.무 = parseInt($this.data('general-strength'));
|
||||
장수.지 = parseInt($this.data('general-intel'));
|
||||
장수.삭턴 = parseInt($tds.eq(-2).text());
|
||||
장수.종류 = getUserType(장수.통, 장수.무, 장수.지);
|
||||
장수.NPC = $this.data('is-npc');
|
||||
|
||||
if(!(국가 in 국가별)){
|
||||
국가별[국가] = {};
|
||||
국가별[국가].만능 = [];
|
||||
국가별[국가].통 = [];
|
||||
국가별[국가].무 = [];
|
||||
국가별[국가].지 = [];
|
||||
국가별[국가].평범 = [];
|
||||
국가별[국가].무지 = [];
|
||||
국가별[국가].무능 = [];
|
||||
//국가별[국가].NPC = [];
|
||||
}
|
||||
|
||||
//if(장수.NPC) 국가별[국가].NPC.push(장수);
|
||||
국가별[국가][장수.종류].push(장수);
|
||||
|
||||
장수.html.hide();
|
||||
$content.append(장수.html);
|
||||
|
||||
|
||||
});
|
||||
|
||||
국가테이블.each(function(idx){
|
||||
var $this = $(this);
|
||||
var $tbl = $this;
|
||||
var $td = $this.find('td:last');
|
||||
var name = $.trim($this.find('td:first').text());
|
||||
name = name.substr(2,name.length-4);
|
||||
|
||||
var 국가정보 = 국가별[name];
|
||||
|
||||
var total = 0;
|
||||
var 전투유저장수 = 0;
|
||||
var 통솔합 = 0;
|
||||
var 삭턴장수 = 0;
|
||||
|
||||
var 전투N장수 = 0;
|
||||
var N장통솔합 = 0;
|
||||
$td.html('<p class="sum" style="margin:0;font-weight:bold;color:yellow;text-align:center"></p>');
|
||||
$td.css('text-indent','-5.8em').css('padding-left','5.8em');
|
||||
for(var 종류명 in 국가정보){
|
||||
|
||||
var $p = $("<p></p>").css('margin','0');
|
||||
|
||||
var 테이블 = 국가정보[종류명];
|
||||
|
||||
if(테이블.length == 0)continue;
|
||||
|
||||
테이블.sort(function(좌, 우){
|
||||
if(우.벌점 == 좌.벌점){
|
||||
return 좌.장수명 > 우.장수명 ? 1 : 0;
|
||||
}
|
||||
return 우.벌점 - 좌.벌점
|
||||
});
|
||||
|
||||
|
||||
var text = " "+종류명;
|
||||
text = text.substr(text.length-2);
|
||||
$p.append(text+'장(');
|
||||
|
||||
text = ""+테이블.length;
|
||||
|
||||
$p.append(text + ')');
|
||||
if(text.length<3){
|
||||
$p.append("<span style='display:inline-block;width:"+(3-text.length)/2+"em;'> </span>");
|
||||
}
|
||||
$p.append(': ');
|
||||
|
||||
total += 테이블.length;
|
||||
|
||||
$.each(테이블,function(idx,val){
|
||||
|
||||
var 종능 = val.통 + val.무 + val.지;
|
||||
console.log(val);
|
||||
if(종류명 != '무능' && 종류명 != '무지'){
|
||||
if(val.삭턴 >= 80 && !val.NPC){
|
||||
전투유저장수 += 1;
|
||||
|
||||
통솔합 += val.통;
|
||||
}
|
||||
|
||||
if(val.삭턴 > 5 && val.NPC){
|
||||
전투N장수 += 1;
|
||||
|
||||
N장통솔합 += val.통;
|
||||
}
|
||||
}
|
||||
|
||||
var $obj = $('<span></span>');
|
||||
var $obj2 = $('<span></span>');
|
||||
$obj.html(val.장수명);
|
||||
|
||||
if(!val.NPC && val.삭턴 < 80){
|
||||
$obj.css('text-decoration','line-through');
|
||||
삭턴장수+=1;
|
||||
}
|
||||
if(val.NPC){
|
||||
$obj.css('color','cyan');
|
||||
}
|
||||
if(val.벌점 >= 1500) $obj.css('color','yellow');
|
||||
else if(val.벌점 >= 200) $obj.css('color','lightgreen');
|
||||
|
||||
$obj2.append($obj);
|
||||
if(idx < 테이블.length-1){
|
||||
$obj2.append(', ');
|
||||
}
|
||||
$p.append($obj2);
|
||||
$obj2.hover(function(){
|
||||
var top = $tbl.offset().top + $tbl.outerHeight() + 3;
|
||||
$userFrame.css('top',top);
|
||||
val.html.show();
|
||||
$userFrame.show();
|
||||
console.log('올림!'+val.장수명);
|
||||
},function(){
|
||||
$userFrame.hide();
|
||||
val.html.hide();
|
||||
console.log('내림!'+val.장수명);
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
$td.append($p);
|
||||
}
|
||||
|
||||
var result = "* 총("+total+"), 전투장("+전투유저장수+", 약 "+formatScore(통솔합*100)+"명), 전투N장("+전투N장수+", 약 "+formatScore(N장통솔합*100)+"명), 삭턴장("+삭턴장수+") *";
|
||||
$tbl.find('.sum').html(result);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
catch(err){
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$userFrame = $('<div id="on_mover" style="position:absolute;">'+
|
||||
'<table class="tb_layout bg0" style="width:100%;"><thead><tr>'+
|
||||
'<td width="64" align="center" class="bg1">얼 굴</td>'+
|
||||
'<td width="100" align="center" class="bg1">이 름</td>'+
|
||||
'<td width="50" align="center" class="bg1">연령</td>'+
|
||||
'<td width="50" align="center" class="bg1">성격</td>'+
|
||||
'<td width="90" align="center" class="bg1">특기</td>'+
|
||||
'<td width="50" align="center" class="bg1">레 벨</td>'+
|
||||
'<td width="100" align="center" class="bg1">국 가</td>'+
|
||||
'<td width="60" align="center" class="bg1">명 성</td>'+
|
||||
'<td width="60" align="center" class="bg1">계 급</td>'+
|
||||
'<td width="80" align="center" class="bg1">관 직</td>'+
|
||||
'<td width="45" align="center" class="bg1">통솔</td>'+
|
||||
'<td width="45" align="center" class="bg1">무력</td>'+
|
||||
'<td width="45" align="center" class="bg1">지력</td>'+
|
||||
'<td width="45" align="center" class="bg1">삭턴</td>'+
|
||||
'<td width="84" align="center" class="bg1">벌점</td>'+
|
||||
'</tr></thead><tbody class="content"></tbody></table></div>');
|
||||
$userFrame.find('thead td');
|
||||
$userFrame.css('width','1000px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-500px');
|
||||
$userFrame.css('box-shadow','0px 0px 7px 3px rgba(255,255,255,50)');
|
||||
$userFrame.hide();
|
||||
|
||||
$('body').append($userFrame);
|
||||
|
||||
var $frame = $('table:eq(0) td:eq(0)');
|
||||
$frame.find('br:last').remove();
|
||||
|
||||
var $btn = $('<input type="button" value="장수 일람 연동">');
|
||||
$btn.click(function(){
|
||||
runAnalysis();
|
||||
$btn.prop("disabled",true);
|
||||
var $tr0 = $('table:eq(0) tr:eq(0)');
|
||||
$tr0.append('<td><strong>*벌점 순 정렬*</strong><br><span style="color:yellow">벌점 1500점 이상</span>, <span style="color:lightgreen">벌점 200점 이상</span>, '+
|
||||
'<span style="text-decoration:line-through">삭턴장</span>, <span style="color:cyan">ⓝ장</span>'+'<br><strong>전투장 :</strong> 만능장 + 무장 + 지장 + 평범장 - 삭턴자(만능, 무, 지, 평범) </td>');
|
||||
});
|
||||
|
||||
|
||||
|
||||
$frame.append($btn);
|
||||
});
|
||||
@@ -1,116 +0,0 @@
|
||||
$(function(){
|
||||
|
||||
var userList = {};
|
||||
var groupList = {};
|
||||
var tGroup = [];
|
||||
var basicPath = document.location.pathname;
|
||||
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
|
||||
|
||||
var $userFrame;
|
||||
|
||||
window.userList = userList;
|
||||
|
||||
var runAnalysis = function(){
|
||||
$.each(groupList,function(idx,val){
|
||||
val.list = [];
|
||||
});
|
||||
userList = [];
|
||||
var $content = $('#on_mover .content');
|
||||
$content.html('');
|
||||
$.get(basicPath+'b_genList.php',function(rawData){
|
||||
|
||||
try{
|
||||
$html = $(rawData);
|
||||
var cnt =0;
|
||||
|
||||
var tmpUsers = {};
|
||||
$html.each(function(idx){
|
||||
var $this = $(this);
|
||||
if($this.attr('id') == "general_list"){
|
||||
tmpUsers = $(this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
tmpUsers.find("tbody > tr").each(function(idx){
|
||||
var $this = $(this);
|
||||
var $부대 = $this.children('.i_troop');
|
||||
|
||||
var 부대 = $.trim($부대.text());
|
||||
|
||||
if(부대 == '-'){
|
||||
//부대 안탔음!
|
||||
return true;
|
||||
}
|
||||
$부대.remove();
|
||||
|
||||
var generalID = parseInt($this.data('general-id'));
|
||||
userList[generalID] = $this;
|
||||
$this.hide();
|
||||
$content.append($this);
|
||||
});
|
||||
|
||||
$('.troopUser').hover(function(){
|
||||
var $this = $(this);
|
||||
var parent = $this.closest('tr');
|
||||
var generalID = parseInt($this.data('general-id'));
|
||||
console.log(generalID);
|
||||
var top = parent.offset().top + parent.outerHeight();
|
||||
$userFrame.css('top',top);
|
||||
userList[generalID].show();
|
||||
$userFrame.show();
|
||||
},function(){
|
||||
var $this = $(this);
|
||||
var parent = $this.closest('tr');
|
||||
var generalID = parseInt($this.data('general-id'));
|
||||
userList[generalID].hide();
|
||||
$userFrame.hide();
|
||||
});
|
||||
}
|
||||
catch(err){
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
var $frame = $('table:eq(0) td:eq(0)');
|
||||
$frame.find('br:last').remove();
|
||||
|
||||
var $btn = $('<input type="button" value="암행부 연동">');
|
||||
$btn.click(function(){
|
||||
runAnalysis();
|
||||
});
|
||||
|
||||
$frame.append($btn);
|
||||
|
||||
|
||||
|
||||
$userFrame = $("<div id='on_mover' style='position:absolute;'>"+
|
||||
"<table class='tb_layout bg0' style='width:100%;'><thead>"+
|
||||
"<tr>"+
|
||||
"<td width=98 class='bg1 center'>이 름</td>"+
|
||||
"<td width=98 class='bg1 center'>통무지</td>"+
|
||||
"<td width=53 class='bg1 center'>자 금</td>"+
|
||||
"<td width=53 class='bg1 center'>군 량</td>"+
|
||||
"<td width=48 class='bg1 center'>도시</td>"+
|
||||
"<td width=28 class='bg1 center'>守</td>"+
|
||||
"<td width=58 class='bg1 center'>병 종</td>"+
|
||||
"<td width=63 class='bg1 center'>병 사</td>"+
|
||||
"<td width=38 class='bg1 center'>훈련</td>"+
|
||||
"<td width=38 class='bg1 center'>사기</td>"+
|
||||
"<td width=213 class='bg1 center'>명 령</td>"+
|
||||
"<td width=38 class='bg1 center'>삭턴</td>"+
|
||||
"<td width=48 class='bg1 center'>턴</td>"+
|
||||
"</tr>"+
|
||||
"</thead></thead><tbody class='content'></tbody></table></div>");
|
||||
$userFrame.find('thead td');
|
||||
$userFrame.css('width','960px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-480px');
|
||||
$userFrame.hide();
|
||||
|
||||
|
||||
|
||||
$('body').append($userFrame);
|
||||
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
jQuery(function($){
|
||||
$('#by_scenario').change(function(){
|
||||
var $this = $(this);
|
||||
var scenarioIdx = $this.val();
|
||||
var seasonIdx = $(this).find('option:selected').data('season');
|
||||
|
||||
|
||||
$.redirect('a_hallOfFame.php', {scenarioIdx:scenarioIdx, seasonIdx:seasonIdx}, 'get');
|
||||
})
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
jQuery(function($){
|
||||
|
||||
|
||||
var currYear = startYear;
|
||||
var currMonth = startMonth;
|
||||
|
||||
var $yearMonth = $('#yearmonth');
|
||||
var $elements = $();
|
||||
|
||||
var endDate = lastYear * 12 + lastMonth - 1;
|
||||
var currDate = startYear * 12 + startMonth - 1;
|
||||
while(currDate <= endDate){
|
||||
|
||||
var target = currYear*100 + currMonth;
|
||||
var sel = '';
|
||||
if(currYear == selectYear && currMonth == selectMonth){
|
||||
sel = 'selected="selected"';
|
||||
}
|
||||
var option = $('<option value="{0}" {1} >{2}년 {3}월</option>'.format(target, sel, currYear, currMonth));
|
||||
$elements = $elements.add(option);
|
||||
|
||||
currMonth += 1;
|
||||
if(currMonth > 12){
|
||||
currYear += 1;
|
||||
currMonth -= 12;
|
||||
}
|
||||
currDate += 1;
|
||||
}
|
||||
$yearMonth.empty();
|
||||
$yearMonth.append($elements);
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user