Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
83d6a2169b | ||
|
|
21e7a4d966 | ||
|
|
404cd24855 | ||
|
|
b4ad72ee67 | ||
|
|
bea628b619 | ||
|
|
3637e54982 | ||
|
|
e0d1a0a612 | ||
|
|
3040996671 | ||
|
|
dd830e7500 | ||
|
|
d2dfe2c418 | ||
|
|
139fb6b6e0 | ||
|
|
c4f6976c42 | ||
|
|
ab428fc104 | ||
|
|
aa97f78acd | ||
|
|
dbce900aeb | ||
|
|
30b382e2e7 | ||
|
|
433c4abb86 | ||
|
|
64404e4092 | ||
|
|
08d483af8a | ||
|
|
fa19c17941 | ||
|
|
c896a999ad | ||
|
|
f9bca935ac | ||
|
|
7abf274d89 | ||
|
|
e2ad417306 | ||
|
|
2ea9655f6b | ||
|
|
f450d5d9de | ||
|
|
f8f4b73a09 | ||
|
|
926d96732d | ||
|
|
167113d6a3 | ||
|
|
911cb614a5 | ||
|
|
7a939b7024 | ||
|
|
6e57a60997 | ||
|
|
9f1151e699 | ||
|
|
3fbe1fb63d | ||
|
|
d4906eec5a | ||
|
|
ebe0663e74 | ||
|
|
04c89b9711 | ||
|
|
4f2bc874e5 | ||
|
|
316ac5c3c8 | ||
|
|
7882aa667e | ||
|
|
8b8d5eecbf | ||
|
|
65b76643ee |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": 3,
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"lodash"
|
||||
]
|
||||
}
|
||||
@@ -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",
|
||||
}
|
||||
}
|
||||
+15
-1
@@ -4,7 +4,8 @@
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
|
||||
/node_modules
|
||||
package-lock.json
|
||||
|
||||
|
||||
# 체섭 ignore
|
||||
@@ -32,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
|
||||
|
||||
@@ -51,3 +60,8 @@ test.php
|
||||
phpinfo.php
|
||||
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||
*.sqlite3
|
||||
|
||||
ingame/js/*
|
||||
ingame/css/*
|
||||
gateway/js/*
|
||||
gateway/css/*
|
||||
|
||||
+15
-5
@@ -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,15 +15,14 @@ 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" => '7.4',
|
||||
'backward_compatibility_checks ' => true,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_CRITICAL,
|
||||
|
||||
'file_list' => [
|
||||
'f_config/config.php',
|
||||
'hwe/a_bestGeneral.php',
|
||||
'hwe/a_emperior.php',
|
||||
'hwe/a_emperior2.php',
|
||||
'hwe/a_emperior_detail.php',
|
||||
'hwe/a_genList.php',
|
||||
'hwe/a_hallOfFame.php',
|
||||
@@ -42,11 +41,13 @@ return [
|
||||
'hwe/b_dipcenter.php',
|
||||
'hwe/b_diplomacy.php',
|
||||
'hwe/b_genList.php',
|
||||
'hwe/v_inheritPoint.php',
|
||||
'hwe/b_myBossInfo.php',
|
||||
'hwe/b_myCityInfo.php',
|
||||
'hwe/b_myGenInfo.php',
|
||||
'hwe/b_myKingdomInfo.php',
|
||||
'hwe/b_myPage.php',
|
||||
'hwe/b_npc_control.php',
|
||||
'hwe/b_processing.php',
|
||||
'hwe/b_tournament.php',
|
||||
'hwe/b_troop.php',
|
||||
@@ -87,14 +88,18 @@ 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_getChiefTurn.php',
|
||||
'hwe/j_get_basic_general_list.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',
|
||||
@@ -108,15 +113,20 @@ 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_vacation.php',
|
||||
'hwe/lib.php',
|
||||
'hwe/process_war.php',
|
||||
'hwe/select_general_from_pool.php',
|
||||
'hwe/select_npc.php',
|
||||
'hwe/t_board.php',
|
||||
'hwe/t_diplomacy.php',
|
||||
|
||||
@@ -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를 이용한 설치
|
||||
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
"php": "7.4"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"ezyang/htmlpurifier": "^4.10",
|
||||
"xemlock/htmlpurifier-html5": "^0.1.7",
|
||||
"catfan/medoo": "^1.5",
|
||||
"phan/phan": "^2.7",
|
||||
"phan/phan": "*",
|
||||
"erusev/parsedown-extra": "^0.8.1",
|
||||
"nette/caching": "^3.0"
|
||||
},
|
||||
|
||||
Generated
+1175
-289
@@ -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": "ab1175c8592ba7f7756d5f02a3aa051c",
|
||||
"content-hash": "2aeb036fc53a6fdc343bd2707d4697ee",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brandonwamboldt/utilphp",
|
||||
@@ -50,20 +50,24 @@
|
||||
"php",
|
||||
"utility"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/brandonwamboldt/utilphp/issues",
|
||||
"source": "https://github.com/brandonwamboldt/utilphp/tree/master"
|
||||
},
|
||||
"time": "2015-02-02T17:56:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "catfan/medoo",
|
||||
"version": "v1.7.8",
|
||||
"version": "v1.7.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/catfan/Medoo.git",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
|
||||
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
|
||||
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -110,32 +114,37 @@
|
||||
"sql",
|
||||
"sqlite"
|
||||
],
|
||||
"time": "2019-12-19T05:04:34+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/catfan/Medoo/issues",
|
||||
"source": "https://github.com/catfan/Medoo"
|
||||
},
|
||||
"time": "2020-02-11T08:20:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "1.5.1",
|
||||
"version": "3.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
|
||||
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5"
|
||||
"phpstan/phpstan": "^0.12.54",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -171,28 +180,48 @@
|
||||
"validation",
|
||||
"versioning"
|
||||
],
|
||||
"time": "2020-01-13T12:06:48+00:00"
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.2.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-24T12:41:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "1.4.1",
|
||||
"version": "2.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
|
||||
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
|
||||
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1 || ^2 || ^3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
|
||||
"phpstan/phpstan": "^0.12.55",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -215,7 +244,26 @@
|
||||
"Xdebug",
|
||||
"performance"
|
||||
],
|
||||
"time": "2020-03-01T12:26:26+00:00"
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-31T17:03:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
@@ -261,6 +309,10 @@
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/erusev/parsedown/issues",
|
||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
||||
},
|
||||
"time": "2019-12-30T22:54:17+00:00"
|
||||
},
|
||||
{
|
||||
@@ -308,20 +360,24 @@
|
||||
"parsedown",
|
||||
"parser"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/erusev/parsedown-extra/issues",
|
||||
"source": "https://github.com/erusev/parsedown-extra/tree/0.8.x"
|
||||
},
|
||||
"time": "2019-12-30T23:20:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.12.0",
|
||||
"version": "v4.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
||||
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -337,6 +393,9 @@
|
||||
},
|
||||
"files": [
|
||||
"library/HTMLPurifier.composer.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -355,29 +414,33 @@
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"time": "2019-10-28T03:44:26+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||
"source": "https://github.com/ezyang/htmlpurifier/tree/master"
|
||||
},
|
||||
"time": "2020-06-29T00:56:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "felixfbecker/advanced-json-rpc",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
|
||||
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
|
||||
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
|
||||
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
|
||||
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447",
|
||||
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"netresearch/jsonmapper": "^1.0 || ^2.0",
|
||||
"php": ">=7.0",
|
||||
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
|
||||
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.0.0"
|
||||
"phpunit/phpunit": "^7.0 || ^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -396,7 +459,11 @@
|
||||
}
|
||||
],
|
||||
"description": "A more advanced JSONRPC implementation",
|
||||
"time": "2020-03-11T15:21:41+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues",
|
||||
"source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1"
|
||||
},
|
||||
"time": "2021-06-11T22:34:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "firephp/firephp-core",
|
||||
@@ -432,27 +499,33 @@
|
||||
],
|
||||
"description": "Traditional FirePHPCore library for sending PHP variables to the browser.",
|
||||
"homepage": "https://github.com/firephp/firephp-core",
|
||||
"support": {
|
||||
"forum": "http://groups.google.com/group/firephp-dev",
|
||||
"issues": "https://github.com/firephp/firephp-core/issues",
|
||||
"source": "https://github.com/firephp/firephp-core"
|
||||
},
|
||||
"time": "2013-04-23T15:28:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.5.2",
|
||||
"version": "6.5.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.6.1",
|
||||
"php": ">=5.5"
|
||||
"php": ">=5.5",
|
||||
"symfony/polyfill-intl-idn": "^1.17.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
@@ -460,7 +533,6 @@
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -499,27 +571,31 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2019-12-23T11:57:10+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/6.5"
|
||||
},
|
||||
"time": "2020-06-16T21:01:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "v1.3.1",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0"
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0"
|
||||
"symfony/phpunit-bridge": "^4.4 || ^5.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -550,20 +626,24 @@
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"time": "2016-12-20T10:07:11+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
||||
},
|
||||
"time": "2021-03-07T09:25:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.6.1",
|
||||
"version": "1.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -576,15 +656,15 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
|
||||
},
|
||||
"suggest": {
|
||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.6-dev"
|
||||
"dev-master": "1.7-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -621,29 +701,33 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2019-07-01T23:21:34+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
|
||||
},
|
||||
"time": "2021-04-26T09:17:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
"version": "3.3.0",
|
||||
"version": "v3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/plates.git",
|
||||
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af"
|
||||
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/plates/zipball/b1684b6f127714497a0ef927ce42c0b44b45a8af",
|
||||
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af",
|
||||
"url": "https://api.github.com/repos/thephpleague/plates/zipball/6d3ee31199b536a4e003b34a356ca20f6f75496a",
|
||||
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3 | ^7.0"
|
||||
"php": "^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mikey179/vfsstream": "^1.4",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~1.5"
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -665,10 +749,15 @@
|
||||
"name": "Jonathan Reinink",
|
||||
"email": "jonathan@reinink.ca",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "RJ Garcia",
|
||||
"email": "ragboyjr@icloud.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
|
||||
"homepage": "http://platesphp.com",
|
||||
"homepage": "https://platesphp.com",
|
||||
"keywords": [
|
||||
"league",
|
||||
"package",
|
||||
@@ -676,27 +765,31 @@
|
||||
"templating",
|
||||
"views"
|
||||
],
|
||||
"time": "2016-12-28T00:14:17+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/plates/issues",
|
||||
"source": "https://github.com/thephpleague/plates/tree/v3.4.0"
|
||||
},
|
||||
"time": "2020-12-25T05:00:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "microsoft/tolerant-php-parser",
|
||||
"version": "v0.0.20",
|
||||
"version": "v0.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/tolerant-php-parser.git",
|
||||
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4"
|
||||
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
|
||||
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
|
||||
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/6a965617cf484355048ac6d2d3de7b6ec93abb16",
|
||||
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.4"
|
||||
"phpunit/phpunit": "^8.5.15"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -717,20 +810,24 @@
|
||||
}
|
||||
],
|
||||
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
|
||||
"time": "2020-02-18T02:57:19+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/microsoft/tolerant-php-parser/issues",
|
||||
"source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.1"
|
||||
},
|
||||
"time": "2021-07-16T21:28:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.25.3",
|
||||
"version": "1.26.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
|
||||
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c6b00f05152ae2c9b04a448f99c7590beb6042f5",
|
||||
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -744,11 +841,10 @@
|
||||
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||
"doctrine/couchdb": "~1.0@dev",
|
||||
"graylog2/gelf-php": "~1.0",
|
||||
"jakub-onderka/php-parallel-lint": "0.9",
|
||||
"php-amqplib/php-amqplib": "~2.4",
|
||||
"php-console/php-console": "^3.1.3",
|
||||
"phpstan/phpstan": "^0.12.59",
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0",
|
||||
"ruflin/elastica": ">=0.90 <3.0",
|
||||
"sentry/sentry": "^0.13",
|
||||
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
||||
@@ -767,11 +863,6 @@
|
||||
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Monolog\\": "src/Monolog"
|
||||
@@ -795,20 +886,34 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2019-12-20T14:15:16+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||
"source": "https://github.com/Seldaek/monolog/tree/1.26.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/Seldaek",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-28T08:32:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "netresearch/jsonmapper",
|
||||
"version": "v2.1.0",
|
||||
"version": "v4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cweiske/jsonmapper.git",
|
||||
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
|
||||
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
|
||||
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
|
||||
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
|
||||
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -816,10 +921,10 @@
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.6"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
|
||||
"phpunit/phpunit": "~7.5 || ~8.0 || ~9.0",
|
||||
"squizlabs/php_codesniffer": "~3.5"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -841,31 +946,37 @@
|
||||
}
|
||||
],
|
||||
"description": "Map nested JSON structures onto PHP classes",
|
||||
"time": "2020-04-16T18:48:43+00:00"
|
||||
"support": {
|
||||
"email": "cweiske@cweiske.de",
|
||||
"issues": "https://github.com/cweiske/jsonmapper/issues",
|
||||
"source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0"
|
||||
},
|
||||
"time": "2020-12-01T19:48:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/caching",
|
||||
"version": "v3.0.1",
|
||||
"version": "v3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/caching.git",
|
||||
"reference": "b9ecbf920f240bd1ab14900d9a77876924ad7fb4"
|
||||
"reference": "3e771c589dee414724be473c24ad16dae50c1960"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/caching/zipball/b9ecbf920f240bd1ab14900d9a77876924ad7fb4",
|
||||
"reference": "b9ecbf920f240bd1ab14900d9a77876924ad7fb4",
|
||||
"url": "https://api.github.com/repos/nette/caching/zipball/3e771c589dee414724be473c24ad16dae50c1960",
|
||||
"reference": "3e771c589dee414724be473c24ad16dae50c1960",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"nette/finder": "^2.4 || ^3.0",
|
||||
"nette/utils": "^2.4 || ^3.0",
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2 <8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"latte/latte": "^2.4",
|
||||
"latte/latte": "^2.10",
|
||||
"nette/di": "^v3.0",
|
||||
"nette/tester": "^2.0",
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"tracy/tracy": "^2.4"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -874,7 +985,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
"dev-master": "3.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -885,8 +996,8 @@
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause",
|
||||
"GPL-2.0",
|
||||
"GPL-3.0"
|
||||
"GPL-2.0-only",
|
||||
"GPL-3.0-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
@@ -907,7 +1018,11 @@
|
||||
"nette",
|
||||
"sqlite"
|
||||
],
|
||||
"time": "2019-11-19T18:41:40+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/caching/issues",
|
||||
"source": "https://github.com/nette/caching/tree/v3.1.1"
|
||||
},
|
||||
"time": "2021-03-06T14:07:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/finder",
|
||||
@@ -970,24 +1085,31 @@
|
||||
"iterator",
|
||||
"nette"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/finder/issues",
|
||||
"source": "https://github.com/nette/finder/tree/v2.5.2"
|
||||
},
|
||||
"time": "2020-01-03T20:35:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v3.1.2",
|
||||
"version": "v3.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "488f58378bba71767e7831c83f9e0fa808bf83b9"
|
||||
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/488f58378bba71767e7831c83f9e0fa808bf83b9",
|
||||
"reference": "488f58378bba71767e7831c83f9e0fa808bf83b9",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2 <8.1"
|
||||
},
|
||||
"conflict": {
|
||||
"nette/di": "<3.0.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"nette/tester": "~2.0",
|
||||
@@ -1006,7 +1128,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1-dev"
|
||||
"dev-master": "3.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1030,7 +1152,7 @@
|
||||
"homepage": "https://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||
"homepage": "https://nette.org",
|
||||
"keywords": [
|
||||
"array",
|
||||
@@ -1048,7 +1170,11 @@
|
||||
"utility",
|
||||
"validation"
|
||||
],
|
||||
"time": "2020-05-27T09:58:51+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v3.2.2"
|
||||
},
|
||||
"time": "2021-03-03T22:53:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pguardiario/phpuri",
|
||||
@@ -1072,47 +1198,52 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"description": "A php library for converting relative urls to absolute.",
|
||||
"support": {
|
||||
"issues": "https://github.com/monkeysuffrage/phpuri/issues",
|
||||
"source": "https://github.com/monkeysuffrage/phpuri/tree/1.0.0"
|
||||
},
|
||||
"time": "2015-05-24T09:13:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phan/phan",
|
||||
"version": "2.7.1",
|
||||
"version": "5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phan/phan.git",
|
||||
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77"
|
||||
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phan/phan/zipball/67c51bb1593e5c30271fc16d691b82e318b90b77",
|
||||
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77",
|
||||
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/semver": "^1.4",
|
||||
"composer/xdebug-handler": "^1.3.2",
|
||||
"composer/semver": "^1.4|^2.0|^3.0",
|
||||
"composer/xdebug-handler": "^1.3.2|^2.0.0",
|
||||
"ext-filter": "*",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"felixfbecker/advanced-json-rpc": "^3.0.4",
|
||||
"microsoft/tolerant-php-parser": "0.0.20",
|
||||
"netresearch/jsonmapper": "^1.6.0|^2.0",
|
||||
"php": "^7.1.0",
|
||||
"sabre/event": "^5.0",
|
||||
"symfony/console": "^2.3|^3.0|^4.0|^5.0",
|
||||
"microsoft/tolerant-php-parser": "^0.1.0",
|
||||
"netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0",
|
||||
"php": "^7.2.0|^8.0.0",
|
||||
"sabre/event": "^5.0.3",
|
||||
"symfony/console": "^3.2|^4.0|^5.0",
|
||||
"symfony/polyfill-mbstring": "^1.11.0",
|
||||
"symfony/polyfill-php72": "^1.15"
|
||||
"symfony/polyfill-php80": "^1.20.0",
|
||||
"tysonandre/var_representation_polyfill": "^0.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"brianium/paratest": "^4.0.0",
|
||||
"phpunit/phpunit": "^7.5.0"
|
||||
"phpunit/phpunit": "^8.5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.6+ is recommended.",
|
||||
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.14+ is recommended.",
|
||||
"ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
||||
"ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",
|
||||
"ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
||||
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions."
|
||||
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.",
|
||||
"ext-var_representation": "Suggested for converting values to strings in issue messages"
|
||||
},
|
||||
"bin": [
|
||||
"phan",
|
||||
@@ -1146,7 +1277,11 @@
|
||||
"php",
|
||||
"static"
|
||||
],
|
||||
"time": "2020-04-12T01:25:29+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/phan/phan/issues",
|
||||
"source": "https://github.com/phan/phan/tree/5.0.0"
|
||||
},
|
||||
"time": "2021-08-01T18:17:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-extended/php-system",
|
||||
@@ -1186,6 +1321,10 @@
|
||||
"php",
|
||||
"system"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://gitlab.com/php-extended/php-system/issues",
|
||||
"source": "https://gitlab.com/php-extended/php-system"
|
||||
},
|
||||
"time": "2018-06-07T06:03:27+00:00"
|
||||
},
|
||||
{
|
||||
@@ -1230,29 +1369,33 @@
|
||||
"php",
|
||||
"tail"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://gitlab.com/php-extended/php-tail/issues",
|
||||
"source": "https://gitlab.com/php-extended/php-tail"
|
||||
},
|
||||
"time": "2018-06-07T06:04:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
|
||||
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
|
||||
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
|
||||
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
"dev-2.x": "2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1279,32 +1422,35 @@
|
||||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"time": "2020-04-27T09:25:28+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
|
||||
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
|
||||
},
|
||||
"time": "2020-06-27T09:03:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "5.1.0",
|
||||
"version": "5.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
|
||||
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
|
||||
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-filter": "^7.1",
|
||||
"php": "^7.2",
|
||||
"phpdocumentor/reflection-common": "^2.0",
|
||||
"phpdocumentor/type-resolver": "^1.0",
|
||||
"webmozart/assert": "^1"
|
||||
"ext-filter": "*",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpdocumentor/reflection-common": "^2.2",
|
||||
"phpdocumentor/type-resolver": "^1.3",
|
||||
"webmozart/assert": "^1.9.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/instantiator": "^1",
|
||||
"mockery/mockery": "^1"
|
||||
"mockery/mockery": "~1.3.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -1332,34 +1478,37 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2020-02-22T12:28:44+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
|
||||
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
|
||||
},
|
||||
"time": "2020-09-03T19:13:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "1.1.0",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
|
||||
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
|
||||
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpdocumentor/reflection-common": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-tokenizer": "^7.2",
|
||||
"mockery/mockery": "~1"
|
||||
"ext-tokenizer": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
"dev-1.x": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1378,31 +1527,30 @@
|
||||
}
|
||||
],
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"time": "2020-02-18T18:59:58+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
|
||||
},
|
||||
"time": "2020-09-17T18:55:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
@@ -1415,7 +1563,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
@@ -1427,7 +1575,11 @@
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
},
|
||||
"time": "2021-03-05T17:36:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
@@ -1477,20 +1629,23 @@
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/master"
|
||||
},
|
||||
"time": "2016-08-06T14:39:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1514,7 +1669,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
@@ -1524,7 +1679,10 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2019-11-01T11:05:21+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
||||
},
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
@@ -1564,28 +1722,33 @@
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"support": {
|
||||
"issues": "https://github.com/ralouphie/getallheaders/issues",
|
||||
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
|
||||
},
|
||||
"time": "2019-03-08T08:55:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sabre/event",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sabre-io/event.git",
|
||||
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276"
|
||||
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sabre-io/event/zipball/d00a17507af0e7544cfe17096372f5d733e3b276",
|
||||
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276",
|
||||
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
|
||||
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2.16.1",
|
||||
"phpunit/phpunit": "^7 || ^8"
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -1624,20 +1787,25 @@
|
||||
"reactor",
|
||||
"signal"
|
||||
],
|
||||
"time": "2020-01-31T18:52:29+00:00"
|
||||
"support": {
|
||||
"forum": "https://groups.google.com/group/sabredav-discuss",
|
||||
"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": "1.0.6",
|
||||
"version": "v1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
|
||||
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1646,11 +1814,19 @@
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
|
||||
"squizlabs/php_codesniffer": "~2.5",
|
||||
"twbs/bootstrap": "~4.3",
|
||||
"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"
|
||||
],
|
||||
@@ -1685,24 +1861,28 @@
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2019-12-12T05:00:52+00:00"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"name": "sergeytsalkov/meekrodb",
|
||||
"version": "v2.3",
|
||||
"version": "v2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SergeyTsalkov/meekrodb.git",
|
||||
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1"
|
||||
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/eb36858f1aff94ae1665900e681a1cfb78563ee1",
|
||||
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1",
|
||||
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/e30c240d54bc81f58c58507a9ed768032eb494a5",
|
||||
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.0"
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -1728,39 +1908,49 @@
|
||||
"mysqli",
|
||||
"pdo"
|
||||
],
|
||||
"time": "2014-06-16T22:40:22+00:00"
|
||||
"support": {
|
||||
"email": "support@meekro.com",
|
||||
"issues": "https://github.com/SergeyTsalkov/meekrodb/issues",
|
||||
"source": "https://github.com/SergeyTsalkov/meekrodb/tree/v2.4"
|
||||
},
|
||||
"time": "2021-06-29T04:31:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v5.0.8",
|
||||
"version": "v5.3.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935"
|
||||
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
|
||||
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php73": "^1.8",
|
||||
"symfony/service-contracts": "^1.1|^2"
|
||||
"symfony/polyfill-php80": "^1.16",
|
||||
"symfony/service-contracts": "^1.1|^2",
|
||||
"symfony/string": "^5.1"
|
||||
},
|
||||
"conflict": {
|
||||
"psr/log": ">=3",
|
||||
"symfony/dependency-injection": "<4.4",
|
||||
"symfony/dotenv": "<5.1",
|
||||
"symfony/event-dispatcher": "<4.4",
|
||||
"symfony/lock": "<4.4",
|
||||
"symfony/process": "<4.4"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0"
|
||||
"psr/log-implementation": "1.0|2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "~1.0",
|
||||
"psr/log": "^1|^2",
|
||||
"symfony/config": "^4.4|^5.0",
|
||||
"symfony/dependency-injection": "^4.4|^5.0",
|
||||
"symfony/event-dispatcher": "^4.4|^5.0",
|
||||
@@ -1775,11 +1965,6 @@
|
||||
"symfony/process": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Console\\": ""
|
||||
@@ -1802,42 +1987,127 @@
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"description": "Eases the creation of beautiful and testable command line interfaces",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2020-03-30T11:42:42+00:00"
|
||||
"keywords": [
|
||||
"cli",
|
||||
"command line",
|
||||
"console",
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.6"
|
||||
},
|
||||
"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-07-27T19:10:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.4.3",
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/dbal": "<2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.5",
|
||||
"mongodb/mongodb": "~1.1",
|
||||
"predis/predis": "~1.0"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.4-dev"
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"function.php"
|
||||
]
|
||||
},
|
||||
"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": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-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": "symfony/lock",
|
||||
"version": "v4.4.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
|
||||
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/dbal": "<2.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "^2.6|^3.0",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Lock\\": ""
|
||||
@@ -1860,7 +2130,7 @@
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Lock Component",
|
||||
"description": "Creates and manages locks, a mechanism to provide exclusive access to a shared resource",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"cas",
|
||||
@@ -1870,24 +2140,41 @@
|
||||
"redlock",
|
||||
"semaphore"
|
||||
],
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/lock/tree/v4.4.27"
|
||||
},
|
||||
"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-07-23T15:41:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
@@ -1895,7 +2182,11 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1928,24 +2219,293 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.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-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.15.0",
|
||||
"name": "symfony/polyfill-intl-grapheme",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
|
||||
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
|
||||
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
|
||||
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Grapheme\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"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": "Symfony polyfill for intl's grapheme_* functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"grapheme",
|
||||
"intl",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
|
||||
},
|
||||
"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-05-27T12:26:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||
"symfony/polyfill-php72": "^1.10"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Laurent Bassin",
|
||||
"email": "laurent@bassin.info"
|
||||
},
|
||||
{
|
||||
"name": "Trevor Rowbotham",
|
||||
"email": "trevor.rowbotham@pm.me"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"idn",
|
||||
"intl",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.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-05-27T09:27:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"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": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"intl",
|
||||
"normalizer",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.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-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
@@ -1953,7 +2513,11 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1987,29 +2551,50 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-03-09T19:04:49+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||
},
|
||||
"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-05-27T12:26:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
|
||||
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2042,29 +2627,50 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.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-05-27T09:17:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
|
||||
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2100,25 +2706,125 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.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-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v2.0.1",
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "144c5e51266b281231e947b51223ba14acf1a749"
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
|
||||
"reference": "144c5e51266b281231e947b51223ba14acf1a749",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"psr/container": "^1.0"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
|
||||
},
|
||||
"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-07-28T13:41:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/service-implementation": ""
|
||||
@@ -2126,7 +2832,11 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2158,27 +2868,178 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/service-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-04-01T10:43:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.7",
|
||||
"name": "symfony/string",
|
||||
"version": "v5.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d"
|
||||
"url": "https://github.com/symfony/string.git",
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"symfony/polyfill-intl-grapheme": "~1.0",
|
||||
"symfony/polyfill-intl-normalizer": "~1.0",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php80": "~1.15"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/error-handler": "^4.4|^5.0",
|
||||
"symfony/http-client": "^4.4|^5.0",
|
||||
"symfony/translation-contracts": "^1.1|^2",
|
||||
"symfony/var-exporter": "^4.4|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\String\\": ""
|
||||
},
|
||||
"files": [
|
||||
"Resources/functions.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"grapheme",
|
||||
"i18n",
|
||||
"string",
|
||||
"unicode",
|
||||
"utf-8",
|
||||
"utf8"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/string/tree/v5.3.3"
|
||||
},
|
||||
"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-06-27T11:44:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tysonandre/var_representation_polyfill",
|
||||
"version": "0.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
|
||||
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^7.2.0|^8.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phan/phan": "^4.0",
|
||||
"phpunit/phpunit": "^8.5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"VarRepresentation\\": "src/VarRepresentation"
|
||||
},
|
||||
"files": [
|
||||
"src/var_representation.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tyson Andre"
|
||||
}
|
||||
],
|
||||
"description": "Polyfill for var_representation",
|
||||
"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"
|
||||
},
|
||||
"time": "2021-06-26T18:55:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
|
||||
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
|
||||
"phpunit/phpunit": ">=4.8.35"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "It can support the multiple bytes string length."
|
||||
@@ -2197,43 +3058,59 @@
|
||||
{
|
||||
"name": "Vance Lucas",
|
||||
"email": "vance@vancelucas.com",
|
||||
"homepage": "http://www.vancelucas.com"
|
||||
"homepage": "https://www.vancelucas.com"
|
||||
}
|
||||
],
|
||||
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
|
||||
"homepage": "http://github.com/vlucas/valitron",
|
||||
"homepage": "https://github.com/vlucas/valitron",
|
||||
"keywords": [
|
||||
"valid",
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2019-08-29T19:49:43+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/vlucas/valitron/issues",
|
||||
"source": "https://github.com/vlucas/valitron/tree/v1.4.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/vlucas/valitron",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-08T16:18:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.8.0",
|
||||
"version": "1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
|
||||
"url": "https://github.com/webmozarts/assert.git",
|
||||
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
|
||||
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
|
||||
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"vimeo/psalm": "<3.9.1"
|
||||
"phpstan/phpstan": "<0.12.20",
|
||||
"vimeo/psalm": "<4.6.1 || 4.6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
"phpunit/phpunit": "^8.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Webmozart\\Assert\\": "src/"
|
||||
@@ -2255,7 +3132,11 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2020-04-18T12:12:48+00:00"
|
||||
"support": {
|
||||
"issues": "https://github.com/webmozarts/assert/issues",
|
||||
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
|
||||
},
|
||||
"time": "2021-03-09T10:59:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "xemlock/htmlpurifier-html5",
|
||||
@@ -2306,6 +3187,10 @@
|
||||
"validator",
|
||||
"xss"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/xemlock/htmlpurifier-html5/issues",
|
||||
"source": "https://github.com/xemlock/htmlpurifier-html5/tree/master"
|
||||
},
|
||||
"time": "2019-08-07T17:19:21+00:00"
|
||||
}
|
||||
],
|
||||
@@ -2319,5 +3204,6 @@
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
}
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
||||
+4
-2
@@ -127,6 +127,8 @@ input::-webkit-input-placeholder {
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
#running_map {
|
||||
margin-top: 20px;
|
||||
#running_map{
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
width:700px;
|
||||
}
|
||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -117,7 +117,7 @@ function logError(string $err, string $errstr, string $errpath, array $trace)
|
||||
]);
|
||||
}
|
||||
|
||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
|
||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext=null)
|
||||
{
|
||||
if (!(error_reporting() & $errno)) {
|
||||
// This error code is not included in error_reporting, so let it fall
|
||||
|
||||
+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>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace kakao;
|
||||
|
||||
// @suppress PhanRedefineClass
|
||||
class KakaoKey{
|
||||
const REST_KEY = '_tK_REST_API_KEY_';
|
||||
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+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
|
||||
|
||||
|
||||
@@ -24,3 +24,7 @@ foreach ($db->queryFirstColumn(
|
||||
) as $generalNo) {
|
||||
CheckHall($generalNo);
|
||||
}
|
||||
|
||||
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
|
||||
$genObj->mergeTotalInheritancePoint();
|
||||
}
|
||||
+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 !== null && key_exists($scenarioIdx, $scenarioList)){
|
||||
$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>
|
||||
|
||||
+21
-16
@@ -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')?>
|
||||
@@ -59,8 +59,13 @@ foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
}
|
||||
|
||||
|
||||
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
|
||||
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
|
||||
|
||||
if($generalListFromPool){
|
||||
$generalList = array_merge($generalListFromPool, $generalList);
|
||||
}
|
||||
|
||||
$sortType = [
|
||||
1 => ['name', true],
|
||||
2 => ['nation', true],
|
||||
@@ -88,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): ?>
|
||||
|
||||
+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>
|
||||
|
||||
|
||||
+15
-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')?>
|
||||
@@ -162,6 +164,7 @@ if(!key_exists($citylist, CityConst::all())){
|
||||
|
||||
if($userGrade >= 5){
|
||||
$valid = true;
|
||||
$showDetailedInfo = true;
|
||||
}
|
||||
|
||||
if(!$valid) {
|
||||
@@ -228,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]
|
||||
){
|
||||
@@ -267,7 +270,7 @@ foreach($generals as $general){
|
||||
|
||||
$isNPC = $general['npc']>1;
|
||||
$wounded = $general['injury'];
|
||||
|
||||
|
||||
|
||||
$name = $general['name'];
|
||||
$nameText = formatName($name, $general['npc']);
|
||||
@@ -324,7 +327,7 @@ foreach($generals as $general){
|
||||
else{
|
||||
$turnText = '';
|
||||
}
|
||||
|
||||
|
||||
$generalsFormat[] = [
|
||||
'ourGeneral'=>$ourGeneral,
|
||||
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
|
||||
@@ -376,7 +379,7 @@ $genTotal = 0;
|
||||
|
||||
|
||||
foreach($generalsFormat as $general){
|
||||
if($general['nation'] == 0){
|
||||
if(!$general['nation'] || !$myNation['nation']){
|
||||
continue;
|
||||
}
|
||||
if($general['nation'] != $myNation['nation']){
|
||||
@@ -406,7 +409,7 @@ foreach($generalsFormat as $general){
|
||||
}
|
||||
|
||||
$chkDef = false;
|
||||
|
||||
|
||||
if($minTrain >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
@@ -423,7 +426,7 @@ foreach($generalsFormat as $general){
|
||||
$chkDef = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -519,4 +522,3 @@ foreach($generalsFormat as $general){
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+11
-15
@@ -55,20 +55,16 @@ $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 +112,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 +196,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){
|
||||
|
||||
+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,420 +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>주변국중 하나를 골라 선포합니다.<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');
|
||||
|
||||
|
||||
+1
-1
@@ -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');
|
||||
|
||||
@@ -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,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%;
|
||||
}
|
||||
@@ -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_"}
|
||||
|
||||
+70
-30
@@ -21,10 +21,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)
|
||||
@@ -903,17 +903,16 @@ function nationMsg(General $general)
|
||||
$db = DB::db();
|
||||
$nationID = $general->getNationID();
|
||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||
|
||||
|
||||
return $nationStor->notice??'';
|
||||
}
|
||||
|
||||
function banner()
|
||||
{
|
||||
|
||||
return sprintf(
|
||||
'<font size=2>%s %s / %s</font>',
|
||||
GameConst::$title,
|
||||
VersionGit::$version,
|
||||
VersionGit::getVersion(),
|
||||
GameConst::$banner
|
||||
);
|
||||
}
|
||||
@@ -1006,7 +1005,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),
|
||||
@@ -1224,15 +1223,15 @@ function updateOnline()
|
||||
|
||||
//동접수
|
||||
$before5Min = TimeUtil::nowAddMinutes(-5);
|
||||
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s', $before5Min);
|
||||
$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));
|
||||
});
|
||||
|
||||
$onlineNation = [];
|
||||
$onlineNation = [];
|
||||
|
||||
foreach($onlineNationUsers as $nationID=>$rawOnlineUser){
|
||||
$nationName = getNationStaticInfo($nationID)['name'];
|
||||
@@ -1537,7 +1536,18 @@ 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()){
|
||||
$invalidItemType[$itemType] = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (array_keys(GameConst::$allItems) as $itemType) {
|
||||
if(key_exists($itemType, $invalidItemType)){
|
||||
continue;
|
||||
}
|
||||
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
|
||||
$itemClass = buildItemClass($itemCode);
|
||||
if (!$itemClass) {
|
||||
@@ -1551,7 +1561,13 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
||||
}
|
||||
|
||||
foreach (GameConst::$allItems as $itemType => $itemCategories) {
|
||||
if(key_exists($itemType, $invalidItemType)){
|
||||
continue;
|
||||
}
|
||||
foreach ($itemCategories as $itemCode => $cnt) {
|
||||
if($cnt == 0){
|
||||
continue;
|
||||
}
|
||||
if (!key_exists($itemCode, $occupiedUnique)) {
|
||||
$availableUnique[] = [[$itemType, $itemCode], $cnt];
|
||||
continue;
|
||||
@@ -1604,37 +1620,55 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
|
||||
return false;
|
||||
}
|
||||
|
||||
$itemTypeCnt = count(GameConst::$allItems);
|
||||
$trialCnt = $itemTypeCnt;
|
||||
|
||||
foreach ($general->getItems() as $item) {
|
||||
if (!$item) {
|
||||
continue;
|
||||
}
|
||||
if (!$item->isBuyable()) {
|
||||
return false;
|
||||
$trialCnt -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if($trialCnt <= 0){
|
||||
LogText("{$general->getName()}, {$general->getID()} 모든 아이템", $trialCnt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scenario = $gameStor->scenario;
|
||||
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
|
||||
|
||||
if ($scenario < 100) {
|
||||
$prob = 1 / ($genCount * 5); // 5~6개월에 하나씩 등장
|
||||
$prob = 1 / ($genCount * 3 * $itemTypeCnt); // 3~4개월에 하나씩 등장
|
||||
} else {
|
||||
$prob = 1 / $genCount; // 1~2개월에 하나씩 등장
|
||||
$prob = 1 / ($genCount * $itemTypeCnt); // 1~2개월에 하나씩 등장
|
||||
}
|
||||
|
||||
if ($acquireType == '설문조사') {
|
||||
$prob = 1 / ($genCount * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
|
||||
$prob = 1 / ($genCount * $itemTypeCnt * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
|
||||
} else if ($acquireType == '랜덤 임관') {
|
||||
$prob = 1 / ($genCount / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
|
||||
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
|
||||
} else if ($acquireType == '건국') {
|
||||
$prob = 1 / ($genCount / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
|
||||
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
|
||||
}
|
||||
|
||||
$prob = Util::valueFit($prob, null, 1 / 3);
|
||||
$prob = Util::valueFit($prob, null, 1 / 4);//최대치 감소
|
||||
$result = false;
|
||||
|
||||
if (!Util::randBool($prob)) {
|
||||
|
||||
|
||||
foreach(Util::range($trialCnt) as $_idx){
|
||||
if (Util::randBool($prob)) {
|
||||
$result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!$result){
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob);
|
||||
return false;
|
||||
}
|
||||
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob);
|
||||
|
||||
return giveRandomUniqueItem($general, $acquireType);
|
||||
}
|
||||
@@ -1656,7 +1690,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'];
|
||||
|
||||
@@ -1665,17 +1699,17 @@ 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', '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;
|
||||
@@ -1689,6 +1723,12 @@ function deleteNation(General $lord, bool $applyDB):array
|
||||
|
||||
// 전 장수 재야로
|
||||
foreach($nationGeneralList as $general){
|
||||
$general->setAuxVar('max_belong',
|
||||
max(
|
||||
$general->getVar('belong'),
|
||||
$general->getAuxVar('max_belong')??0
|
||||
)
|
||||
);
|
||||
$general->setVar('belong', 0);
|
||||
$general->setVar('troop', 0);
|
||||
$general->setVar('officer_level', 0);
|
||||
@@ -1736,7 +1776,7 @@ function nextRuler(General $general)
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
[$year, $month, $fiction] = $gameStor->getValuesAsArray(['year', 'month', 'fiction']);
|
||||
$nation = $general->getStaticNation();
|
||||
$nationName = $nation['name'];
|
||||
$nationID = $nation['nation'];
|
||||
@@ -1744,7 +1784,7 @@ function nextRuler(General $general)
|
||||
$candidate = null;
|
||||
|
||||
//npc or npc유저인 경우 후계 찾기
|
||||
if ($general->getNPCType() > 0) {
|
||||
if (!$fiction && $general->getNPCType() > 0) {
|
||||
$candidate = $db->queryFirstRow(
|
||||
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
|
||||
$general->getVar('affinity'),
|
||||
@@ -1847,7 +1887,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
|
||||
{
|
||||
@@ -1861,7 +1901,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',
|
||||
@@ -1924,7 +1964,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',
|
||||
|
||||
+64
-14
@@ -623,30 +623,38 @@ function updateNationState()
|
||||
$nation['nation'],
|
||||
$targetKillTurn
|
||||
);
|
||||
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong'], 2);
|
||||
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc'], 2);
|
||||
$chiefObj = null;
|
||||
|
||||
$uniqueLotteryWeightList = [];
|
||||
foreach ($nationGenList as $nationGen) {
|
||||
$hasUnique = false;
|
||||
if ($nationGen->getVar('officer_level') == 12) {
|
||||
$chiefObj = $nationGen;
|
||||
}
|
||||
$trialCnt = count(GameConst::$allItems);
|
||||
|
||||
foreach ($nationGen->getItems() as $item) {
|
||||
if (!$item->isBuyable()) {
|
||||
$hasUnique = true;
|
||||
break;
|
||||
$trialCnt -= 1;
|
||||
}
|
||||
}
|
||||
if ($hasUnique) {
|
||||
|
||||
if ($trialCnt <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$score = $nationGen->getVar('belong') + 5;
|
||||
|
||||
if ($nationGen->getVar('officer_level') == 12) {
|
||||
$score += 200; //NOTE: 꼬우면 군주하세요.
|
||||
$score += 100; //NOTE: 꼬우면 군주하세요.
|
||||
} else if ($nationGen->getVar('officer_level') == 11) {
|
||||
$score += 70;
|
||||
$score += 50;
|
||||
} else if ($nationGen->getVar('officer_level') > 4) {
|
||||
$score += 35;
|
||||
}
|
||||
|
||||
$score *= $trialCnt;
|
||||
|
||||
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
|
||||
}
|
||||
|
||||
@@ -661,6 +669,10 @@ function updateNationState()
|
||||
giveRandomUniqueItem($winnerObj, '작위보상');
|
||||
$winnerObj->applyDB($db);
|
||||
}
|
||||
|
||||
if($chiefObj){
|
||||
$chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -682,7 +694,7 @@ function updateNationState()
|
||||
$lastAssemblerID += 1;
|
||||
$npcObj = new Scenario\GeneralBuilder(
|
||||
sprintf('부대장%4d', $lastAssemblerID),
|
||||
0,
|
||||
false,
|
||||
null,
|
||||
$nation['nation']
|
||||
);
|
||||
@@ -733,7 +745,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'
|
||||
);
|
||||
@@ -978,6 +990,15 @@ 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){
|
||||
$genObj->increaseInheritancePoint('unifier', 2000);
|
||||
};
|
||||
}
|
||||
$genObj->mergeTotalInheritancePoint();
|
||||
}
|
||||
|
||||
$gameStor->isunited = 2;
|
||||
$gameStor->conlimit = $gameStor->conlimit * 100;
|
||||
|
||||
@@ -1001,8 +1022,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
|
||||
); // 오호장군
|
||||
@@ -1013,8 +1034,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
|
||||
); // 건안칠자
|
||||
@@ -1031,7 +1052,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');
|
||||
@@ -1128,3 +1149,32 @@ function checkEmperior()
|
||||
//연감 월결산
|
||||
LogHistory();
|
||||
}
|
||||
|
||||
function resetInheritanceUser(int $userID, bool $isRebirth=false){
|
||||
$rebirthDegraded = [
|
||||
'dex'=>0.5,
|
||||
];
|
||||
|
||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
||||
$totalPoint = 0;
|
||||
foreach($inheritStor->getAll() as $key=>[$value,]){
|
||||
if(key_exists($key, $rebirthDegraded)){
|
||||
$value *= $rebirthDegraded[$key];
|
||||
}
|
||||
$totalPoint += $value;
|
||||
}
|
||||
$totalPoint = Util::toInt($totalPoint);
|
||||
$inheritStor->resetValues();
|
||||
$inheritStor->setValue('previous', [$totalPoint, null]);
|
||||
}
|
||||
|
||||
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){
|
||||
$general->setInheritancePoint('max_domestic_critical', $maxDomesticCritical);
|
||||
}
|
||||
}
|
||||
+20
-15
@@ -173,7 +173,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 +246,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;
|
||||
@@ -297,7 +297,7 @@ function startTournament($auto, $type) {
|
||||
][$type];
|
||||
|
||||
$history[] = "<S>◆</>{$admin['year']}년 {$admin['month']}월:{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
|
||||
|
||||
|
||||
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
|
||||
}
|
||||
|
||||
@@ -689,7 +689,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
'grp_no'=>$general['grp_no'],
|
||||
'reward'=>$cost,
|
||||
'msg'=>"<span class='ev_highlight'>16강 진출</span>",
|
||||
'logger'=>$logger
|
||||
'logger'=>$logger,
|
||||
'inheritance_point'=>10,
|
||||
];
|
||||
}
|
||||
//8강자 명성 돈
|
||||
@@ -723,6 +724,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
//포상 장수 이름, 금액
|
||||
$resultHelper[$generalID]['reward'] += $cost;
|
||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>4강 진출</span>";
|
||||
General::createGeneralObjFromDB($generalID)->increaseInheritancePoint('tournament', 10);
|
||||
}
|
||||
//결승자 명성 돈
|
||||
$cost = $admin['develcost'] * 6;
|
||||
@@ -739,6 +741,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
//포상 장수 이름, 금액
|
||||
$resultHelper[$generalID]['reward'] += $cost;
|
||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>준우승</span>으";
|
||||
$resultHelper[$generalID]['inheritance_point'] = 50;
|
||||
if($general['lose'] > 0){
|
||||
$runnerUp = $general;
|
||||
}
|
||||
@@ -761,6 +764,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
//포상 장수 이름, 금액
|
||||
$resultHelper[$generalID]['reward'] += $cost;
|
||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>우승</span>으";
|
||||
$resultHelper[$generalID]['inheritance_point'] = 100;
|
||||
$winner = $general;
|
||||
}
|
||||
|
||||
@@ -775,9 +779,6 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
$runnerUpLogger = $resultHelper[$runnerUp['no']]['logger'];
|
||||
$runnerUpLogger->pushGeneralHistoryLog("<C>{$tp}</> 대회에서 준우승");
|
||||
|
||||
|
||||
|
||||
|
||||
$winnerRewardText = number_format($resultHelper[$winner['no']]['reward']);
|
||||
$runnerUpRewardText = number_format($resultHelper[$runnerUp['no']]['reward']);
|
||||
|
||||
@@ -786,12 +787,16 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
||||
|
||||
$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);
|
||||
|
||||
foreach($resultHelper as $general){
|
||||
|
||||
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
|
||||
|
||||
foreach($resultHelper as $generalID=>$general){
|
||||
$rewardText = number_format($general['reward']);
|
||||
/** @var ActionLogger */
|
||||
$logger = $general['logger'];
|
||||
$logger->pushGeneralActionLog("<C>{$tp}</> 대회의 {$general['msg']}로 <C>{$rewardText}</>의 <S>상금</>, 약간의 <S>명성</> 획득!", ActionLogger::EVENT_PLAIN);
|
||||
//TODO: 토너먼트의 다른 값이 모두 sql에 직접 입력하므로 기반을 바꿔야함.
|
||||
$generalObjList[$generalID]->increaseInheritancePoint('tournament', $general['inheritance_point']);
|
||||
}
|
||||
|
||||
//우승자 번호
|
||||
@@ -829,7 +834,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)')
|
||||
@@ -862,16 +867,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']);
|
||||
@@ -883,7 +888,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:
|
||||
@@ -1085,7 +1090,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; }
|
||||
|
||||
+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 생성?
|
||||
|
||||
|
||||
+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();
|
||||
|
||||
|
||||
@@ -115,7 +115,10 @@ foreach(GameConst::$generalPoolAllowOption as $allowOption){
|
||||
}
|
||||
}
|
||||
|
||||
$userNick = $ownerInfo['name'];
|
||||
|
||||
$builder->setOwner($userID);
|
||||
$builder->setOwnerName($userNick);
|
||||
$builder->setKillturn(5);
|
||||
$builder->setNPCType(0);
|
||||
$builder->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $env['turnterm']));
|
||||
@@ -135,7 +138,7 @@ $db->update('select_pool',[
|
||||
'reserved_until'=>null,
|
||||
], '(owner=%i or reserved_until < %s) AND general_id is NULL', $userID, $now);
|
||||
|
||||
$userNick = $ownerInfo['name'];
|
||||
|
||||
$josaYi = JosaUtil::pick($userNick, '이');
|
||||
$generalName = $builder->getGeneralName();
|
||||
$josaRo = JosaUtil::pick($generalName, '로');
|
||||
|
||||
@@ -140,6 +140,7 @@ if(!$v->validate()){
|
||||
'reason'=>'[출병자]'.$v->errorStr()
|
||||
]);
|
||||
}
|
||||
$rawAttacker['owner'] = 0;
|
||||
|
||||
$defenderList = [];
|
||||
foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
|
||||
@@ -152,6 +153,7 @@ foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
|
||||
'reason'=>"[수비자{$idx}]".$v->errorStr()
|
||||
]);
|
||||
}
|
||||
$rawDefenderGeneral['owner'] = 0;
|
||||
|
||||
$defenderList[] = new General($rawDefenderGeneral, extractRankVar($rawDefenderGeneral), $rawDefenderCity, $rawAttackerNation, $year, $month, true);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ if(key_exists('specialWar', $info)){
|
||||
$generalObj->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $turnterm));
|
||||
|
||||
$userNick = $ownerInfo['name'];
|
||||
$generalObj->setVar('owner_name', $userNick);
|
||||
$josaYi = JosaUtil::pick($userNick, '이');
|
||||
|
||||
$generalName = $info['generalName'];
|
||||
|
||||
+11
-12
@@ -56,11 +56,10 @@ echo Json::encode((object)$charInfoText);
|
||||
<?=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')?>
|
||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
||||
<?=WebUtil::printJS('dist_js/join.js')?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -95,10 +94,10 @@ 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>
|
||||
<td colspan=3 align=center class='bg1'>장수 생성</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>장수명</td>
|
||||
<td width=498 align=right class='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>
|
||||
@@ -108,7 +107,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
||||
$imageTemp = GetImageURL($member['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=right id=bg1>전콘 사용 여부</td>
|
||||
<td align=right class='bg1'>전콘 사용 여부</td>
|
||||
<td width=64 height=64>
|
||||
<img width='64' height='64' src='{$imageTemp}/{$member['picture']}' border='0'>
|
||||
</td>
|
||||
@@ -125,7 +124,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>성격</td>
|
||||
<td width=498 align=right class='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>
|
||||
@@ -137,19 +136,19 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>통솔</td>
|
||||
<td width=498 align=right class='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 width=498 align=right class='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 width=498 align=right class='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 width=498 align=right class='bg1'>능력치 조정</td>
|
||||
<td colspan=2>
|
||||
<input type=button value=랜덤형 onclick=abilityRand()>
|
||||
<input type=button value=통솔무력형 onclick=abilityLeadpow()>
|
||||
|
||||
+4
-2
@@ -185,10 +185,10 @@ if($relYear < 3){
|
||||
$experience = 0;
|
||||
}
|
||||
else{
|
||||
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 5');
|
||||
$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 < 5 ORDER BY experience ASC LIMIT %i, 1',
|
||||
'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1',
|
||||
$targetGenOrder - 1
|
||||
);
|
||||
$experience *= 0.8;
|
||||
@@ -266,6 +266,8 @@ foreach(Util::range(GameConst::$maxTurn) as $turnIdx){
|
||||
}
|
||||
$db->insert('general_turn', $turnRows);
|
||||
|
||||
resetInheritanceUser($userID);
|
||||
|
||||
$rank_data = [];
|
||||
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
|
||||
$rank_data[] = [
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
function showCityGeneral(cityIdx){
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
function loadScenarioPreview(scenarioIdx){
|
||||
$(function(){
|
||||
reloadWorldMap({
|
||||
clickableAll:true,
|
||||
selectCallback:showCityGeneral,
|
||||
hrefTemplate:'#',
|
||||
neutralView:true,
|
||||
showMe:false,
|
||||
targetJson:'j_get_scenario_map.php?scenarioIdx={0}'.format(scenarioIdx)
|
||||
});
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function loadScenarios() {
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: 'j_load_scenarios.php',
|
||||
dataType: 'json'
|
||||
}).then(function(result) {
|
||||
if (!result.result) {
|
||||
var deferred = $.Deferred();
|
||||
deferred.reject('fail');
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
|
||||
var list = {};
|
||||
|
||||
|
||||
$.each(result.scenario, function(idx, value) {
|
||||
var title = value.title || "-";
|
||||
var pat = /【(.*?)[0-9\-_\.a-zA-Z]*】/;
|
||||
var category = pat.exec(title);
|
||||
category = category ? category[1] : '-';
|
||||
|
||||
value.title = title;
|
||||
value.category = category;
|
||||
value.idx = idx;
|
||||
value.year = value.year || 180;
|
||||
|
||||
if (!(category in list)) {
|
||||
list[category] = {};
|
||||
}
|
||||
|
||||
list[category][idx] = value;
|
||||
});
|
||||
|
||||
var $select = $('#scenario_sel');
|
||||
$.each(list, function(category, items) {
|
||||
var $optgroup = $('<optgroup>').attr('label', category);
|
||||
|
||||
$.each(items, function(idx, scenario) {
|
||||
var $option = $('<option>')
|
||||
.data('scenario', scenario)
|
||||
.val(idx)
|
||||
.html(scenario.title);
|
||||
$optgroup.append($option);
|
||||
});
|
||||
|
||||
$select.append($optgroup);
|
||||
});
|
||||
|
||||
$select.val(0);
|
||||
$select.change();
|
||||
});
|
||||
}
|
||||
|
||||
function scenarioPreview() {
|
||||
var $select = $(this);
|
||||
var $option = $select.find('option:selected');
|
||||
|
||||
var $year = $('#scenario_begin');
|
||||
var $npc = $('#scenario_npc');
|
||||
var $npcEx = $('#scenario_npc_extend');
|
||||
var $nation = $('#scenario_nation');
|
||||
|
||||
var scenario = $option.data('scenario');
|
||||
console.log(scenario.idx, scenario.title);
|
||||
|
||||
$year.html('{0}년'.format(scenario.year));
|
||||
$npc.html('{0}명'.format(scenario.npc_cnt));
|
||||
if (scenario.npcEx_cnt == 0) {
|
||||
$npcEx.html('');
|
||||
} else {
|
||||
$npcEx.html('+{0}명'.format(scenario.npcEx_cnt));
|
||||
}
|
||||
|
||||
$nation.html('');
|
||||
$.each(scenario.nation, function(idx, nation) {
|
||||
$nation.append('<span style="color:{0}">{1}</span> {2}명. {3}<br>'.format(
|
||||
nation.color, nation.name, nation.generals, nation.cities.join(', ')
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
function formSetup() {
|
||||
$.validator.addMethod("autorun_user", function(value, element) {
|
||||
var parent = $(element).parent('.input-group');
|
||||
var checkCnt = parent.find('input:checked').length;
|
||||
if (value <= 0) {
|
||||
if (checkCnt > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (checkCnt == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}, "유효 시간과 옵션은 동시에 설정해야합니다.");
|
||||
$('#game_form').validate({
|
||||
rules: {
|
||||
turnterm: "required",
|
||||
sync: "required",
|
||||
scenario: "required",
|
||||
fiction: "required",
|
||||
extend: "required",
|
||||
npcmode: "required",
|
||||
show_img_level: "required",
|
||||
tournament_trig: "required",
|
||||
join_mode: 'required',
|
||||
autorun_user_minutes: { required: true, autorun_user: true, min: 0 }
|
||||
},
|
||||
errorElement: "div",
|
||||
errorPlacement: function(error, element) {
|
||||
// Add the `help-block` class to the error element
|
||||
error.addClass("invalid-feedback");
|
||||
|
||||
if (element.prop("type") === "checkbox") {
|
||||
error.insertAfter(element.parent("label"));
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
},
|
||||
highlight: function(element, errorClass, validClass) {
|
||||
$(element).addClass("is-invalid").removeClass("is-valid");
|
||||
},
|
||||
unhighlight: function(element, errorClass, validClass) {
|
||||
$(element).addClass("is-valid").removeClass("is-invalid");
|
||||
}
|
||||
});
|
||||
$('#game_form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
if (!$("#game_form").valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var autorun_user_minutes = parseInt($('#autorun_user_minutes').val());
|
||||
var autorun_user = [];
|
||||
if (autorun_user_minutes > 0) {
|
||||
$('.autorun_user_chk:checked').each(function() {
|
||||
autorun_user.push($(this).data('key'));
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: 'post',
|
||||
url: 'j_install.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
turnterm: $('#turnterm input:radio:checked').val(),
|
||||
sync: $('#sync input:radio:checked').val(),
|
||||
scenario: $('#scenario_sel').val(),
|
||||
fiction: $('#fiction input:radio:checked').val(),
|
||||
extend: $('#extend input:radio:checked').val(),
|
||||
block_general_create: $('#block_general_create input:radio:checked').val(),
|
||||
npcmode: $('#npcmode input:radio:checked').val(),
|
||||
show_img_level: $('#show_img_level input:radio:checked').val(),
|
||||
tournament_trig: $('#tournament_trig input:radio:checked').val(),
|
||||
reserve_open: $('#reserve_open').val(),
|
||||
pre_reserve_open: $('#pre_reserve_open').val(),
|
||||
join_mode: $('#join_mode input:radio:checked').val(),
|
||||
autorun_user_minutes: autorun_user_minutes,
|
||||
autorun_user: autorun_user
|
||||
}
|
||||
}).then(function(result) {
|
||||
var deferred = $.Deferred();
|
||||
|
||||
if (!result.result) {
|
||||
alert(result.reason);
|
||||
deferred.reject('fail');
|
||||
} else {
|
||||
alert('게임이 리셋되었습니다.');
|
||||
deferred.resolve();
|
||||
}
|
||||
|
||||
return deferred.promise();
|
||||
}).then(function() {
|
||||
location.href = '..';
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
loadScenarios();
|
||||
$('#scenario_sel').change(scenarioPreview);
|
||||
formSetup();
|
||||
})
|
||||
@@ -1,65 +0,0 @@
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#db_form').validate({
|
||||
rules:{
|
||||
db_host:"required",
|
||||
db_port:"required",
|
||||
db_id:"required",
|
||||
db_pw:"required",
|
||||
db_name:"required"
|
||||
},
|
||||
errorElement: "div",
|
||||
errorPlacement: function ( error, element ) {
|
||||
// Add the `help-block` class to the error element
|
||||
error.addClass( "invalid-feedback" );
|
||||
|
||||
if ( element.prop( "type" ) === "checkbox" ) {
|
||||
error.insertAfter( element.parent( "label" ) );
|
||||
} else {
|
||||
error.insertAfter( element );
|
||||
}
|
||||
},
|
||||
highlight: function ( element, errorClass, validClass ) {
|
||||
$( element ).addClass( "is-invalid" ).removeClass( "is-valid" );
|
||||
},
|
||||
unhighlight: function (element, errorClass, validClass) {
|
||||
$( element ).addClass( "is-valid" ).removeClass( "is-invalid" );
|
||||
}
|
||||
});
|
||||
$('#db_form').submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$("#db_form").valid()){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
cache:false,
|
||||
type:'post',
|
||||
url:'j_install_db.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
full_reset:$('#full_reset input:radio:checked').val(),
|
||||
db_host:$('#db_host').val(),
|
||||
db_port:$('#db_port').val(),
|
||||
db_id:$('#db_id').val(),
|
||||
db_pw:$('#db_pw').val(),
|
||||
db_name:$('#db_name').val()
|
||||
}
|
||||
}).then(function(result){
|
||||
var deferred = $.Deferred();
|
||||
|
||||
if(!result.result){
|
||||
alert(result.reason);
|
||||
deferred.reject('fail');
|
||||
}
|
||||
else{
|
||||
alert('DB.php가 생성되었습니다.');
|
||||
deferred.resolve();
|
||||
}
|
||||
|
||||
return deferred.promise();
|
||||
}).then(function(){
|
||||
location.href = 'install.php';
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
-205
@@ -1,205 +0,0 @@
|
||||
|
||||
jQuery(function($){
|
||||
var $leadership = $('#leadership');
|
||||
var $strength = $('#strength');
|
||||
var $intel = $('#intel');
|
||||
|
||||
function abilityRand(){
|
||||
var leadership = Math.random()*65 + 10;
|
||||
var strength = Math.random()*65 + 10;
|
||||
var intel = Math.random()*65 + 10;
|
||||
var rate = leadership + strength + intel;
|
||||
|
||||
leadership = Math.floor(leadership / rate * defaultStatTotal);
|
||||
strength = Math.floor(strength / rate * defaultStatTotal);
|
||||
intel = Math.floor(intel / rate * defaultStatTotal);
|
||||
|
||||
|
||||
while(leadership+strength+intel < defaultStatTotal){
|
||||
leadership+=1;
|
||||
}
|
||||
|
||||
if(leadership > defaultStatMax || strength > defaultStatMax || intel > defaultStatMax || leadership < defaultStatMin || strength < defaultStatMin || intel < defaultStatMin){
|
||||
return abilityRand();
|
||||
}
|
||||
|
||||
$leadership.val(leadership);
|
||||
$strength.val(strength);
|
||||
$intel.val(intel);
|
||||
}
|
||||
|
||||
|
||||
function abilityLeadpow(){
|
||||
var leadership = Math.random() * 6;
|
||||
var strength = Math.random() * 6;
|
||||
var intel = Math.random() * 1;
|
||||
var rate = leadership + strength + intel;
|
||||
|
||||
leadership = Math.floor(leadership / rate * defaultStatTotal);
|
||||
strength = Math.floor(strength / rate * defaultStatTotal);
|
||||
intel = Math.floor(intel / rate * defaultStatTotal);
|
||||
|
||||
while(leadership+strength+intel < defaultStatTotal){
|
||||
strength+=1;
|
||||
}
|
||||
|
||||
if(intel < defaultStatMin){
|
||||
leadership -= defaultStatMin - intel;
|
||||
intel = defaultStatMin;
|
||||
}
|
||||
|
||||
if(leadership > defaultStatMax){
|
||||
strength += leadership - defaultStatMax;
|
||||
leadership = defaultStatMax;
|
||||
}
|
||||
|
||||
if(strength > defaultStatMax){
|
||||
leadership += strength - defaultStatMax;
|
||||
strength = defaultStatMax;
|
||||
}
|
||||
|
||||
if(leadership > defaultStatMax){
|
||||
intel += leadership - defaultStatMax;
|
||||
leadership = defaultStatMax;
|
||||
}
|
||||
|
||||
$leadership.val(leadership);
|
||||
$strength.val(strength);
|
||||
$intel.val(intel);
|
||||
}
|
||||
|
||||
function abilityLeadint(){
|
||||
var leadership = Math.random() * 6;
|
||||
var strength = Math.random() * 1;
|
||||
var intel = Math.random() * 6;
|
||||
var rate = leadership + strength + intel;
|
||||
|
||||
leadership = Math.floor(leadership / rate * defaultStatTotal);
|
||||
strength = Math.floor(strength / rate * defaultStatTotal);
|
||||
intel = Math.floor(intel / rate * defaultStatTotal);
|
||||
|
||||
while(leadership+strength+intel < defaultStatTotal){
|
||||
intel+=1;
|
||||
}
|
||||
|
||||
if(strength < defaultStatMin){
|
||||
leadership -= defaultStatMin - strength;
|
||||
strength = defaultStatMin;
|
||||
}
|
||||
|
||||
if(leadership > defaultStatMax){
|
||||
intel += leadership - defaultStatMax;
|
||||
leadership = defaultStatMax;
|
||||
}
|
||||
|
||||
if(intel > defaultStatMax){
|
||||
leadership += intel - defaultStatMax;
|
||||
intel = defaultStatMax;
|
||||
}
|
||||
|
||||
if(leadership > defaultStatMax){
|
||||
strength += leadership - defaultStatMax;
|
||||
leadership = defaultStatMax;
|
||||
}
|
||||
|
||||
$leadership.val(leadership);
|
||||
$strength.val(strength);
|
||||
$intel.val(intel);
|
||||
}
|
||||
|
||||
function abilityPowint(){
|
||||
var leadership = Math.random() * 1;
|
||||
var strength = Math.random() * 6;
|
||||
var intel = Math.random() * 6;
|
||||
var rate = leadership + strength + intel;
|
||||
|
||||
leadership = Math.floor(leadership / rate * defaultStatTotal);
|
||||
strength = Math.floor(strength / rate * defaultStatTotal);
|
||||
intel = Math.floor(intel / rate * defaultStatTotal);
|
||||
|
||||
while(leadership+strength+intel < defaultStatTotal){
|
||||
intel+=1;
|
||||
}
|
||||
|
||||
if(leadership < defaultStatMin){
|
||||
strength -= defaultStatMin - leadership;
|
||||
leadership = defaultStatMin;
|
||||
}
|
||||
|
||||
if(strength > defaultStatMax){
|
||||
intel += strength - defaultStatMax;
|
||||
strength = defaultStatMax;
|
||||
}
|
||||
|
||||
if(intel > defaultStatMax){
|
||||
strength += intel - defaultStatMax;
|
||||
intel = defaultStatMax;
|
||||
}
|
||||
|
||||
if(strength > defaultStatMax){
|
||||
leadership += strength - defaultStatMax;
|
||||
strength = defaultStatMax;
|
||||
}
|
||||
|
||||
$leadership.val(leadership);
|
||||
$strength.val(strength);
|
||||
$intel.val(intel);
|
||||
}
|
||||
|
||||
window.abilityRand = abilityRand;
|
||||
window.abilityLeadpow = abilityLeadpow;
|
||||
window.abilityLeadint = abilityLeadint;
|
||||
window.abilityPowint = abilityPowint;
|
||||
|
||||
var $charInfoText = $('#charInfoText');
|
||||
var $selChar = $('#selChar');
|
||||
$selChar.change(function(){
|
||||
var $this = $(this);
|
||||
var char = $this.val();
|
||||
if(char in charInfoText){
|
||||
$charInfoText.html(charInfoText[char]);
|
||||
}
|
||||
else{
|
||||
$charInfoText.html('');
|
||||
}
|
||||
});
|
||||
|
||||
var $generalName = $('#generalName');
|
||||
if($generalName.on('change keyup paste', function(){
|
||||
var generalName = $generalName.val();
|
||||
var len = mb_strwidth(generalName);
|
||||
if(len == 0 || len > 18){
|
||||
$generalName.css('color','red');
|
||||
}
|
||||
else{
|
||||
$generalName.css('color','white');
|
||||
}
|
||||
}));
|
||||
|
||||
$('#join_form').submit(function(){
|
||||
var generalName = $generalName.val();
|
||||
if(mb_strwidth(generalName) > 18){
|
||||
alert('장수 이름이 너무 깁니다!');
|
||||
return false;
|
||||
}
|
||||
var currentStatTotal = parseInt($leadership.val()) + parseInt($strength.val()) + parseInt($intel.val());
|
||||
if(currentStatTotal < defaultStatTotal){
|
||||
if(!confirm('현재 능력치 총합은 {0}으로, {1}보다 낮습니다. 장수 생성을 진행할까요?'.format(currentStatTotal, defaultStatTotal))){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
var randomGenType = Math.floor(Math.random()*7);
|
||||
if(randomGenType < 3){
|
||||
abilityLeadpow();
|
||||
}
|
||||
else if(randomGenType < 6){
|
||||
abilityLeadint();
|
||||
}
|
||||
else{
|
||||
abilityPowint();
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"typeAcquisition": {
|
||||
"include": [
|
||||
"jquery"
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
-155
@@ -1,155 +0,0 @@
|
||||
jQuery(function($){
|
||||
|
||||
$('#refreshPage').click(function(){
|
||||
document.location.reload();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
function reloadCommandList(){
|
||||
$.get({
|
||||
url:'j_get_reserved_command.php',
|
||||
dataType:'json',
|
||||
cache: false,
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
return;
|
||||
}
|
||||
if(!data.result){
|
||||
return;
|
||||
}
|
||||
var game_clock = moment(data.date);
|
||||
var now_clock = moment();
|
||||
var $clock = $('#clock');
|
||||
$clock.data('time-diff', game_clock.diff(now_clock));
|
||||
$clock.val(game_clock.format('YYYY-MM-DD HH:mm:ss'));
|
||||
|
||||
var turnTime = moment(data.turnTime);
|
||||
var nextTurnTime = turnTime.clone();
|
||||
|
||||
var year = data.year;
|
||||
var month = data.month;
|
||||
|
||||
$.each(data.turn, function(turnIdx, turnInfo){
|
||||
var $tr = $('#command_{0}'.format(turnIdx));
|
||||
|
||||
$tr.find('.time_pad').text(nextTurnTime.format('HH:mm'));
|
||||
$tr.find('.month_pad').text('{0}年 {1}月'.format(year, month));
|
||||
var $turn_pad = $tr.find('.turn_pad');
|
||||
var $turn_text = $turn_pad.find('.turn_text');
|
||||
$turn_text.text(turnInfo.brief).css('font-size','13px');
|
||||
|
||||
var oWidth = $turn_pad.innerWidth();
|
||||
var iWidth = $turn_text.outerWidth();
|
||||
if(iWidth > oWidth * 0.95){
|
||||
var newFontSize = 13 * oWidth / iWidth * 0.9;
|
||||
$turn_text.css('font-size', '{0}px'.format(newFontSize));
|
||||
}
|
||||
|
||||
nextTurnTime.add(data.turnTerm, 'minutes');
|
||||
month+=1;
|
||||
if(month >= 13){
|
||||
year += 1;
|
||||
month -= 12;
|
||||
}
|
||||
});
|
||||
console.log(data);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function myclock() {
|
||||
|
||||
var $clock = $('#clock');
|
||||
var now_clock = moment();
|
||||
|
||||
if($clock.data('time-diff') == null){
|
||||
return;
|
||||
}
|
||||
|
||||
var game_clock = now_clock.add(parseInt($clock.data('time-diff')), 'milliseconds');
|
||||
|
||||
$('#clock').val(game_clock.format('YYYY-MM-DD HH:mm:ss'));
|
||||
}
|
||||
|
||||
function pushTurn(pushAmount){
|
||||
$.post({
|
||||
url:'j_general_turn.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
amount:pushAmount
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
}
|
||||
reloadCommandList();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
function repeatTurn(repeatAmount){
|
||||
$.post({
|
||||
url:'j_general_turn.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
amount:repeatAmount,
|
||||
is_repeat:true
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
}
|
||||
reloadCommandList();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
$('#pullTurn').click(function(){
|
||||
pushTurn(-parseInt($('#repeatAmount').val()));
|
||||
});
|
||||
|
||||
$('#pushTurn').click(function(){
|
||||
pushTurn(parseInt($('#repeatAmount').val()));
|
||||
});
|
||||
|
||||
$('#repeatTurn').click(function(){
|
||||
repeatTurn(parseInt($('#repeatAmount').val()));
|
||||
});
|
||||
|
||||
|
||||
function reserveTurn(turnList, command){
|
||||
console.log(turnList, command);
|
||||
$.post({
|
||||
url:'j_set_general_command.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:command,
|
||||
turnList:turnList
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
}
|
||||
reloadCommandList();
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
$('#reserveTurn').click(function(){
|
||||
var turnList = $('#generalTurnSelector').val().map(function(v){return parseInt(v);});
|
||||
var $command = $('#generalCommandList option:selected');
|
||||
if($command.data('reqarg')){
|
||||
$.redirect(
|
||||
"b_processing.php", {
|
||||
command: $command.val(),
|
||||
turnList: turnList.join('_')
|
||||
}, "GET");
|
||||
}
|
||||
else{
|
||||
reserveTurn(turnList, $command.val());
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
setInterval(myclock, 500);
|
||||
reloadCommandList();
|
||||
});
|
||||
-686
@@ -1,686 +0,0 @@
|
||||
function is_touch_device() {
|
||||
var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
|
||||
var mq = function(query) {
|
||||
return window.matchMedia(query).matches;
|
||||
}
|
||||
|
||||
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// include the 'heartz' as a way to have a non matching MQ to help terminate the join
|
||||
// https://git.io/vznFH
|
||||
var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');
|
||||
return mq(query);
|
||||
}
|
||||
|
||||
function reloadWorldMap(option, drawTarget) {
|
||||
if (drawTarget === undefined || drawTarget === null) {
|
||||
drawTarget = '.world_map'
|
||||
}
|
||||
var $world_map = $(drawTarget);
|
||||
|
||||
if ($world_map.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var defaultOption = {
|
||||
isDetailMap: true, //복잡 지도, 단순 지도
|
||||
clickableAll: false, //어떤 경우든 클릭을 가능하게 함. 해당 동작의 동작 가능성 여부와는 별도.
|
||||
selectCallback: null, //callback을 지정시 clickable과 관계 없이 해당 함수를 실행.
|
||||
hrefTemplate: '#', //도시가 클릭가능할 경우 지정할 href값. {0}은 도시 id로 변환됨
|
||||
useCachedMap: false, //맵 캐시를 사용
|
||||
|
||||
//아래부터는 post query에 들어갈 녀석
|
||||
year: null, //year값, 연감등에 사용
|
||||
month: null, //month값, 연감등에 사용
|
||||
aux: null, //기타 넣고 싶은 값을 입력
|
||||
neutralView: false, //clickable, 소속 국가, 첩보 여부 등을 반환여부를 설정
|
||||
showMe: true, //반환 값에 본인이 위치한 도시 값을 반환하도록 설정. neutralView와 별개
|
||||
|
||||
targetJson: 'j_map.php',
|
||||
reqType: 'post',
|
||||
dynamicMapTheme: false,
|
||||
callback: null,
|
||||
|
||||
//기타 보조 값
|
||||
startYear: null,
|
||||
};
|
||||
|
||||
option = $.extend(defaultOption, option);
|
||||
|
||||
var useCachedMap = option.useCachedMap;
|
||||
var isDetailMap = option.isDetailMap;
|
||||
var clickableAll = option.clickableAll;
|
||||
var selectCallback = option.selectCallback;
|
||||
var hrefTemplate = option.hrefTemplate;
|
||||
|
||||
var cityPosition = getCityPosition();
|
||||
|
||||
var storedOldMapKey = 'sam.{0}.map'.format(serverNick);
|
||||
var storedStartYear = 'sam.{0}.startYear'.format(serverNick);
|
||||
//OBJ : startYear, year, month, cityList, nationList, spyList, shownByGeneralList, myCity
|
||||
|
||||
function checkReturnObject(obj) {
|
||||
if (!obj.result) {
|
||||
var obj = $.Deferred();
|
||||
obj.reject('fail');
|
||||
return obj.promise();
|
||||
}
|
||||
|
||||
if (!$.isNumeric(obj.startYear) ||
|
||||
!$.isNumeric(obj.year) ||
|
||||
!$.isNumeric(obj.month)
|
||||
) {
|
||||
var obj = $.Deferred();
|
||||
obj.reject('fail');
|
||||
return obj.promise();
|
||||
}
|
||||
|
||||
if (useCachedMap) {
|
||||
localStorage.setItem(storedOldMapKey, JSON.stringify([serverID, obj]));
|
||||
localStorage.setItem(storedStartYear, JSON.stringify(obj.startYear));
|
||||
}
|
||||
|
||||
$world_map.removeClass('draw_required');
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setMapBackground(obj) {
|
||||
function setTheme() {
|
||||
var oldTheme = $world_map.data('currentTheme');
|
||||
var newTheme = obj.theme;
|
||||
if (oldTheme === newTheme) {
|
||||
return;
|
||||
}
|
||||
if (oldTheme) {
|
||||
$world_map.removeClass('map_theme_' + oldTheme);
|
||||
}
|
||||
$world_map.addClass('map_theme_' + newTheme);
|
||||
$world_map.data('currentTheme', newTheme);
|
||||
}
|
||||
if (option.dynamicMapTheme) {
|
||||
setTheme();
|
||||
}
|
||||
var startYear = obj.startYear;
|
||||
var year = obj.year;
|
||||
var month = obj.month;
|
||||
|
||||
if (isDetailMap) {
|
||||
$world_map.addClass('map_detail').removeClass('map_basic');
|
||||
} else {
|
||||
$world_map.addClass('map_basic').removeClass('map_detail');
|
||||
}
|
||||
|
||||
var $map_title = $('.map_title_text');
|
||||
if (year < startYear + 1) {
|
||||
$map_title.css('color', 'magenta');
|
||||
} else if (year < startYear + 2) {
|
||||
$map_title.css('color', 'orange');
|
||||
} else if (year < startYear + 3) {
|
||||
$map_title.css('color', 'yellow');
|
||||
}
|
||||
|
||||
$map_title_tooltip = $('.map_title .tooltiptext');
|
||||
$map_title_tooltip.empty();
|
||||
|
||||
var tooltipTexts = [];
|
||||
if (year < startYear + 3) {
|
||||
var startYearText = [];
|
||||
var remainYear = startYear + 3 - year;
|
||||
var remainMonth = 12 - month + 1;
|
||||
if (remainMonth > 0) {
|
||||
remainYear -= 1;
|
||||
}
|
||||
if (remainYear) {
|
||||
startYearText.push('{0}년'.format(remainYear));
|
||||
}
|
||||
if (remainMonth) {
|
||||
startYearText.push('{0}개월'.format(remainMonth));
|
||||
}
|
||||
|
||||
tooltipTexts.push('초반제한 기간 : {0} ({1}년)'.format(startYearText.join(' '), startYear + 3));
|
||||
}
|
||||
|
||||
var currentTechLimit = Math.floor(Math.max(0, year - startYear) / 5) + 1;
|
||||
var nextTechLimitYear = currentTechLimit * 5 + startYear;
|
||||
|
||||
tooltipTexts.push('기술등급 제한 : {0}등급 ({1}년 해제)'.format(currentTechLimit, nextTechLimitYear, currentTechLimit + 1));
|
||||
$map_title_tooltip.html(tooltipTexts.join('<br>'));
|
||||
|
||||
$world_map.removeClass('map_string map_summer map_fall map_winter');
|
||||
if (month <= 3) {
|
||||
$world_map.addClass('map_spring');
|
||||
} else if (month <= 6) {
|
||||
$world_map.addClass('map_summer');
|
||||
} else if (month <= 9) {
|
||||
$world_map.addClass('map_fall');
|
||||
} else {
|
||||
$world_map.addClass('map_winter');
|
||||
}
|
||||
|
||||
$map_title.html('{0}年 {1}月'.format(year, month));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function convertCityObjs(obj) {
|
||||
//원본 Obj는 굉장히 간소하게 온다, Object 형태로 변환해서 사용한다.
|
||||
|
||||
function toCityObj(arr) {
|
||||
return {
|
||||
id: arr[0],
|
||||
level: arr[1],
|
||||
state: arr[2],
|
||||
nationId: (arr[3] > 0) ? arr[3] : null,
|
||||
region: arr[4],
|
||||
supply: (arr[5] != 0)
|
||||
};
|
||||
}
|
||||
|
||||
function toNationObj(arr) {
|
||||
return {
|
||||
id: arr[0],
|
||||
name: arr[1],
|
||||
color: arr[2],
|
||||
capital: arr[3]
|
||||
};
|
||||
}
|
||||
|
||||
var cityList = obj.cityList.map(toCityObj);
|
||||
var nationList = obj.nationList.map(toNationObj);
|
||||
nationList = convertDictById(nationList); //array of object -> dict
|
||||
|
||||
var spyList = obj.spyList;
|
||||
var shownByGeneralList = convertSet(obj.shownByGeneralList); //Array -> Set
|
||||
|
||||
var myCity = obj.myCity;
|
||||
var myNation = obj.myNation;
|
||||
|
||||
|
||||
function mergePositionInfo(city) {
|
||||
var id = city.id;
|
||||
if (!(id in cityPosition)) {
|
||||
return city;
|
||||
}
|
||||
var xy_val = cityPosition[id];
|
||||
city.name = xy_val[0];
|
||||
city.x = xy_val[1];
|
||||
city.y = xy_val[2];
|
||||
return city;
|
||||
}
|
||||
|
||||
function mergeNationInfo(city) {
|
||||
//nationId 값으로 isCapital, color, nation을 통합
|
||||
|
||||
var nationId = city.nationId;
|
||||
if (nationId === null || !(nationId in nationList)) {
|
||||
city.nationId = null;
|
||||
city.nation = null;
|
||||
city.color = null;
|
||||
city.isCapital = false;
|
||||
return city;
|
||||
}
|
||||
|
||||
var nationObj = nationList[nationId];
|
||||
city.nation = nationObj.name;
|
||||
city.color = nationObj.color;
|
||||
city.isCapital = (nationObj.capital == city.id);
|
||||
|
||||
return city;
|
||||
}
|
||||
|
||||
function mergeClickable(city) {
|
||||
//clickable = (defaultCity << 4 ) | (remainSpy << 3) | (ourCity << 2) | (shownByGeneral << 1) | clickableAll
|
||||
var id = city.id;
|
||||
var nationId = city.nationId;
|
||||
var clickable = 16;
|
||||
if (id in spyList) {
|
||||
clickable |= spyList[id] << 3;
|
||||
}
|
||||
if (myNation !== null && nationId == myNation) {
|
||||
clickable |= 4;
|
||||
}
|
||||
if (shownByGeneralList.hasOwnProperty(id)) {
|
||||
clickable |= 2;
|
||||
}
|
||||
if (myCity !== null && id == myCity) {
|
||||
clickable |= 2;
|
||||
}
|
||||
if (clickableAll) {
|
||||
clickable |= 1;
|
||||
}
|
||||
|
||||
|
||||
city.clickable = clickable;
|
||||
return city;
|
||||
}
|
||||
|
||||
cityList = cityList
|
||||
.map(mergePositionInfo)
|
||||
.map(mergeNationInfo)
|
||||
.map(mergeClickable)
|
||||
.map(formatCityInfo);
|
||||
|
||||
return {
|
||||
'cityList': cityList,
|
||||
'myCity': myCity
|
||||
};
|
||||
}
|
||||
|
||||
function drawDetailWorldMap(obj) {
|
||||
|
||||
var $map_body = $(drawTarget + ' .map_body');
|
||||
|
||||
var cityList = obj.cityList;
|
||||
var myCity = obj.myCity;
|
||||
|
||||
cityList.forEach(function(city) {
|
||||
var id = city.id;
|
||||
$('.city_base_{0}'.format(id)).detach();
|
||||
//이전 도시는 지운다.
|
||||
|
||||
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
||||
$cityObj.addClass('city_level_{0}'.format(city.level));
|
||||
$cityObj.data('obj', city).css({ 'left': city.x - 20, 'top': city.y - 15 });
|
||||
|
||||
if ('color' in city && city.color !== null) {
|
||||
var $bgObj = $('<div class="city_bg"></div>');
|
||||
$cityObj.append($bgObj);
|
||||
$bgObj.css({ 'background-image': 'url({0}/b{1}.png)'.format(pathConfig.gameImage, convColorValue(city.color)) });
|
||||
}
|
||||
|
||||
var $linkObj = $('<a class="city_link"></a>');
|
||||
$linkObj.data({ 'text': city.text, 'nation': city.nation, 'id': city.id });
|
||||
$cityObj.append($linkObj);
|
||||
|
||||
var $imgObj = $('<div class="city_img"><img src="{0}/cast_{1}.gif"><div class="city_filler"></div></div>'.format(pathConfig.gameImage, city.level));
|
||||
$linkObj.append($imgObj);
|
||||
|
||||
|
||||
|
||||
if (city.state > 0) {
|
||||
var $stateObj = $('<div class="city_state"><img src="{0}/event{1}.gif"></div>'.format(pathConfig.gameImage, city.state));
|
||||
$linkObj.append($stateObj);
|
||||
}
|
||||
|
||||
if (city.nationId && city.nationId > 0) {
|
||||
var flagType = city.supply ? 'f' : 'd';
|
||||
var $flagObj = $('<div class="city_flag"><img src="{0}/{1}{2}.gif"></div>'.format(pathConfig.gameImage, flagType, convColorValue(city.color)));
|
||||
if (city.isCapital) {
|
||||
var $capitalObj = $('<div class="city_capital"><img src="{0}/event51.gif"></div>'.format(pathConfig.gameImage));
|
||||
$flagObj.append($capitalObj);
|
||||
}
|
||||
$imgObj.append($flagObj);
|
||||
}
|
||||
|
||||
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
|
||||
$imgObj.append($nameObj);
|
||||
|
||||
|
||||
$map_body.append($cityObj);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$world_map.find('.city_base_{0} .city_filler'.format(myCity)).addClass('my_city');
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function drawBasicWorldMap(obj) {
|
||||
|
||||
var $map_body = $(drawTarget + ' .map_body');
|
||||
|
||||
var cityList = obj.cityList;
|
||||
var myCity = obj.myCity;
|
||||
|
||||
cityList.forEach(function(city) {
|
||||
var id = city.id;
|
||||
$('.city_base_{0}'.format(id)).detach();
|
||||
//이전 도시는 지운다.
|
||||
|
||||
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
||||
$cityObj.addClass('city_level_{0}'.format(city.level));
|
||||
$cityObj.data('obj', city).css({ 'left': city.x - 20, 'top': city.y - 15 });
|
||||
|
||||
var $linkObj = $('<a class="city_link"></a>');
|
||||
$linkObj.data({ 'text': city.text, 'nation': city.nation, 'id': city.id });
|
||||
$cityObj.append($linkObj);
|
||||
|
||||
var $imgObj = $('<div class="city_img"><div class="city_filler"></div></div>');
|
||||
if ('color' in city && city.color !== null) {
|
||||
$imgObj.css({ 'background-color': city.color });
|
||||
}
|
||||
$linkObj.append($imgObj);
|
||||
|
||||
if (city.state > 0) {
|
||||
var state_text = 'wrong';
|
||||
if (city.state < 10) {
|
||||
state_text = 'good';
|
||||
} else if (city.state < 40) {
|
||||
state_text = 'bad';
|
||||
} else if (city.state < 50) {
|
||||
state_text = 'war';
|
||||
}
|
||||
|
||||
var $stateObj = $('<div class="city_state city_state_{0}"></div>'.format(state_text));
|
||||
$imgObj.append($stateObj);
|
||||
}
|
||||
|
||||
//단순 표기에서는 깃발 여부가 없음
|
||||
if (city.isCapital) {
|
||||
var $capitalObj = $('<div class="city_capital"></div>');
|
||||
$imgObj.append($capitalObj);
|
||||
}
|
||||
|
||||
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
|
||||
$imgObj.append($nameObj);
|
||||
|
||||
$map_body.append($cityObj);
|
||||
});
|
||||
|
||||
$world_map.find('.city_base_{0} .city_filler'.format(myCity)).addClass('my_city');
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function setMouseWork(obj) {
|
||||
var $tooltip = $(drawTarget + ' .city_tooltip');
|
||||
var $tooltip_city = $tooltip.find('.city_name');
|
||||
var $tooltip_nation = $tooltip.find('.nation_name');
|
||||
|
||||
var $objs = $(drawTarget + ' .city_link');
|
||||
|
||||
var $map_body = $(drawTarget + ' .map_body');
|
||||
|
||||
//터치스크린 탭
|
||||
|
||||
if (!option.neutralView && is_touch_device()) {
|
||||
$objs.on('touchstart', function(e) {
|
||||
if (window.sam_toggleSingleTap) {
|
||||
return true;
|
||||
}
|
||||
var $this = $(this);
|
||||
|
||||
var touchMode = $this.data('touchMode');
|
||||
if ($tooltip_city.data('target') != $this.data('id')) {
|
||||
$this.data('touchMode', 1);
|
||||
} else if (touchMode === undefined) {
|
||||
$this.data('touchMode', 1);
|
||||
} else {
|
||||
$this.data('touchMode', touchMode + 1);
|
||||
}
|
||||
$map_body.data('touchMode', 1);
|
||||
|
||||
$tooltip_city.data('target', $this.data('id'));
|
||||
|
||||
|
||||
});
|
||||
|
||||
$objs.on('touchend', function(e) {
|
||||
if (window.sam_toggleSingleTap) {
|
||||
return true;
|
||||
}
|
||||
var $this = $(this);
|
||||
var position = $this.parent().position();
|
||||
$tooltip_city.html($this.data('text'));
|
||||
|
||||
var nation_text = $this.data('nation');
|
||||
if (nation_text) {
|
||||
$tooltip_nation.html(nation_text).show();
|
||||
} else {
|
||||
$tooltip_nation.html('').hide();
|
||||
}
|
||||
|
||||
var left = position.left;
|
||||
var top = position.top;
|
||||
|
||||
var scale = $map_body.data('scale');
|
||||
if (scale) {
|
||||
left /= scale;
|
||||
top /= scale;
|
||||
}
|
||||
|
||||
$tooltip.css({ 'top': top + 25, 'left': left + 35 }).show();
|
||||
|
||||
var touchMode = $this.data('touchMode');
|
||||
if (touchMode <= 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다.
|
||||
$this.data('touchMode', 0);
|
||||
});
|
||||
|
||||
$map_body.on('touchend', function(e) {
|
||||
if (window.sam_toggleSingleTap) {
|
||||
return true;
|
||||
}
|
||||
//위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치
|
||||
$tooltip.hide();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//Mouse over 모드 작동
|
||||
|
||||
$map_body.on('mousemove', function(e) {
|
||||
if ($(this).data('touchMode')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var rect = this.getBoundingClientRect();
|
||||
var left = (e.clientX - rect.left - this.clientLeft + this.scrollLeft);
|
||||
var top = (e.clientY - rect.top - this.clientTop + this.scrollTop);
|
||||
|
||||
var scale = $map_body.data('scale');
|
||||
if (scale) {
|
||||
left /= scale;
|
||||
top /= scale;
|
||||
}
|
||||
|
||||
$tooltip.css({ 'top': top + 10, 'left': left + 10 });
|
||||
});
|
||||
|
||||
$objs.on('mouseenter', function(e) {
|
||||
if ($map_body.data('touchMode')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
$tooltip_city.data('target', $this.data('id'));
|
||||
$tooltip_city.html($this.data('text'));
|
||||
var nation_text = $this.data('nation');
|
||||
if (nation_text) {
|
||||
$tooltip_nation.html(nation_text).show();
|
||||
} else {
|
||||
$tooltip_nation.html('').hide();
|
||||
}
|
||||
|
||||
$tooltip.show();
|
||||
});
|
||||
|
||||
$objs.on('mouseleave', function(event) {
|
||||
$tooltip.hide();
|
||||
});
|
||||
|
||||
$objs.on('click', function(e) {
|
||||
//xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다.
|
||||
var touchMode = $(this).data('touchMode');
|
||||
if (touchMode === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (touchMode === 1) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function setCityClickable(obj) {
|
||||
|
||||
obj.cityList.forEach(function(city) {
|
||||
var $cityLink = $world_map.find('.city_base_{0} .city_link'.format(city.id));
|
||||
|
||||
if ('clickable' in city && city.clickable > 0) {
|
||||
$cityLink.attr('href', hrefTemplate.format(city.id));
|
||||
}
|
||||
|
||||
if (selectCallback) {
|
||||
$cityLink.click(function() {
|
||||
return selectCallback(city);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function saveCityInfo(obj) {
|
||||
$world_map.data('cityInfo', obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
var $hideCityNameBtn = $world_map.find('.map_toggle_cityname');
|
||||
if (localStorage.getItem('sam.hideMapCityName') == 'yes') {
|
||||
$world_map.addClass('hide_cityname');
|
||||
$hideCityNameBtn.addClass('active').attr('aria-pressed', 'true');
|
||||
}
|
||||
|
||||
$hideCityNameBtn.click(function() {
|
||||
//이전 상태 확인
|
||||
var state = !$hideCityNameBtn.hasClass('active');
|
||||
if (state) {
|
||||
$world_map.addClass('hide_cityname');
|
||||
localStorage.setItem('sam.hideMapCityName', 'yes');
|
||||
} else {
|
||||
$world_map.removeClass('hide_cityname');
|
||||
localStorage.setItem('sam.hideMapCityName', 'no');
|
||||
}
|
||||
});
|
||||
|
||||
var $toggleSingleTapBtn = $world_map.find('.map_toggle_single_tap');
|
||||
if (localStorage.getItem('sam.toggleSingleTap') == 'yes') {
|
||||
window.sam_toggleSingleTap = true;
|
||||
$toggleSingleTapBtn.addClass('active').attr('aria-pressed', 'true');
|
||||
} else {
|
||||
window.sam_toggleSingleTap = false;
|
||||
}
|
||||
|
||||
var $map_body = $(drawTarget + ' .map_body');
|
||||
|
||||
$toggleSingleTapBtn.click(function() {
|
||||
//이전 상태 확인
|
||||
var state = !$toggleSingleTapBtn.hasClass('active');
|
||||
if (state) {
|
||||
$map_body.removeData('touchMode');
|
||||
localStorage.setItem('sam.toggleSingleTap', 'yes');
|
||||
window.sam_toggleSingleTap = true;
|
||||
} else {
|
||||
localStorage.setItem('sam.toggleSingleTap', 'no');
|
||||
window.sam_toggleSingleTap = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (isDetailMap) {
|
||||
$world_map.addClass('map_detail');
|
||||
} else {
|
||||
$world_map.removeClass('map_datail');
|
||||
}
|
||||
|
||||
//deferred mode of jQuery. != promise-then.
|
||||
var deferred = $.ajax({
|
||||
url: option.targetJson,
|
||||
type: option.reqType,
|
||||
dataType: 'json',
|
||||
ifModified: true,
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
neutralView: option.neutralView,
|
||||
year: option.year,
|
||||
month: option.month,
|
||||
showMe: option.showMe,
|
||||
aux: option.aux
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
var rawObject = null;
|
||||
|
||||
deferred
|
||||
.then(function(data) {
|
||||
rawObject = data;
|
||||
return data;
|
||||
})
|
||||
.then(checkReturnObject)
|
||||
.then(setMapBackground)
|
||||
.then(convertCityObjs)
|
||||
.then(isDetailMap ? drawDetailWorldMap : drawBasicWorldMap)
|
||||
.then(setMouseWork)
|
||||
.then(setCityClickable)
|
||||
.then(saveCityInfo)
|
||||
.then(function(data) {
|
||||
if (option.callback) {
|
||||
option.callback(data, rawObject);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if ($world_map.hasClass('draw_required')) {
|
||||
if (useCachedMap) {
|
||||
//일단 불러옴
|
||||
do {
|
||||
var storedMap = localStorage.getItem(storedOldMapKey);
|
||||
if (!storedMap) {
|
||||
break;
|
||||
}
|
||||
storedMap = JSON.parse(storedMap);
|
||||
var storedServerID = storedMap[0];
|
||||
if (storedServerID != serverID) {
|
||||
break;
|
||||
}
|
||||
|
||||
storedMap = storedMap[1];
|
||||
storedMap = setMapBackground(storedMap);
|
||||
storedMap = convertCityObjs(storedMap);
|
||||
if (isDetailMap) {
|
||||
storedMap = drawDetailWorldMap(storedMap);
|
||||
} else {
|
||||
storedMap = drawBasicWorldMap(storedMap);
|
||||
}
|
||||
storedMap = setMouseWork(storedMap);
|
||||
storedMap = setCityClickable(storedMap);
|
||||
storedMap = saveCityInfo(storedMap);
|
||||
} while (false);
|
||||
} else if (option.year && option.month) {
|
||||
var startYear = localStorage.getItem(storedStartYear);
|
||||
if (startYear) {
|
||||
startYear = JSON.parse(startYear);
|
||||
} else {
|
||||
startYear = option.year;
|
||||
}
|
||||
var tmp = {
|
||||
year: option.year,
|
||||
month: option.month,
|
||||
startYear: startYear
|
||||
};
|
||||
setMapBackground(tmp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
if (is_touch_device()) {
|
||||
$('.map_body .map_toggle_single_tap').show();
|
||||
}
|
||||
})
|
||||
-562
@@ -1,562 +0,0 @@
|
||||
|
||||
|
||||
|
||||
var messageTemplate = '';
|
||||
var myGeneralID=null;
|
||||
var isChief = false;
|
||||
var lastSequence = 0;
|
||||
var myNation = null;
|
||||
var minMsgSeq = {
|
||||
'private':0x7fffffff,
|
||||
'public':0x7fffffff,
|
||||
'national':0x7fffffff,
|
||||
'diplomacy':0x7fffffff,
|
||||
}
|
||||
|
||||
var generalList = {};
|
||||
|
||||
function responseMessage(msgID, response){
|
||||
$.ajax({
|
||||
url: 'j_msg_decide_opt.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
msgID:msgID,
|
||||
response:response
|
||||
})
|
||||
}
|
||||
}).then(function(result){
|
||||
if(result && !result.result){
|
||||
alert(result.reason);
|
||||
}
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
function deleteMessage(msgID){
|
||||
$.ajax({
|
||||
url: 'j_msg_delete.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
data: {
|
||||
msgID:msgID
|
||||
}
|
||||
}).then(refreshMsg);
|
||||
}
|
||||
|
||||
function refreshMsg(result){
|
||||
if(result && !result.result){
|
||||
alert(result.reason);
|
||||
}
|
||||
return redrawMsg(fetchRecentMsg(), true);
|
||||
}
|
||||
|
||||
function fetchRecentMsg(){
|
||||
return $.ajax({
|
||||
url: 'j_msg_get_recent.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
data: {
|
||||
sequence:lastSequence
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showOldMsg(msgType){
|
||||
var oldMsg = $.ajax({
|
||||
url: 'j_msg_get_old.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
data: {
|
||||
to:minMsgSeq[msgType],
|
||||
type:msgType,
|
||||
}
|
||||
});
|
||||
redrawMsg(oldMsg, false);
|
||||
}
|
||||
|
||||
function redrawMsg(deferred, addFront){
|
||||
function checkErasable(obj){
|
||||
|
||||
var now = moment().format('YYYY-MM-DD HH:mm:ss');
|
||||
$('.btn-delete-msg').each(function(){
|
||||
var $btn = $(this);
|
||||
var eraseUntil = $btn.data('erase_until');
|
||||
if(eraseUntil < now){
|
||||
$btn.detach();
|
||||
}
|
||||
})
|
||||
return obj;
|
||||
}
|
||||
function checkClear(obj){
|
||||
if(!obj.result){
|
||||
var t = $.Deferred();
|
||||
t.reject();
|
||||
return t;
|
||||
}
|
||||
if(!obj.keepRecent){
|
||||
var t = $.Deferred();
|
||||
$('.msg_plate').detach();
|
||||
lastSequence = null;
|
||||
console.log('refresh!');
|
||||
redrawMsg(fetchRecentMsg(), true);
|
||||
t.reject();
|
||||
return t;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
function registerSequence(obj){
|
||||
if(!obj.result){
|
||||
var t = $.Deferred();
|
||||
t.reject();
|
||||
return t;
|
||||
}
|
||||
lastSequence = Math.max(lastSequence, obj.sequence);
|
||||
$.each(['public', 'private', 'national', 'diplomacy'], function (_, msgType) {
|
||||
var msgList = obj[msgType];
|
||||
if(msgList === undefined || msgList.length == 0){
|
||||
return true;
|
||||
}
|
||||
var lastMsg = msgList[msgList.length - 1];
|
||||
minMsgSeq[msgType] = Math.min(minMsgSeq[msgType], lastMsg.id);
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
function refineMessageObjs(obj){
|
||||
var msgList = [obj.public, obj.private, obj.diplomacy, obj.national];
|
||||
$.each(msgList, function(){
|
||||
if(!this){
|
||||
return true;
|
||||
}
|
||||
|
||||
$.each(this, function(){
|
||||
var msg = this;
|
||||
if(!msg.src.nation){
|
||||
msg.src.nation = '재야';
|
||||
msg.src.color = '#000000';
|
||||
}
|
||||
|
||||
if(!msg.dest.nation){
|
||||
msg.dest.nation = '재야';
|
||||
msg.dest.color = '#000000';
|
||||
}
|
||||
|
||||
msg.src.colorType = isBrightColor(msg.src.color)?'bright':'dark';
|
||||
msg.dest.colorType = isBrightColor(msg.dest.color)?'bright':'dark';
|
||||
});
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
function printTemplate(obj){
|
||||
var printList = [
|
||||
[obj.public, $('#message_board .public_message'), 'public'],
|
||||
[obj.private, $('#message_board .private_message'), 'private'],
|
||||
[obj.diplomacy, $('#message_board .diplomacy_message'), 'diplomacy'],
|
||||
[obj.national, $('#message_board .national_message'), 'national'],
|
||||
];
|
||||
|
||||
$.each(printList, function(){
|
||||
var msgSource = this[0];
|
||||
var $msgBoard = this[1];
|
||||
var msgType = this[2];
|
||||
|
||||
if(!msgSource || $msgBoard.length == 0){
|
||||
console.log('No Items', msgSource, $msgBoard);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
var needRefreshLastContact = (msgType == 'private');
|
||||
|
||||
var now = moment().format('YYYY-MM-DD HH:mm:ss');
|
||||
//list의 맨 앞이 가장 최신 메시지임.
|
||||
var $msgs = msgSource.map(function(msg){
|
||||
|
||||
var contactTarget = (msg.src.id != myGeneralID) ? msg.src.id : msg.dest.id;
|
||||
if(needRefreshLastContact && contactTarget != myGeneralID && contactTarget in generalList)
|
||||
{
|
||||
needRefreshLastContact = false;
|
||||
$('#last_contact').val(contactTarget).html(generalList[contactTarget].textName).show();
|
||||
}
|
||||
|
||||
msg.nationID = obj.nationID;
|
||||
msg.generalName = obj.generalName;
|
||||
msg.msgType = msgType;
|
||||
|
||||
if(msg.src.nation_id == msg.dest.nation_id){
|
||||
msg.nationType = 'local';
|
||||
}
|
||||
else if(msg.nationID == msg.src.nation_id){
|
||||
msg.nationType = 'src';
|
||||
}
|
||||
else{
|
||||
msg.nationType = 'dest';
|
||||
}
|
||||
|
||||
|
||||
msg.defaultIcon = pathConfig.sharedIcon+'/default.jpg';
|
||||
if(msgType == 'diplomacy'){
|
||||
msg.allowButton = permissionLevel>=4;
|
||||
}
|
||||
else{
|
||||
msg.allowButton = true;
|
||||
}
|
||||
msg.myGeneralID = myGeneralID;
|
||||
msg.last5min = moment(msg.time).add(5, 'minute').format('YYYY-MM-DD HH:mm:ss');
|
||||
msg.now = now;
|
||||
if(msg.option && msg.option.invalid){
|
||||
msg.invalidType = 'msg_invalid';
|
||||
}
|
||||
else{
|
||||
msg.invalidType = 'msg_valid';
|
||||
}
|
||||
|
||||
if(msg.option && !msg.option.deletable){
|
||||
msg.deletable = false;
|
||||
}
|
||||
else{
|
||||
msg.deletable = true;
|
||||
}
|
||||
|
||||
var msgHtml = TemplateEngine(messageTemplate, msg);
|
||||
|
||||
|
||||
//만약 이전 메시지와 같은 id가 온 경우 덮어씌운다.
|
||||
//NOTE:현 프로세스 상에서는 같은 id가 와선 안된다.
|
||||
var $existMsg = $('#msg_{0}'.format(msg.id));
|
||||
var $msg = $(msgHtml);
|
||||
if($existMsg.length){
|
||||
console.log('메시지 충돌', $msg, $existMsg);
|
||||
$existMsg.html($msg.html());
|
||||
$msg = $existMsg;
|
||||
}
|
||||
|
||||
var hideMsg = false;
|
||||
if(msg.option){
|
||||
if(msg.option.delete !== undefined){
|
||||
//delete는 삭제.
|
||||
$('#msg_{0}'.format(msg.option.delete)).detach();
|
||||
}
|
||||
if(msg.option.overwrite !== undefined){
|
||||
//overwrite는 숨기기.
|
||||
$.map(msg.option.overwrite, function (overwriteID) {
|
||||
var $msg = $('#msg_{0}'.format(overwriteID));
|
||||
$msg.find('.btn-delete-msg').detach();
|
||||
$msg.find('.msg_content').html('삭제된 메시지입니다.').removeClass('msg_valid').addClass('msg_invalid');
|
||||
});
|
||||
|
||||
}
|
||||
if(msg.option.hide){
|
||||
hideMsg = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(hideMsg){
|
||||
return null;
|
||||
}
|
||||
|
||||
$msg.find('.btn-delete-msg').click(function(){
|
||||
if(!confirm("삭제하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
deleteMessage(msg.id);
|
||||
});
|
||||
|
||||
$msg.find('button.prompt_yes').click(function(){
|
||||
if(!confirm("수락하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
responseMessage(msg.id, true);
|
||||
|
||||
});
|
||||
|
||||
$msg.find('button.prompt_no').click(function(){
|
||||
if(!confirm("거절하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
responseMessage(msg.id, false);
|
||||
});
|
||||
|
||||
if($existMsg.length){
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
return $msg;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(addFront){
|
||||
$msgBoard.prepend($msgs);
|
||||
}
|
||||
else{
|
||||
$msgBoard.find('.load_old_message').before($msgs);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
deferred
|
||||
.then(checkErasable)
|
||||
.then(checkClear)
|
||||
.then(registerSequence)
|
||||
.then(refineMessageObjs)
|
||||
.then(printTemplate);
|
||||
}
|
||||
|
||||
function refreshMailboxList(obj){
|
||||
//$.ajax는 data, textStatus, jqXHR를 가진다
|
||||
//when으로 묶었으므로 data를 풀어야함.
|
||||
obj = obj[0];
|
||||
|
||||
|
||||
var $mailboxList = $('#mailbox_list');
|
||||
|
||||
$mailboxList.change(function(){
|
||||
console.log($(this).val());
|
||||
})
|
||||
|
||||
var oldSelected = $mailboxList.val();
|
||||
|
||||
$mailboxList.empty();
|
||||
|
||||
var $lastContact = $('#last_contact');
|
||||
var lastContact = null;
|
||||
if($lastContact.length > 0 && $lastContact.val()>=0){
|
||||
lastContact = {
|
||||
id:$lastContact.val(),
|
||||
textName:$lastContact.html()
|
||||
};
|
||||
$lastContact = null;
|
||||
}
|
||||
|
||||
generalList = {};
|
||||
|
||||
|
||||
obj.nation.sort(function(lhs, rhs){
|
||||
if(lhs.mailbox == myNation.mailbox){
|
||||
return -1;
|
||||
}
|
||||
if(rhs.mailbox == myNation.mailbox){
|
||||
return 1;
|
||||
}
|
||||
return lhs.mailbox - rhs.mailbox;
|
||||
})
|
||||
|
||||
$.each(obj.nation, function(){
|
||||
var nation = this;
|
||||
//console.log(nation);
|
||||
var $optgroup = $('<optgroup label="{0}"></optgroup>'.format(nation.name));
|
||||
$optgroup.css('background-color', nation.color);
|
||||
|
||||
if(myNation.mailbox == nation.mailbox){
|
||||
myNation.color = nation.color;
|
||||
}
|
||||
|
||||
if(isBrightColor(nation.color)){
|
||||
$optgroup.css('color', 'black');
|
||||
}
|
||||
else{
|
||||
$optgroup.css('color', 'white');
|
||||
}
|
||||
|
||||
nation.general.sort(function(lhs, rhs){
|
||||
if(lhs[1] < rhs[1]){
|
||||
return -1;
|
||||
}
|
||||
if(lhs[1] > rhs[1]){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
$.each(nation.general, function(){
|
||||
var generalID = this[0];
|
||||
var generalName = this[1];
|
||||
var isNPC = !!(this[2] & 0x2);
|
||||
var isRuler = !!(this[2] & 0x1);
|
||||
var isAmbassador = !!(this[2] & 0x4);
|
||||
|
||||
|
||||
|
||||
if(generalID == myGeneralID){
|
||||
return true;
|
||||
}
|
||||
|
||||
var textName = generalName;
|
||||
if(isRuler){
|
||||
textName = '*{0}*'.format(textName);
|
||||
}
|
||||
else if(isAmbassador){
|
||||
textName = '#{0}#'.format(textName);
|
||||
}
|
||||
|
||||
generalList[generalID] = {
|
||||
id:generalID,
|
||||
name:generalName,
|
||||
textName:textName,
|
||||
isRuler:isRuler,
|
||||
nation:nation.nationID,
|
||||
color:nation.color
|
||||
};
|
||||
|
||||
var $item = $('<option value="{0}">{1}</option>'.format(generalID, textName));
|
||||
|
||||
if(permissionLevel == 4 && isAmbassador && myNation.mailbox != nation.mailbox){
|
||||
$item.prop('disabled', true);
|
||||
}
|
||||
$optgroup.append($item);
|
||||
});
|
||||
|
||||
$mailboxList.append($optgroup);
|
||||
});
|
||||
|
||||
var $favorite = $('<optgroup label="즐겨찾기"></optgroup>');
|
||||
|
||||
//아국메시지, 전체메시지
|
||||
var $ourCountry = $('<option value="{0}">【 아국 메세지 】</option>'.format(myNation.mailbox))
|
||||
.css({'background-color':myNation.color, 'color':isBrightColor(myNation.color)?'black':'white'});
|
||||
var $toPublic = $('<option value="9999">【 전체 메세지 】</option>');
|
||||
$favorite.append($ourCountry);
|
||||
$favorite.append($toPublic);
|
||||
|
||||
$lastContact = $('<option id="last_contact" value="-1"></option>').hide();
|
||||
if(lastContact){
|
||||
$lastContact.show().val(lastContact.id).html(lastContact.textName);
|
||||
}
|
||||
$favorite.append($lastContact);
|
||||
//TODO:운영자를 추가하는 코드도 넣을 것.
|
||||
|
||||
if(permissionLevel >= 4){
|
||||
$.each(obj.nation, function(){
|
||||
var nation = this;
|
||||
//console.log(nation);
|
||||
var $nation = $('<option value="{0}">{1}</option>'.format(nation.mailbox,nation.name));
|
||||
$nation.css('background-color', nation.color);
|
||||
|
||||
if(isBrightColor(nation.color)){
|
||||
$nation.css('color', 'black');
|
||||
}
|
||||
else{
|
||||
$nation.css('color', 'white');
|
||||
}
|
||||
$favorite.append($nation);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$mailboxList.prepend($favorite);
|
||||
|
||||
if(!oldSelected){
|
||||
$mailboxList.val(myNation.mailbox);
|
||||
}
|
||||
else{
|
||||
$mailboxList.val(oldSelected);
|
||||
}
|
||||
}
|
||||
|
||||
function registerGlobal(basicInfo){
|
||||
|
||||
window.myNation = {
|
||||
'id':basicInfo.myNationID,
|
||||
'mailbox':basicInfo.myNationID+9000,
|
||||
'color':'#000000',
|
||||
'nation':'재야'
|
||||
};
|
||||
window.myGeneralID = basicInfo.generalID;
|
||||
window.isChief = basicInfo.isChief;
|
||||
window.myOfficerLevel = basicInfo.officerLevel;
|
||||
window.permissionLevel = basicInfo.permission;
|
||||
}
|
||||
|
||||
function activateMessageForm(){
|
||||
var $msgInput = $('#msg_input');
|
||||
var $msgSubmit = $('#msg_submit');
|
||||
var $mailboxList = $('#mailbox_list');
|
||||
|
||||
$msgInput.keypress(function (e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if (code == 13) {
|
||||
$msgSubmit.trigger('click');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
$msgSubmit.click(function(){
|
||||
|
||||
var text = $.trim($msgInput.val());
|
||||
$msgInput.val('').focus();
|
||||
|
||||
var targetMailbox = $mailboxList.val();
|
||||
console.log(targetMailbox, text);
|
||||
|
||||
var deferred;
|
||||
|
||||
if(text){
|
||||
deferred = $.ajax({
|
||||
url:'j_msg_submit.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
mailbox:parseInt(targetMailbox),
|
||||
text:text
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
deferred = $.Deferred();
|
||||
deferred.resolve({
|
||||
result:true,
|
||||
reason:'no_text'
|
||||
});
|
||||
}
|
||||
|
||||
deferred.then(refreshMsg);
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
//tmp_template.html은 추후 msg.js에 통합될 수 있음
|
||||
var getTemplate = $.get('js/templates/message.html?12',function(obj){
|
||||
messageTemplate = obj;
|
||||
});
|
||||
|
||||
//basic_info.json은 세션값에 따라 동적으로 바뀌는 데이터임.
|
||||
var basicInfo = $.ajax({
|
||||
url:'j_basic_info.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
}).then(registerGlobal);
|
||||
|
||||
//sender_list.json 은 서버측에선 캐시 가능한 데이터임.
|
||||
var senderList = $.ajax({
|
||||
url: 'j_msg_contact_list.php',
|
||||
type: 'post',
|
||||
dataType:'json',
|
||||
});
|
||||
|
||||
var MessageList = fetchRecentMsg();
|
||||
|
||||
senderList = $.when(senderList, basicInfo)
|
||||
.then(refreshMailboxList)
|
||||
.then(activateMessageForm);
|
||||
|
||||
$.when(MessageList, getTemplate, basicInfo, senderList)
|
||||
.then(function(){
|
||||
redrawMsg(MessageList, true);
|
||||
}).then(function(){
|
||||
$('.load_old_message').click(function(){
|
||||
var $this = $(this);
|
||||
var msgType = $this.data('msg_type');
|
||||
showOldMsg(msgType);
|
||||
})
|
||||
});
|
||||
});
|
||||
@@ -1,167 +0,0 @@
|
||||
jQuery(function($) {
|
||||
|
||||
|
||||
var initCustomCSSForm = function() {
|
||||
var lastTimeOut = null;
|
||||
var $obj = $('#custom_css');
|
||||
var key = 'sam_customCSS';
|
||||
|
||||
var text = localStorage.getItem(key);
|
||||
if (text) {
|
||||
$obj.val(text);
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
if ($obj.on('change keyup paste', function() {
|
||||
var newText = $obj.val();
|
||||
if (text == newText) {
|
||||
return;
|
||||
}
|
||||
if (lastTimeOut) {
|
||||
clearTimeout(lastTimeOut);
|
||||
}
|
||||
$obj.css('background-color', '#222222');
|
||||
lastTimeOut = setTimeout(function() {
|
||||
text = $obj.val();
|
||||
localStorage.setItem(key, text);
|
||||
$obj.css('background-color', 'black');
|
||||
}, 500);
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
$('.load_old_log').click(function() {
|
||||
var $thisBtn = $(this);
|
||||
var logType = $thisBtn.data('log_type');
|
||||
var $last = $('.log_{0}:last'.format(logType));
|
||||
var reqTo = null;
|
||||
if ($last.length) {
|
||||
reqTo = $last.data('seq');
|
||||
}
|
||||
|
||||
$.post({
|
||||
url: 'j_general_log_old.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
to: reqTo,
|
||||
type: logType
|
||||
}
|
||||
}).then(function(data) {
|
||||
if (!data) {
|
||||
return quickReject('로그를 받아오지 못했습니다.');
|
||||
}
|
||||
if (!data.result) {
|
||||
return quickReject('로그를 받아오지 못했습니다. : ' + data.reason);
|
||||
}
|
||||
|
||||
var keys = Object.keys(data.log);
|
||||
if (keys.length > 1 && keys[0] < keys[1]) {
|
||||
keys.reverse();
|
||||
}
|
||||
|
||||
if (keys == 0) {
|
||||
$thisBtn.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var html = [];
|
||||
$.each(keys, function(_, key) {
|
||||
if ($('#log_{0}_{1}'.format(logType, key)).length) {
|
||||
return true;
|
||||
}
|
||||
var item = data.log[key];
|
||||
html.push("<div class='log_{0}' id='log_{0}_{1}' data-seq='{1}'>{2}</div>".format(logType, key, item));
|
||||
});
|
||||
|
||||
$('#{0}Plate'.format(logType)).append(html);
|
||||
}, errUnknown)
|
||||
.fail(function(reason) {
|
||||
alert(reason);
|
||||
location.reload();
|
||||
});
|
||||
})
|
||||
|
||||
initCustomCSSForm();
|
||||
|
||||
|
||||
$('#die_immediately').click(function() {
|
||||
if (!confirm('정말로 삭제하시겠습니까?')) {
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url: 'j_die_immediately.php',
|
||||
dataType: 'json',
|
||||
}).then(function(data) {
|
||||
if (!data) {
|
||||
return quickReject('실패했습니다.');
|
||||
}
|
||||
if (!data.result) {
|
||||
return quickReject(data.reason);
|
||||
}
|
||||
|
||||
location.replace('..');
|
||||
|
||||
}, errUnknown)
|
||||
.fail(function(reason) {
|
||||
alert(reason);
|
||||
location.reload();
|
||||
});
|
||||
return false;
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#vacation').click(function() {
|
||||
if (!confirm('휴가 기능을 신청할까요?')) {
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url: 'j_vacation.php',
|
||||
dataType: 'json',
|
||||
}).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;
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#set_my_setting').click(function() {
|
||||
$.post({
|
||||
url: 'j_set_my_setting.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
tnmt: $('.tnmt:checked').val(),
|
||||
defence_train: $('#defence_train').val(),
|
||||
use_treatment: $('#use_treatment').val(),
|
||||
use_auto_nation_turn: $('#use_auto_nation_turn').val(),
|
||||
}
|
||||
}).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;
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -1,289 +0,0 @@
|
||||
jQuery(function ($) {
|
||||
|
||||
var itemFrame =
|
||||
'<div class="list-group-item list-group-item-action" data-value="{0}">'
|
||||
+ '<i class="fas fa-bars"></i> '
|
||||
+ '{0}'
|
||||
+ '<button class="btn btn-sm float-right btn-secondary py-0 px-1 help-message">'
|
||||
+ '<i class="fas fa-question fa-xs"></i>'
|
||||
+ '</button>' +
|
||||
'</div>';
|
||||
var itemFrameDisabled =
|
||||
'<div class="list-group-item list-group-item-dark">'
|
||||
+ '{0}' +
|
||||
'</div>';
|
||||
|
||||
|
||||
function initPriority(priorityKey, currentPriority, availablePriority) {
|
||||
var $disabledList = $('#{0}Disabled'.format(priorityKey));
|
||||
var $enabledList = $('#{0}'.format(priorityKey));
|
||||
|
||||
$disabledList.empty();
|
||||
$enabledList.empty();
|
||||
|
||||
var usedKey = {};
|
||||
var items = [];
|
||||
$.each(currentPriority, function (key, val) {
|
||||
var $item = $(itemFrame.format(val));
|
||||
usedKey[val] = true;
|
||||
$enabledList.append($item);
|
||||
items.push($item);
|
||||
})
|
||||
|
||||
var $disabled = $(itemFrameDisabled.format('<비활성화 항목들>')).addClass('filtered');
|
||||
$disabledList.append($disabled);
|
||||
|
||||
var lastInfoObj = null;
|
||||
var lastInfoData = null;
|
||||
|
||||
var onChoose = function(evt){
|
||||
//$(evt.item).find('.help-message').popopver('disable');
|
||||
if(lastInfoObj){
|
||||
lastInfoObj.popover('hide');
|
||||
}
|
||||
}
|
||||
|
||||
var onUnchoose = function(evt){
|
||||
var $item = $(evt.item);//.find('.help-message').popopver('enable');
|
||||
var $helpMessage = $item.find('.help-message');
|
||||
if(!$helpMessage.length){
|
||||
return;
|
||||
}
|
||||
if(lastInfoData != $item.data('value')){
|
||||
$helpMessage.popover('show')
|
||||
lastInfoData = $item.data('value');
|
||||
lastInfoObj = $helpMessage;
|
||||
}
|
||||
else{
|
||||
$helpMessage.popover('hide');
|
||||
lastInfoData = null;
|
||||
lastInfoObj = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.each(availablePriority, function (key, val) {
|
||||
if (val in usedKey) {
|
||||
return true;
|
||||
}
|
||||
var $item = $(itemFrame.format(val));
|
||||
$disabledList.append($item);
|
||||
items.push($item);
|
||||
})
|
||||
|
||||
$disabledList.sortable({
|
||||
group: priorityKey,
|
||||
filter: '.filtered',
|
||||
onChoose,onChoose,
|
||||
onUnchoose:onUnchoose,
|
||||
animation: 150
|
||||
});
|
||||
|
||||
$enabledList.sortable({
|
||||
group: priorityKey,
|
||||
filter: '.filtered',
|
||||
onChoose,onChoose,
|
||||
onUnchoose:onUnchoose,
|
||||
animation: 150
|
||||
});
|
||||
|
||||
$.each(items, function(key, $item){
|
||||
var itemValue = $item.data('value');
|
||||
if(!(itemValue in btnHelpMessage)){
|
||||
return true;
|
||||
}
|
||||
|
||||
var helpText = btnHelpMessage[itemValue];
|
||||
var $helpMessage = $item.find('.help-message');
|
||||
$helpMessage.popover({
|
||||
content:helpText,
|
||||
placement:'top',
|
||||
html:true,
|
||||
trigger:'hover'
|
||||
});
|
||||
$item.mouseleave(function(){
|
||||
$helpMessage.popover('hide');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function initNationPolicy() {
|
||||
$.each(currentNationPolicy, function (key, val) {
|
||||
var $obj = $('#{0}'.format(key));
|
||||
|
||||
if (!$obj.length) {
|
||||
console.log('{0}가 없대!'.format(key));
|
||||
return true;
|
||||
}
|
||||
|
||||
var type = $obj.data('type');
|
||||
if (!$obj.is('input')) {
|
||||
console.log('아니라고?');
|
||||
return true;
|
||||
}
|
||||
|
||||
if (type == 'percent') {
|
||||
$obj.val(val * 100);
|
||||
}
|
||||
else if (type == 'json') {
|
||||
$obj.val(JSON.stringify(val));
|
||||
}
|
||||
else {
|
||||
$obj.val(val);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
|
||||
initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
|
||||
initNationPolicy();
|
||||
|
||||
|
||||
$('.reset_btn').click(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if (!confirm('서버 초기 설정으로 되돌릴까요?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var type = $this.parents('.control_bar').data('type');
|
||||
if (type === 'nationPolicy') {
|
||||
window.currentNationPolicy = window.defaultNationPolicy;
|
||||
initNationPolicy();
|
||||
}
|
||||
else if (type === 'generalPriority') {
|
||||
window.currentGeneralActionPriority = window.defaultGeneralActionPriority;
|
||||
initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
|
||||
}
|
||||
else if (type === 'nationPriority') {
|
||||
window.currentNationPriority = window.defaultNationPriority;
|
||||
initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
|
||||
}
|
||||
|
||||
$.toast({
|
||||
title: '초기화 완료',
|
||||
content: '서버 초기값을 적용했습니다. 설정 버튼을 누르면 반영됩니다.',
|
||||
type: 'info',
|
||||
delay: 5000
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.revert_btn').click(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if (!confirm('이전 설정으로 되돌릴까요?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var type = $this.parents('.control_bar').data('type');
|
||||
if (type === 'nationPolicy') {
|
||||
initNationPolicy();
|
||||
}
|
||||
|
||||
if (type === 'generalPriority') {
|
||||
initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
|
||||
}
|
||||
|
||||
if (type === 'nationPriority') {
|
||||
initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
|
||||
}
|
||||
|
||||
$.toast({
|
||||
title: '되돌리기 완료',
|
||||
content: '이전 설정으로 되돌렸습니다.',
|
||||
type: 'info',
|
||||
delay: 5000
|
||||
});
|
||||
});
|
||||
|
||||
var collectPriority = function (priorityKey) {
|
||||
var $list = $('#{0}'.format(priorityKey));
|
||||
var result = [];
|
||||
$list.find('.list-group-item').each(function () {
|
||||
var $item = $(this);
|
||||
result.push($item.data('value'));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
var collectNationPolicy = function () {
|
||||
var src = window.currentNationPolicy;
|
||||
var result = {};
|
||||
$.each(src, function (key, val) {
|
||||
var $item = $('#{0}'.format(key));
|
||||
var val = $item.val();
|
||||
var dataType = $item.data('type');
|
||||
if (dataType === 'percent') {
|
||||
val /= 100;
|
||||
}
|
||||
else if (dataType === 'json') {
|
||||
val = JSON.parse(val);
|
||||
}
|
||||
else if (dataType === 'integer') {
|
||||
val = parseInt(val);
|
||||
}
|
||||
result[key] = val;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
window.collectNationPolicy = collectNationPolicy;
|
||||
|
||||
$('.submit_btn').click(function () {
|
||||
var $this = $(this);
|
||||
if (!confirm('저장할까요?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var type = $this.parents('.control_bar').data('type');
|
||||
var data;
|
||||
if (type === 'nationPolicy') {
|
||||
data = collectNationPolicy();
|
||||
}
|
||||
else if (type === 'nationPriority') {
|
||||
data = collectPriority(type);
|
||||
}
|
||||
else if (type === 'generalPriority') {
|
||||
data = collectPriority(type);
|
||||
}
|
||||
else {
|
||||
alert('올바르지 않은 type : {0}'.type);
|
||||
return false;
|
||||
}
|
||||
console.log(data);
|
||||
|
||||
$.post({
|
||||
url: 'j_set_npc_control.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
type: type,
|
||||
data: JSON.stringify(data)
|
||||
}
|
||||
}).then(function (data) {
|
||||
if (!data) {
|
||||
return quickReject('설정하지 못했습니다.');
|
||||
}
|
||||
if (!data.result) {
|
||||
return quickReject('설정하지 못했습니다. : ' + data.reason);
|
||||
}
|
||||
$.toast({
|
||||
title: '적용 완료',
|
||||
content: 'NPC 정책이 반영되었습니다.',
|
||||
type: 'success',
|
||||
delay: 5000
|
||||
});
|
||||
}, errUnknownToast)
|
||||
.fail(function (reason) {
|
||||
$.toast({
|
||||
title: '에러!',
|
||||
content: reason,
|
||||
type: 'danger',
|
||||
delay: 5000
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
@@ -1,245 +0,0 @@
|
||||
function reserveTurn(turnList, command, arg) {
|
||||
var target;
|
||||
if (isChiefTurn) {
|
||||
target = 'j_set_chief_command.php';
|
||||
} else {
|
||||
target = 'j_set_general_command.php';
|
||||
}
|
||||
$.post({
|
||||
url: target,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: command,
|
||||
turnList: turnList,
|
||||
arg: JSON.stringify(arg)
|
||||
}
|
||||
}).then(function(data) {
|
||||
if (!data.result) {
|
||||
alert(data.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isChiefTurn) {
|
||||
window.location.href = './';
|
||||
} else {
|
||||
window.location.href = 'b_chiefcenter.php';
|
||||
}
|
||||
|
||||
}, errUnknown);
|
||||
}
|
||||
|
||||
jQuery(function($) {
|
||||
|
||||
window.submitAction = function() {
|
||||
|
||||
//checkCommandArg 참고
|
||||
var availableArgumentList = {
|
||||
'string': [
|
||||
'nationName', 'optionText', 'itemType', 'nationType', 'itemCode', 'commandType',
|
||||
],
|
||||
'int': [
|
||||
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
|
||||
'amount', 'colorType',
|
||||
'year', 'month',
|
||||
'srcArmType', 'destArmType', //숙련전환 전용
|
||||
],
|
||||
'boolean': [
|
||||
'isGold', 'buyRice',
|
||||
],
|
||||
'integerArray': [
|
||||
'destNationIDList', 'destGeneralIDList', 'amountList'
|
||||
]
|
||||
}
|
||||
|
||||
var handlerList = {
|
||||
'string': function($obj) {
|
||||
return $.trim($obj.eq(0).val());
|
||||
},
|
||||
'int': function($obj) {
|
||||
return parseInt($obj.eq(0).val());
|
||||
},
|
||||
'boolean': function($obj) {
|
||||
switch ($obj.eq(0).val().toLowerCase()) {
|
||||
case "true":
|
||||
case "yes":
|
||||
case "1":
|
||||
return true;
|
||||
case "false":
|
||||
case "no":
|
||||
case "0":
|
||||
return false;
|
||||
default:
|
||||
throw new Error("Boolean.parse: Cannot convert string to boolean.");
|
||||
}
|
||||
},
|
||||
'integerArray': function($obj) {
|
||||
var result = [];
|
||||
$obj.each(function() {
|
||||
result.push(parseInt($(this).val()));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
var argument = {};
|
||||
for (var typeName in availableArgumentList) {
|
||||
availableArgumentList[typeName].forEach(function(argName) {
|
||||
var $obj = $('#' + argName);
|
||||
if ($obj.length == 0) {
|
||||
$obj = $('.' + argName);
|
||||
if ($obj.length == 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
argument[argName] = handlerList[typeName]($obj);
|
||||
});
|
||||
}
|
||||
|
||||
console.log(argument);
|
||||
reserveTurn(turnList, command, argument);
|
||||
};
|
||||
|
||||
$('#commonSubmit').click(submitAction);
|
||||
|
||||
var $colorType = $('#colorType');
|
||||
if ($colorType.length) {
|
||||
$colorType.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "색상을 선택해 주세요.",
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
templateSelection: function(item) {
|
||||
if (item.disabled) {
|
||||
return item.text;
|
||||
}
|
||||
var bgcolor = item.element.dataset.color;
|
||||
var fgcolor = item.element.dataset.fontColor;
|
||||
return $("<span><span style='background-color:{0};color:{1};'> </span> {2}</span>".format(
|
||||
bgcolor, fgcolor, item.text
|
||||
));
|
||||
},
|
||||
templateResult: function(item) {
|
||||
if (item.disabled) {
|
||||
return item.text;
|
||||
}
|
||||
var bgcolor = item.element.dataset.color;
|
||||
var fgcolor = item.element.dataset.fontColor;
|
||||
return $("<div style='padding: 0.75rem 0.375rem; background-color:{0};color:{1};'>{2}</div>".format(
|
||||
bgcolor, fgcolor, item.text
|
||||
));
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'no-padding simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $nationType = $('#nationType');
|
||||
if ($nationType.length) {
|
||||
$nationType.select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $destCityID = $('#destCityID');
|
||||
if ($destCityID.length) {
|
||||
$destCityID.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "도시를 선택해 주세요.",
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $destNationID = $('#destNationID');
|
||||
if ($destNationID.length) {
|
||||
$destNationID.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "국가를 선택해 주세요.",
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $destGeneralID = $('#destGeneralID');
|
||||
if ($destGeneralID.length) {
|
||||
$destGeneralID.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "장수를 선택해 주세요.",
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $isGold = $('#isGold');
|
||||
if ($isGold.length) {
|
||||
$isGold.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "분량을 지정해 주세요.",
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
minimumResultsForSearch: -1,
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
});
|
||||
}
|
||||
|
||||
var $amount = $('#amount:not([type=hidden])');
|
||||
if ($amount.length) {
|
||||
$amount.select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: "분량을 지정해 주세요.",
|
||||
allowClear: false,
|
||||
language: "ko",
|
||||
containerCss: {
|
||||
display: "inline-block !important",
|
||||
color: 'white !important',
|
||||
},
|
||||
tags: true,
|
||||
sorter: function(items) {
|
||||
items.sort(function(lhs, rhs) {
|
||||
return parseInt(lhs.id) - parseInt(rhs.id);
|
||||
})
|
||||
return items;
|
||||
},
|
||||
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||
dropdownCssClass: 'select2-only-number simple-select2-align-center bg-secondary text-secondary',
|
||||
})
|
||||
}
|
||||
|
||||
$(document).on('keypress', '.select2-only-number .select2-search__field', function() {
|
||||
$(this).val($(this).val().replace(/[^\d].+/, ""));
|
||||
if ((event.which < 48 || event.which > 57)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,97 +0,0 @@
|
||||
window.calc = function(id) {
|
||||
var $obj = $('#crewType{0}'.format(id));
|
||||
var crew = $obj.find('.form_double').val();
|
||||
var baseCost = $obj.data('cost');
|
||||
var $cost = $obj.find('.form_cost');
|
||||
|
||||
var cost = crew * baseCost;
|
||||
if(window.is모병){
|
||||
cost *= 2;
|
||||
}
|
||||
$cost.val(Math.round(cost));
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
|
||||
var $postForm = $('#post_form');
|
||||
var $formAmount = $('#amount');
|
||||
var $formCrewtype = $('#crewType');
|
||||
$('.form_double').on('keyup change',function(e){
|
||||
var $this = $(this);
|
||||
var $parent = $this.parents('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
calc(crewtype);
|
||||
$formCrewtype.val(crewtype);
|
||||
$formAmount.val($this.val()*100);
|
||||
|
||||
if(e.which === 13){
|
||||
submitAction();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_half').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = Math.round(leadership / 2);
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_fill').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = Math.ceil((leadership*100 - currentCrew)/100);
|
||||
if(crewtype != currentCrewType){
|
||||
fillValue = leadership;
|
||||
}
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_full').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = fullLeadership + 15;
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.submit_btn').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('tr').find('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double');
|
||||
|
||||
$formCrewtype.val(crewtype);
|
||||
$formAmount.val($input.val()*100);
|
||||
|
||||
submitAction();
|
||||
});
|
||||
|
||||
$('.btn_fill').click();
|
||||
|
||||
$('#show_unavailable_troops').change(function(){
|
||||
var show = $('#show_unavailable_troops').is(":checked");
|
||||
if(show){
|
||||
$('.show_default_false').show();
|
||||
}
|
||||
else{
|
||||
$('.show_default_false').hide();
|
||||
}
|
||||
});
|
||||
$('.show_default_false').hide();
|
||||
});
|
||||
@@ -1,210 +0,0 @@
|
||||
var templateGeneralCard = '<div class="general_card">\
|
||||
<h4 class="bg1 with_border"><%generalName%></h4>\
|
||||
<h4><img src="<%iconPath%>" height=64 width=64></h4><p>\
|
||||
<%if(leadership){%>\
|
||||
<%leadership%> / <%strength%> / <%intel%><br>\
|
||||
<%}%>\
|
||||
<%if(personalText){%><%personalText%><br><%}%>\
|
||||
<%if(specialDomesticText||specialWarText){%>\
|
||||
<%specialDomesticText%> / <%specialWarText%><br>\
|
||||
<%}%>\
|
||||
<%if(dex){%><br>\
|
||||
보병: <%parseInt(dex[0]/1000)%>K<br>\
|
||||
궁병: <%parseInt(dex[1]/1000)%>K<br>\
|
||||
기병: <%parseInt(dex[2]/1000)%>K<br>\
|
||||
귀병: <%parseInt(dex[3]/1000)%>K<br>\
|
||||
차병: <%parseInt(dex[4]/1000)%>K<br>\
|
||||
<%}%>\
|
||||
</p>\
|
||||
<button type="subject" class="with_skin with_border select_btn" data-name="<%generalName%>" value="<%uniqueName%>" name="pick">선택하기</button>\
|
||||
</div>';
|
||||
|
||||
var templateSpecial =
|
||||
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
|
||||
<span class="tooltiptext">\
|
||||
<%info%>\
|
||||
</span>\
|
||||
</span>\
|
||||
';
|
||||
|
||||
function pickGeneral() {
|
||||
$btn = $(this);
|
||||
|
||||
|
||||
if (hasGeneralID) {
|
||||
if (!confirm('이 장수를 선택할까요? : {0}'.format($btn.data('name')))) {
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url: 'j_update_picked_general.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
pick: $btn.val()
|
||||
}
|
||||
}).then(function(result) {
|
||||
if (!result.result) {
|
||||
alert(result.reason);
|
||||
location.refresh();
|
||||
}
|
||||
|
||||
alert('선택한 장수로 변경했습니다.');
|
||||
location.href = './';
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
currentGeneralInfo = cards[$btn.val()];
|
||||
var $card = $btn.closest('.general_card');
|
||||
|
||||
var $leftPad = $('#left_pad');
|
||||
$leftPad.empty();
|
||||
$card.clone().appendTo($leftPad);
|
||||
initTooltip($leftPad);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function buildGeneral() {
|
||||
if (!currentGeneralInfo) {
|
||||
alert('장수를 선택해주세요!');
|
||||
return false;
|
||||
}
|
||||
if (!confirm('이 장수로 생성할까요?')) {
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url: 'j_select_picked_general.php',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
pick: currentGeneralInfo.uniqueName,
|
||||
use_own_picture: $('#use_own_picture').is(':checked'),
|
||||
leadership: parseInt($('#leadership').val()),
|
||||
strength: parseInt($('#leadership').val()),
|
||||
intel: parseInt($('#leadership').val()),
|
||||
personal: $('#selChar').val()
|
||||
}
|
||||
}).then(function(result) {
|
||||
if (!result.result) {
|
||||
alert(result.reason);
|
||||
location.refresh();
|
||||
}
|
||||
|
||||
alert('선택한 장수로 생성했습니다.');
|
||||
location.href = './';
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateOutdateTimer() {
|
||||
var $validUntilText = $('#valid_until_text');
|
||||
var now = Date.now();
|
||||
var validUntil = $validUntilText.data('until');
|
||||
if (validUntil <= 0) {
|
||||
return;
|
||||
} else if (validUntil < now) {
|
||||
$validUntilText.data('until', 0);
|
||||
$('#valid_until').hide();
|
||||
$('#outdate_token').show();
|
||||
return;
|
||||
} else if (validUntil - now <= 30000) {
|
||||
$validUntilText.css('color', "rgb(255, {0}, {0})".format(255 * (validUntil - now) / 30000));
|
||||
}
|
||||
|
||||
setTimeout(updateOutdateTimer, 1000);
|
||||
}
|
||||
|
||||
function printGenerals(value) {
|
||||
$('.card_holder').empty();
|
||||
$('#valid_until').show();
|
||||
$('#valid_until_text').html(value.validUntil).data('until', (new Date(value.validUntil)).getTime()).css('color', 'white');
|
||||
$('#outdate_token').hide();
|
||||
|
||||
var pick = $.map(value.pick, function(value, key) {
|
||||
return value;
|
||||
});
|
||||
|
||||
var emptyCard = {
|
||||
'leadership': null,
|
||||
'strength': null,
|
||||
'intel': null,
|
||||
'personalText': null,
|
||||
'specialDomesticText': null,
|
||||
'specialWarText': null,
|
||||
'dex': null
|
||||
};
|
||||
|
||||
$.each(pick, function(idx, cardData) {
|
||||
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
|
||||
if (cardData.specialDomestic !== undefined) {
|
||||
cardData.specialDomesticText = TemplateEngine(templateSpecial, {
|
||||
text: cardData.specialDomesticName,
|
||||
info: cardData.specialDomesticInfo
|
||||
});
|
||||
cardData.specialWarText = '-';
|
||||
}
|
||||
|
||||
if (cardData.specialWar !== undefined) {
|
||||
cardData.specialWarText = TemplateEngine(templateSpecial, {
|
||||
text: cardData.specialWarName,
|
||||
info: cardData.specialWarInfo
|
||||
});
|
||||
if (cardData.specialDomesticText === undefined) {
|
||||
cardData.specialDomesticText = '-';
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME: ego로 적었던것 같음!
|
||||
if (cardData.personal in characterInfo) {
|
||||
cardData.personalText = TemplateEngine(templateSpecial, {
|
||||
text: characterInfo[cardData.personal].name,
|
||||
info: characterInfo[cardData.personal].info
|
||||
});
|
||||
} else {
|
||||
cardData.personalText = cardData.personal;
|
||||
}
|
||||
|
||||
cards[cardData.uniqueName] = cardData;
|
||||
|
||||
var $card = $(TemplateEngine(templateGeneralCard, $.extend({}, emptyCard, cardData)));
|
||||
|
||||
$('.card_holder').append($card);
|
||||
$card.find('.select_btn').click(pickGeneral);
|
||||
$card.find('.obj_tooltip').tooltip({
|
||||
title: function() {
|
||||
return $.trim($(this).find('.tooltiptext').html());
|
||||
},
|
||||
html: true
|
||||
});
|
||||
});
|
||||
|
||||
updateOutdateTimer();
|
||||
}
|
||||
|
||||
|
||||
$(function($) {
|
||||
$.post('j_get_select_pool.php').then(function(value) {
|
||||
if (!value.result) {
|
||||
alert(value.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(value);
|
||||
printGenerals(value);
|
||||
});
|
||||
|
||||
if (hasGeneralID) {
|
||||
$('#create_plate').hide();
|
||||
}
|
||||
|
||||
$('#build_general').on('click', buildGeneral);
|
||||
|
||||
$.each(validCustomOption, function(idx, value) {
|
||||
if (value == 'picture') {
|
||||
$('.custom_picture').show();
|
||||
} else if (value == 'ego') {
|
||||
$('.custom_personality').show();
|
||||
} else if (value == 'stat') {
|
||||
$('.custom_stat').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,48 +0,0 @@
|
||||
<div
|
||||
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>"
|
||||
id="msg_<%id%>"
|
||||
data-id="<%id%>"
|
||||
>
|
||||
<div class="msg_icon">
|
||||
<%if(src.icon){ %>
|
||||
<img class='generalIcon' width='64' height='64' src="<%encodeURI(src.icon)%>">
|
||||
<%} else {%>
|
||||
<img class='generalIcon' width='64' height='64' src="<%encodeURI(defaultIcon)%>">
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="msg_body">
|
||||
<div class="msg_header">
|
||||
<%if(!this.option.action && src.id == myGeneralID && now <= last5min && invalidType == 'msg_valid' && !deletable){%>
|
||||
<button type="button" data-erase_until="<%last5min%>" class="btn btn btn-outline-warning btn-sm btn-delete-msg" style='float:right'>❌</button>
|
||||
<%}%>
|
||||
<%if(msgType == 'private') {%>
|
||||
<%if(src.name == generalName){%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;">나</span
|
||||
><span class="msg_from_to">▶</span
|
||||
><span class="msg_target msg_<%dest.colorType%>" style="background-color:<%dest.color%>;"><%e(dest.name)%>:<%dest.nation%></span>
|
||||
<%}else{%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;"><%e(src.name)%>:<%src.nation%></span
|
||||
><span class="msg_from_to">▶</span
|
||||
><span class="msg_target msg_<%dest.colorType%>" style="background-color:<%dest.color%>;">나</span>
|
||||
<%}%>
|
||||
<%} else if(msgType == 'national' && src.nation_id == dest.nation_id){%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;"><%e(src.name)%></span>
|
||||
<%} else if(msgType == 'national' || msgType == 'diplomacy'){%>
|
||||
<%if(src.nation_id == nationID){%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;"><%e(src.name)%></span
|
||||
><span class="msg_from_to">▶</span
|
||||
><span class="msg_target msg_<%dest.colorType%>" style="background-color:<%dest.color%>;"><%dest.nation%></span>
|
||||
<%}else{%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;"><%e(src.name)%>:<%src.nation%></span
|
||||
><span class="msg_from_to"></span>
|
||||
<%}%>
|
||||
<%} else {%>
|
||||
<span class="msg_target msg_<%src.colorType%>" style="background-color:<%src.color%>;"><%e(src.name)%>:<%src.nation%></span>
|
||||
<%} %>
|
||||
<span class="msg_time"><<%e(time)%>></span>
|
||||
</div>
|
||||
<div class="msg_content <%invalidType%>"><%linkifyStr(text)%></div>
|
||||
<%if(this.option && this.option.action) {%>
|
||||
<div class="msg_prompt">
|
||||
<button type="button" class="prompt_yes btn_prompt" <%allowButton?'':'disabled="disabled"'%>>수락</button> <button type="button" class="prompt_no btn_prompt" <%allowButton?'':'disabled="disabled"'%>>거절</button>
|
||||
</div><%} %></div></div>
|
||||
+12
-2
@@ -43,7 +43,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
|
||||
$iterDefender = new \ArrayIterator($defenderList);
|
||||
$iterDefender->rewind();
|
||||
|
||||
$getNextDefender = function(?WarUnit $prevDefender, bool $reqNext) use ($iterDefender, $rawDefenderNation, $db) {
|
||||
$getNextDefender = function(?WarUnit $prevDefender, bool $reqNext) use ($iterDefender, $rawDefenderNation, $rawDefenderCity, $db) {
|
||||
if($prevDefender !== null){
|
||||
$prevDefender->applyDB($db);
|
||||
}
|
||||
@@ -57,6 +57,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
|
||||
}
|
||||
|
||||
$nextDefender = $iterDefender->current();
|
||||
$nextDefender->setRawCity($rawDefenderCity);
|
||||
if(extractBattleOrder($nextDefender) <= 0){
|
||||
return null;
|
||||
}
|
||||
@@ -260,6 +261,15 @@ function processWar_NG(
|
||||
|
||||
$attacker->addTrain(1);
|
||||
$defender->addTrain(1);
|
||||
|
||||
$attackerCrewTypeCoef = $attacker->getCrewType()->getAttackCoef($defender->getCrewType()) * $defender->getCrewType()->getDefenceCoef($attacker->getCrewType());
|
||||
$defenderCrewTypeCoef = $defender->getCrewType()->getAttackCoef($attacker->getCrewType()) * $attacker->getCrewType()->getDefenceCoef($defender->getCrewType());
|
||||
if($attackerCrewTypeCoef > $defenderCrewTypeCoef && $attacker instanceof WarUnitGeneral){
|
||||
$attacker->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
|
||||
}
|
||||
if($defenderCrewTypeCoef > $attackerCrewTypeCoef && $defender instanceof WarUnitGeneral){
|
||||
$defender->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
|
||||
}
|
||||
|
||||
$attackerName = $attacker->getName();
|
||||
$attackerCrewTypeName = $attacker->getCrewTypeName();
|
||||
@@ -521,7 +531,7 @@ function ConquerCity(array $admin, General $general, array $city) {
|
||||
|
||||
$lord = new General($db->queryFirstRow(
|
||||
'SELECT %l FROM general WHERE nation = %i AND officer_level = %i LIMIT 1',
|
||||
Util::formatListOfBackticks(General::mergeQueryColumn(['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1)[0]),
|
||||
Util::formatListOfBackticks(General::mergeQueryColumn(['npc', 'gold', 'rice', 'experience', 'explevel', 'belong', 'dedication', 'dedlevel', 'aux'], 1)[0]),
|
||||
$defenderNationID,
|
||||
12
|
||||
), null, $city, $loseNation, $year, $month, false);
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>최근 지도</title>
|
||||
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||
<?= WebUtil::printStaticValues([
|
||||
'serverNick' => DB::prefix(),
|
||||
'serverID' => UniqueConst::$serverID
|
||||
]) ?>
|
||||
<?= WebUtil::printJS('dist_js/vendors.js') ?>
|
||||
<?= WebUtil::printJS('d_shared/base_map.js') ?>
|
||||
<?= WebUtil::printJS('dist_js/recent_map.js') ?>
|
||||
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
|
||||
<?= WebUtil::printCSS('css/common.css') ?>
|
||||
<?= WebUtil::printCSS('css/map.css') ?>
|
||||
<style>
|
||||
html {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
width: 700px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="card" style="width:700px;">
|
||||
<h3 class="card-header">
|
||||
<?= UniqueConst::$serverName ?> 현황
|
||||
</h3>
|
||||
<div class='map-container' style='position:relative;'>
|
||||
<?= getMapHtml() ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -6,4 +6,18 @@ use \sammo\General;
|
||||
class che_명마_07_기주마 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 공격 시 페이즈 +1";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||
if($statName === 'initWarPhase'){
|
||||
return $value + 1;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,26 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_퇴각부상무효;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_명마_07_백마 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 전투 종료로 인한 부상 없음";
|
||||
}
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user