Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a556877a17 | ||
|
|
bcbd6dc4db | ||
|
|
41f7ad8d75 | ||
|
|
258d4b28da | ||
|
|
31e900c422 | ||
|
|
7b1a76871a | ||
|
|
c6f3e7672f | ||
|
|
540c31903c | ||
|
|
3e5262d7a3 | ||
|
|
2b36ffef45 | ||
|
|
4c25d2275c | ||
|
|
6c66fcdfc3 | ||
|
|
aaa972d767 | ||
|
|
45c8538426 | ||
|
|
95702724a9 | ||
|
|
98c4d3853c | ||
|
|
7c91143f39 | ||
|
|
56e6f57568 | ||
|
|
ccab456679 | ||
|
|
5af000ca43 | ||
|
|
354c8f04ae | ||
|
|
3fbd336b45 | ||
|
|
3c0b86a322 | ||
|
|
fca4b69d5a | ||
|
|
ce62072761 | ||
|
|
93dd7a8478 | ||
|
|
02fb84a312 | ||
|
|
f3e68989e5 | ||
|
|
468050a9ce | ||
|
|
f37a602da3 | ||
|
|
2979691d7e | ||
|
|
72920a0432 | ||
|
|
e81075ef04 | ||
|
|
df1a99d877 | ||
|
|
10e825dc9f | ||
|
|
07ba7933fb | ||
|
|
3059eac0fd | ||
|
|
aa33aa6d4f | ||
|
|
0a1cdeeaa3 | ||
|
|
e4bef47b7e | ||
|
|
f551f994b5 | ||
|
|
4b7a3af691 | ||
|
|
6f88a80118 | ||
|
|
e03715ee46 | ||
|
|
aafe6d8863 | ||
|
|
47005483cd | ||
|
|
378075955a | ||
|
|
2059797904 | ||
|
|
8c711242a9 | ||
|
|
481894c89b | ||
|
|
ba53275322 | ||
|
|
cfe2b4c1bd | ||
|
|
60e83f8324 | ||
|
|
ceac040d82 | ||
|
|
89d400c81a | ||
|
|
4cf7bca399 | ||
|
|
761441622e | ||
|
|
1b814abf0b | ||
|
|
62a2147e33 | ||
|
|
246dff9c87 | ||
|
|
50494beb27 | ||
|
|
ce3b3ebfd8 | ||
|
|
213090c32e | ||
|
|
adb8668197 | ||
|
|
0023677003 | ||
|
|
0b19a37ad4 | ||
|
|
9f34ae5d28 | ||
|
|
6f07b5cf08 | ||
|
|
0f39431157 | ||
|
|
bc1a470e64 | ||
|
|
09e24f5684 | ||
|
|
2f27ea4c8a | ||
|
|
d09aba70b7 | ||
|
|
69b0a80684 | ||
|
|
48f0c56a9e | ||
|
|
83833a3693 | ||
|
|
18429d52d4 | ||
|
|
58cc90083b | ||
|
|
2772161144 | ||
|
|
0e95259b14 | ||
|
|
3d9f38f1e3 | ||
|
|
ba3accd834 | ||
|
|
0786e40ebd | ||
|
|
8a56393159 | ||
|
|
5ca8a6ecfa | ||
|
|
5c82edc4be | ||
|
|
093c04bc24 | ||
|
|
131dd46a38 | ||
|
|
6b1b4fdfbb | ||
|
|
e4ad779b37 | ||
|
|
65d817624e | ||
|
|
66501189c4 | ||
|
|
4303898bb8 | ||
|
|
7d76a9d3ed | ||
|
|
1cc42f341b | ||
|
|
0b41ee0a29 | ||
|
|
66b6c4d04f | ||
|
|
6502843d6c | ||
|
|
5ecfe72e19 | ||
|
|
f28cdefffe | ||
|
|
40494f2cf1 | ||
|
|
f2664c112b | ||
|
|
41d91df355 | ||
|
|
965671dd93 | ||
|
|
c8d08e4b2c | ||
|
|
2897a9b484 | ||
|
|
d190e59d83 | ||
|
|
0bb25e8773 | ||
|
|
37e1903cb1 | ||
|
|
b402846d43 | ||
|
|
c1a6dd385a | ||
|
|
ccbef236d3 | ||
|
|
d7b9e8b2e0 | ||
|
|
deaf77d3d0 | ||
|
|
5c738f97ed | ||
|
|
c9f7f7ab08 | ||
|
|
746977d5d0 | ||
|
|
acb09bfe71 | ||
|
|
e2a1203b43 | ||
|
|
124036cea6 | ||
|
|
2ac1d82826 | ||
|
|
fa4e0c1948 | ||
|
|
735427ead0 | ||
|
|
4fa99a7e1b | ||
|
|
2f963a205a | ||
|
|
1f03f7e7c3 | ||
|
|
31689fb6ba | ||
|
|
cf7ebbd314 | ||
|
|
40a953aed5 | ||
|
|
c4d999ada7 | ||
|
|
fff6b4e155 | ||
|
|
380e08d89f | ||
|
|
96c8199092 | ||
|
|
54870cf067 | ||
|
|
8654447aac | ||
|
|
28a690cbba | ||
|
|
52d1a48c0b | ||
|
|
f45333db5e | ||
|
|
c920e45934 | ||
|
|
dd86ef4591 | ||
|
|
b9fb00f042 | ||
|
|
355d9fd995 | ||
|
|
b68c13c4f2 | ||
|
|
f2803291ab | ||
|
|
54df034c77 | ||
|
|
7317b8bc18 | ||
|
|
2f030a6dd6 | ||
|
|
ef0dec32ee | ||
|
|
e7f5850c31 | ||
|
|
d1d81e03d1 | ||
|
|
c65d6565df | ||
|
|
a2d40ecf4a | ||
|
|
7291c828c0 | ||
|
|
01caa625bd | ||
|
|
6cad6f45fe | ||
|
|
a6936ac8d7 | ||
|
|
eb9ae00d24 | ||
|
|
b8c8321757 | ||
|
|
41235bed5d | ||
|
|
7367eb1c45 | ||
|
|
f9d90c38ef | ||
|
|
275d9b1c25 | ||
|
|
663c24b31f | ||
|
|
beb501354d | ||
|
|
ba165239c3 | ||
|
|
e64ef5de84 | ||
|
|
c6bbbe081d | ||
|
|
66dcefc844 | ||
|
|
93d580e74e | ||
|
|
9eb35b55c6 | ||
|
|
d2e052dfa3 | ||
|
|
ddd889c42c | ||
|
|
70da3909a9 | ||
|
|
c398b55f3c | ||
|
|
317c42b384 | ||
|
|
a95903ceff | ||
|
|
98c386622a | ||
|
|
398f54cced | ||
|
|
c337ff2f67 | ||
|
|
d9f6f7956e | ||
|
|
30e2432fc3 | ||
|
|
8238f27dfa | ||
|
|
b00d8f2ebd | ||
|
|
98168c61b3 | ||
|
|
6627797cc6 | ||
|
|
30e54c3d0e | ||
|
|
ee3764f5f5 | ||
|
|
a86e4cf64b | ||
|
|
78ea405e40 | ||
|
|
f99583dc99 | ||
|
|
b9e5ddce94 | ||
|
|
1d28f22577 | ||
|
|
90235660db | ||
|
|
8e12aea3ff | ||
|
|
280ff18526 | ||
|
|
9e88b03438 | ||
|
|
14213ea3cd | ||
|
|
5352a507b2 | ||
|
|
3b382199fc | ||
|
|
67dea49a9b | ||
|
|
8bdca87bf9 | ||
|
|
8085e96fdd | ||
|
|
86b40695e6 | ||
|
|
676f98659a | ||
|
|
2fbf8bc2e2 | ||
|
|
bf233f7552 | ||
|
|
2c3e577c4e | ||
|
|
7270de6775 | ||
|
|
e45f3a7d03 | ||
|
|
742e2e8003 | ||
|
|
4cdec6c393 | ||
|
|
a2d273bdc9 | ||
|
|
a163fbef7f | ||
|
|
ec226ede65 | ||
|
|
771fcbec6a | ||
|
|
ae62669fe8 | ||
|
|
4823795c50 | ||
|
|
a80442399d | ||
|
|
913b308892 | ||
|
|
21837d0869 | ||
|
|
5706fcfb7d | ||
|
|
5bc3b55400 | ||
|
|
ffbe2844e4 | ||
|
|
7776b35cab | ||
|
|
c39794c086 | ||
|
|
6aaa50364b | ||
|
|
d0778550ab | ||
|
|
8cba6ac16a | ||
|
|
0516007130 | ||
|
|
af9df325f0 | ||
|
|
4dd69db652 | ||
|
|
316d466795 | ||
|
|
3fb5b99af3 | ||
|
|
1764504ea3 | ||
|
|
fab0495a39 | ||
|
|
166eafe4ee | ||
|
|
9d6181ede1 | ||
|
|
67ecd514a4 | ||
|
|
52f4b79fdf | ||
|
|
5e74a34d3e | ||
|
|
288be33eac | ||
|
|
451a759cca | ||
|
|
a9052705a8 | ||
|
|
5490e74f04 | ||
|
|
ab5768998b | ||
|
|
b71ae96d66 | ||
|
|
e3528ac82f | ||
|
|
bad5a3c0ef | ||
|
|
bb49e6dec7 | ||
|
|
2d24ba659f | ||
|
|
29ce47251a | ||
|
|
d02a84e87e | ||
|
|
c5d008ec47 | ||
|
|
798be5fd5c | ||
|
|
ab6bb54eae | ||
|
|
ae24d18adb | ||
|
|
dcfb49d927 | ||
|
|
d82ab51d58 | ||
|
|
5166001956 | ||
|
|
aa46fc9668 | ||
|
|
beea13ff4b | ||
|
|
766d0b3ad5 | ||
|
|
64e279d859 | ||
|
|
a3f6a8e8ab | ||
|
|
330853c98d | ||
|
|
776e16b58b | ||
|
|
70b1f23a49 | ||
|
|
5e4493b49a | ||
|
|
dec24e09cf | ||
|
|
95445d8f8a | ||
|
|
683a844a08 | ||
|
|
a75eb5b74e | ||
|
|
5dfb844c7e | ||
|
|
20f991a205 | ||
|
|
3c1c339498 | ||
|
|
5974028c4d | ||
|
|
a534b8f812 | ||
|
|
cb2fbf1a32 | ||
|
|
a1392652ae | ||
|
|
69af23b60a | ||
|
|
063b3d37a6 | ||
|
|
ebf9b4b75d | ||
|
|
45fd06c195 | ||
|
|
7db3675e71 | ||
|
|
a19661199e | ||
|
|
953196ec78 | ||
|
|
d5be6e3e08 | ||
|
|
551b79d8c2 | ||
|
|
95a22f228c | ||
|
|
a242b9a20e | ||
|
|
19e91b2de0 | ||
|
|
eac92293fc | ||
|
|
a1397e41aa | ||
|
|
13fccb998e | ||
|
|
1e54220230 | ||
|
|
6b2000bb39 | ||
|
|
5f3fbdb089 | ||
|
|
63e888c9b1 | ||
|
|
e97e702c2e | ||
|
|
657c35f876 | ||
|
|
bc79250f96 | ||
|
|
dd7846e995 | ||
|
|
8a5483d508 | ||
|
|
805053e921 | ||
|
|
170a32a1bd | ||
|
|
5262d424b4 | ||
|
|
9c3c1045ac | ||
|
|
2d1a3f5da9 | ||
|
|
088260bbc6 | ||
|
|
18ebbbc555 | ||
|
|
80b70a8765 | ||
|
|
d3d4cce8b5 | ||
|
|
76bfcd4fa8 | ||
|
|
7cbe383a8a | ||
|
|
0488ebf071 | ||
|
|
1cfab53472 | ||
|
|
084c7a2626 | ||
|
|
161836a233 | ||
|
|
c86ac7d20f | ||
|
|
20cceec090 | ||
|
|
62c6ba362d | ||
|
|
5ed31881e6 | ||
|
|
647c51fe0f | ||
|
|
a2d3ac9e70 | ||
|
|
20f74f6645 | ||
|
|
0bb1ed6f18 | ||
|
|
2102a852cb | ||
|
|
0cfb80b7bf | ||
|
|
4297ea9e40 | ||
|
|
0ce36e93bd | ||
|
|
18bd5f4246 | ||
|
|
2e7bcd9038 | ||
|
|
bfef0c28bc | ||
|
|
b447065651 | ||
|
|
f540f87e77 | ||
|
|
6ebe3454af | ||
|
|
7e00500870 | ||
|
|
bc37dd1df7 | ||
|
|
77aca09f53 | ||
|
|
23fb1194ee | ||
|
|
6253b757ec | ||
|
|
9122342fb9 | ||
|
|
fb42a32089 | ||
|
|
5c7f4c43ae | ||
|
|
3da256cc29 | ||
|
|
717c576cba | ||
|
|
ddb4011b5d | ||
|
|
48207b9300 | ||
|
|
388afe6fb4 | ||
|
|
99b459766a | ||
|
|
230fc5ba53 | ||
|
|
9c266b7b1c | ||
|
|
603599d666 | ||
|
|
b3cd29ac95 | ||
|
|
a4beab86c2 | ||
|
|
3a84e0d064 | ||
|
|
31f1eb2d28 | ||
|
|
d73c0c6f0c | ||
|
|
36409cf066 | ||
|
|
556e1059f9 | ||
|
|
131a6cb6c3 | ||
|
|
598943eb1b | ||
|
|
bf746393b8 | ||
|
|
70b6997436 | ||
|
|
b26c6a04c0 | ||
|
|
4f262a03e4 | ||
|
|
a0ca3dc3f6 | ||
|
|
f58736277f | ||
|
|
473cae169e | ||
|
|
4b956385bd | ||
|
|
481494a885 | ||
|
|
243604d6c1 | ||
|
|
dc97c71e0b | ||
|
|
e6b4832b5d | ||
|
|
00ac67e8ac | ||
|
|
953b609b32 | ||
|
|
a5875be39b | ||
|
|
0f45de8384 | ||
|
|
d119200287 | ||
|
|
b9fa0bea6e | ||
|
|
3a28180700 | ||
|
|
5b6f456d5c | ||
|
|
fb1ae6ea88 | ||
|
|
50582a0e8b | ||
|
|
8fe3d0258a | ||
|
|
f2537b20de | ||
|
|
31d6850e6e | ||
|
|
31468d5425 | ||
|
|
688b839315 | ||
|
|
fa4c9046fc | ||
|
|
c7560f9113 | ||
|
|
f7e3966310 | ||
|
|
7359237da4 | ||
|
|
d617203c05 | ||
|
|
910526ba44 | ||
|
|
c1842703d7 | ||
|
|
2f9d2e2bc2 | ||
|
|
20d7e005a0 | ||
|
|
0ce5a88e49 | ||
|
|
4af10fb485 | ||
|
|
f872113e99 | ||
|
|
f33fefd188 | ||
|
|
8c2f4f9dc9 | ||
|
|
3b6e7c5c28 | ||
|
|
595c11a9a7 | ||
|
|
1ab7b57885 | ||
|
|
07130e6022 | ||
|
|
2cc2f7eb23 | ||
|
|
c798ac49b9 | ||
|
|
a8796edbd3 | ||
|
|
a4ead74cb2 | ||
|
|
0beb00c5e5 | ||
|
|
3d43690303 | ||
|
|
938c819e9a | ||
|
|
889ced68ed | ||
|
|
de97384424 | ||
|
|
f6ffc20a23 | ||
|
|
c0ec82051f | ||
|
|
91273522c0 | ||
|
|
20a475466d | ||
|
|
10b6a4ff6e | ||
|
|
2a4e59d6e2 | ||
|
|
c016ea7c52 | ||
|
|
00bece9c9c | ||
|
|
44ed61c14e | ||
|
|
002b7ae534 | ||
|
|
63000bdd22 | ||
|
|
20fd52b32d | ||
|
|
7a3064d37b | ||
|
|
7fea0a41c6 | ||
|
|
e701540d7f | ||
|
|
5187ebbf52 | ||
|
|
df26c511b5 | ||
|
|
0e650da34a | ||
|
|
2c382da773 | ||
|
|
e709ee5db8 | ||
|
|
d550415b65 | ||
|
|
9ec144e8f6 | ||
|
|
9458307612 | ||
|
|
915c5fcd8e | ||
|
|
0df1293139 | ||
|
|
9bcd18c42e | ||
|
|
1c853107b7 | ||
|
|
3f21e28ef7 | ||
|
|
61244fcef9 | ||
|
|
03c930ce7d | ||
|
|
f57c4967f2 | ||
|
|
49f40d56b0 | ||
|
|
190fcabbac | ||
|
|
8bccf449ad | ||
|
|
f7dc1a588b | ||
|
|
0eb91c6301 | ||
|
|
0fa4d88ea9 | ||
|
|
18e355b701 | ||
|
|
1cb877503d | ||
|
|
b65e691255 | ||
|
|
a4ee43f12b | ||
|
|
f71c61a55b | ||
|
|
418130f4cd | ||
|
|
1566aa0243 | ||
|
|
ab546f66f0 | ||
|
|
fc021dae54 | ||
|
|
58a7b3afe1 | ||
|
|
72f41df5d2 | ||
|
|
8fd6b91cf7 | ||
|
|
cf2ace32d1 | ||
|
|
05c4f721f2 | ||
|
|
b2096cc274 | ||
|
|
067df49914 | ||
|
|
6961298e53 | ||
|
|
3e6523002c | ||
|
|
c26add7b04 | ||
|
|
12d50fec03 | ||
|
|
a43bbc9f23 | ||
|
|
2bec3b253c | ||
|
|
a69f256168 | ||
|
|
d7fb88eed6 | ||
|
|
bfd79f479e | ||
|
|
7ec3fcc78e | ||
|
|
858a09b429 | ||
|
|
c2298efaf0 |
@@ -15,6 +15,7 @@ d_log/*.txt
|
|||||||
d_log/*.zip
|
d_log/*.zip
|
||||||
sess_*
|
sess_*
|
||||||
*/logs/*.txt
|
*/logs/*.txt
|
||||||
|
*/logs/*/*.txt
|
||||||
err.txt
|
err.txt
|
||||||
che/.htaccess
|
che/.htaccess
|
||||||
kwe/.htaccess
|
kwe/.htaccess
|
||||||
@@ -30,6 +31,7 @@ d_pic/*.png
|
|||||||
|
|
||||||
d_setting/*.php
|
d_setting/*.php
|
||||||
*/d_setting/*.php
|
*/d_setting/*.php
|
||||||
|
*/d_setting/templates/*.php
|
||||||
|
|
||||||
**/old/*
|
**/old/*
|
||||||
test.php
|
test.php
|
||||||
@@ -37,6 +39,9 @@ test.php
|
|||||||
/che
|
/che
|
||||||
/kwe
|
/kwe
|
||||||
/pwe
|
/pwe
|
||||||
|
/nya
|
||||||
|
/pya
|
||||||
/twe
|
/twe
|
||||||
|
|
||||||
phpinfo.php
|
phpinfo.php
|
||||||
|
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
"**/.hg": true,
|
"**/.hg": true,
|
||||||
"**/CVS": true,
|
"**/CVS": true,
|
||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"**/logs/*.txt": true,
|
"**/logs/**/*.txt": true,
|
||||||
"**/session/sess*":true,
|
"**/session/sess*":true,
|
||||||
"/che":true,
|
"/che":true,
|
||||||
"/kwe":true,
|
"/kwe":true,
|
||||||
"/pwe":true,
|
"/pwe":true,
|
||||||
|
"/nya":true,
|
||||||
|
"/pya":true,
|
||||||
"/twe":true,
|
"/twe":true,
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -19,6 +21,8 @@
|
|||||||
"/che":true,
|
"/che":true,
|
||||||
"/kwe":true,
|
"/kwe":true,
|
||||||
"/pwe":true,
|
"/pwe":true,
|
||||||
|
"/nya":true,
|
||||||
|
"/pya":true,
|
||||||
"/twe":true,
|
"/twe":true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
* Apache2
|
* Apache2
|
||||||
* <code>mpm_event</code> 권장
|
* <code>mpm_event</code> 권장
|
||||||
* PHP 7.0 이상
|
* PHP 7.2 이상
|
||||||
* <code>php-fpm</code> 권장
|
* <code>php-fpm</code> 권장
|
||||||
* php에서 curl을 실행가능해야 합니다.
|
* php에서 curl을 실행가능해야 합니다.
|
||||||
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
|
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
|
||||||
@@ -32,13 +32,13 @@ sudo -u www-data git clone ssh://git@storage.hided.net:2525/devsam/core.git
|
|||||||
git clone ssh://git@storage.hided.net:2525/devsam/image.git
|
git clone ssh://git@storage.hided.net:2525/devsam/image.git
|
||||||
```
|
```
|
||||||
|
|
||||||
> 이미지는 별도의 업데이트 기능을 제공하지 않습니다. 수동으로 <code>git pull</code>을 해야합니다.
|
> 이미지는 git hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
|
||||||
|
|
||||||
### 설치
|
### 설치
|
||||||
|
|
||||||
이후 해당 경로를 웹 브라우저를 통해 접근하여 설치를 진행할 수 있습니다.
|
이후 해당 경로를 웹 브라우저를 통해 접근하여 설치를 진행할 수 있습니다.
|
||||||
|
|
||||||
Database 수는 로그인 관리 서버 1개, 내부 서버 5개로, 총 6개의 Database가 필요합니다. 내부 설정을 고쳐서 서버 수를 늘리거나 줄일 경우 그에 맞는 Database 수가 필요합니다. 또한 Database마다 관리할 별도의 계정을 만드는 것을 추천합니다.
|
Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의 Database가 필요합니다. 내부 설정을 고쳐서 서버 수를 늘리거나 줄일 경우 그에 맞는 Database 수가 필요합니다. 또한 Database마다 관리할 별도의 계정을 만드는 것을 추천합니다.
|
||||||
|
|
||||||
설치 이후에는 서버관리 페이지에서 **업데이트** 명령을 통해 원 클릭 업데이트가 가능합니다.
|
설치 이후에는 서버관리 페이지에서 **업데이트** 명령을 통해 원 클릭 업데이트가 가능합니다.
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
"firephp/firephp-core": "^0.4.0",
|
"firephp/firephp-core": "^0.4.0",
|
||||||
"vlucas/valitron": "^1.4",
|
"vlucas/valitron": "^1.4",
|
||||||
"php-extended/php-tail": "^2.1",
|
"php-extended/php-tail": "^2.1",
|
||||||
"pguardiario/phpuri": "^1.0"
|
"pguardiario/phpuri": "^1.0",
|
||||||
|
"symfony/lock": "^4.1",
|
||||||
|
"ezyang/htmlpurifier": "^4.10",
|
||||||
|
"xemlock/htmlpurifier-html5": "^0.1.7"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "1753c2c2ad9fe40ecc5c6ae541dd2e78",
|
"content-hash": "43da7d5e9d8441faa4311f32b16ee1c0",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brandonwamboldt/utilphp",
|
"name": "brandonwamboldt/utilphp",
|
||||||
@@ -52,6 +52,53 @@
|
|||||||
],
|
],
|
||||||
"time": "2015-02-02T17:56:14+00:00"
|
"time": "2015-02-02T17:56:14+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ezyang/htmlpurifier",
|
||||||
|
"version": "v4.10.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||||
|
"reference": "d85d39da4576a6934b72480be6978fb10c860021"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
|
||||||
|
"reference": "d85d39da4576a6934b72480be6978fb10c860021",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"simpletest/simpletest": "^1.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"HTMLPurifier": "library/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"library/HTMLPurifier.composer.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Edward Z. Yang",
|
||||||
|
"email": "admin@htmlpurifier.org",
|
||||||
|
"homepage": "http://ezyang.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Standards compliant HTML filter written in PHP",
|
||||||
|
"homepage": "http://htmlpurifier.org/",
|
||||||
|
"keywords": [
|
||||||
|
"html"
|
||||||
|
],
|
||||||
|
"time": "2018-02-23T01:58:20+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "firephp/firephp-core",
|
"name": "firephp/firephp-core",
|
||||||
"version": "v0.4.0",
|
"version": "v0.4.0",
|
||||||
@@ -90,16 +137,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
"version": "6.3.2",
|
"version": "6.3.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
|
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||||
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
|
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -109,7 +156,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4",
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||||
"psr/log": "^1.0"
|
"psr/log": "^1.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -151,7 +198,7 @@
|
|||||||
"rest",
|
"rest",
|
||||||
"web service"
|
"web service"
|
||||||
],
|
],
|
||||||
"time": "2018-03-26T16:33:04+00:00"
|
"time": "2018-04-22T15:46:56+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
@@ -271,16 +318,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leafo/scssphp",
|
"name": "leafo/scssphp",
|
||||||
"version": "v0.7.5",
|
"version": "v0.7.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/leafo/scssphp.git",
|
"url": "https://github.com/leafo/scssphp.git",
|
||||||
"reference": "8b538d828bbb75276974605c4a1a435e939da74e"
|
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/8b538d828bbb75276974605c4a1a435e939da74e",
|
"url": "https://api.github.com/repos/leafo/scssphp/zipball/585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||||
"reference": "8b538d828bbb75276974605c4a1a435e939da74e",
|
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -319,7 +366,7 @@
|
|||||||
"scss",
|
"scss",
|
||||||
"stylesheet"
|
"stylesheet"
|
||||||
],
|
],
|
||||||
"time": "2018-02-09T02:04:21+00:00"
|
"time": "2018-05-24T02:18:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/plates",
|
"name": "league/plates",
|
||||||
@@ -480,16 +527,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-extended/php-system",
|
"name": "php-extended/php-system",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-extended/php-system.git",
|
"url": "https://gitlab.com/php-extended/php-system.git",
|
||||||
"reference": "66727d5dc0a665916bd7e08bcfb9820e7be1d20c"
|
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-extended/php-system/zipball/66727d5dc0a665916bd7e08bcfb9820e7be1d20c",
|
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-system/repository/archive.zip?sha=9e6b3c2009ef56dc123efc43900e40cdf217ace0",
|
||||||
"reference": "66727d5dc0a665916bd7e08bcfb9820e7be1d20c",
|
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@@ -505,31 +552,31 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Anastaszor",
|
"name": "Anastaszor",
|
||||||
"role": "developer"
|
"role": "Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A generic way to find informations about the running system",
|
"description": "A generic way to find informations about the running system",
|
||||||
"homepage": "https://github.com/php-extended/php-system",
|
"homepage": "https://gitlab.com/php-extended/php-system",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"operating system",
|
"operating system",
|
||||||
"os",
|
"os",
|
||||||
"php",
|
"php",
|
||||||
"system"
|
"system"
|
||||||
],
|
],
|
||||||
"time": "2017-01-14T11:56:24+00:00"
|
"time": "2018-06-07T06:03:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-extended/php-tail",
|
"name": "php-extended/php-tail",
|
||||||
"version": "2.1.1",
|
"version": "2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-extended/php-tail.git",
|
"url": "https://gitlab.com/php-extended/php-tail.git",
|
||||||
"reference": "eabf7bee64f8c30fe9b9e1176562fdb903c54ae7"
|
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-extended/php-tail/zipball/eabf7bee64f8c30fe9b9e1176562fdb903c54ae7",
|
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-tail/repository/archive.zip?sha=19fbd3a79ccc071954f28296b2c44754335304a0",
|
||||||
"reference": "eabf7bee64f8c30fe9b9e1176562fdb903c54ae7",
|
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -548,11 +595,11 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Anastaszor",
|
"name": "Anastaszor",
|
||||||
"role": "developer"
|
"role": "Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A smart way to tail files depending of the environment",
|
"description": "A smart way to tail files depending of the environment",
|
||||||
"homepage": "https://github.com/php-extended/php-tail",
|
"homepage": "https://gitlab.com/php-extended/php-tail",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cheat",
|
"cheat",
|
||||||
"mighty",
|
"mighty",
|
||||||
@@ -560,7 +607,7 @@
|
|||||||
"php",
|
"php",
|
||||||
"tail"
|
"tail"
|
||||||
],
|
],
|
||||||
"time": "2017-07-25T13:52:42+00:00"
|
"time": "2018-06-07T06:04:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
@@ -703,34 +750,98 @@
|
|||||||
"time": "2014-06-16T22:40:22+00:00"
|
"time": "2014-06-16T22:40:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/valitron",
|
"name": "symfony/lock",
|
||||||
"version": "v1.4.2",
|
"version": "v4.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vlucas/valitron.git",
|
"url": "https://github.com/symfony/lock.git",
|
||||||
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6"
|
"reference": "a1df50492e927ad00ca271f29adb2949a14f2a5a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/87775d76268beda2afa085bdd6e44b17e98907c6",
|
"url": "https://api.github.com/repos/symfony/lock/zipball/a1df50492e927ad00ca271f29adb2949a14f2a5a",
|
||||||
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6",
|
"reference": "a1df50492e927ad00ca271f29adb2949a14f2a5a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.1.3",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"predis/predis": "~1.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Lock\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jérémy Derussé",
|
||||||
|
"email": "jeremy@derusse.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony Lock Component",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"cas",
|
||||||
|
"flock",
|
||||||
|
"locking",
|
||||||
|
"mutex",
|
||||||
|
"redlock",
|
||||||
|
"semaphore"
|
||||||
|
],
|
||||||
|
"time": "2018-05-30T07:26:09+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vlucas/valitron",
|
||||||
|
"version": "v1.4.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/vlucas/valitron.git",
|
||||||
|
"reference": "3c5463315bfa23b17f8949b100a960d035234e43"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/vlucas/valitron/zipball/3c5463315bfa23b17f8949b100a960d035234e43",
|
||||||
|
"reference": "3c5463315bfa23b17f8949b100a960d035234e43",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.0"
|
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-mbstring": "It can support the multiple bytes string length."
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"Valitron": "src/"
|
"Valitron\\": "src/Valitron"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@@ -746,7 +857,47 @@
|
|||||||
"validation",
|
"validation",
|
||||||
"validator"
|
"validator"
|
||||||
],
|
],
|
||||||
"time": "2017-10-30T23:15:06+00:00"
|
"time": "2018-05-06T10:45:26+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "xemlock/htmlpurifier-html5",
|
||||||
|
"version": "v0.1.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/xemlock/htmlpurifier-html5.git",
|
||||||
|
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||||
|
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ezyang/htmlpurifier": "^4.7",
|
||||||
|
"php": ">=5.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "4.7.*|5.7.*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"library/HTMLPurifier/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "xemlock",
|
||||||
|
"email": "xemlock@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "HTML Purifier definitions for HTML5 elements",
|
||||||
|
"time": "2018-06-07T14:30:17+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
* { margin: 0px; padding: 0px; }
|
body {
|
||||||
body { color:white; background-color:black; border-width:1px; border-color:gray; }
|
color:white; background-color:black; font-family: '맑은 고딕';
|
||||||
table {
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕'; line-height: 110%;
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
th, td {
|
th, td {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
||||||
@@ -16,21 +18,15 @@ th, td {
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕'; line-height: 110%;
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
|
|
||||||
a.just_link {
|
a.just_link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div {
|
|
||||||
margin:0px;
|
|
||||||
padding: 0px;
|
|
||||||
word-break: break-all;
|
|
||||||
font-family: '맑은 고딕';
|
|
||||||
}
|
|
||||||
|
|
||||||
.with_border{
|
.with_border{
|
||||||
|
margin:0;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
@@ -45,6 +41,8 @@ div {
|
|||||||
line-height:50px;
|
line-height:50px;
|
||||||
font-size: 30px; font-weight: bold;
|
font-size: 30px; font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color:white;
|
||||||
|
padding:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legacy_layout div {
|
.legacy_layout div {
|
||||||
@@ -53,20 +51,9 @@ div {
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕'; line-height: 110%;
|
font-family: '맑은 고딕';;
|
||||||
}
|
}
|
||||||
|
|
||||||
font { font-family: '맑은 고딕'; line-height: 110%; }
|
|
||||||
/*
|
|
||||||
input {
|
|
||||||
width: 100px; height: 18px;
|
|
||||||
background-color: black; color: white;
|
|
||||||
font-family: '맑은 고딕';
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 110%;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
.obj_fill{
|
.obj_fill{
|
||||||
display:block;
|
display:block;
|
||||||
width:100%;
|
width:100%;
|
||||||
@@ -77,28 +64,20 @@ button.with_skin {
|
|||||||
background-color: black; color: white;
|
background-color: black; color: white;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 110%;
|
}
|
||||||
|
|
||||||
|
button.with_skin:disabled {
|
||||||
|
background-color:#333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.with_skin {
|
input.with_skin {
|
||||||
background-color: black; color: white;
|
background-color: black; color: white;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 110%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
input.with_skin:disabled {
|
||||||
width: 100px; height: 18px;
|
background-color: #333333;
|
||||||
background-color: black; color: white;
|
|
||||||
font-family: '맑은 고딕';
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 110%;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
width: 100px; height: 20px;
|
|
||||||
background-color: black; color: white;
|
|
||||||
font-family: '맑은 고딕';
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.font0 { font-size: 10px; }
|
.font0 { font-size: 10px; }
|
||||||
@@ -106,4 +85,82 @@ button {
|
|||||||
.font2 { font-size: 15px; }
|
.font2 { font-size: 15px; }
|
||||||
.font3 { font-size: 20px; }
|
.font3 { font-size: 20px; }
|
||||||
.font4 { font-size: 30px; }
|
.font4 { font-size: 30px; }
|
||||||
.font5 { font-size: 50px; }
|
.font5 { font-size: 50px; }
|
||||||
|
|
||||||
|
caption.section_title {
|
||||||
|
caption-side:top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.samButton{
|
||||||
|
float:left;
|
||||||
|
display:block;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
text-decoration: none;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.samButton.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButtonOuter{
|
||||||
|
display: table;
|
||||||
|
border: outset 2px white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight:bold;
|
||||||
|
padding: 1px 6px;
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#000000;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButtonOuter:active{
|
||||||
|
border: inset 2px white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.samButtonInner{
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samToolbarButton > .samButtonOuter{
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#225500;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samToolbarButton2 > .samButtonOuter{
|
||||||
|
width:125px;
|
||||||
|
height:30px;
|
||||||
|
background-color:#225500;
|
||||||
|
color:magenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton > .samButtonOuter{
|
||||||
|
width:111px;
|
||||||
|
height:30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter{
|
||||||
|
background-color:transparent !important;
|
||||||
|
color:gray !important;
|
||||||
|
border-color:transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
|
||||||
|
content:'【'
|
||||||
|
}
|
||||||
|
|
||||||
|
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
|
||||||
|
content:'】'
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
|
body{
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
#server_notice {
|
#server_notice {
|
||||||
margin:10px 0;
|
margin:10px 0;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -55,77 +59,6 @@
|
|||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Legacy*/
|
|
||||||
|
|
||||||
|
|
||||||
#Entrance_00 {
|
|
||||||
width: 800px;
|
|
||||||
position: absolute; top: 50px; left: 50%;
|
|
||||||
margin-left: -400px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_0004 {
|
|
||||||
width: 52px; height: 52px;
|
|
||||||
position: absolute; top: 0px; left: -62px;
|
|
||||||
border: 1px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_0005 {
|
|
||||||
width: 160px; height: 600px;
|
|
||||||
position: absolute; top: 62px; left: -170px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_0006 {
|
|
||||||
width: 160px; height: 600px;
|
|
||||||
position: absolute; top: 62px; left: 810px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Entrance_0000 {
|
|
||||||
width: 800px; height: 134px;
|
|
||||||
position: absolute; top: 0px; left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000000 {
|
|
||||||
width: 798px; height: 50px;
|
|
||||||
position: absolute; top: 0px; left: 0px;
|
|
||||||
font-size: 30px; font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000001 {
|
|
||||||
width: 798px; height: 20px;
|
|
||||||
position: absolute; top: 52px; left: 0px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_00000000 {
|
|
||||||
width: 98px; height: 20px;
|
|
||||||
position: absolute; top: 0px; left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_00000001 {
|
|
||||||
width: 398px; height: 20px;
|
|
||||||
position: absolute; top: 0px; left: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_00000002 {
|
|
||||||
width: 178px; height: 20px;
|
|
||||||
position: absolute; top: 0px; left: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_00000003 {
|
|
||||||
width: 118px; height: 20px;
|
|
||||||
position: absolute; top: 0px; left: 680px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000002 {
|
|
||||||
width: 798px; height: 64px;
|
|
||||||
position: absolute; top: 74px; left: 0px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Entrance_ServerList {
|
.Entrance_ServerList {
|
||||||
width: 800px; height: 64px;
|
width: 800px; height: 64px;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -195,27 +128,14 @@
|
|||||||
color: magenta; font-size: 15px; font-weight: bold;
|
color: magenta; font-size: 15px; font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Entrance_Nya {
|
||||||
|
color: #e67e22; font-size: 15px; font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Entrance_Pya {
|
||||||
|
color: #9b59b6; font-size: 15px; font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.Entrance_Hwe {
|
.Entrance_Hwe {
|
||||||
color: red; font-size: 15px; font-weight: bold;
|
color: red; font-size: 15px; font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_0001 {
|
|
||||||
width: 800px; height: 130px;
|
|
||||||
position: absolute; top: 154px; left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000100 {
|
|
||||||
width: 798px; height: 50px;
|
|
||||||
position: absolute; top: 0px; left: 0px;
|
|
||||||
font-size: 30px; font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000101 {
|
|
||||||
width: 200px; height: 50px;
|
|
||||||
position: absolute; top: 65px; left: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#Entrance_000102 {
|
|
||||||
width: 200px; height: 50px;
|
|
||||||
position: absolute; top: 65px; left: 450px;
|
|
||||||
}
|
|
||||||
@@ -62,8 +62,21 @@ input::-webkit-input-placeholder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.col-form-label{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
.terms{
|
.terms{
|
||||||
max-height: 200px; overflow: auto;
|
max-height: 200px; overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terms pre{
|
||||||
|
width:100%;
|
||||||
|
white-space: pre-wrap; /* Since CSS 2.1 */
|
||||||
|
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||||
|
white-space: -pre-wrap; /* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap; /* Opera 7 */
|
||||||
|
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
.vertical-center {
|
.vertical-center {
|
||||||
@@ -72,4 +85,32 @@ input::-webkit-input-placeholder {
|
|||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#btn_kakao_login{
|
||||||
|
cursor: pointer;
|
||||||
|
height:46px;
|
||||||
|
width:116px;
|
||||||
|
background-color: transparent;
|
||||||
|
color:transparent;
|
||||||
|
border:0;
|
||||||
|
background-size: 100%; /* To fill the dimensions of container (button), or */
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: bottom center;
|
||||||
|
margin-top:5px;
|
||||||
|
background-image:url('../oauth_kakao/kakao_login_join.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
#btn_kakao_login:hover {
|
||||||
|
background-image:url('../oauth_kakao/kakao_login_join_ov.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
#bottom_box{
|
||||||
|
position:fixed;
|
||||||
|
bottom:0;
|
||||||
|
width:100%;
|
||||||
|
left:0;
|
||||||
|
}
|
||||||
|
#bottom_box .container{
|
||||||
|
text-align:center;
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
right: 6px;
|
right: 6px;
|
||||||
margin:6px;
|
margin:6px;
|
||||||
height:40px;
|
height:40px;
|
||||||
|
line-height:40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#btn_delete_me{
|
#btn_delete_me{
|
||||||
@@ -37,15 +38,15 @@
|
|||||||
|
|
||||||
#image_upload_filename{
|
#image_upload_filename{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
height:16px;
|
height:20px;
|
||||||
left:10px;
|
left:10px;
|
||||||
width:130px;
|
width:130px;
|
||||||
top:16px;
|
top:12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#image_upload_fake_btn{
|
#image_upload_fake_btn{
|
||||||
top:16px;
|
top:12px;
|
||||||
height:20px;
|
height:22px;
|
||||||
right:10px;
|
right:10px;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
}
|
}
|
||||||
@@ -53,8 +54,7 @@
|
|||||||
#image_upload{
|
#image_upload{
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:16px;
|
top:12px;
|
||||||
height:22px;
|
|
||||||
left:0;
|
left:0;
|
||||||
height:20px;
|
height:20px;
|
||||||
width:100%;
|
width:100%;
|
||||||
@@ -70,7 +70,6 @@
|
|||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;
|
left:0;
|
||||||
width:50%;
|
width:50%;
|
||||||
height:20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#btn_remove_icon{
|
#btn_remove_icon{
|
||||||
@@ -78,171 +77,10 @@
|
|||||||
bottom:0;
|
bottom:0;
|
||||||
right:0;
|
right:0;
|
||||||
width:50%;
|
width:50%;
|
||||||
height:20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#EntranceManage_00 {
|
#third_use_disallow{
|
||||||
width: 500px; height: 409px;
|
display:none;
|
||||||
z-index: 2;
|
margin-left:10px;
|
||||||
}
|
width:40px;
|
||||||
|
}
|
||||||
#EntranceManage_0000 {
|
|
||||||
width: 498px; height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0001 {
|
|
||||||
width: 100px; height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0002 {
|
|
||||||
width: 498px; height: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0003 {
|
|
||||||
width: 98px; height: 84px;
|
|
||||||
line-height: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0004 {
|
|
||||||
width: 148px; height: 84px;
|
|
||||||
line-height: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0005 {
|
|
||||||
width: 98px; height: 84px;
|
|
||||||
line-height: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0006 {
|
|
||||||
width: 148px; height: 84px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_000600 {
|
|
||||||
width: 80px; height: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_000601 {
|
|
||||||
width: 80px; height: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_000602 {
|
|
||||||
width: 80px; height: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_000603 {
|
|
||||||
width: 144px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0007 {
|
|
||||||
width: 98px; height: 64px;
|
|
||||||
line-height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0008 {
|
|
||||||
width: 148px; height: 64px;
|
|
||||||
line-height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0009 {
|
|
||||||
width: 98px; height: 64px;
|
|
||||||
line-height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0010 {
|
|
||||||
width: 148px; height: 64px;
|
|
||||||
line-height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0011 {
|
|
||||||
width: 98px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0012 {
|
|
||||||
width: 148px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0013 {
|
|
||||||
width: 248px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0014 {
|
|
||||||
width: 98px; height: 64px;
|
|
||||||
line-height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0015 {
|
|
||||||
width: 148px; height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001500 {
|
|
||||||
width: 64px; height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001501 {
|
|
||||||
width: 64px; height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0016 {
|
|
||||||
width: 248px; height: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001600 {
|
|
||||||
width: 100px; height: 16px;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001601 {
|
|
||||||
width: 70px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001602 {
|
|
||||||
width: 85px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_001603 {
|
|
||||||
width: 85px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0017 {
|
|
||||||
width: 98px; height: 100px;
|
|
||||||
line-height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0018 {
|
|
||||||
width: 398px; height: 100px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0019 {
|
|
||||||
width: 149px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_0020 {
|
|
||||||
width: 500px; height: 20px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_002000 {
|
|
||||||
width: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EntranceManage_00200000 {
|
|
||||||
width: 498px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.EntranceManage_Sequence {
|
|
||||||
width: 48px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.EntranceManage_Date {
|
|
||||||
width: 148px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.EntranceManage_Amount {
|
|
||||||
width: 148px; height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.EntranceManage_Cumul {
|
|
||||||
width: 148px; height: 20px;
|
|
||||||
}
|
|
||||||
|
After Width: | Height: | Size: 341 B |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
@@ -2,11 +2,15 @@
|
|||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
define('ROOT', realpath(__dir__.'/..'));
|
define('ROOT', realpath(__dir__.'/..'));
|
||||||
|
setlocale(LC_ALL, 'ko_KR.UTF-8');
|
||||||
|
date_default_timezone_set('Asia/Seoul');
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
mb_http_output('UTF-8');
|
mb_http_output('UTF-8');
|
||||||
mb_regex_encoding('UTF-8');
|
mb_regex_encoding('UTF-8');
|
||||||
|
|
||||||
|
ini_set("session.cache_expire", 10080); // minutes
|
||||||
|
ini_set("session.gc_maxlifetime", 604800); // seconds
|
||||||
|
|
||||||
function getFriendlyErrorType($type)
|
function getFriendlyErrorType($type)
|
||||||
{
|
{
|
||||||
switch($type)
|
switch($type)
|
||||||
@@ -79,6 +83,7 @@ function logExceptionByCustomHandler(\Throwable $e){
|
|||||||
], Json::PRETTY);
|
], Json::PRETTY);
|
||||||
|
|
||||||
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
|
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
|
||||||
|
echo $e->getTraceAsString();
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
||||||
@@ -8,15 +8,16 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>설치</title>
|
<title>설치</title>
|
||||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<script src="../e_lib/bootstrap.bundle.min.js"></script>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<script src="../e_lib/jquery.validate.min.js"></script>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<script src="../e_lib/sha512.min.js"></script>
|
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||||
<script src="../js/install.js"></script>
|
<?=WebUtil::printJS('../js/install.js')?>
|
||||||
<link type="text/css" rel="stylesheet" href="../e_lib/bootstrap.min.css">
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<link type="text/css" rel="stylesheet" href="../css/install.css">
|
<?=WebUtil::printCSS('../css/install.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -216,6 +216,13 @@ $result = Util::generateFileUsingSimpleTemplate(
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
|
__dir__.'/templates/menu.orig.js',
|
||||||
|
ROOT.'/d_shared/menu.js',
|
||||||
|
[],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result'=>false,
|
||||||
|
|||||||
@@ -25,9 +25,11 @@ CREATE TABLE `member` (
|
|||||||
`EMAIL` VARCHAR(64) NULL DEFAULT NULL,
|
`EMAIL` VARCHAR(64) NULL DEFAULT NULL,
|
||||||
`PW` CHAR(128) NOT NULL,
|
`PW` CHAR(128) NOT NULL,
|
||||||
`salt` CHAR(16) NOT NULL,
|
`salt` CHAR(16) NOT NULL,
|
||||||
|
`third_use` INT(1) NOT NULL DEFAULT '0',
|
||||||
`NAME` VARCHAR(64) NOT NULL,
|
`NAME` VARCHAR(64) NOT NULL,
|
||||||
`PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg',
|
`PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg',
|
||||||
`IMGSVR` INT(1) NULL DEFAULT '0',
|
`IMGSVR` INT(1) NULL DEFAULT '0',
|
||||||
|
`acl` text NOT NULL DEFAULT '{}' COMMENT 'json',
|
||||||
`GRADE` INT(1) NULL DEFAULT '1',
|
`GRADE` INT(1) NULL DEFAULT '1',
|
||||||
`REG_NUM` INT(3) NULL DEFAULT '0',
|
`REG_NUM` INT(3) NULL DEFAULT '0',
|
||||||
`REG_DATE` DATETIME NOT NULL,
|
`REG_DATE` DATETIME NOT NULL,
|
||||||
@@ -53,4 +55,18 @@ CREATE TABLE `member_log` (
|
|||||||
INDEX `action` (`member_no`, `action_type`, `date`),
|
INDEX `action` (`member_no`, `action_type`, `date`),
|
||||||
INDEX `member` (`member_no`, `date`)
|
INDEX `member` (`member_no`, `date`)
|
||||||
)
|
)
|
||||||
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
###################
|
||||||
|
# KV storage
|
||||||
|
###################
|
||||||
|
CREATE TABLE if not exists `storage` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`namespace` VARCHAR(40) NOT NULL,
|
||||||
|
`key` VARCHAR(40) NOT NULL,
|
||||||
|
`value` TEXT NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE INDEX `key` (`namespace`, `key`)
|
||||||
|
)
|
||||||
|
COLLATE='utf8mb4_general_ci'
|
||||||
|
ENGINE=MyISAM
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
window.sammo_menu = [
|
||||||
|
['/bbs/board', '삼모게시판', '_blank'],
|
||||||
|
['/bbs/tip', '팁/강좌', '_blank'],
|
||||||
|
['/bbs/news', '삼국 일보', '_blank'],
|
||||||
|
['/bbs/history2', '개인 열전', '_blank'],
|
||||||
|
['/bbs/history3', '국가 열전', '_blank'],
|
||||||
|
['/bbs/patch', '패치 내역', '_blank']
|
||||||
|
];
|
||||||
@@ -5,15 +5,17 @@ include "lib.php";
|
|||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 4) {
|
||||||
?><!DOCTYPE html>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
@@ -25,11 +27,10 @@ if($session->userGrade < 5) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select turntime,tnmt_time from game";
|
list($turntime, $tnmt_time) = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select plock from plock";
|
$query = "select plock from plock";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -39,14 +40,16 @@ $plock = MYDB_fetch_array($result);
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>삼국지 모의전투 HiDCHe</title>
|
<title>삼국지 모의전투 HiDCHe</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form action=_119_b.php method=post>
|
<form action=_119_b.php method=post>
|
||||||
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$admin['turntime']?><br>
|
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$turntime?><br>
|
||||||
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$admin['tnmt_time']?><br>
|
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$tnmt_time?><br>
|
||||||
봉급지급 : <input type=submit name=btn value='금지급'><input type=submit name=btn value='쌀지급'><br>
|
봉급지급 : <input type=submit name=btn value='금지급'><input type=submit name=btn value='쌀지급'><br>
|
||||||
락 풀 기 : <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
|
락 풀 기 : <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ include "func.php";
|
|||||||
|
|
||||||
|
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
if($session->userGrade < 5){
|
if($session->userGrade < 4){
|
||||||
header('location:_119.php');
|
header('location:_119.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,51 @@ $minute2 = Util::getReq('minute2', 'int');
|
|||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
switch($btn) {
|
switch($btn) {
|
||||||
case "분당김":
|
case "분당김":
|
||||||
$query = "update game set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE),starttime=DATE_SUB(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute MINUTE)";
|
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
$query = "update general set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE)";
|
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
$query = "update auction set expire=DATE_SUB(expire, INTERVAL $minute MINUTE)";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
|
||||||
|
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
||||||
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$db->update('general', [
|
||||||
|
'turntime'=>$db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], true);
|
||||||
|
$db->update('auction', [
|
||||||
|
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], true);
|
||||||
break;
|
break;
|
||||||
case "분지연":
|
case "분지연":
|
||||||
$query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)";
|
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
|
||||||
$query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE)";
|
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
|
||||||
$query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
|
||||||
|
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
||||||
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$db->update('general', [
|
||||||
|
'turntime'=>$db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], true);
|
||||||
|
$db->update('auction', [
|
||||||
|
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], true);
|
||||||
break;
|
break;
|
||||||
case "토너분당김":
|
case "토너분당김":
|
||||||
$query = "update game set tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute2 MINUTE)";
|
$tnmt_time = new \DateTime($gameStor->tnmt_time);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
|
||||||
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
break;
|
break;
|
||||||
case "토너분지연":
|
case "토너분지연":
|
||||||
$query = "update game set tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute2 MINUTE)";
|
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
|
||||||
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
break;
|
break;
|
||||||
case "금지급":
|
case "금지급":
|
||||||
processGoldIncome();
|
processGoldIncome();
|
||||||
@@ -61,12 +80,10 @@ case "쌀지급":
|
|||||||
processRiceIncome();
|
processRiceIncome();
|
||||||
break;
|
break;
|
||||||
case "락걸기":
|
case "락걸기":
|
||||||
$query = "update plock set plock=1";
|
$db->update('plock', ['plock'=>1], true);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
break;
|
break;
|
||||||
case "락풀기":
|
case "락풀기":
|
||||||
$query = "update plock set plock=0";
|
$db->update('plock', ['plock'=>0], true);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,22 +7,23 @@ include "func.php";
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,16 +36,18 @@ $admin = getAdmin();
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>게임관리</title>
|
<title>게임관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
<tr><td>게 임 관 리<br><?=backButton()?></td></tr>
|
<tr><td>게 임 관 리<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<form name=form1 method=post action=_admin1_submit.php>
|
<form name=form1 method=post action=_admin1_submit.php>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
<tr><td width=110 align=right>운영자메세지</td>
|
<tr><td width=110 align=right>운영자메세지</td>
|
||||||
<td colspan=3><input type=textarea size=90 style=color:white;background-color:black; name=msg value='<?=$admin['msg']?>'><input type=submit name=btn value=변경></td></td>
|
<td colspan=3><input type=textarea size=90 style=color:white;background-color:black; name=msg value='<?=$admin['msg']?>'><input type=submit name=btn value=변경></td></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -81,7 +84,7 @@ $admin = getAdmin();
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -33,15 +33,14 @@ $startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
|
|||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$admin = getAdmin();
|
$admin = getAdmin();
|
||||||
|
|
||||||
switch ($btn) {
|
switch ($btn) {
|
||||||
case "변경":
|
case "변경":
|
||||||
$msg = addslashes(SQ2DQ($msg));
|
$gameStor->msg = $msg;
|
||||||
$query = "update game set msg='$msg'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
break;
|
break;
|
||||||
case "로그쓰기":
|
case "로그쓰기":
|
||||||
$lognum = $admin['historyindex'] + 1;
|
$lognum = $admin['historyindex'] + 1;
|
||||||
@@ -51,20 +50,16 @@ switch ($btn) {
|
|||||||
pushWorldHistory(["<R>★</><S>{$log}</>"]);
|
pushWorldHistory(["<R>★</><S>{$log}</>"]);
|
||||||
break;
|
break;
|
||||||
case "변경1":
|
case "변경1":
|
||||||
$query = "update game set starttime='$starttime'";
|
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
break;
|
break;
|
||||||
case "변경2":
|
case "변경2":
|
||||||
$query = "update game set maxgeneral='$maxgeneral'";
|
$gameStor->maxgeneral = $maxgeneral;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
break;
|
break;
|
||||||
case "변경3":
|
case "변경3":
|
||||||
$query = "update game set maxnation='$maxnation'";
|
$gameStor->maxnation = $maxnation;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
break;
|
break;
|
||||||
case "변경4":
|
case "변경4":
|
||||||
$query = "update game set startyear='$startyear'";
|
$gameStor->startyear = $startyear;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
break;
|
break;
|
||||||
case "1분턴":
|
case "1분턴":
|
||||||
case "2분턴":
|
case "2분턴":
|
||||||
@@ -88,8 +83,8 @@ switch ($btn) {
|
|||||||
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
|
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
|
||||||
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
|
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
|
||||||
$starttime = cutTurn($starttime, $turnterm);
|
$starttime = cutTurn($starttime, $turnterm);
|
||||||
$query = "update game set turnterm='$turnterm',starttime='$starttime'";
|
$gameStor->turnterm = $turnterm;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$gameStor->starttime = $starttime;
|
||||||
// 턴시간이 길어지는 경우 랜덤턴 배정
|
// 턴시간이 길어지는 경우 랜덤턴 배정
|
||||||
if ($turnterm < $admin['turnterm']) {
|
if ($turnterm < $admin['turnterm']) {
|
||||||
$query = "select no from general";
|
$query = "select no from general";
|
||||||
|
|||||||
@@ -7,52 +7,51 @@ include "func.php";
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>회원관리</title>
|
<title>회원관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>회 원 관 리<br><?=backButton()?></td></tr>
|
<tr><td>회 원 관 리<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<form name=form1 method=post action=_admin2_submit.php>
|
<form name=form1 method=post action=_admin2_submit.php>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center>접속제한</td>
|
<td width=80 align=center>접속제한</td>
|
||||||
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
|
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center rowspan=12>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
<td width=80 align=center rowspan=12>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
||||||
<td width=105 rowspan=12>
|
<td width=105 rowspan=12>
|
||||||
@@ -60,13 +59,9 @@ $admin = MYDB_fetch_array($result);
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
||||||
|
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
|
||||||
|
|
||||||
$query = "select no,name,npc,block from general order by npc,binary(name)";
|
foreach($generalList as $general){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||||
@@ -131,7 +126,7 @@ for($i=0; $i < 27; $i++) {
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -19,11 +19,15 @@ if($session->userGrade < 5) {
|
|||||||
$generalID = $session->generalID;
|
$generalID = $session->generalID;
|
||||||
if(!$generalID){
|
if(!$generalID){
|
||||||
header('location:_admin2.php');
|
header('location:_admin2.php');
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
|
|
||||||
switch($btn) {
|
switch($btn) {
|
||||||
case "전체 접속허용":
|
case "전체 접속허용":
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
@@ -95,13 +99,11 @@ switch($btn) {
|
|||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "특기 부여":
|
case "특기 부여":
|
||||||
list($year, $month) = $db->queryFirstList('select `year`, `month` from `game` where `no`=1');
|
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
|
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
|
||||||
$text = "특기 부여!";
|
$text = "특기 부여!";
|
||||||
|
|
||||||
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
|
|
||||||
$specialWar = SpecialityConst::pickSpecialWar($general);
|
$specialWar = SpecialityConst::pickSpecialWar($general);
|
||||||
@@ -110,16 +112,16 @@ switch($btn) {
|
|||||||
'special2'=>$specialWar
|
'special2'=>$specialWar
|
||||||
], 'no=%i', $general['no']);
|
], 'no=%i', $general['no']);
|
||||||
$specialWarName = SpecialityConst::WAR[$specialWar][0];
|
$specialWarName = SpecialityConst::WAR[$specialWar][0];
|
||||||
pushGeneralHistory($general, "<C>●</>{$year}년 {$month}월:특기 【<b><C>{$specialWarName}</></b>】(을)를 습득");
|
$josaUl = JosaUtil::pick($specialWarName, '을');
|
||||||
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】(을)를 익혔습니다!"]);
|
pushGeneralHistory($general, "<C>●</>{$year}년 {$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
|
||||||
|
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "경험치1000":
|
case "경험치1000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
|
||||||
$text = $btn." 지급!";
|
$text = $btn." 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -128,10 +130,9 @@ switch($btn) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case "공헌치1000":
|
case "공헌치1000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
|
||||||
$text = $btn." 지급!";
|
$text = $btn." 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -140,10 +141,9 @@ switch($btn) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case "보숙10000":
|
case "보숙10000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
|
||||||
$text = "보병숙련도+10000 지급!";
|
$text = "보병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -151,10 +151,9 @@ switch($btn) {
|
|||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "궁숙10000":
|
case "궁숙10000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
|
||||||
$text = "궁병숙련도+10000 지급!";
|
$text = "궁병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -165,7 +164,7 @@ switch($btn) {
|
|||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "기병숙련도+10000 지급!";
|
$text = "기병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -176,7 +175,7 @@ switch($btn) {
|
|||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "귀병숙련도+10000 지급!";
|
$text = "귀병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -187,7 +186,7 @@ switch($btn) {
|
|||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "차병숙련도+10000 지급!";
|
$text = "차병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general',[
|
||||||
@@ -195,19 +194,19 @@ switch($btn) {
|
|||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "접속 허용":
|
case "접속 허용":
|
||||||
$db->update('genera',[
|
$db->update('general',[
|
||||||
'con'=>0
|
'con'=>0
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "접속 제한":
|
case "접속 제한":
|
||||||
$db->update('genera',[
|
$db->update('general',[
|
||||||
'con'=>1000
|
'con'=>1000
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "메세지 전달":
|
case "메세지 전달":
|
||||||
$text = $msg;
|
$text = $msg;
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -221,7 +220,7 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +244,7 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +268,7 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +292,7 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,7 +329,7 @@ switch($btn) {
|
|||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "00턴":
|
case "00턴":
|
||||||
$turnterm = $db->queryFirstField('SELECT turnterm FROM game LIMIT 1');
|
$turnterm = $gameStor->turnterm;
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach($genlist as $generalID){
|
||||||
$turntime = getRandTurn($turnterm);
|
$turntime = getRandTurn($turnterm);
|
||||||
|
|||||||
@@ -7,46 +7,48 @@ include "func.php";
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
$conlimit = $gameStor->conlimit;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>멀티관리</title>
|
<title>멀티관리</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>멀 티 관 리<br><?=backButton()?></td></tr>
|
<tr><td>멀 티 관 리<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<form name=form1 method=post action=_admin4_submit.php>
|
<form name=form1 method=post action=_admin4_submit.php>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
||||||
<td width=105 rowspan=3>
|
<td width=105 rowspan=3>
|
||||||
@@ -55,17 +57,12 @@ $admin = MYDB_fetch_array($result);
|
|||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
||||||
|
|
||||||
$query = "select no,name,npc,block from general where ip!='' order by npc,ip";
|
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||||
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
||||||
if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; }
|
if($general['con'] > $conlimit) { $style .= "color:red;"; }
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<option value={$general['no']} $style>{$general['name']}</option>";
|
<option value={$general['no']} $style>{$general['name']}</option>";
|
||||||
@@ -90,7 +87,7 @@ echo "
|
|||||||
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=100>장수명</td>
|
<td align=center width=100>장수명</td>
|
||||||
<td align=center width=180>최근로그인</td>
|
<td align=center width=180>최근로그인</td>
|
||||||
@@ -137,7 +134,7 @@ echo "
|
|||||||
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ if($session->userGrade < 5) {
|
|||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getReq('btn');
|
||||||
$genlist = Util::getReq('genlist', 'array_int');
|
$genlist = Util::getReq('genlist', 'array_int');
|
||||||
|
$msg = Util::getReq('msg','string', '메시지');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
||||||
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
|
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
|
||||||
@@ -57,7 +57,20 @@ switch($btn) {
|
|||||||
case "메세지 전달":
|
case "메세지 전달":
|
||||||
//TODO:새 갠메 시스템으로 변경
|
//TODO:새 갠메 시스템으로 변경
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
for($i=0; $i < count($genlist); $i++) {
|
for($i=0; $i < count($genlist); $i++) {
|
||||||
|
$msgObj = new Message(
|
||||||
|
Message::MSGTYPE_PRIVATE,
|
||||||
|
$src,
|
||||||
|
MessageTarget::buildQuick($genlist[$i]),
|
||||||
|
$msg,
|
||||||
|
new DateTime(),
|
||||||
|
new \DateTime('9999-12-31'),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
if($msgObj){
|
||||||
|
$msgObj->send(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,22 +20,23 @@ extractMissingPostToGlobals();
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,20 +48,19 @@ $sel2 = [];
|
|||||||
$sel[$type] = "selected";
|
$sel[$type] = "selected";
|
||||||
$sel2[$type2] = "selected";
|
$sel2[$type2] = "selected";
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>일제정보</title>
|
<title>일제정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>일 제 정 보<br><?=closeButton()?></td></tr>
|
<tr><td>일 제 정 보<br><?=closeButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<form name=form1 method=post>정렬순서 :
|
<form name=form1 method=post>정렬순서 :
|
||||||
@@ -115,7 +115,7 @@ for($i=1; $i <= $count; $i++) {
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1600 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px; id=bg0>
|
<table align=center width=1600 class="tb_layout bg0">
|
||||||
<tr id=bg1>
|
<tr id=bg1>
|
||||||
<td align=center>국명</td>
|
<td align=center>국명</td>
|
||||||
<td align=center>접률</td>
|
<td align=center>접률</td>
|
||||||
@@ -262,11 +262,11 @@ for($i=0; $i < $nationCount; $i++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
|
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1760 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px; id=bg0>
|
<table align=center width=1760 class="tb_layout bg0">
|
||||||
<tr id=bg1>
|
<tr id=bg1>
|
||||||
<td width=30 align=center>년</td>
|
<td width=30 align=center>년</td>
|
||||||
<td width=30 align=center>월</td>
|
<td width=30 align=center>월</td>
|
||||||
@@ -317,7 +317,7 @@ for($i=0; $i < $count; $i++) {
|
|||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -14,22 +14,23 @@ extractMissingPostToGlobals();
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,12 +44,14 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>접속정보</title>
|
<title>접속정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>접 속 정 보<br><?=closeButton()?></td></tr>
|
<tr><td>접 속 정 보<br><?=closeButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
@@ -61,7 +64,7 @@ $sel[$type] = "selected";
|
|||||||
<input type=submit value='정렬하기'></form>
|
<input type=submit value='정렬하기'></form>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center class='tb_layout bg0'>
|
||||||
<tr id=bg1>
|
<tr id=bg1>
|
||||||
<td align=center width=120>장수명</td>
|
<td align=center width=120>장수명</td>
|
||||||
<td align=center width=50>접속률</td>
|
<td align=center width=50>접속률</td>
|
||||||
@@ -100,7 +103,7 @@ for($i=0; $i < $gencount; $i++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -18,22 +18,23 @@ extractMissingPostToGlobals();
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,12 +51,14 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>로그정보</title>
|
<title>로그정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>로 그 정 보<br><?=closeButton()?></td></tr>
|
<tr><td>로 그 정 보<br><?=closeButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=post>
|
||||||
@@ -99,7 +102,7 @@ for($i=0; $i < $gencount; $i++) {
|
|||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 align=center class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=50% align=center id=bg1><font color=skyblue size=3>장 수 정 보</font></td>
|
<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 id=bg1><font color=orange size=3>-</font></td>
|
||||||
@@ -136,7 +139,7 @@ for($i=0; $i < $gencount; $i++) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -14,22 +14,23 @@ extractMissingPostToGlobals();
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if ($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
echo "<!DOCTYPE html>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>관리메뉴</title>
|
<title>관리메뉴</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
관리자가 아닙니다.<br>
|
관리자가 아닙니다.<br>
|
||||||
";
|
<?=banner()?>
|
||||||
echo banner();
|
|
||||||
echo "
|
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>
|
||||||
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,12 +47,14 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>외교정보</title>
|
<title>외교정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>외 교 정 보<br><?=closeButton()?></td></tr>
|
<tr><td>외 교 정 보<br><?=closeButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=post>
|
||||||
@@ -63,11 +66,11 @@ $sel[$type] = "selected";
|
|||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 align=center class='tb_layout bg0'>
|
||||||
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=100 align=center id=bg1>국 가 명</td>
|
<td width=130 align=center id=bg1>국 가 명</td>
|
||||||
<td width=100 align=center id=bg1>국 가 명</td>
|
<td width=130 align=center id=bg1>국 가 명</td>
|
||||||
<td width=80 align=center id=bg1>상 태</td>
|
<td width=80 align=center id=bg1>상 태</td>
|
||||||
<td width=60 align=center id=bg1>기 간</td>
|
<td width=60 align=center id=bg1>기 간</td>
|
||||||
<td align=center id=bg1>비 고</td>
|
<td align=center id=bg1>비 고</td>
|
||||||
@@ -155,7 +158,7 @@ for ($i=0; $i < $dipcount; $i++) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ $dec = 0;
|
|||||||
$rice = 0;
|
$rice = 0;
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
increaseRefresh("시뮬", 2);
|
increaseRefresh("시뮬", 2);
|
||||||
|
|
||||||
@@ -81,11 +82,9 @@ $query = "select no,tournament,con,turntime from general where owner='{$userID}'
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select * from game limit 1";
|
$admin = $gameStor->getAll();
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$game = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $game['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||||
|
|
||||||
if($session->userGrade < 3) {
|
if($session->userGrade < 3) {
|
||||||
@@ -173,7 +172,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
$opposecount = 0;
|
$opposecount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
$warphase = getRate($admin, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
||||||
|
|
||||||
// 우선 스케일링
|
// 우선 스케일링
|
||||||
$city['def'] *= 10;
|
$city['def'] *= 10;
|
||||||
@@ -189,7 +188,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
while($phase < $warphase) {
|
while($phase < $warphase) {
|
||||||
// 장수가 없어서 도시 공격
|
// 장수가 없어서 도시 공격
|
||||||
if($opposecount == 0) {
|
if($opposecount == 0) {
|
||||||
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."(으)로 성을 <M>공격</>합니다.<br>";
|
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
|
||||||
|
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} 성을 <M>공격</>합니다.<br>";
|
||||||
|
|
||||||
$mykillnum = 0; $mydeathnum = 0;
|
$mykillnum = 0; $mydeathnum = 0;
|
||||||
while($phase < $warphase) {
|
while($phase < $warphase) {
|
||||||
@@ -301,7 +301,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
}
|
}
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||||
if($ratio < $ratio2 && $avoid == 1) {
|
if($ratio < $ratio2 && $avoid == 1) {
|
||||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||||
$myCrew /= 10; // 10%만 소모
|
$myCrew /= 10; // 10%만 소모
|
||||||
@@ -379,7 +379,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
}
|
}
|
||||||
// 장수 대결
|
// 장수 대결
|
||||||
} else {
|
} else {
|
||||||
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."(으)로 <Y>수비장수</>의 ".GameUnitConst::byID($oppose['crewtype'])->name."(을)를 공격합니다.<br>";
|
$josaUl = JosaUtil::pick(GameUnitConst::byID($oppose['crewtype'])->name, '을');
|
||||||
|
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
|
||||||
|
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} <Y>수비장수</>의 ".GameUnitConst::byID($oppose['crewtype'])->name."{$josaUl} 공격합니다.<br>";
|
||||||
|
|
||||||
$mykillnum = 0; $mydeathnum = 0;
|
$mykillnum = 0; $mydeathnum = 0;
|
||||||
while($phase < $warphase) {
|
while($phase < $warphase) {
|
||||||
@@ -665,7 +667,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
}
|
}
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||||
if($ratio < $ratio2 && $myAvoid == 1) {
|
if($ratio < $ratio2 && $myAvoid == 1) {
|
||||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||||
$myCrew /= 10; // 10%만 소모
|
$myCrew /= 10; // 10%만 소모
|
||||||
@@ -673,7 +675,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
}
|
}
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율
|
$ratio2 = getRate($admin, $oppose['crewtype'], "avd"); //회피율
|
||||||
if($ratio < $ratio2 && $opAvoid == 1) {
|
if($ratio < $ratio2 && $opAvoid == 1) {
|
||||||
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
|
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
|
||||||
$opCrew /= 10; // 10%만 소모
|
$opCrew /= 10; // 10%만 소모
|
||||||
@@ -802,8 +804,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
|||||||
|
|
||||||
$def = 7000;
|
$def = 7000;
|
||||||
$wall = 7000;
|
$wall = 7000;
|
||||||
$train3 = $game['city_rate'];
|
$train3 = $admin['city_rate'];
|
||||||
$atmos3 = $game['city_rate'];
|
$atmos3 = $admin['city_rate'];
|
||||||
}
|
}
|
||||||
|
|
||||||
switch($level1) {
|
switch($level1) {
|
||||||
@@ -1138,10 +1140,12 @@ switch($dex240) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<title>전투시뮬레이션</title>
|
<title>전투시뮬레이션</title>
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
select { background-color:black;color:white; }
|
select { background-color:black;color:white; }
|
||||||
input { background-color:black;color:white; }
|
input { background-color:black;color:white; }
|
||||||
@@ -1151,7 +1155,7 @@ input { background-color:black;color:white; }
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<form method=post action=_simul.php>
|
<form method=post action=_simul.php>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr id=bg1>
|
<tr id=bg1>
|
||||||
<td>공격장수</td>
|
<td>공격장수</td>
|
||||||
<td>상대장수</td>
|
<td>상대장수</td>
|
||||||
@@ -1584,7 +1588,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
|||||||
?>
|
?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr id=bg1>
|
<tr id=bg1>
|
||||||
<td align=right></td>
|
<td align=right></td>
|
||||||
<td align=center>공격</td>
|
<td align=center>공격</td>
|
||||||
@@ -1598,31 +1602,31 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
for($i=0; $i <= 5; $i++) {
|
for($i=0; $i <= 5; $i++) {
|
||||||
printSimul($game, $i);
|
printSimul($admin, $i);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||||
|
|
||||||
for($i=10; $i <= 14; $i++) {
|
for($i=10; $i <= 14; $i++) {
|
||||||
printSimul($game, $i);
|
printSimul($admin, $i);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||||
|
|
||||||
for($i=20; $i <= 27; $i++) {
|
for($i=20; $i <= 27; $i++) {
|
||||||
printSimul($game, $i);
|
printSimul($admin, $i);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||||
|
|
||||||
for($i=30; $i <= 38; $i++) {
|
for($i=30; $i <= 38; $i++) {
|
||||||
printSimul($game, $i);
|
printSimul($admin, $i);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||||
|
|
||||||
for($i=40; $i <= 43; $i++) {
|
for($i=40; $i <= 43; $i++) {
|
||||||
printSimul($game, $i);
|
printSimul($admin, $i);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||||
@@ -1630,17 +1634,16 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function printSimul($game, $i) {
|
function printSimul($admin, $i) {
|
||||||
$att = $game["att{$i}"];
|
$att = $admin["att{$i}"];
|
||||||
$def = $game["def{$i}"];
|
$def = $admin["def{$i}"];
|
||||||
$spd = $game["spd{$i}"];
|
$spd = $admin["spd{$i}"];
|
||||||
$avd = $game["avd{$i}"];
|
$avd = $admin["avd{$i}"];
|
||||||
$cst = $game["cst{$i}"];
|
$cst = $admin["cst{$i}"];
|
||||||
$ric = $game["ric{$i}"];
|
$ric = $admin["ric{$i}"];
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right>".GameUnitConst::byId($i)->name."</td>
|
<td align=right>".GameUnitConst::byId($i)->name."</td>
|
||||||
|
|||||||
@@ -13,40 +13,29 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
increaseRefresh("명장일람", 2);
|
increaseRefresh("명장일람", 1);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select con,turntime from general where owner='{$userID}'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$me = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
|
||||||
if ($con >= 2) {
|
|
||||||
printLimitMsg($me['turntime']);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>명장일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1136" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1100 class='tb_layout bg0'>
|
||||||
<tr><td>명 장 일 람<br><?=closeButton()?></td></tr>
|
<tr><td>명 장 일 람<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1100 class='tb_layout bg0'>
|
||||||
<form name=form1 action=a_bestGeneral.php method=post>
|
<form name=form1 action=a_bestGeneral.php method=post>
|
||||||
<tr><td align=center>
|
<tr><td align=center>
|
||||||
<input type=submit name=btn value='유저 보기'>
|
<input type=submit name=btn value='유저 보기'>
|
||||||
@@ -54,297 +43,226 @@ if ($con >= 2) {
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style="margin:auto;width=1000px;">
|
||||||
<?php
|
<?php
|
||||||
if (isset($btn) && $btn == "NPC 보기") {
|
|
||||||
//FIXME: query가 너무 적나라.
|
|
||||||
$sel = "npc>=2";
|
|
||||||
} else {
|
|
||||||
$sel = "npc<2";
|
|
||||||
}
|
|
||||||
|
|
||||||
$nationName = ['재야'];
|
|
||||||
$nationColor = ['#000000'];
|
$nationName = [0=>'재야'];
|
||||||
|
$nationColor = [0=>'#000000'];
|
||||||
foreach (getAllNationStaticInfo() as $nation) {
|
foreach (getAllNationStaticInfo() as $nation) {
|
||||||
$nationName[$nation['nation']] = $nation['name'];
|
$nationName[$nation['nation']] = $nation['name'];
|
||||||
$nationColor[$nation['nation']] = $nation['color'];
|
$nationColor[$nation['nation']] = $nation['color'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = array(
|
$types = [
|
||||||
"명 성",
|
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
|
||||||
"계 급",
|
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
|
||||||
"계 략 성 공",
|
["계 략 성 공", "int", function($v){
|
||||||
"전 투 횟 수",
|
$v['value'] = $v['firenum'];
|
||||||
"승 리",
|
$v['nationName'] = '???';
|
||||||
"승 률",
|
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||||
"사 살",
|
$v['name'] = '???';
|
||||||
"살 상 률",
|
$v['owner_name'] = null;
|
||||||
"보 병 숙 련 도",
|
$v['bgColor'] = GameConst::$basecolor4;
|
||||||
"궁 병 숙 련 도",
|
$v['fgColor'] = newColor($v['bgColor']);
|
||||||
"기 병 숙 련 도",
|
return $v;
|
||||||
"귀 병 숙 련 도",
|
}],
|
||||||
"차 병 숙 련 도",
|
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }],
|
||||||
"전 력 전 승 률",
|
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }],
|
||||||
"통 솔 전 승 률",
|
["승 률", "percent", function($v){
|
||||||
"일 기 토 승 률",
|
if($v['warnum'] < 10){
|
||||||
"설 전 승 률",
|
$v['value'] = 0;
|
||||||
"베 팅 투 자 액",
|
}
|
||||||
"베 팅 당 첨",
|
else{
|
||||||
"베 팅 수 익 금",
|
$v['value'] = $v['killnum'] / max(1, $v['warnum']);
|
||||||
"베 팅 수 익 률"
|
}
|
||||||
);
|
return $v;
|
||||||
|
}],
|
||||||
|
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }],
|
||||||
|
["살 상 률", "percent", function($v){
|
||||||
|
if($v['warnum'] < 10){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex0']; return $v; }],
|
||||||
|
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex10']; return $v; }],
|
||||||
|
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex20']; return $v; }],
|
||||||
|
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex30']; return $v; }],
|
||||||
|
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex40']; return $v; }],
|
||||||
|
["전 력 전 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['ttw']+$v['ttd']+$v['ttl'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['ttw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["통 솔 전 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tlw']+$v['tld']+$v['tll'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tlw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["일 기 토 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tpw']+$v['tpd']+$v['tpl'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tpw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["설 전 승 률", "percent", function($v){
|
||||||
|
$totalCnt = $v['tiw']+$v['tid']+$v['til'];
|
||||||
|
if($totalCnt < 50){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['tiw']/max(1, $totalCnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
|
||||||
|
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }],
|
||||||
|
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }],
|
||||||
|
["베 팅 수 익 률", "percent", function($v){
|
||||||
|
if($v['betgold'] < 1000){
|
||||||
|
$v['value'] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$v['value'] = $v['betwingold']/max(1, $v['betgold']);
|
||||||
|
}
|
||||||
|
return $v;
|
||||||
|
}],
|
||||||
|
];
|
||||||
|
|
||||||
|
$generals = array_map(function($general) use($nationColor, $nationName) {
|
||||||
for ($i=0; $i < 21; $i++) {
|
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
|
||||||
$name = [];
|
$general['fgColor'] = newColor($general['bgColor']);
|
||||||
$data = [];
|
$general['nationName'] = $nationName[$general['nation']];
|
||||||
$color = [];
|
|
||||||
$pic = [];
|
if(key_exists('picture', $general)){
|
||||||
|
$imageTemp = GetImageURL($general['imgsvr']);
|
||||||
switch ($i) {
|
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||||
case 0: $query = "select nation,no,name,picture,imgsvr,experience as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 1: $query = "select nation,no,name,picture,imgsvr,dedication as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 2: $query = "select nation,no,name,picture,imgsvr,firenum as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 3: $query = "select nation,no,name,picture,imgsvr,warnum as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 4: $query = "select nation,no,name,picture,imgsvr,killnum as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 5: $query = "select nation,no,name,picture,imgsvr,killnum/warnum*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break;
|
|
||||||
case 6: $query = "select nation,no,name,picture,imgsvr,killcrew as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 7: $query = "select nation,no,name,picture,imgsvr,killcrew/deathcrew*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break;
|
|
||||||
case 8: $query = "select nation,no,name,picture,imgsvr,dex0 as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 9: $query = "select nation,no,name,picture,imgsvr,dex10 as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 10: $query = "select nation,no,name,picture,imgsvr,dex20 as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 11: $query = "select nation,no,name,picture,imgsvr,dex30 as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 12: $query = "select nation,no,name,picture,imgsvr,dex40 as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 13: $query = "select nation,no,name,picture,imgsvr,ttw/(ttw+ttd+ttl)*10000 as data from general where $sel and (ttw+ttd+ttl)>=50 order by data desc limit 0,10"; break;
|
|
||||||
case 14: $query = "select nation,no,name,picture,imgsvr,tlw/(tlw+tld+tll)*10000 as data from general where $sel and (tlw+tld+tll)>=50 order by data desc limit 0,10"; break;
|
|
||||||
case 15: $query = "select nation,no,name,picture,imgsvr,tpw/(tpw+tpd+tpl)*10000 as data from general where $sel and (tpw+tpd+tpl)>=50 order by data desc limit 0,10"; break;
|
|
||||||
case 16: $query = "select nation,no,name,picture,imgsvr,tiw/(tiw+tid+til)*10000 as data from general where $sel and (tiw+tid+til)>=50 order by data desc limit 0,10"; break;
|
|
||||||
case 17: $query = "select nation,no,name,picture,imgsvr,betgold as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 18: $query = "select nation,no,name,picture,imgsvr,betwin as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 19: $query = "select nation,no,name,picture,imgsvr,betwingold as data from general where $sel order by data desc limit 0,10"; break;
|
|
||||||
case 20: $query = "select nation,no,name,picture,imgsvr,betwingold/betgold*10000 as data from general where $sel and betgold >= 1000 order by data desc limit 0,10"; break;
|
|
||||||
}
|
}
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
else{
|
||||||
|
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||||
echo "
|
|
||||||
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
|
|
||||||
<tr align=center id=bg2><td>1위</td><td>2위</td><td>3위</td><td>4위</td><td>5위</td><td>6위</td><td>7위</td><td>8위</td><td>9위</td><td>10위</td></tr>
|
|
||||||
<tr>";
|
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
|
||||||
$gen = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
if ($i != 2) {
|
|
||||||
if (isset($gen)) {
|
|
||||||
$name[$k] = $gen['name'];
|
|
||||||
$nation[$k] = $nationName[$gen['nation']];
|
|
||||||
$data[$k] = $gen['data'];
|
|
||||||
$color[$k] = $nationColor[$gen['nation']];
|
|
||||||
$pic[$k] = $gen['picture'];
|
|
||||||
} else {
|
|
||||||
$name[$k] = "-";
|
|
||||||
$nation[$k] = "-";
|
|
||||||
$data[$k] = "-";
|
|
||||||
$color[$k] = GameConst::$basecolor4;
|
|
||||||
$pic[$k] = "";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$name[$k] = "???";
|
|
||||||
$nation[$k] = "???";
|
|
||||||
$data[$k] = $gen['data'];
|
|
||||||
$color[$k] = GameConst::$basecolor4;
|
|
||||||
$gen['imgsvr'] = 0;
|
|
||||||
$pic[$k] = "9999.jpg";
|
|
||||||
}
|
|
||||||
if ($color[$k] == "") {
|
|
||||||
$color[$k] = GameConst::$basecolor4;
|
|
||||||
}
|
|
||||||
if ($nation[$k] == "") {
|
|
||||||
$nation[$k] = " ";
|
|
||||||
}
|
|
||||||
if ($pic[$k] == "") {
|
|
||||||
echo "<td align=center> </td>";
|
|
||||||
} else {
|
|
||||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
|
||||||
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></td>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</tr><tr>";
|
return $general;
|
||||||
|
}, $db->query(
|
||||||
|
"SELECT nation,no,name,name2 as owner_name, picture, imgsvr,
|
||||||
|
experience, dedication, firenum, warnum, killnum, killcrew, deathcrew,
|
||||||
|
dex0, dex10, dex20, dex30, dex40,
|
||||||
|
ttw, ttd, ttl, tlw, tld, tll, tpw, tpd, tpl, tiw, tid, til,
|
||||||
|
betgold, betwin, betwingold,
|
||||||
|
horse, weap, book, item
|
||||||
|
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2"));
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
|
$validCnt = 0;
|
||||||
}
|
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt){
|
||||||
|
$general = ($typeFunc)($general);
|
||||||
|
$value = $general['value'];
|
||||||
|
|
||||||
echo "</tr><tr>";
|
if($value > 0){
|
||||||
|
$validCnt+=1;
|
||||||
for ($k=0; $k < 10; $k++) {
|
|
||||||
if($data[$k] === '-'){
|
|
||||||
//do Nothing
|
|
||||||
}
|
}
|
||||||
else if ($i == 5 || $i == 7 || $i == 20) {
|
|
||||||
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
|
if($typeValue == 'percent'){
|
||||||
|
$general['printValue'] = number_format($value*100, 2).'%';
|
||||||
}
|
}
|
||||||
else if ($i >= 13 && $i <= 16) {
|
else {
|
||||||
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
|
$general['printValue'] = number_format($value);
|
||||||
}
|
}
|
||||||
echo "<td align=center>{$data[$k]}</td>";
|
return $general;
|
||||||
}
|
}, $generals);
|
||||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
|
||||||
|
usort($typeGenerals, function($lhs, $rhs){
|
||||||
|
//내림차순
|
||||||
|
return -($lhs['value'] <=> $rhs['value']);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
echo $templates->render('hallOfFrame', [
|
||||||
|
'typeName'=>$typeName,
|
||||||
|
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
";
|
|
||||||
|
|
||||||
$type = array(
|
|
||||||
"명 마",
|
|
||||||
"명 검",
|
|
||||||
"명 서",
|
|
||||||
"도 구"
|
|
||||||
);
|
|
||||||
|
|
||||||
$call = array(
|
|
||||||
"horse",
|
|
||||||
"weap",
|
|
||||||
"book",
|
|
||||||
"item"
|
|
||||||
);
|
|
||||||
|
|
||||||
$func = array(
|
|
||||||
"\\sammo\\getHorseName",
|
|
||||||
"\\sammo\\getWeapName",
|
|
||||||
"\\sammo\\getBookName",
|
|
||||||
"\\sammo\\getItemName"
|
|
||||||
);
|
|
||||||
|
|
||||||
for ($i=0; $i < 4; $i++) {
|
|
||||||
$name = [];
|
|
||||||
$data = [];
|
|
||||||
$color = [];
|
|
||||||
$pic = [];
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
|
|
||||||
<tr align=center id=bg2>";
|
|
||||||
for ($k=26; $k > 16; $k--) {
|
|
||||||
$str = $func[$i]($k);
|
|
||||||
echo "<td>".$str."</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=26; $k > 16; $k--) {
|
|
||||||
$query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$gen = MYDB_fetch_array($result);
|
|
||||||
if (isset($gen)) {
|
|
||||||
$name[$k] = $gen['name'];
|
|
||||||
$nation[$k] = $nationName[$gen['nation']];
|
|
||||||
$color[$k] = $nationColor[$gen['nation']];
|
|
||||||
$pic[$k] = $gen['picture'];
|
|
||||||
} else {
|
|
||||||
$name[$k] = "미발견";
|
|
||||||
$nation[$k] = "-";
|
|
||||||
$color[$k] = "";
|
|
||||||
$pic[$k] = "";
|
|
||||||
}
|
|
||||||
if ($color[$k] == "") {
|
|
||||||
$color[$k] = GameConst::$basecolor4;
|
|
||||||
}
|
|
||||||
if ($nation[$k] == "") {
|
|
||||||
$nation[$k] = " ";
|
|
||||||
}
|
|
||||||
if ($pic[$k] == "") {
|
|
||||||
echo "<td align=center> </td>";
|
|
||||||
} else {
|
|
||||||
$imageTemp = GetImageURL($gen['imgsvr']??0);
|
|
||||||
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=26; $k > 16; $k--) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=26; $k > 16; $k--) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<tr align=center id=bg2>";
|
|
||||||
for ($k=16; $k > 6; $k--) {
|
|
||||||
$str = $func[$i]($k);
|
|
||||||
echo "<td>".$str."</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=16; $k > 6; $k--) {
|
|
||||||
$query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$gen = MYDB_fetch_array($result);
|
|
||||||
if (isset($gen)) {
|
|
||||||
$name[$k] = $gen['name'];
|
|
||||||
$nation[$k] = $nationName[$gen['nation']];
|
|
||||||
$color[$k] = $nationColor[$gen['nation']];
|
|
||||||
$pic[$k] = $gen['picture'];
|
|
||||||
} else {
|
|
||||||
$name[$k] = "미발견";
|
|
||||||
$nation[$k] = "-";
|
|
||||||
$color[$k] = "";
|
|
||||||
$pic[$k] = "";
|
|
||||||
}
|
|
||||||
if ($color[$k] == "") {
|
|
||||||
$color[$k] = GameConst::$basecolor4;
|
|
||||||
}
|
|
||||||
if ($nation[$k] == "") {
|
|
||||||
$nation[$k] = " ";
|
|
||||||
}
|
|
||||||
if ($pic[$k] == "") {
|
|
||||||
echo "<td align=center> </td>";
|
|
||||||
} else {
|
|
||||||
$imageTemp = GetImageURL($gen['imgsvr']??0);
|
|
||||||
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=16; $k > 6; $k--) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=16; $k > 6; $k--) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</div>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style="margin:auto;width=1000px;margin-top:5px;">
|
||||||
|
<?php
|
||||||
|
//유니크 아이템 소유자
|
||||||
|
$itemTypes = [
|
||||||
|
["명 마", 'horse', function($v){return getHorseName($v);}, 7, 26, []],
|
||||||
|
["명 검", 'weap', function($v){return getWeapName($v);}, 7, 26, []],
|
||||||
|
["명 서", 'book', function($v){return getBookName($v);}, 7, 26, []],
|
||||||
|
["도 구", 'item', function($v){return getItemName($v);}, 7, 26, []],
|
||||||
|
];
|
||||||
|
|
||||||
|
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
||||||
|
|
||||||
|
foreach($generals as $general){
|
||||||
|
foreach($itemTypes as $itemIdx=>[,$itemType, $itemFunc,,,]){
|
||||||
|
$itemCode = $general[$itemType];
|
||||||
|
if($itemCode <= 6){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$itemName = ($itemFunc)($itemCode);
|
||||||
|
$general['rankName'] = $itemName;
|
||||||
|
$general['value'] = $itemCode;
|
||||||
|
$itemTypes[$itemIdx][5][$itemCode] = $general;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($itemTypes as [$itemNameType, $itemType, $itemFunc, $itemMinCode, $itemMaxCode, $itemOwners]){
|
||||||
|
$itemRanker = [];
|
||||||
|
for($itemCode = $itemMaxCode; $itemCode >= $itemMinCode; $itemCode--){
|
||||||
|
if(!key_exists($itemCode, $itemOwners)){
|
||||||
|
$emptyCard = [
|
||||||
|
'rankName' => ($itemFunc)($itemCode),
|
||||||
|
'pictureFullPath' => GetImageURL(0)."/default.jpg",
|
||||||
|
'value'=>$itemCode,
|
||||||
|
'name'=>'미발견',
|
||||||
|
'bgColor'=>GameConst::$basecolor4,
|
||||||
|
'fgColor'=>newColor(GameConst::$basecolor4),
|
||||||
|
];
|
||||||
|
$itemRanker[$itemCode] = $emptyCard;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$general = $itemOwners[$itemCode];
|
||||||
|
$itemRanker[$itemCode] = $general;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $templates->render('hallOfFrame', [
|
||||||
|
'typeName'=>$itemNameType,
|
||||||
|
'generals'=>$itemRanker
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<table align=center width=1100 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -4,204 +4,115 @@ namespace sammo;
|
|||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$select = Util::getReq('select', 'int', 0);
|
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
increaseRefresh("왕조일람", 2);
|
increaseRefresh("왕조일람", 1);
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>왕조일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;color:white;background-color:black" id=bg0>
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
<tr><td>역 대 왕 조<br>
|
<tr><td>역 대 왕 조<br>
|
||||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
<button onclick=window.close()>창 닫기</button><br>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($select == 0) {
|
$showCurrentNation = true;
|
||||||
$query = "select * from emperior order by no desc";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$empcount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for ($i=0; $i < $empcount; $i++) {
|
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
|
||||||
$emperior = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
if($emperiors){
|
||||||
<form action=a_emperior.php method=post>
|
$serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null);
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style='font-size:13px;word-break:break-all;color:white;' id=bg0>
|
if($serverID == UniqueConst::$serverID){
|
||||||
|
$showCurrentNation = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($showCurrentNation) {
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor=skyblue align=center colspan=8>
|
<td style="background-color:#333333;" align=center colspan=8>
|
||||||
<font size=5>{$emperior['phase']}</font>
|
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
|
||||||
<input type=submit value='자세히'>
|
|
||||||
<input type=hidden name=select value='{$emperior['no']}'>
|
<a href="a_emperior_detail.php"><button>자세히</button></a>
|
||||||
|
|
||||||
|
<a href="a_history.php"><button>역사 보기</button></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=8>
|
|
||||||
<font size=5>{$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center width=123>국 력</td>
|
|
||||||
<td align=center width=123>{$emperior['power']}</td>
|
|
||||||
<td id=bg1 align=center width=123>장 수</td>
|
|
||||||
<td align=center width=123>{$emperior['gennum']}</td>
|
|
||||||
<td id=bg1 align=center width=123>속 령</td>
|
|
||||||
<td align=center width=123>{$emperior['citynum']}</td>
|
|
||||||
<td id=bg1 align=center width=123>성 향</td>
|
|
||||||
<td align=center width=123>{$emperior['type']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 width=123 align=center>황 제</td>
|
|
||||||
<td width=123 align=center>{$emperior['l12name']}</td>
|
|
||||||
<td id=bg1 width=123 align=center>승 상</td>
|
|
||||||
<td width=123 align=center>{$emperior['l11name']}</td>
|
|
||||||
<td id=bg1 width=123 align=center>위 장 군</td>
|
|
||||||
<td width=123 align=center>{$emperior['l10name']}</td>
|
|
||||||
<td id=bg1 width=123 align=center>사 공</td>
|
|
||||||
<td width=123 align=center>{$emperior['l9name']}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</form>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$query = "select * from emperior where no='$select'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$emperior = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
<?php
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style='font-size:13px;word-break:break-all;color:white;' id=bg0>
|
}
|
||||||
|
|
||||||
|
foreach($emperiors as $emperior){
|
||||||
|
$serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor=skyblue align=center colspan=6>
|
<td bgcolor=skyblue align=center colspan=8>
|
||||||
<font size=5>{$emperior['phase']}</font>
|
<font size=5><?=$emperior['phase']?></font>
|
||||||
<input type=submit value='전체보기'>
|
|
||||||
<input type=hidden name=select value='0'>
|
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button>자세히</button></a>
|
||||||
|
|
||||||
|
<?php if($emperior['server_id']): ?>
|
||||||
|
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button>역사 보기</button></a>
|
||||||
|
<?php endif ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
<td align=center style=color:".newColor($emperior['color'])."; bgcolor=<?=$emperior['color']?> colspan=8>
|
||||||
<td align=center width=398 colspan=2>{$emperior['nation_count']}</td>
|
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
|
||||||
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['gen_count']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>등 장 국 가</td>
|
|
||||||
<td colspan=5>{$emperior['nation_name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>국가별 성향</td>
|
|
||||||
<td colspan=5>{$emperior['nation_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 성 격</td>
|
|
||||||
<td colspan=5>{$emperior['personal_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 특 기</td>
|
|
||||||
<td colspan=5>{$emperior['special_hist']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=6>
|
|
||||||
<font size=5>{$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)</font>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 width=98 align=center>국 력</td>
|
<td id=bg1 align=center width=80>국 력</td>
|
||||||
<td align=center width=398 colspan=2>{$emperior['power']}</td>
|
<td align=center width=170><?=$emperior['power']?></td>
|
||||||
<td id=bg1 width=98 align=center>성 향</td>
|
<td id=bg1 align=center width=80>장 수</td>
|
||||||
<td align=center width=398 colspan=2>{$emperior['type']}</td>
|
<td align=center width=170><?=$emperior['gennum']?></td>
|
||||||
</tr>
|
<td id=bg1 align=center width=80>속 령</td>
|
||||||
<tr>
|
<td align=center width=170><?=$emperior['citynum']?></td>
|
||||||
<td id=bg1 width=98 align=center>장 수</td>
|
<td id=bg1 align=center width=80>성 향</td>
|
||||||
<td align=center width=398 colspan=2>{$emperior['gennum']}</td>
|
<td align=center width=170><?=$emperior['type']?></td>
|
||||||
<td id=bg1 width=98 align=center>속 령</td>
|
|
||||||
<td align=center width=398 colspan=2>{$emperior['citynum']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>총 인 구</td>
|
|
||||||
<td align=center colspan=2>{$emperior['pop']}</td>
|
|
||||||
<td id=bg1 align=center>인 구 율</td>
|
|
||||||
<td align=center colspan=2>{$emperior['poprate']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>국 고</td>
|
|
||||||
<td align=center colspan=2>{$emperior['gold']}</td>
|
|
||||||
<td id=bg1 align=center>병 량</td>
|
|
||||||
<td align=center colspan=2>{$emperior['rice']}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 align=center>황 제</td>
|
<td id=bg1 align=center>황 제</td>
|
||||||
<td width=64> </td>
|
<td align=center><?=$emperior['l12name']?></td>
|
||||||
<td width=332>{$emperior['l12name']}</td>
|
|
||||||
<td id=bg1 align=center>승 상</td>
|
<td id=bg1 align=center>승 상</td>
|
||||||
<td width=64> </td>
|
<td align=center><?=$emperior['l11name']?></td>
|
||||||
<td width=332>{$emperior['l11name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>위 장 군</td>
|
<td id=bg1 align=center>위 장 군</td>
|
||||||
<td width=64> </td>
|
<td align=center><?=$emperior['l10name']?></td>
|
||||||
<td width=332>{$emperior['l10name']}</td>
|
|
||||||
<td id=bg1 align=center>사 공</td>
|
<td id=bg1 align=center>사 공</td>
|
||||||
<td width=64> </td>
|
<td align=center><?=$emperior['l9name']?></td>
|
||||||
<td width=332>{$emperior['l9name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>표 기 장 군</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l8name']}</td>
|
|
||||||
<td id=bg1 align=center>태 위</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l7name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>거 기 장 군</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l6name']}</td>
|
|
||||||
<td id=bg1 align=center>사 도</td>
|
|
||||||
<td width=64> </td>
|
|
||||||
<td width=332>{$emperior['l5name']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>오 호 장 군</td>
|
|
||||||
<td colspan=5>{$emperior['tiger']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>건 안 칠 자</td>
|
|
||||||
<td colspan=5>{$emperior['eagle']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
|
|
||||||
<td colspan=5>{$emperior['gen']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id=bg1 align=center>역 사 기 록</td>
|
|
||||||
<td colspan=5>".ConvertLog($emperior['history'], 1)."</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
";
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all;color:white; id=bg0>
|
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@@ -17,15 +17,17 @@ increaseRefresh("왕조일람", 2);
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>왕조일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>역 대 왕 조<br>
|
<tr><td>역 대 왕 조<br>
|
||||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
<input type=button value='창 닫기' onclick=window.close()><br>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
@@ -43,7 +45,7 @@ if ($select == 0) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<form action=a_emperior2.php method=post>
|
<form action=a_emperior2.php method=post>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor=skyblue align=center colspan=8>
|
<td bgcolor=skyblue align=center colspan=8>
|
||||||
<font size=5>{$emperior['phase']}</font>
|
<font size=5>{$emperior['phase']}</font>
|
||||||
@@ -57,24 +59,24 @@ if ($select == 0) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 align=center width=123>국 력</td>
|
<td id=bg1 align=center width=80>국 력</td>
|
||||||
<td align=center width=123>{$emperior['power']}</td>
|
<td align=center width=170>{$emperior['power']}</td>
|
||||||
<td id=bg1 align=center width=123>장 수</td>
|
<td id=bg1 align=center width=80>장 수</td>
|
||||||
<td align=center width=123>{$emperior['gennum']}</td>
|
<td align=center width=170>{$emperior['gennum']}</td>
|
||||||
<td id=bg1 align=center width=123>속 령</td>
|
<td id=bg1 align=center width=80>속 령</td>
|
||||||
<td align=center width=123>{$emperior['citynum']}</td>
|
<td align=center width=170>{$emperior['citynum']}</td>
|
||||||
<td id=bg1 align=center width=123>성 향</td>
|
<td id=bg1 align=center width=80>성 향</td>
|
||||||
<td align=center width=123>{$emperior['type']}</td>
|
<td align=center width=170>{$emperior['type']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id=bg1 width=123 align=center>황 제</td>
|
<td id=bg1 align=center>황 제</td>
|
||||||
<td width=123 align=center>{$emperior['l12name']}</td>
|
<td align=center>{$emperior['l12name']}</td>
|
||||||
<td id=bg1 width=123 align=center>승 상</td>
|
<td id=bg1 align=center>승 상</td>
|
||||||
<td width=123 align=center>{$emperior['l11name']}</td>
|
<td align=center>{$emperior['l11name']}</td>
|
||||||
<td id=bg1 width=123 align=center>위 장 군</td>
|
<td id=bg1 align=center>위 장 군</td>
|
||||||
<td width=123 align=center>{$emperior['l10name']}</td>
|
<td align=center>{$emperior['l10name']}</td>
|
||||||
<td id=bg1 width=123 align=center>사 공</td>
|
<td id=bg1 align=center>사 공</td>
|
||||||
<td width=123 align=center>{$emperior['l9name']}</td>
|
<td align=center>{$emperior['l9name']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>";
|
</form>";
|
||||||
@@ -86,7 +88,7 @@ if ($select == 0) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<form action=a_emperior2.php method=post>
|
<form action=a_emperior2.php method=post>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor=skyblue align=center colspan=6>
|
<td bgcolor=skyblue align=center colspan=6>
|
||||||
<font size=5>{$emperior['phase']}</font>
|
<font size=5>{$emperior['phase']}</font>
|
||||||
@@ -198,11 +200,10 @@ if ($select == 0) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
$select = Util::getReq('select', 'int', 0);
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
$templates->registerFunction('ConvertLog', '\sammo\ConvertLog');
|
||||||
|
$templates->registerFunction('newColor', '\sammo\newColor');
|
||||||
|
increaseRefresh("왕조일람", 1);
|
||||||
|
|
||||||
|
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select);
|
||||||
|
$serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
|
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
|
||||||
|
<button onclick=window.close()>창 닫기</button>
|
||||||
|
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($emperior):
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor=skyblue align=center colspan=6>
|
||||||
|
<font size=5><?=$emperior['phase']?></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['nation_count']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['gen_count']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>등 장 국 가</td>
|
||||||
|
<td colspan=5><?=$emperior['nation_name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>국가별 성향</td>
|
||||||
|
<td colspan=5><?=$emperior['nation_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 성 격</td>
|
||||||
|
<td colspan=5><?=$emperior['personal_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 특 기</td>
|
||||||
|
<td colspan=5><?=$emperior['special_hist']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center style=color:<?=newColor($emperior['color'])?>; bgcolor=<?=$emperior['color']?> colspan=6>
|
||||||
|
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>국 력</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['power']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>성 향</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['type']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 width=98 align=center>장 수</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['gennum']?></td>
|
||||||
|
<td id=bg1 width=98 align=center>속 령</td>
|
||||||
|
<td align=center width=398 colspan=2><?=$emperior['citynum']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>총 인 구</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['pop']?></td>
|
||||||
|
<td id=bg1 align=center>인 구 율</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['poprate']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>국 고</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['gold']?></td>
|
||||||
|
<td id=bg1 align=center>병 량</td>
|
||||||
|
<td align=center colspan=2><?=$emperior['rice']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>황 제</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l12name']?></td>
|
||||||
|
<td id=bg1 align=center>승 상</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l11name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>위 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l10name']?></td>
|
||||||
|
<td id=bg1 align=center>사 공</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l9name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>표 기 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l8name']?></td>
|
||||||
|
<td id=bg1 align=center>태 위</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l7name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>거 기 장 군</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l6name']?></td>
|
||||||
|
<td id=bg1 align=center>사 도</td>
|
||||||
|
<td width=64> </td>
|
||||||
|
<td width=332><?=$emperior['l5name']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>오 호 장 군</td>
|
||||||
|
<td colspan=5><?=$emperior['tiger']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>건 안 칠 자</td>
|
||||||
|
<td colspan=5><?=$emperior['eagle']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
|
||||||
|
<td colspan=5><?=$emperior['gen']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id=bg1 align=center>역 사 기 록</td>
|
||||||
|
<td colspan=5><?=ConvertLog($emperior['history'], 1)?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
$showServers = $serverID || (!$emperior);
|
||||||
|
|
||||||
|
if(!$serverID){
|
||||||
|
$serverID = UniqueConst::$serverID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($showServers){
|
||||||
|
$nations = $db->query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID);
|
||||||
|
foreach($nations as $nation){
|
||||||
|
if(!$nation['nation']??null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$nation += Json::decode($nation['data']);
|
||||||
|
|
||||||
|
$nation['typeName'] = getNationType($nation['type']);
|
||||||
|
$nation['levelName'] = getNationLevel($nation['level']);
|
||||||
|
if($nation['generals']){
|
||||||
|
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']);
|
||||||
|
|
||||||
|
if(count($generals) != $nation['generals'] && $serverID == UniqueConst::$serverID){
|
||||||
|
$liveGenerals = $nation['generals'];
|
||||||
|
foreach($generals as $general){
|
||||||
|
if(in_array($general['general_no'], $nation['generals'])){
|
||||||
|
unset($nation['generals'][$general['general_no']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
|
||||||
|
$nation['generalsFull'] = array_merge($liveGenerals, $generals);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$nation['generalsFull'] = $generals;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$nation['generalsFull'] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
|
||||||
|
$nation += Json::decode($nation['aux']);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $templates->render('oldNation', $nation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
|
<tr><td><?=banner()?></td></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -13,19 +13,16 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("장수일람", 2);
|
increaseRefresh("장수일람", 2);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select con,turntime from general where owner='{$userID}'";
|
$query = "select con,turntime from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -40,16 +37,19 @@ if ($type <= 0 || $type > 15) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>장수일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
||||||
<script type="text/javascript" src="../e_lib/jquery-3.2.1.min.js"></script>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>장 수 일 람<br><?=closeButton()?></td></tr>
|
<tr><td>장 수 일 람<br><?=closeButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select id='viewType' name='type' size=1>
|
<select id='viewType' name='type' size=1>
|
||||||
@@ -103,23 +103,23 @@ $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect)
|
|||||||
$gencount = MYDB_num_rows($genresult);
|
$gencount = MYDB_num_rows($genresult);
|
||||||
|
|
||||||
echo"
|
echo"
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 align=center id=bg1>얼 굴</td>
|
<td width=64 align=center id=bg1>얼 굴</td>
|
||||||
<td width=100 align=center id=bg1>이 름</td>
|
<td width=140 align=center id=bg1>이 름</td>
|
||||||
<td width=50 align=center id=bg1>연령</td>
|
<td width=45 align=center id=bg1>연령</td>
|
||||||
<td width=50 align=center id=bg1>성격</td>
|
<td width=45 align=center id=bg1>성격</td>
|
||||||
<td width=90 align=center id=bg1>특기</td>
|
<td width=80 align=center id=bg1>특기</td>
|
||||||
<td width=50 align=center id=bg1>레 벨</td>
|
<td width=45 align=center id=bg1>레 벨</td>
|
||||||
<td width=100 align=center id=bg1>국 가</td>
|
<td width=140 align=center id=bg1>국 가</td>
|
||||||
<td width=60 align=center id=bg1>명 성</td>
|
<td width=55 align=center id=bg1>명 성</td>
|
||||||
<td width=60 align=center id=bg1>계 급</td>
|
<td width=55 align=center id=bg1>계 급</td>
|
||||||
<td width=80 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=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=84 align=center id=bg1>벌점</td>
|
<td width=70 align=center id=bg1>벌점</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
for ($j=0; $j < $gencount; $j++) {
|
for ($j=0; $j < $gencount; $j++) {
|
||||||
$general = MYDB_fetch_array($genresult);
|
$general = MYDB_fetch_array($genresult);
|
||||||
@@ -190,11 +190,10 @@ echo "
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#viewType").val("<?=$type?>").attr("selected", "selected");
|
$("#viewType").val("<?=$type?>").attr("selected", "selected");
|
||||||
|
|||||||
@@ -4,121 +4,141 @@ namespace sammo;
|
|||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
|
$session = Session::getInstance()->setReadOnly();
|
||||||
|
$scenarioIdx = Util::getReq('scenarioIdx', 'int', null);
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
increaseRefresh("명예의전당", 1);
|
||||||
|
|
||||||
|
$scenarioList= [];
|
||||||
|
foreach($db->query('SELECT scenario_name as name, count(scenario) as cnt, scenario from ng_games group by scenario order by scenario asc') as $scenarioInfo){
|
||||||
|
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
|
||||||
|
$searchScenarioName = $scenarioList[$scenarioIdx]['name'];
|
||||||
|
$searchFilter = $db->sqleval('scenario = %i', $scenarioIdx);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$searchScenarioName = '* 모두 *';
|
||||||
|
$searchFilter = $db->sqleval(true);
|
||||||
|
}
|
||||||
|
|
||||||
increaseRefresh("명예의전당", 2);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>명예의 전당</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1136" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||||
|
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=Font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1100 class='tb_layout bg0'>
|
||||||
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr>
|
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr>
|
||||||
|
<tr><td>
|
||||||
|
시나리오 검색 : <select id="by_scenario" name="by_scenario">
|
||||||
|
<option value="" <?=$scenarioIdx?"selected='selected'":''?>>* 종합 *</option>
|
||||||
|
<?php foreach($scenarioList as $info): ?>
|
||||||
|
<option
|
||||||
|
value="<?=$info['scenario']?>"
|
||||||
|
<?=($info['scenario']===$scenarioIdx)?"selected='selected'":''?>
|
||||||
|
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style="margin:auto;width=1100px;">
|
||||||
<?php
|
<?php
|
||||||
$type = array(
|
$types = [
|
||||||
"명 성",
|
["명 성", 'int'],
|
||||||
"계 급",
|
["계 급", 'int'],
|
||||||
"계 략 성 공",
|
["계 략 성 공", 'int'],
|
||||||
"전 투 횟 수",
|
["전 투 횟 수", 'int'],
|
||||||
"승 리",
|
["승 리", 'int'],
|
||||||
"승 률",
|
["승 률", 'percent'],
|
||||||
"사 살",
|
["사 살", 'int'],
|
||||||
"살 상 률",
|
["살 상 률", 'percent'],
|
||||||
"보 병 숙 련 도",
|
["보 병 숙 련 도", 'int'],
|
||||||
"궁 병 숙 련 도",
|
["궁 병 숙 련 도", 'int'],
|
||||||
"기 병 숙 련 도",
|
["기 병 숙 련 도", 'int'],
|
||||||
"귀 병 숙 련 도",
|
["귀 병 숙 련 도", 'int'],
|
||||||
"차 병 숙 련 도",
|
["차 병 숙 련 도", 'int'],
|
||||||
"전 력 전 승 률",
|
["전 력 전 승 률", 'percent'],
|
||||||
"통 솔 전 승 률",
|
["통 솔 전 승 률", 'percent'],
|
||||||
"일 기 토 승 률",
|
["일 기 토 승 률", 'percent'],
|
||||||
"설 전 승 률",
|
["설 전 승 률", 'percent'],
|
||||||
"베 팅 투 자 액",
|
["베 팅 투 자 액", 'int'],
|
||||||
"베 팅 당 첨",
|
["베 팅 당 첨", 'int'],
|
||||||
"베 팅 수 익 금",
|
["베 팅 수 익 금", 'int'],
|
||||||
"베 팅 수 익 률"
|
["베 팅 수 익 률", 'percent'],
|
||||||
);
|
];
|
||||||
for ($i=0; $i < 21; $i++) {
|
|
||||||
$name = [];
|
|
||||||
$nation = [];
|
|
||||||
$data = [];
|
|
||||||
$color = [];
|
|
||||||
$pic = [];
|
|
||||||
|
|
||||||
$query = "select * from hall where type={$i} order by rank";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
|
|
||||||
echo "
|
$templates = new \League\Plates\Engine('templates');
|
||||||
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
|
|
||||||
<tr align=center id=bg2><td>1위</td><td>2위</td><td>3위</td><td>4위</td><td>5위</td><td>6위</td><td>7위</td><td>8위</td><td>9위</td><td>10위</td></tr>
|
|
||||||
<tr>";
|
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
foreach($types as $idx=>[$typeName, $typeValue]) {
|
||||||
$gen = MYDB_fetch_array($result);
|
$hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
|
||||||
$name[$k] = $gen['name'];
|
|
||||||
$nation[$k] = $gen['nation'];
|
$hallResult = array_map(function($general)use($typeValue){
|
||||||
$data[$k] = $gen['data'];
|
$aux = Json::decode($general['aux']);
|
||||||
$color[$k] = $gen['color'];
|
$general += $aux;
|
||||||
$pic[$k] = $gen['picture'];
|
if(!key_exists('bgColor', $general)){
|
||||||
if ($color[$k] == "") {
|
if(!key_exists('color', $general)){
|
||||||
$color[$k] = GameConst::$basecolor4;
|
$general['bgColor'] = GameConst::$basecolor4;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$general['bgColor'] = $general['color'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($nation[$k] == "") {
|
|
||||||
$nation[$k] = " ";
|
if(!key_exists('fgColor', $general)){
|
||||||
|
$general['fgColor'] = newColor($general['bgColor']);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if($pic[$k] == "") {
|
|
||||||
echo "<td align=center> </td>";
|
|
||||||
} else {
|
|
||||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
|
||||||
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
// echo "</tr><tr>";
|
if(key_exists('picture', $general)){
|
||||||
|
$imageTemp = GetImageURL($general['imgsvr']);
|
||||||
for ($k=0; $k < 10; $k++) {
|
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
|
||||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</tr><tr>";
|
|
||||||
|
|
||||||
for ($k=0; $k < 10; $k++) {
|
|
||||||
if ($i == 5 || $i == 7 || $i == 20) {
|
|
||||||
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
|
|
||||||
}
|
}
|
||||||
if ($i >= 13 && $i <= 16) {
|
else{
|
||||||
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
|
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||||
}
|
}
|
||||||
echo "<td align=center>{$data[$k]}</td>";
|
|
||||||
}
|
if(!key_exists('printValue', $general)){
|
||||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
$value = $general['value'];
|
||||||
|
if($typeValue == 'percent'){
|
||||||
|
$general['printValue'] = number_format($value*100, 2).'%';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$general['printValue'] = number_format($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $general;
|
||||||
|
}, $hallResult);
|
||||||
|
|
||||||
|
echo $templates->render('hallOfFrame', [
|
||||||
|
'typeName'=>$typeName,
|
||||||
|
'generals'=>$hallResult
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</div>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1100 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ include "lib.php";
|
|||||||
include "func.php";
|
include "func.php";
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getReq('btn');
|
||||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||||
|
$serverID = Util::getReq('serverID', 'string', null);
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
@@ -13,36 +14,43 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("연감", 5);
|
if(!$serverID){
|
||||||
|
$serverID = UniqueConst::$serverID;
|
||||||
|
}
|
||||||
|
|
||||||
$query = "select startyear,year,month,conlimit from game limit 1";
|
if($serverID === UniqueConst::$serverID){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
increaseRefresh("연감", 1);
|
||||||
$admin = MYDB_fetch_array($result);
|
}
|
||||||
|
|
||||||
$query = "select map,con,turntime from general where owner='{$userID}'";
|
$admin = $gameStor->getValues(['startyear','year','month']);
|
||||||
|
|
||||||
|
$query = "select con,turntime from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select year,month from history order by no limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$history = MYDB_fetch_array($result);
|
|
||||||
$s = ($history['year']*12) + $history['month'];
|
|
||||||
|
|
||||||
$query = "select year,month from history order by no desc limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
|
||||||
$history = MYDB_fetch_array($result);
|
$s = $s_year * 12 + $s_month;
|
||||||
$e = ($history['year']*12) + $history['month'];
|
|
||||||
|
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
|
||||||
|
$e = $e_year * 12 + $e_month;
|
||||||
|
|
||||||
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
||||||
if (!$yearmonth) {
|
if($serverID !== UniqueConst::$serverID && !$yearmonth){
|
||||||
|
$year = $s_year;
|
||||||
|
$month = $s_month;
|
||||||
|
}
|
||||||
|
else if (!$yearmonth) {
|
||||||
$year = $admin['year'];
|
$year = $admin['year'];
|
||||||
$month = $admin['month'] - 1;
|
$month = $admin['month'] - 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -76,22 +84,24 @@ if ($month <= 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>연감</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
<meta name="viewport" content="width=1024" />
|
||||||
<script src="../d_shared/common_path.js"></script>
|
<title><?=UniqueConst::$serverName?>: 연감</title>
|
||||||
<script src="js/common.js"></script>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<script src="js/base_map.js"></script>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<script src="js/map.js"></script>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
|
<?=WebUtil::printJS('js/map.js')?>
|
||||||
|
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<link href="css/map.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/map.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>연 감<br><?=closeButton()?></td></tr>
|
<tr><td>연 감<br><?=closeButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=post>
|
||||||
@@ -99,24 +109,19 @@ if ($month <= 0) {
|
|||||||
<input type=submit name=btn value="◀◀ 이전달">
|
<input type=submit name=btn value="◀◀ 이전달">
|
||||||
<select name=yearmonth size=1>
|
<select name=yearmonth size=1>
|
||||||
<?php
|
<?php
|
||||||
$query = "select year,month from history";
|
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC', $serverID);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
foreach($dates as [$hYear, $hMonth]){
|
||||||
$histCount = MYDB_num_rows($result);
|
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
|
||||||
for ($i=0; $i < $histCount; $i++) {
|
if ($hYear == $year && $hMonth == $month) {
|
||||||
$history = MYDB_fetch_array($result);
|
|
||||||
$value = "".$history['year'].StringUtil::padStringAlignRight($history['month'], 2, "0");
|
|
||||||
if ($history['year'] == $year && $history['month'] == $month) {
|
|
||||||
echo "
|
echo "
|
||||||
<option selected value={$value}>{$history['year']}년 {$history['month']}월</option>";
|
<option selected value={$value}>{$hYear}년 {$hMonth}월</option>";
|
||||||
} else {
|
} else {
|
||||||
echo "
|
echo "
|
||||||
<option value={$value}>{$history['year']}년 {$history['month']}월</option>";
|
<option value={$value}>{$hYear}년 {$hMonth}월</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select log,genlog,nation,power,gen,city from history where year='$year' and month='$month'";
|
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$history = MYDB_fetch_array($result);
|
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='조회하기'>
|
<input type=submit name=btn value='조회하기'>
|
||||||
@@ -124,16 +129,16 @@ $history = MYDB_fetch_array($result);
|
|||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 height=520 class='tb_layout bg0'>
|
||||||
<tr><td colspan=5 align=center id=bg1>중 원 지 도</td></tr>
|
<tr><td colspan=5 align=center id=bg1>중 원 지 도</td></tr>
|
||||||
<tr height=520>
|
<tr height=520>
|
||||||
<td width=698>
|
<td width=698>
|
||||||
<?=getMapHtml();?>
|
<?=getMapHtml();?>
|
||||||
|
|
||||||
<td width=98 valign=top><?=$history['nation']?></td>
|
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$history['nation']?></td>
|
||||||
<td width=78 valign=top><?=$history['power']?></td>
|
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$history['power']?></td>
|
||||||
<td width=58 valign=top><?=$history['gen']?></td>
|
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$history['gen']?></td>
|
||||||
<td width=58 valign=top><?=$history['city']?></td>
|
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$history['city']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan=5 align=center id=bg1>중 원 정 세</td></tr>
|
<tr><td colspan=5 align=center id=bg1>중 원 정 세</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -148,17 +153,16 @@ $history = MYDB_fetch_array($result);
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<script>
|
<script>
|
||||||
reloadWorldMap({
|
reloadWorldMap({
|
||||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>',
|
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||||
showMe:false,
|
showMe:false,
|
||||||
neutralView:true
|
neutralView:true
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,34 +8,35 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("세력일람", 2);
|
increaseRefresh("세력일람", 2);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select con,turntime from general where owner='{$userID}'";
|
$query = "select con,turntime from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>세력일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>세 력 일 람<br><?=closeButton()?></td></tr>
|
<tr><td>세 력 일 람<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
@@ -127,19 +128,19 @@ for($i=1; $i <= $count; $i++) {
|
|||||||
else { $l5 = $level5['name']; }
|
else { $l5 = $level5['name']; }
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table align=center width=1000 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=123 align=center id=bg1>성 향</td>
|
<td width=80 align=center id=bg1>성 향</td>
|
||||||
<td width=123 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
||||||
<td width=123 align=center id=bg1>작 위</td>
|
<td width=80 align=center id=bg1>작 위</td>
|
||||||
<td width=123 align=center>".getNationLevel($nation['level'])."</td>
|
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
|
||||||
<td width=123 align=center id=bg1>국 력</td>
|
<td width=80 align=center id=bg1>국 력</td>
|
||||||
<td width=123 align=center>{$nation['power']}</td>
|
<td width=170 align=center>{$nation['power']}</td>
|
||||||
<td width=123 align=center id=bg1>장수 / 속령</td>
|
<td width=80 align=center id=bg1>장수 / 속령</td>
|
||||||
<td width=123 align=center>{$gencount} / {$citycount}</td>
|
<td width=170 align=center>{$gencount} / {$citycount}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
|
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
|
||||||
@@ -209,7 +210,7 @@ $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect
|
|||||||
$citycount = MYDB_num_rows($cityresult);
|
$citycount = MYDB_num_rows($cityresult);
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table align=center width=1000 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=5 align=center>【 재 야 】</td>
|
<td colspan=5 align=center>【 재 야 】</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -244,11 +245,10 @@ echo"
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -25,15 +25,17 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>빙의일람</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>빙 의 일 람<br><?=closeButton()?></td></tr>
|
<tr><td>빙 의 일 람<br><?=closeButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
@@ -71,7 +73,7 @@ $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect)
|
|||||||
$gencount = MYDB_num_rows($genresult);
|
$gencount = MYDB_num_rows($genresult);
|
||||||
|
|
||||||
echo"
|
echo"
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=102 align=center id=bg1>희생된 장수</td>
|
<td width=102 align=center id=bg1>희생된 장수</td>
|
||||||
<td width=102 align=center id=bg1>악령 이름</td>
|
<td width=102 align=center id=bg1>악령 이름</td>
|
||||||
@@ -120,11 +122,10 @@ echo "
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,20 +8,17 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("세력도", 2);
|
increaseRefresh("세력도", 2);
|
||||||
checkTurn();
|
checkTurn();
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
$query = "select con,turntime from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select map,con,turntime from general where owner='{$userID}'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -29,12 +26,13 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>세력도</title>
|
<meta name="viewport" content="width=1024" />
|
||||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
||||||
<script src="../d_shared/common_path.js"></script>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<script src="js/common.js"></script>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<script src="js/base_map.js"></script>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<script src="js/map.js"></script>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
|
<?=WebUtil::printJS('js/map.js')?>
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
@@ -45,18 +43,18 @@ $(function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<link href="../d_shared/common.css" rel="stylesheet">
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<link href="css/normalize.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||||
<link href="css/common.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<link href="css/map.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/map.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1200 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1200 class='tb_layout bg0'>
|
||||||
<tr><td>세 력 도<br><?=closeButton()?></td></tr>
|
<tr><td>세 력 도<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1200 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1200 height=520 class='tb_layout bg0'>
|
||||||
<tr height=520>
|
<tr height=520>
|
||||||
<td width=498 valign=top>
|
<td width=498 valign=top>
|
||||||
<?=getGeneralPublicRecordRecent(34)?>
|
<?=getGeneralPublicRecordRecent(34)?>
|
||||||
@@ -67,15 +65,14 @@ $(function(){
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 valign=top>
|
<td colspan=2 valign=top>
|
||||||
<?php getWorldHistoryRecent(34); ?>
|
<?=getWorldHistoryRecent(34)?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1200 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1200 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -5,15 +5,14 @@ include "lib.php";
|
|||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("갱신정보", 2);
|
increaseRefresh("갱신정보", 2);
|
||||||
|
|
||||||
$query = "select year,month,refresh,maxrefresh,maxonline from game limit 1";
|
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$game = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$log = getRawFileLogRecent(__dir__.'/logs/_traffic.txt', 11, 100);
|
$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
|
||||||
|
|
||||||
$date = [];
|
$date = [];
|
||||||
$year = [];
|
$year = [];
|
||||||
@@ -22,249 +21,176 @@ $refresh = [];
|
|||||||
$online = [];
|
$online = [];
|
||||||
|
|
||||||
$curonline = getOnlineNum();
|
$curonline = getOnlineNum();
|
||||||
$visibleLogs = min(11, count($log));
|
foreach($log as $i=>$value){
|
||||||
for ($i=0; $i < $visibleLogs; $i++) {
|
$parse = Json::decode($value);
|
||||||
$parse = explode("|", $log[count($log)-$visibleLogs+$i]);
|
$date[$i] = $parse[0];
|
||||||
$date[$i] = trim($parse[0]);
|
$year[$i] = $parse[1];
|
||||||
$year[$i] = trim($parse[1]);
|
$month[$i] = $parse[2];
|
||||||
$month[$i] = trim($parse[2]);
|
$refresh[$i] = $parse[3];
|
||||||
$refresh[$i] = trim($parse[3]);
|
$online[$i] = $parse[4];
|
||||||
$online[$i] = trim($parse[4]);
|
|
||||||
}
|
}
|
||||||
if ($game['maxrefresh'] == 0) {
|
$year[] = $admin['year'];
|
||||||
$game['maxrefresh'] = 1;
|
$month[] = $admin['month'];
|
||||||
|
$date[] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
if ($admin['maxrefresh'] == 0) {
|
||||||
|
$admin['maxrefresh'] = 1;
|
||||||
}
|
}
|
||||||
if ($game['maxrefresh'] < $game['refresh']) {
|
if ($admin['maxrefresh'] < $admin['refresh']) {
|
||||||
$game['maxrefresh'] = $game['refresh'];
|
$admin['maxrefresh'] = $admin['refresh'];
|
||||||
}
|
}
|
||||||
if ($game['maxonline'] == 0) {
|
if ($admin['maxonline'] == 0) {
|
||||||
$game['maxonline'] = 1;
|
$admin['maxonline'] = 1;
|
||||||
}
|
}
|
||||||
if ($game['maxonline'] < $curonline) {
|
if ($admin['maxonline'] < $curonline) {
|
||||||
$game['maxonline'] = $curonline;
|
$admin['maxonline'] = $curonline;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>트래픽정보</title>
|
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<style>
|
||||||
|
.big_bar{
|
||||||
|
float:left;
|
||||||
|
position:relative;
|
||||||
|
height:30px;
|
||||||
|
}
|
||||||
|
.big_bar span{
|
||||||
|
float:right;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
line-height:30px;
|
||||||
|
padding-right:1ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.little_bar{
|
||||||
|
float:left;
|
||||||
|
position:relative;
|
||||||
|
height:17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.out_bar{
|
||||||
|
line-height:30px;
|
||||||
|
margin-left:1ch;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>트 래 픽 정 보<br><?=closeButton()?></td></tr>
|
<tr><td>트 래 픽 정 보<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1016 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all;>
|
<table align=center width=1016>
|
||||||
<tr><td align=left>
|
<tr><td align=left>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 id=bg2><font size=5>접 속 량</font></td></tr>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $i < $visibleLogs; $i++) {
|
$refresh[] = $admin['refresh'];
|
||||||
$w = round($refresh[$i] / $game['maxrefresh'] * 100, 1);
|
foreach($refresh as $i=>$value){
|
||||||
if ($w >= 100) {
|
$w = round($value / $admin['maxrefresh'] * 100, 1);
|
||||||
$w -= 0.1;
|
|
||||||
}
|
|
||||||
if ($refresh[$i] < 10 && $w < 3) {
|
|
||||||
$w = 3;
|
|
||||||
} elseif ($refresh[$i] < 100 && $w < 6) {
|
|
||||||
$w = 6;
|
|
||||||
} elseif ($refresh[$i] < 1000 && $w < 9) {
|
|
||||||
$w = 9;
|
|
||||||
}
|
|
||||||
$w2 = round(100 - $w, 1);
|
|
||||||
$color = getTrafficColor($w);
|
$color = getTrafficColor($w);
|
||||||
$dt = substr($date[$i], 11, 5); ?>
|
$dt = substr($date[$i], 11, 5); ?>
|
||||||
<tr height=30>
|
<tr height=30>
|
||||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||||
<td width=2 align=center id=bg1></td>
|
<td width=2 align=center id=bg1></td>
|
||||||
<td width=320 align=center>
|
<td width=320>
|
||||||
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<?php if($w == 0): ?>
|
||||||
<tr>
|
<span class="out_bar"><?=$value?></span>
|
||||||
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$refresh[$i]?> </td>
|
<?php elseif($w < 10): ?>
|
||||||
<td width=<?=$w2?>% id=bg0><font size=1> </font></td>
|
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||||
</tr>
|
<?php else:?>
|
||||||
</table>
|
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||||
|
<?php endif;?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
$w = round($game['refresh'] / $game['maxrefresh'] * 100, 1);
|
|
||||||
if ($w >= 100) {
|
|
||||||
$w -= 0.1;
|
|
||||||
}
|
|
||||||
if ($game['refresh'] < 10 && $w < 3) {
|
|
||||||
$w = 3;
|
|
||||||
} elseif ($game['refresh'] < 100 && $w < 6) {
|
|
||||||
$w = 6;
|
|
||||||
} elseif ($game['refresh'] < 1000 && $w < 9) {
|
|
||||||
$w = 9;
|
|
||||||
}
|
|
||||||
$w2 = round(100 - $w, 1);
|
|
||||||
$color = getTrafficColor($w);
|
|
||||||
$dt = date('H:i');
|
|
||||||
?>
|
?>
|
||||||
<tr height=30>
|
|
||||||
<td width=100 align=center><?=$game['year']?>년 <?=$game['month']?>월</td>
|
|
||||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
|
||||||
<td width=2 align=center id=bg1></td>
|
|
||||||
<td width=320 align=center>
|
|
||||||
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$game['refresh']?> </td>
|
|
||||||
<td width=<?=$w2?>% id=bg0><font size=1> </font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
|
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$game['maxrefresh']?></td>
|
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td align=right>
|
<td align=right>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 id=bg2><font size=5>접 속 자</font></td></tr>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $i < $visibleLogs; $i++) {
|
$online[] = $curonline;
|
||||||
$w = round($online[$i] / $game['maxonline'] * 100, 1);
|
foreach($online as $i=>$value){
|
||||||
if ($w >= 100) {
|
$w = round($value / $admin['maxonline'] * 100, 1);
|
||||||
$w -= 0.1;
|
|
||||||
}
|
|
||||||
if ($online[$i] < 10 && $w < 3) {
|
|
||||||
$w = 3;
|
|
||||||
} elseif ($online[$i] < 100 && $w < 6) {
|
|
||||||
$w = 6;
|
|
||||||
} elseif ($online[$i] < 1000 && $w < 9) {
|
|
||||||
$w = 9;
|
|
||||||
}
|
|
||||||
$w2 = round(100 - $w, 1);
|
|
||||||
$color = getTrafficColor($w);
|
$color = getTrafficColor($w);
|
||||||
$dt = substr($date[$i], 11, 5); ?>
|
$dt = substr($date[$i], 11, 5); ?>
|
||||||
<tr height=30>
|
<tr height=30>
|
||||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||||
<td width=2 align=center id=bg1></td>
|
<td width=2 align=center id=bg1></td>
|
||||||
<td width=320 align=center>
|
<td width=320>
|
||||||
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<?php if($w == 0): ?>
|
||||||
<tr>
|
<span class="out_bar"><?=$value?></span>
|
||||||
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$online[$i]?> </td>
|
<?php elseif($w < 10): ?>
|
||||||
<td width=<?=$w2?>% id=bg0><font size=1> </font></td>
|
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||||
</tr>
|
<?php else:?>
|
||||||
</table>
|
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||||
|
<?php endif;?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
$w = round($curonline / $game['maxonline'] * 100, 1);
|
?>
|
||||||
if ($w >= 100) {
|
|
||||||
$w -= 0.1;
|
|
||||||
}
|
|
||||||
if ($curonline < 10 && $w < 3) {
|
|
||||||
$w = 3;
|
|
||||||
} elseif ($curonline < 100 && $w < 6) {
|
|
||||||
$w = 6;
|
|
||||||
} elseif ($curonline < 1000 && $w < 9) {
|
|
||||||
$w = 9;
|
|
||||||
}
|
|
||||||
$w2 = round(100 - $w, 1);
|
|
||||||
$color = getTrafficColor($w);
|
|
||||||
$dt = date('H:i');
|
|
||||||
echo "
|
|
||||||
<tr height=30>
|
|
||||||
<td width=100 align=center>{$game['year']}년 {$game['month']}월</td>
|
|
||||||
<td width=60 align=center id=bg2>{$dt}</td>
|
|
||||||
<td width=2 align=center id=bg1></td>
|
|
||||||
<td width=320 align=center>
|
|
||||||
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
<td width={$w}% bgcolor={$color} align=right>{$curonline} </td>
|
|
||||||
<td width={$w2}% id=bg0><font size=1> </font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
|
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 height=30 align=center id=bg0>최고기록: {$game['maxonline']}</td>
|
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
|
||||||
?>
|
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 id=bg2><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr>
|
||||||
<?php
|
<?php
|
||||||
$query = "select sum(refresh) as refresh,sum(connect) as connect from general";
|
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$max_refresh['name'] = '접속자 총합';
|
||||||
$user = MYDB_fetch_array($result);
|
|
||||||
$user['connect'] = round($user['connect'], 1);
|
|
||||||
$maxrefresh = $user['refresh'];
|
|
||||||
|
|
||||||
$w = round($maxrefresh / $maxrefresh * 100, 1);
|
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
|
||||||
$w2 = round(100 - $w, 1);
|
|
||||||
$color = getTrafficColor($w);
|
|
||||||
echo "
|
|
||||||
<tr id=bg2>
|
|
||||||
<td width=98 align=center>주의대상자</td>
|
|
||||||
<td width=98 align=center>벌점(순간갱신)</td>
|
|
||||||
<td width=798 align=center>전체 대비</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align=center>접속자 총합</td>
|
|
||||||
<td align=center>{$user['connect']}({$maxrefresh})</td>
|
|
||||||
<td align=center>
|
|
||||||
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
<td width={$w}% bgcolor={$color}> </td>
|
|
||||||
<td width={$w2}%> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
";
|
|
||||||
|
|
||||||
$query = "select name,refresh,connect from general order by refresh desc limit 0,5";
|
foreach ($refresh_result as $i=>$user) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$w = round($user['refresh'] / $max_refresh['refresh'] * 100, 1);
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
for ($i=0; $i < $count; $i++) {
|
|
||||||
$user = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$w = round($user['refresh'] / $maxrefresh * 100, 1);
|
|
||||||
$w2 = round(100 - $w, 1);
|
$w2 = round(100 - $w, 1);
|
||||||
$color = getTrafficColor($w);
|
$color = getTrafficColor($w);
|
||||||
echo "
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=98 align=center>{$user['name']}</td>
|
<td width=98 align=center><?=$user['name']?></td>
|
||||||
<td width=98 align=center>{$user['connect']}({$user['refresh']})</td>
|
<td width=98 align=center><?=$user['connect']?>(<?=$user['refresh']?>)</td>
|
||||||
<td width=798 align=center>
|
<td width=798>
|
||||||
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<?php if($w == 0): ?>
|
||||||
<tr>
|
<?php elseif($w < 10): ?>
|
||||||
<td width={$w}% bgcolor={$color}> </td>
|
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||||
<td width={$w2}%> </td>
|
<?php else:?>
|
||||||
</tr>
|
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||||
</table>
|
<?php endif;?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@@ -274,7 +200,7 @@ function getTrafficColor($per)
|
|||||||
$r = getHex($per);
|
$r = getHex($per);
|
||||||
$b = getHex(100 - $per);
|
$b = getHex(100 - $per);
|
||||||
$color = $r . "00" . $b;
|
$color = $r . "00" . $b;
|
||||||
return $color;
|
return '#'.$color;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHex($dec)
|
function getHex($dec)
|
||||||
|
|||||||
@@ -7,31 +7,41 @@ include "func.php";
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("설문조사", 1);
|
increaseRefresh("설문조사", 1);
|
||||||
|
|
||||||
|
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||||
|
$isVoteAdmin |= $session->userGrade >= 5;
|
||||||
|
|
||||||
$query = "select no,vote from general where owner='{$userID}'";
|
$query = "select no,vote from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select develcost,voteopen,vote,votecomment from game limit 1";
|
$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$vote_title = $admin['vote_title']??'-';
|
||||||
$admin = MYDB_fetch_array($result);
|
$vote = $admin['vote']?:['-'];
|
||||||
|
|
||||||
$vote = explode("|", $admin['vote']);
|
|
||||||
if ($vote[0] == "") {
|
|
||||||
$vote[0] = "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>설문조사</title>
|
<title><?=UniqueConst::$serverName?>: 설문조사</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<style>
|
||||||
|
.little_bar{
|
||||||
|
float:left;
|
||||||
|
position:relative;
|
||||||
|
height:17px;
|
||||||
|
line-height:17px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function captureKey(e) {
|
function captureKey(e) {
|
||||||
if(e.keyCode == 13 && e.srcElement.type == 'text') {
|
if(e.keyCode == 13 && e.srcElement.type == 'text') {
|
||||||
@@ -44,15 +54,15 @@ function captureKey(e) {
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>설 문 조 사<br><?=closeButton()?></td></tr>
|
<tr><td>설 문 조 사<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<form name=form1 action=c_vote.php method=post>
|
<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 id=bg2><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($session->userGrade >= 5) {
|
if ($isVoteAdmin) {
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=48 align=center><input type=submit name=btn value='알림'></td>
|
<td width=48 align=center><input type=submit name=btn value='알림'></td>
|
||||||
@@ -62,11 +72,11 @@ if ($session->userGrade >= 5) {
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
$vote[0] = Tag2Code($vote[0]);
|
$vote_title = Tag2Code($vote_title);
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 width=148 align=center id=bg1>제 목</td>
|
<td colspan=2 width=148 align=center id=bg1>제 목</td>
|
||||||
<td width=848 align=left> {$vote[0]}</td>
|
<td width=848 align=left> {$vote_title}</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
|
||||||
@@ -91,7 +101,7 @@ for ($i=1; $i < $voteTypeCount; $i++) {
|
|||||||
echo "
|
echo "
|
||||||
<input type=radio name=sel value={$i}>
|
<input type=radio name=sel value={$i}>
|
||||||
";
|
";
|
||||||
} elseif ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
|
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||||
$query = "select no from general where vote='{$i}'";
|
$query = "select no from general where vote='{$i}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$vCount = MYDB_num_rows($result);
|
$vCount = MYDB_num_rows($result);
|
||||||
@@ -127,7 +137,7 @@ echo "
|
|||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
|
||||||
if ($session->userGrade >= 5) {
|
if ($isVoteAdmin) {
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center><input type=submit name=btn value='리셋'></td>
|
<td align=center><input type=submit name=btn value='리셋'></td>
|
||||||
@@ -137,49 +147,49 @@ if ($session->userGrade >= 5) {
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admin['votecomment'] != "") {
|
if ($admin['votecomment']) {
|
||||||
$comment = explode("|", $admin['votecomment']);
|
$comment = $admin['votecomment'];
|
||||||
$commentCount = count($comment);
|
$commentCount = count($comment);
|
||||||
} else {
|
} else {
|
||||||
$commentCount = 0;
|
$commentCount = 0;
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 align=center id=bg1>댓 글</td>
|
<td colspan=4 align=center id=bg1>댓 글</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
for ($i=0; $i < $commentCount; $i++) {
|
for ($i=0; $i < $commentCount; $i++) {
|
||||||
$cmt = explode(":", $comment[$i]);
|
$cmt = $comment[$i];
|
||||||
$cmt[2] = Tag2Code($cmt[2]);
|
$cmt[2] = Tag2Code($cmt[2]);
|
||||||
$j = $i+1;
|
$j = $i+1;
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=28 align=center>{$j}.</td>
|
<td width=28 align=center>{$j}.</td>
|
||||||
<td width=83 align=center>{$cmt[0]}</td>
|
<td width=130 align=center>{$cmt[0]}</td>
|
||||||
<td width=83 align=center>{$cmt[1]}</td>
|
<td width=130 align=center>{$cmt[1]}</td>
|
||||||
<td width=788 align=left> {$cmt[2]}</td>
|
<td width=712 align=left> {$cmt[2]}</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
if ($me['no'] > 0) {
|
if ($me['no'] > 0) {
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=108 colspan=2 align=center>-</td>
|
<td width=158 colspan=2 align=center>-</td>
|
||||||
<td width=83 align=center><input type=submit name=btn value='댓글'></td>
|
<td width=130 align=center><input type=submit name=btn value='댓글'></td>
|
||||||
<td align=left><input type=text name=comment maxlength=60 style=width:798px; onkeydown='return captureKey(event)'></td>
|
<td align=left><input type=text name=comment maxlength=60 style=width:700px; onkeydown='return captureKey(event)'></td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 id=bg2><font size=5>
|
||||||
전 체 통 계
|
전 체 통 계
|
||||||
<?php
|
<?php
|
||||||
if ($session->userGrade >= 5) {
|
if ($isVoteAdmin) {
|
||||||
echo "
|
echo "
|
||||||
<input type=submit name=btn value='숨김'>
|
<input type=submit name=btn value='숨김'>
|
||||||
<input type=submit name=btn value='전체통계만'>
|
<input type=submit name=btn value='전체통계만'>
|
||||||
@@ -188,32 +198,27 @@ if ($session->userGrade >= 5) {
|
|||||||
echo "
|
echo "
|
||||||
</font></td></tr>";
|
</font></td></tr>";
|
||||||
|
|
||||||
if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
|
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=98 align=center>전 체</td>
|
<td width=130 align=center>전 체</td>
|
||||||
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
|
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
|
||||||
<td width=768 align=center>
|
<td width=742>
|
||||||
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
";
|
";
|
||||||
|
|
||||||
$memCount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2');
|
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
|
||||||
if ($memCount == 0) {
|
|
||||||
$memCount = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$totalVote = [];
|
$totalVote = [];
|
||||||
$nationVoteCount = [[0]];
|
$nationVoteCount = [];
|
||||||
$nationVote = [[]];
|
$nationVote = [];
|
||||||
|
|
||||||
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
|
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
|
||||||
$nation = $row['nation'];
|
$nation = $row['nation'];
|
||||||
$vote = $row['vote'];
|
$ownVote = $row['vote'];
|
||||||
$cnt = $row['cnt'];
|
$cnt = $row['cnt'];
|
||||||
|
|
||||||
if (!isset($totalVote[$vote])) {
|
if (!isset($totalVote[$ownVote])) {
|
||||||
$totalVote[$vote] = 0;
|
$totalVote[$ownVote] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($nationVoteCount[$nation])) {
|
if (!isset($nationVoteCount[$nation])) {
|
||||||
@@ -221,32 +226,44 @@ if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
|
|||||||
$nationVote[$nation] = [];
|
$nationVote[$nation] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($nationVote[$nation][$vote])) {
|
if (!isset($nationVote[$nation][$ownVote])) {
|
||||||
$nationVote[$nation][$vote] = 0;
|
$nationVote[$nation][$ownVote] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$totalVote[$vote] += $cnt;
|
$totalVote[$ownVote] += $cnt;
|
||||||
$nationVoteCount[$nation] += $cnt;
|
$nationVoteCount[$nation] += $cnt;
|
||||||
$nationVote[$nation][$vote] += $cnt;
|
$nationVote[$nation][$ownVote] += $cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$totalPer = 0;
|
||||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||||
$per = round(($totalVote[$i]??0) / $memCount * 100, 1);
|
$per = round(($totalVote[$i]??0) * 100 / $memCount, 1);
|
||||||
|
if($i == $voteTypeCount-1){
|
||||||
|
$per = 100-$totalPer;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$totalPer += $per;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if($per < 5) { $vote['cnt'] = " "; }
|
// if($per < 5) { $vote['cnt'] = " "; }
|
||||||
echo "
|
?>
|
||||||
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$totalVote[$i]}</td>
|
<?php if($per == 0): ?>
|
||||||
";
|
<?php elseif($per < 10): ?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
|
||||||
|
<?php else:?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$totalVote[$i]?></div>
|
||||||
|
<?php endif;?>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
|
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||||
$query = "select no from general where nation=0 and npc<2";
|
$query = "select no from general where nation=0 and npc<2";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$memCount = MYDB_num_rows($result);
|
$memCount = MYDB_num_rows($result);
|
||||||
@@ -263,22 +280,30 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td align=center bgcolor=black>재 야</td>
|
<td align=center bgcolor=black>재 야</td>
|
||||||
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</td>
|
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</td>
|
||||||
<td align=center>
|
<td>
|
||||||
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
";
|
";
|
||||||
|
|
||||||
|
$totalPer = 0;
|
||||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||||
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
|
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
|
||||||
|
if($i == $voteTypeCount-1){
|
||||||
|
$per = 100-$totalPer;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$totalPer += $per;
|
||||||
|
}
|
||||||
// if($per < 5) { $vote['cnt'] = " "; }
|
// if($per < 5) { $vote['cnt'] = " "; }
|
||||||
echo "
|
?>
|
||||||
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$nationVote[0][$i]}</td>
|
<?php if($per == 0): ?>
|
||||||
";
|
<?php elseif($per < 10): ?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
|
||||||
|
<?php else:?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$nationVote[0][$i]?></div>
|
||||||
|
<?php endif;?>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
@@ -293,29 +318,52 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$memCount = MYDB_num_rows($result);
|
$memCount = MYDB_num_rows($result);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
|
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
|
||||||
$percentage = round($voteCount / $memCount * 100, 1);
|
if($memCount == 0){
|
||||||
|
$percentage = 100;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$percentage = round($voteCount / $memCount * 100, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
|
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
|
||||||
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</td>
|
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</td>
|
||||||
<td align=center>
|
<td align=center>
|
||||||
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
";
|
";
|
||||||
|
|
||||||
|
$totalPer = 0;
|
||||||
for ($k=0; $k < $voteTypeCount; $k++) {
|
for ($k=0; $k < $voteTypeCount; $k++) {
|
||||||
$per = round($nationVote[$nation['nation']][$k] / $memCount * 100, 1);
|
if($memCount == 0){
|
||||||
|
$per = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$per = round($nationVote[$nation['nation']][$k]??0 / $memCount * 100, 1);
|
||||||
|
|
||||||
|
if($i == $voteTypeCount-1){
|
||||||
|
$per = 100-$totalPer;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$totalPer += $per;
|
||||||
|
}
|
||||||
|
|
||||||
// if($per < 5) { $vote['cnt'] = " "; }
|
// if($per < 5) { $vote['cnt'] = " "; }
|
||||||
echo "
|
?>
|
||||||
<td width={$per}% align=center style=color:".getNewColor($k)."; bgcolor=".getVoteColor($k).">{$nationVote[$nation['nation']][$k]}</td>
|
<?php if($per == 0): ?>
|
||||||
";
|
<?php elseif($per < 10): ?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'></div>
|
||||||
|
<?php else:?>
|
||||||
|
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'><?=$nationVote[$nation['nation']][$k]??0?></div>
|
||||||
|
<?php endif;?>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
@@ -324,11 +372,10 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
|
|||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("거래장", 2);
|
increaseRefresh("거래장", 2);
|
||||||
@@ -22,11 +23,7 @@ $query = "select no,special,con,turntime from general where owner='{$userID}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
$con = checkLimit($me['con']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -58,18 +55,19 @@ if ($msg2 == "") {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>거래장</title>
|
<title><?=UniqueConst::$serverName?>: 거래장</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>거 래 장<br><?=closeButton()?></td></tr>
|
<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 id=bg2><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick=location.replace('b_auction.php')></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<form method=post action=c_auction.php>
|
<form method=post action=c_auction.php>
|
||||||
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr>
|
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr>
|
||||||
<tr align=center id=bg1>
|
<tr align=center id=bg1>
|
||||||
@@ -167,7 +165,7 @@ for ($i=0; $i < $count; $i++) {
|
|||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<form method=post action=c_auction.php>
|
<form method=post action=c_auction.php>
|
||||||
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr>
|
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr>
|
||||||
<tr align=center id=bg1>
|
<tr align=center id=bg1>
|
||||||
@@ -265,7 +263,7 @@ for ($i=0; $i < $count; $i++) {
|
|||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 id=bg2><font size=5>최 근 기 록</font></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<?=getAuctionLogRecent(20)?>
|
<?=getAuctionLogRecent(20)?>
|
||||||
@@ -284,7 +282,7 @@ for ($i=0; $i < $count; $i++) {
|
|||||||
ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.<br>
|
ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.<br>
|
||||||
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
|
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
|
||||||
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
|
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
|
||||||
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다. 거상 특기 소유자는 1인당 도합 3건입니다.<br>
|
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
|
||||||
ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.<br>
|
ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.<br>
|
||||||
ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.<br>
|
ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.<br>
|
||||||
ㆍ<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
|
ㆍ<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
|
||||||
@@ -299,6 +297,5 @@ for ($i=0; $i < $count; $i++) {
|
|||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -23,15 +23,13 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("감찰부", 2);
|
increaseRefresh("감찰부", 2);
|
||||||
//전투 추진을 위해 갱신
|
//전투 추진을 위해 갱신
|
||||||
checkTurn();
|
checkTurn();
|
||||||
|
$gameStor->resetCache();
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select nation from general where no='$gen'";
|
$query = "select nation from general where no='$gen'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
@@ -45,7 +43,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -75,15 +73,17 @@ $sel[$type] = "selected";
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>감찰부</title>
|
<title><?=UniqueConst::$serverName?>: 감찰부</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>감 찰 부<br><?=closeButton()?></td></tr>
|
<tr><td>감 찰 부<br><?=closeButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=post>
|
||||||
@@ -100,20 +100,23 @@ $sel[$type] = "selected";
|
|||||||
<?php
|
<?php
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
default:
|
default:
|
||||||
case 0: $query = "select no,name from general where nation='{$me['nation']}' order by turntime desc"; break;
|
case 0: $query = "select no,name,npc from general where nation='{$me['nation']}' order by turntime desc"; break;
|
||||||
case 1: $query = "select no,name from general where nation='{$me['nation']}' order by recwar desc"; break;
|
case 1: $query = "select no,name,npc from general where nation='{$me['nation']}' order by recwar desc"; break;
|
||||||
case 2: $query = "select no,name from general where nation='{$me['nation']}' order by npc,binary(name)"; break;
|
case 2: $query = "select no,name,npc from general where nation='{$me['nation']}' order by npc,binary(name)"; break;
|
||||||
case 3: $query = "select no,name from general where nation='{$me['nation']}' order by warnum desc"; break;
|
case 3: $query = "select no,name,npc from general where nation='{$me['nation']}' order by warnum desc"; break;
|
||||||
}
|
}
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$gencount = MYDB_num_rows($result);
|
$gencount = MYDB_num_rows($result);
|
||||||
|
$npc = 0;
|
||||||
for ($i=0; $i < $gencount; $i++) {
|
for ($i=0; $i < $gencount; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
// 선택 없으면 맨 처음 장수
|
// 선택 없으면 맨 처음 장수
|
||||||
if ($gen == 0) {
|
if ($gen == 0) {
|
||||||
$gen = $general['no'];
|
$gen = $general['no'];
|
||||||
}
|
}
|
||||||
|
if($gen == $general['no']){
|
||||||
|
$npc = $general['npc'];
|
||||||
|
}
|
||||||
if ($gen == $general['no']) {
|
if ($gen == $general['no']) {
|
||||||
echo "
|
echo "
|
||||||
<option selected value={$general['no']}>{$general['name']}</option>";
|
<option selected value={$general['no']}>{$general['name']}</option>";
|
||||||
@@ -128,7 +131,7 @@ for ($i=0; $i < $gencount; $i++) {
|
|||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 align=center class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=50% align=center id=bg1><font color=skyblue size=3>장 수 정 보</font></td>
|
<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 id=bg1><font color=orange size=3>장 수 열 전</font></td>
|
||||||
@@ -153,11 +156,23 @@ for ($i=0; $i < $gencount; $i++) {
|
|||||||
<?=getBatResRecent($gen, 24)?>
|
<?=getBatResRecent($gen, 24)?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php if($npc > 1): ?>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign=top>
|
||||||
|
<?=getGenLogRecent($gen, 24)?>
|
||||||
|
</td>
|
||||||
|
<td valign=top>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("베팅장", 1);
|
increaseRefresh("베팅장", 1);
|
||||||
@@ -17,11 +18,13 @@ $query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+b
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select conlimit,tournament,phase,tnmt_type,develcost,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
|
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$admin['bet'] =
|
||||||
$admin = MYDB_fetch_array($result);
|
$admin['bet0'] + $admin['bet1'] + $admin['bet2'] + $admin['bet3'] + $admin['bet4'] +
|
||||||
|
$admin['bet5'] + $admin['bet6'] + $admin['bet7'] + $admin['bet8'] + $admin['bet9'] +
|
||||||
|
$admin['bet10'] + $admin['bet11'] + $admin['bet12'] + $admin['bet13'] + $admin['bet14'] + $admin['bet15'];
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -37,7 +40,13 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
|||||||
|
|
||||||
$str1 = getTournament($admin['tournament']);
|
$str1 = getTournament($admin['tournament']);
|
||||||
$str2 = getTournamentTime();
|
$str2 = getTournamentTime();
|
||||||
|
if($str2){
|
||||||
|
$str2 = ', '.$str2;
|
||||||
|
}
|
||||||
$str3 = getTournamentTerm();
|
$str3 = getTournamentTerm();
|
||||||
|
if($str3){
|
||||||
|
$str3 = ', '.$str3;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -46,38 +55,35 @@ $str3 = getTournamentTerm();
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>베팅장</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<style>
|
<meta name="viewport" content="width=1024" />
|
||||||
body { color:white; background-color:black; border-width:1px; border-color:gray; }
|
<title><?=UniqueConst::$serverName?>: 베팅장</title>
|
||||||
table { font-family:'맑은 고딕'; line-height:110%; }
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
font { font-family:'맑은 고딕'; line-height:110%; }
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
|
|
||||||
select { font-family:'굴림'; line-height:100%; }
|
|
||||||
#bg0 { background-image:url(<?=ServConfig::$gameImagePath?>/back_walnut.jpg); }
|
|
||||||
#bg1 { background-image:url(<?=ServConfig::$gameImagePath?>/back_green.jpg); }
|
|
||||||
#bg2 { background-image:url(<?=ServConfig::$gameImagePath?>/back_blue.jpg); }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1120 class='tb_layout bg0'>
|
||||||
<tr><td>베 팅 장<br><?=closeButton()?></td></tr>
|
<tr><td>베 팅 장<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10px;word-break:break-all; id=bg0>
|
<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><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 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>(전체 금액 : <?=$admin['bet']?> / 내 투자 금액 : <?=$me['bet']?>)</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>(전체 금액 : <?=$admin['bet']?> / 내 투자 금액 : <?=$me['bet']?>)</font></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10px;word-break:break-all; id=bg0>
|
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
|
||||||
<tr align=center><td height=10 colspan=16></td></tr>
|
<tr align=center><td height=10 colspan=16></td></tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<?php
|
<?php
|
||||||
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
|
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
for ($i=0; $i < 1; $i++) {
|
for ($i=0; $i < 1; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'win'=>0
|
||||||
|
];
|
||||||
if ($general['name'] == "") {
|
if ($general['name'] == "") {
|
||||||
$general['name'] = "-";
|
$general['name'] = "-";
|
||||||
}
|
}
|
||||||
@@ -102,7 +108,11 @@ for ($i=0; $i < 1; $i++) {
|
|||||||
$cent[$i] = "<font color=white>";
|
$cent[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
for ($i=0; $i < 2; $i++) {
|
for ($i=0; $i < 2; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'win'=>0
|
||||||
|
];
|
||||||
if ($general['name'] == "") {
|
if ($general['name'] == "") {
|
||||||
$general['name'] = "-";
|
$general['name'] = "-";
|
||||||
}
|
}
|
||||||
@@ -143,7 +153,11 @@ for ($i=0; $i < 2; $i++) {
|
|||||||
$cent[$i] = "<font color=white>";
|
$cent[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
for ($i=0; $i < 4; $i++) {
|
for ($i=0; $i < 4; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'win'=>0
|
||||||
|
];
|
||||||
if ($general['name'] == "") {
|
if ($general['name'] == "") {
|
||||||
$general['name'] = "-";
|
$general['name'] = "-";
|
||||||
}
|
}
|
||||||
@@ -184,7 +198,11 @@ for ($i=0; $i < 4; $i++) {
|
|||||||
$cent[$i] = "<font color=white>";
|
$cent[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
for ($i=0; $i < 8; $i++) {
|
for ($i=0; $i < 8; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'win'=>0
|
||||||
|
];
|
||||||
if ($general['name'] == "") {
|
if ($general['name'] == "") {
|
||||||
$general['name'] = "-";
|
$general['name'] = "-";
|
||||||
}
|
}
|
||||||
@@ -225,7 +243,11 @@ for ($i=0; $i < 8; $i++) {
|
|||||||
$cent[$i] = "<font color=white>";
|
$cent[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
for ($i=0; $i < 16; $i++) {
|
for ($i=0; $i < 16; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'win'=>0
|
||||||
|
];
|
||||||
if ($general['name'] == "") {
|
if ($general['name'] == "") {
|
||||||
$general['name'] = "-";
|
$general['name'] = "-";
|
||||||
}
|
}
|
||||||
@@ -268,19 +290,27 @@ for ($i=0; $i < 16; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ($i=0; $i < 16; $i++) {
|
for ($i=0; $i < 16; $i++) {
|
||||||
$bet[$i] = @round($admin['bet'] / $admin["bet{$i}"], 2);
|
if($admin["bet{$i}"] == 0){
|
||||||
if ($bet[$i] == 0) {
|
|
||||||
$bet[$i] = "∞";
|
$bet[$i] = "∞";
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
$bet[$i] = round($admin['bet'] / $admin["bet{$i}"], 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i=0; $i < 16; $i++) {
|
for ($i=0; $i < 16; $i++) {
|
||||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
if(!is_numeric($bet[$i])){
|
||||||
|
$gold[$i] = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1120 class='tb_layout bg0'>
|
||||||
<tr align=center><td height=10 colspan=16></td></tr>
|
<tr align=center><td height=10 colspan=16></td></tr>
|
||||||
<?php
|
<?php
|
||||||
echo "
|
echo "
|
||||||
@@ -359,7 +389,7 @@ if ($admin['tournament'] == 6) {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr align=center><td height=10 colspan=16></td></tr>
|
<tr align=center><td height=10 colspan=16></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<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 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 colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
@@ -374,7 +404,7 @@ for ($i=0; $i < 4; $i++) {
|
|||||||
$grp = $i;
|
$grp = $i;
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td>
|
||||||
<table align=center width=280 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=280 class='tb_layout bg0'>
|
||||||
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4>{$type1[$i]}</font></td></tr>
|
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4>{$type1[$i]}</font></td></tr>
|
||||||
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$type2[$i]}</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 id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$type2[$i]}</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>";
|
||||||
|
|
||||||
@@ -401,10 +431,9 @@ for ($i=0; $i < 4; $i++) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1120 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -25,15 +25,18 @@ if($me['level'] < 5) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>기밀실</title>
|
<title><?=UniqueConst::$serverName?>: 기밀실</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style='width:1000px;margin:auto'>
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>기 밀 실<br><?=backButton()?></td></tr>
|
<tr><td>기 밀 실<br><?=backButton()?></td></tr>
|
||||||
<form name=form1 method=post action=c_chiefboard.php>
|
<form name=form1 method=post action=c_chiefboard.php>
|
||||||
<tr><td align=center>
|
<tr><td align=center>
|
||||||
@@ -65,11 +68,11 @@ for($i=0; $i < 20; $i++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("사령부", 1);
|
increaseRefresh("사령부", 1);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
@@ -24,7 +21,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||||
|
|
||||||
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||||
@@ -38,9 +35,7 @@ else { $btn = "hidden"; $btn2 = "hidden"; }
|
|||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// 명령 목록
|
// 명령 목록
|
||||||
$query = "select year,month,turnterm from game limit 1";
|
$admin = $gameStor->getValues(['year','month','turnterm']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "
|
$query = "
|
||||||
select nation,level,
|
select nation,level,
|
||||||
@@ -58,23 +53,36 @@ $nation = MYDB_fetch_array($result);
|
|||||||
|
|
||||||
$lv = getNationChiefLevel($nation['level']);
|
$lv = getNationChiefLevel($nation['level']);
|
||||||
$turn = [];
|
$turn = [];
|
||||||
$gen = [[],[],[],[],[],[],[],[],[],[],[],[]];
|
|
||||||
for($i=12; $i >= $lv; $i--) {
|
for($i=12; $i >= $lv; $i--) {
|
||||||
$turn[$i] = getCoreTurn($nation, $i);
|
$turn[$i] = getCoreTurn($nation, $i);
|
||||||
|
|
||||||
$query = "select name,turntime,npc from general where level={$i} and nation='{$me['nation']}'";
|
$query = "select name,turntime,npc from general where level={$i} and nation='{$me['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gen[$i] = MYDB_fetch_array($result);
|
$gen[$i] = MYDB_fetch_array($result)??[
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'turntime'=>''
|
||||||
|
];
|
||||||
|
}
|
||||||
|
for($i= $lv - 1; $i>=5; $i--){
|
||||||
|
$gen[$i] = [
|
||||||
|
'npc'=>0,
|
||||||
|
'name'=>'',
|
||||||
|
'turntime'=>''
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>사령부</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function turn(type) {
|
function turn(type) {
|
||||||
if(type == 0) location.replace('turn_push_core.php');
|
if(type == 0) location.replace('turn_push_core.php');
|
||||||
@@ -85,10 +93,10 @@ function turn(type) {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>사 령 부<input type=button value='갱신' onclick=location.replace('b_chiefcenter.php')><br><?=backButton()?></td></tr>
|
<tr><td>사 령 부<input type=button value='갱신' onclick=location.replace('b_chiefcenter.php')><br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td colspan=10 align=center bgcolor=skyblue>수뇌부 일정</td></tr>
|
<tr><td colspan=10 align=center bgcolor=skyblue>수뇌부 일정</td></tr>
|
||||||
<tr><td colspan=10 align=center>
|
<tr><td colspan=10 align=center>
|
||||||
<?php
|
<?php
|
||||||
@@ -110,13 +118,6 @@ for($i=12; $i >= $lv; $i--) {
|
|||||||
for($k=0; $k < 2; $k++) {
|
for($k=0; $k < 2; $k++) {
|
||||||
$l4 = 12 - $k; $l3 = 10 - $k; $l2 = 8 - $k; $l1 = 6 - $k;
|
$l4 = 12 - $k; $l3 = 10 - $k; $l2 = 8 - $k; $l1 = 6 - $k;
|
||||||
|
|
||||||
if(!isset($gen[$l4])){
|
|
||||||
$gen[$l4] = [
|
|
||||||
'npc'=>0,
|
|
||||||
'name'=>0
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($gen[$l4]['npc'] >= 2) { $gen[$l4]['name'] = "<font color=cyan>".($gen[$l4]['name']??'')."</font>"; }
|
if ($gen[$l4]['npc'] >= 2) { $gen[$l4]['name'] = "<font color=cyan>".($gen[$l4]['name']??'')."</font>"; }
|
||||||
elseif($gen[$l4]['npc'] == 1) { $gen[$l4]['name'] = "<font color=skyblue>".($gen[$l4]['name']??'')."</font>"; }
|
elseif($gen[$l4]['npc'] == 1) { $gen[$l4]['name'] = "<font color=skyblue>".($gen[$l4]['name']??'')."</font>"; }
|
||||||
if ($gen[$l3]['npc'] >= 2) { $gen[$l3]['name'] = "<font color=cyan>".($gen[$l3]['name']??'')."</font>"; }
|
if ($gen[$l3]['npc'] >= 2) { $gen[$l3]['name'] = "<font color=cyan>".($gen[$l3]['name']??'')."</font>"; }
|
||||||
@@ -153,16 +154,16 @@ for($k=0; $k < 2; $k++) {
|
|||||||
$tn1 = $turn[$l1][$i]??"-";
|
$tn1 = $turn[$l1][$i]??"-";
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=28 align=center id=bg0><b>$j</b></td>
|
<td width=20 align=center id=bg0><b>$j</b></td>
|
||||||
<td width=58 align=center bgcolor=black><b>$td4</b></td>
|
<td width=43 align=center bgcolor=black><b>$td4</b></td>
|
||||||
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn4</td>
|
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn4</td>
|
||||||
<td width=58 align=center bgcolor=black><b>$td3</b></td>
|
<td width=43 align=center bgcolor=black><b>$td3</b></td>
|
||||||
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn3</td>
|
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn3</td>
|
||||||
<td width=58 align=center bgcolor=black><b>$td2</b></td>
|
<td width=43 align=center bgcolor=black><b>$td2</b></td>
|
||||||
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn2</td>
|
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn2</td>
|
||||||
<td width=58 align=center bgcolor=black><b>$td1</b></td>
|
<td width=43 align=center bgcolor=black><b>$td1</b></td>
|
||||||
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn1</td>
|
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn1</td>
|
||||||
<td width=28 align=center id=bg0><b>$j</b></td>
|
<td width=20 align=center id=bg0><b>$j</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
if($totaldate[$l4]??'') { $totaldate[$l4] = addTurn($totaldate[$l4], $admin['turnterm']); }
|
if($totaldate[$l4]??'') { $totaldate[$l4] = addTurn($totaldate[$l4], $admin['turnterm']); }
|
||||||
@@ -184,11 +185,10 @@ for($k=0; $k < 2; $k++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -25,24 +25,41 @@ $query = "select nation,level,spy from nation where nation='{$me['nation']}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$myNation = MYDB_fetch_array($result);
|
$myNation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>도시정보</title>
|
<title><?=UniqueConst::$serverName?>: 도시정보</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link href="../d_shared/common.css" rel="stylesheet">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link href="css/common.css" rel="stylesheet">
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<style>
|
||||||
|
#general_list tr td{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#general_list tr td:last-child{
|
||||||
|
text-align:left;
|
||||||
|
padding-left:1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_turn_text{
|
||||||
|
font-size:x-small;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>도 시 정 보<br><?=backButton()?></td></tr>
|
<tr><td>도 시 정 보<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=998>
|
<td width=998>
|
||||||
<form name=cityselect method=get>도시선택 :
|
<form name=cityselect method=get>도시선택 :
|
||||||
@@ -160,44 +177,44 @@ if($city['trade'] == 0) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table align=center width=1000 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=12 align=center style=color:"<?=newColor($nation['color'])?>"; bgcolor=<?=$nation['color']?>>【 <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
|
<td colspan=12 align=center style=color:"<?=newColor($nation['color'])?>"; bgcolor=<?=$nation['color']?>>【 <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=48 id=bg1>주민</td>
|
<td align=center width=46 class=bg1>주민</td>
|
||||||
<td align=center width=112><?=$city['pop']?>/<?=$city['pop2']?></td>
|
<td align=center width=140><?=$city['pop']?>/<?=$city['pop2']?></td>
|
||||||
<td align=center width=48 id=bg1>농업</td>
|
<td align=center width=46 class=bg1>농업</td>
|
||||||
<td align=center width=108><?=$city['agri']?>/<?=$city['agri2']?></td>
|
<td align=center width=140><?=$city['agri']?>/<?=$city['agri2']?></td>
|
||||||
<td align=center width=48 id=bg1>상업</td>
|
<td align=center width=46 class=bg1>상업</td>
|
||||||
<td align=center width=108><?=$city['comm']?>/<?=$city['comm2']?></td>
|
<td align=center width=140><?=$city['comm']?>/<?=$city['comm2']?></td>
|
||||||
<td align=center width=48 id=bg1>치안</td>
|
<td align=center width=46 class=bg1>치안</td>
|
||||||
<td align=center width=108><?=$city['secu']?>/<?=$city['secu2']?></td>
|
<td align=center width=140><?=$city['secu']?>/<?=$city['secu2']?></td>
|
||||||
<td align=center width=48 id=bg1>수비</td>
|
<td align=center width=46 class=bg1>수비</td>
|
||||||
<td align=center width=108><?=$city['def']?>/<?=$city['def2']?></td>
|
<td align=center width=140><?=$city['def']?>/<?=$city['def2']?></td>
|
||||||
<td align=center width=48 id=bg1>성벽</td>
|
<td align=center width=46 class=bg1>성벽</td>
|
||||||
<td align=center width=108><?=$city['wall']?>/<?=$city['wall2']?></td>
|
<td align=center width=140><?=$city['wall']?>/<?=$city['wall2']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1>민심</td>
|
<td align=center class=bg1>민심</td>
|
||||||
<td align=center><?=$city['rate']?></td>
|
<td align=center><?=$city['rate']?></td>
|
||||||
<td align=center id=bg1>시세</td>
|
<td align=center class=bg1>시세</td>
|
||||||
<td align=center><?=$city['trade']?>%</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['pop2']*100, 2)?>%</td>
|
<td align=center><?=round($city['pop']/$city['pop2']*100, 2)?>%</td>
|
||||||
<td align=center id=bg1>태수</td>
|
<td align=center class=bg1>태수</td>
|
||||||
<td align=center><?=$gen1['name']??'-'?></td>
|
<td align=center><?=$gen1['name']??'-'?></td>
|
||||||
<td align=center id=bg1>군사</td>
|
<td align=center class=bg1>군사</td>
|
||||||
<td align=center><?=$gen2['name']??'-'?></td>
|
<td align=center><?=$gen2['name']??'-'?></td>
|
||||||
<td align=center id=bg1>시중</td>
|
<td align=center class=bg1>시중</td>
|
||||||
<td align=center><?=$gen3['name']??'-'?></td>
|
<td align=center><?=$gen3['name']??'-'?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1>장수</td>
|
<td align=center class=bg1>장수</td>
|
||||||
<td colspan=11>
|
<td colspan=11>
|
||||||
<?php
|
<?php
|
||||||
$query = "select name, npc from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록
|
$query = "select name, npc from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록
|
||||||
@@ -212,6 +229,26 @@ if($city['trade'] == 0) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<table align=center class='tb_layout bg0'>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td width=64 align=center class=bg1>얼 굴</td>
|
||||||
|
<td width=128 align=center class=bg1>이 름</td>
|
||||||
|
<td width=48 align=center class=bg1>통솔</td>
|
||||||
|
<td width=48 align=center class=bg1>무력</td>
|
||||||
|
<td width=48 align=center class=bg1>지력</td>
|
||||||
|
<td width=78 align=center class=bg1>관 직</td>
|
||||||
|
<td width=28 align=center class=bg1>守</td>
|
||||||
|
<td width=78 align=center class=bg1>병 종</td>
|
||||||
|
<td width=78 align=center class=bg1>병 사</td>
|
||||||
|
<td width=48 align=center class=bg1>훈련</td>
|
||||||
|
<td width=48 align=center class=bg1>사기</td>
|
||||||
|
<td width=280 align=center class=bg1>명 령</td>
|
||||||
|
</tr></thead><tbody class='bg0' id='general_list'>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4,turn5 from general where city='{$city['city']}' order by dedication desc"; // 장수 목록
|
$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4,turn5 from general where city='{$city['city']}' order by dedication desc"; // 장수 목록
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -224,127 +261,116 @@ foreach(getAllNationStaticInfo() as $nation){
|
|||||||
$nationlevel[$nation['nation']] = $nation['level'];
|
$nationlevel[$nation['nation']] = $nation['level'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($gencount != 0) {
|
|
||||||
echo "
|
|
||||||
<br>
|
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
||||||
<tr>
|
|
||||||
<td width=64 align=center id=bg1>얼 굴</td>
|
|
||||||
<td width=98 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=78 align=center id=bg1>관 직</td>
|
|
||||||
<td width=28 align=center id=bg1>守</td>
|
|
||||||
<td width=78 align=center id=bg1>병 종</td>
|
|
||||||
<td width=78 align=center id=bg1>병 사</td>
|
|
||||||
<td width=48 align=center id=bg1>훈련</td>
|
|
||||||
<td width=48 align=center id=bg1>사기</td>
|
|
||||||
<td width=310 align=center id=bg1>명 령</td>
|
|
||||||
</tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
for($j=0; $j < $gencount; $j++) {
|
for($j=0; $j < $gencount; $j++) {
|
||||||
$general = MYDB_fetch_array($genresult);
|
$general = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
|
$nationInfo = getNationStaticInfo($general['nation']);
|
||||||
|
|
||||||
|
if($general['nation'] != 0 && $general['nation'] == $myNation['nation']){
|
||||||
|
$ourGeneral = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$ourGeneral = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$isNPC = $general['npc']>1;
|
||||||
|
$wounded = $general['injury'];
|
||||||
|
|
||||||
|
|
||||||
|
$name = $general['name'];
|
||||||
|
$nameText = formatName($name, $general['npc']);
|
||||||
|
|
||||||
|
$leadership = $general['leader'];
|
||||||
|
$power = $general['power'];
|
||||||
|
$intel = $general['intel'];
|
||||||
|
|
||||||
|
$leadershipText = formatWounded($leadership, $general['injury']);
|
||||||
|
$powerText = formatWounded($power, $general['injury']);
|
||||||
|
$intelText = formatWounded($intel, $general['injury']);
|
||||||
|
|
||||||
|
$level = $general['level'];
|
||||||
|
$levelText = getLevel($general['level']);
|
||||||
|
|
||||||
if($general['level'] == 12) {
|
if($general['level'] == 12) {
|
||||||
$lbonus = $nationlevel[$general['nation']] * 2;
|
$leadershipBonus = $nationInfo['level'] * 2;
|
||||||
} elseif($general['level'] >= 5) {
|
} elseif($general['level'] >= 5) {
|
||||||
$lbonus = $nationlevel[$general['nation']];
|
$leadershipBonus = $nationInfo['level'];
|
||||||
} else {
|
} else {
|
||||||
$lbonus = 0;
|
$leadershipBonus = 0;
|
||||||
}
|
}
|
||||||
if($lbonus > 0) {
|
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
|
||||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
|
||||||
} else {
|
if($ourGeneral){
|
||||||
$lbonus = "";
|
$defenceMode = $general['mode'];
|
||||||
|
$defenceModeText = formatDefenceMode($defenceMode);
|
||||||
|
$crewType = $general['crewtype'];
|
||||||
|
$crewTypeText = GameUnitConst::byId($crewType)->name;
|
||||||
|
$crew = $general['crew'];
|
||||||
|
$train = $general['train'];
|
||||||
|
$atmos = $general['atmos'];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$defenceMode = 0;
|
||||||
|
$defenceModeText = '';
|
||||||
|
$crewType = 0;
|
||||||
|
$crewTypeText = '';
|
||||||
|
$crew = $general['crew'];
|
||||||
|
$train = -1;
|
||||||
|
$atmos = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['injury'] > 0) {
|
$nation = $general['nation'];
|
||||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
$nationName = $nationInfo['name'];
|
||||||
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
|
||||||
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
|
|
||||||
$leader = "<font color=red>{$leader}</font>{$lbonus}";
|
|
||||||
$power = "<font color=red>{$power}</font>";
|
|
||||||
$intel = "<font color=red>{$intel}</font>";
|
|
||||||
} else {
|
|
||||||
$leader = "{$general['leader']}{$lbonus}";
|
|
||||||
$power = "{$general['power']}";
|
|
||||||
$intel = "{$general['intel']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>{$general['name']}</font>"; }
|
if($ourGeneral && !$isNPC){
|
||||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>{$general['name']}</font>"; }
|
$turnText = [];
|
||||||
$imageTemp = GetImageURL($general['imgsvr']);
|
foreach(getTurn($general, 1) as $turnRawIdx=>$turn){
|
||||||
echo "
|
$turnIdx = $turnRawIdx+1;
|
||||||
<tr>
|
$turnText[] = "{$turnIdx} : $turn";
|
||||||
<td align=center height=64></td>
|
|
||||||
<td align=center>{$general['name']}</td>
|
|
||||||
<td align=center>$leader</td>
|
|
||||||
<td align=center>$power</td>
|
|
||||||
<td align=center>$intel</td>
|
|
||||||
<td align=center>".getLevel($general['level'])."</td>";
|
|
||||||
//아국장수이거나 보는 사람이 운영자일때 보여줌
|
|
||||||
if(($general['nation'] != 0 && $general['nation'] == $myNation['nation']) || $session->userGrade >= 5) {
|
|
||||||
switch($general['mode']) {
|
|
||||||
case 0: $mode = "×"; break;
|
|
||||||
case 1: $mode = "○"; break;
|
|
||||||
case 2: $mode = "◎"; break;
|
|
||||||
}
|
}
|
||||||
|
$turnText = join('<br>', $turnText);
|
||||||
echo "
|
|
||||||
<td align=center>$mode</td>
|
|
||||||
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
|
||||||
<td align=center>{$general['crew']}</td>
|
|
||||||
<td align=center>{$general['train']}</td>
|
|
||||||
<td align=center>{$general['atmos']}</td>";
|
|
||||||
if($general['npc'] >= 2) {
|
|
||||||
echo "
|
|
||||||
<td>NPC 장수";
|
|
||||||
} else {
|
|
||||||
echo "
|
|
||||||
<td>
|
|
||||||
<font size=1>";
|
|
||||||
$turn = getTurn($general, 1);
|
|
||||||
|
|
||||||
for($i=0; $i < 4; $i++) {
|
|
||||||
$k = $i+1;
|
|
||||||
echo "
|
|
||||||
$k : $turn[$i]<br>";
|
|
||||||
}
|
|
||||||
echo "
|
|
||||||
</font>";
|
|
||||||
}
|
|
||||||
} elseif($general['nation'] != 0) {
|
|
||||||
echo "
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>{$general['crew']}</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td>【{$nationname[$general['nation']]}】 장수";
|
|
||||||
} else {
|
|
||||||
echo "
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>{$general['crew']}</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td align=center>?</td>
|
|
||||||
<td> 재 야";
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
echo "
|
$turnText = '';
|
||||||
</td>
|
}
|
||||||
</tr>";
|
|
||||||
|
echo $templates->render('cityGeneral', [
|
||||||
|
'ourGeneral'=>$ourGeneral,
|
||||||
|
'isNPC'=>$isNPC,
|
||||||
|
'wounded'=>$wounded,
|
||||||
|
'name'=>$name,
|
||||||
|
'nameText'=>$nameText,
|
||||||
|
'leadership'=>$leadership,
|
||||||
|
'leadershipText'=>$leadershipText,
|
||||||
|
'leadershipBonus'=>$leadershipBonus,
|
||||||
|
'leadershipBonusText'=>$leadershipBonusText,
|
||||||
|
'level'=>$level,
|
||||||
|
'levelText'=>$levelText,
|
||||||
|
'power'=>$power,
|
||||||
|
'powerText'=>$powerText,
|
||||||
|
'intel'=>$intel,
|
||||||
|
'intelText'=>$intelText,
|
||||||
|
'defenceMode'=>$defenceMode,
|
||||||
|
'defenceModeText'=>$defenceModeText,
|
||||||
|
'crewType'=>$crewType,
|
||||||
|
'crewTypeText'=>$crewTypeText,
|
||||||
|
'crew'=>$crew,
|
||||||
|
'train'=>$train,
|
||||||
|
'atmos'=>$atmos,
|
||||||
|
'nation'=>$nation,
|
||||||
|
'nationName'=>$nationName,
|
||||||
|
'turnText'=>$turnText
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("내무부", 1);
|
increaseRefresh("내무부", 1);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
@@ -24,7 +21,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -47,33 +44,33 @@ if ($me['level'] >= 5) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>내무부</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>내 무 부<br><?=backButton()?></td></tr>
|
<tr><td>내 무 부<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=100 align=center id=bg1>국 가 명</td>
|
<td width=130 align=center class=bg1>국 가 명</td>
|
||||||
<td width=50 align=center id=bg1>국력</td>
|
<td width=50 align=center class=bg1>국력</td>
|
||||||
<td width=40 align=center id=bg1>장수</td>
|
<td width=40 align=center class=bg1>장수</td>
|
||||||
<td width=40 align=center id=bg1>속령</td>
|
<td width=40 align=center class=bg1>속령</td>
|
||||||
<td width=80 align=center id=bg1>상태</td>
|
<td width=80 align=center class=bg1>상태</td>
|
||||||
<td width=60 align=center id=bg1>기간</td>
|
<td width=60 align=center class=bg1>기간</td>
|
||||||
<td width=100 align=center id=bg1>종 료 시 점</td>
|
<td width=100 align=center class=bg1>종 료 시 점</td>
|
||||||
<td align=center id=bg1>비 고</td>
|
<td align=center class=bg1>비 고</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year','month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select nation,name,color,power,gennum from nation order by power desc";
|
$query = "select nation,name,color,power,gennum from nation order by power desc";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
@@ -190,9 +187,7 @@ $query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutm
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select gold_rate,rice_rate from game limit 1";
|
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
// 금 수지
|
// 금 수지
|
||||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||||
|
|
||||||
@@ -220,65 +215,62 @@ if ($budgetricediff > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<form name=form1 method=post action=c_dipcenter.php>
|
<form name=form1 method=post action=c_dipcenter.php>
|
||||||
<tr><td colspan=2 height=10></td></tr>
|
<tr><td colspan=2 height=10></td></tr>
|
||||||
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메세지</td></tr>
|
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메시지</td></tr>
|
||||||
<tr><td colspan=2 id=bg1>국가 방침 <input type=text <?=$read?> maxlength=500 style=color:white;background-color:black;width:830px; name=msg value='<?=$nation['msg']?>'><input type=<?=$btn?> name=btn value=국가방침></td></tr>
|
<tr><td colspan=2 class=bg1>국가 방침 <textarea <?=$read?> maxlength=16000 rows="5" style="color:white;background-color:black;width:830px;" name=msg><?=$nation['msg']?></textarea><input type=<?=$btn?> name=btn value=국가방침></td></tr>
|
||||||
<tr><td colspan=2 id=bg1>임관 권유 <input type=text <?=$read?> maxlength=500 style=color:white;background-color:black;width:830px; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
|
<tr><td colspan=2 class=bg1>임관 권유 <input type=text <?=$read?> maxlength=1000 style=color:white;background-color:black;width:830px; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
|
||||||
<tr><td colspan=2>900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.</td></tr>
|
<tr><td colspan=2>870 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.</td></tr>
|
||||||
<tr><td colspan=2 height=10></td></tr>
|
<tr><td colspan=2 height=10></td></tr>
|
||||||
<tr><td colspan=2 align=center bgcolor=green>예 산 & 정 책</td></tr>
|
<tr><td colspan=2 align=center bgcolor=green>예 산 & 정 책</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2>
|
<td colspan=2>
|
||||||
<table width=998 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=998 class='tb_layout bg0'>
|
||||||
<?php
|
|
||||||
echo "
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 align=center id=bg1>자금 예산</td>
|
<td colspan=2 align=center class=bg1>자금 예산</td>
|
||||||
<td colspan=2 align=center id=bg1>병량 예산</td>
|
<td colspan=2 align=center class=bg1>병량 예산</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=248 align=right id=bg1>현 재 </td>
|
<td width=248 align=right class=bg1>현 재 </td>
|
||||||
<td width=248 align=center>{$nation['gold']}</td>
|
<td width=248 align=center><?=$nation['gold']?></td>
|
||||||
<td width=248 align=right id=bg1>현 재 </td>
|
<td width=248 align=right class=bg1>현 재 </td>
|
||||||
<td width=248 align=center>{$nation['rice']}</td>
|
<td width=248 align=center><?=$nation['rice']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>단기수입 </td>
|
<td align=right class=bg1>단기수입 </td>
|
||||||
<td align=center>+$deadIncome</td>
|
<td align=center>+<?=$deadIncome?></td>
|
||||||
<td align=right id=bg1>둔전수입 </td>
|
<td align=right class=bg1>둔전수입 </td>
|
||||||
<td align=center>+$riceincomeList[1]</td>
|
<td align=center>+<?=$riceincomeList[1]?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>세 금 </td>
|
<td align=right class=bg1>세 금 </td>
|
||||||
<td align=center>+$goldincomeList[0]</td>
|
<td align=center>+<?=$goldincomeList[0]?></td>
|
||||||
<td align=right id=bg1>세 곡 </td>
|
<td align=right class=bg1>세 곡 </td>
|
||||||
<td align=center>+$riceincomeList[0]</td>
|
<td align=center>+<?=$riceincomeList[0]?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>수입 / 지출 </td>
|
<td align=right class=bg1>수입 / 지출 </td>
|
||||||
<td align=center>+$goldincome / -$goldoutcome</td>
|
<td align=center>+<?=$goldincome?> / -<?=$goldoutcome?></td>
|
||||||
<td align=right id=bg1>수입 / 지출 </td>
|
<td align=right class=bg1>수입 / 지출 </td>
|
||||||
<td align=center>+$riceincome / -$riceoutcome</td>
|
<td align=center>+<?=$riceincome?> / -<?=$riceoutcome?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>국고 예산 </td>
|
<td align=right class=bg1>국고 예산 </td>
|
||||||
<td align=center>{$budgetgold} ({$budgetgolddiff})</td>
|
<td align=center><?=$budgetgold?> (<?=$budgetgolddiff?>)</td>
|
||||||
<td align=right id=bg1>병량 예산 </td>
|
<td align=right class=bg1>병량 예산 </td>
|
||||||
<td align=center>{$budgetrice} ({$budgetricediff})</td>
|
<td align=center><?=$budgetrice?> (<?=$budgetricediff?>)</td>
|
||||||
</tr>";
|
</tr>
|
||||||
?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>세율 (5 ~ 30%) </td>
|
<td align=right class=bg1>세율 (5 ~ 30%) </td>
|
||||||
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
|
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
|
||||||
<td align=right id=bg1>봉급 지급율 (20 ~ 200%) </td>
|
<td align=right class=bg1>봉급 지급율 (20 ~ 200%) </td>
|
||||||
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급율></td>
|
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급율></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right id=bg1>기밀 권한 (1 ~ 99년) </td>
|
<td align=right class=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||||
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
|
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
|
||||||
<td align=right id=bg1>임관&전쟁 변경 가능</td>
|
<td align=right class=bg1>임관&전쟁 변경 가능</td>
|
||||||
<td align=center>무제한</td>
|
<td align=center>무제한</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -307,10 +299,9 @@ if ($nation['war'] == 0) {
|
|||||||
<tr><td colspan=2 height=10></td></tr>
|
<tr><td colspan=2 height=10></td></tr>
|
||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,15 +8,12 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("중원정보", 1);
|
increaseRefresh("중원정보", 1);
|
||||||
|
|
||||||
$query = "select turnterm from game limit 1";
|
$query = "select no,nation from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,map from general where owner='{$userID}'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
@@ -42,9 +39,9 @@ for($i=0; $i < $nationcount; $i++) {
|
|||||||
$nationname[$nation['nation']] = $nation['name'];
|
$nationname[$nation['nation']] = $nation['name'];
|
||||||
|
|
||||||
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
|
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
|
||||||
$powerStr .= "국력 {$nation['power']}<br>";
|
$powerStr .= "{$nation['power']}<br>";
|
||||||
$genStr .= "장수 {$nation['gennum']}<br>";
|
$genStr .= "{$nation['gennum']}<br>";
|
||||||
$cityStr .= "속령 $citycount<br>";
|
$cityStr .= "$citycount<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$realConflict = [];
|
$realConflict = [];
|
||||||
@@ -78,12 +75,13 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>중원정보</title>
|
<meta name="viewport" content="width=1024" />
|
||||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
||||||
<script src="../d_shared/common_path.js"></script>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<script src="js/common.js"></script>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<script src="js/base_map.js"></script>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<script src="js/map.js"></script>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
|
<?=WebUtil::printJS('js/map.js')?>
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
@@ -94,24 +92,24 @@ $(function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<link href="css/normalize.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||||
<link href="../d_shared/common.css" rel="stylesheet">
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<link href="css/common.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<link href="css/map.css" rel="stylesheet">
|
<?=WebUtil::printCSS('css/map.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>중 원 정 보<br><?=backButton()?></td></tr>
|
<tr><td>중 원 정 보<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
|
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
|
||||||
<?php
|
<?php
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=108 style=background-color:".GameConst::$basecolor2.";> </td>";
|
<td align=center width=130 style=background-color:".GameConst::$basecolor2.";> </td>";
|
||||||
|
|
||||||
if($nationcount != 0) {
|
if($nationcount != 0) {
|
||||||
$width = intdiv(888, $nationcount);
|
$width = intdiv(888, $nationcount);
|
||||||
@@ -179,35 +177,17 @@ for($i=0; $i < $nationcount; $i++) {
|
|||||||
<?php if ($realConflict) : ?>
|
<?php if ($realConflict) : ?>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<table
|
<table align='center' width=1000 class='tb_layout bg0'>
|
||||||
align='center'
|
|
||||||
width=1000
|
|
||||||
border=1
|
|
||||||
cellspacing=0
|
|
||||||
cellpadding=0
|
|
||||||
bordercolordark='gray'
|
|
||||||
bordercolorlight='black'
|
|
||||||
style='font-size:13px;word-break:break-all;'
|
|
||||||
class='bg0'
|
|
||||||
>
|
|
||||||
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr>
|
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr>
|
||||||
<?php foreach($realConflict as list($cityID, $cityName, $conflict)): ?>
|
<?php foreach($realConflict as list($cityID, $cityName, $conflict)): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=48><?=$cityName?></td>
|
<td align=center width=48><?=$cityName?></td>
|
||||||
<td width=948>
|
<td style='width:948px;position:relative;'>
|
||||||
<table
|
<table class='tb_layout bg0' style='width:100%;'>
|
||||||
border=0
|
|
||||||
cellspacing=0
|
|
||||||
cellpadding=0
|
|
||||||
bordercolordark='gray'
|
|
||||||
bordercolorlight='black'
|
|
||||||
style='font-size:13px;word-break:break-all;width:100%;'
|
|
||||||
class='bg0'
|
|
||||||
>
|
|
||||||
<?php foreach($conflict as $item): ?>
|
<?php foreach($conflict as $item): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
width=98
|
width=130
|
||||||
align=right
|
align=right
|
||||||
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
|
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
|
||||||
><?=$item['name']?> </td>
|
><?=$item['name']?> </td>
|
||||||
@@ -228,7 +208,7 @@ for($i=0; $i < $nationcount; $i++) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<table class="bg0" align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;">
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td>
|
<td colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -236,18 +216,17 @@ for($i=0; $i < $nationcount; $i++) {
|
|||||||
<td width=698 height=420>
|
<td width=698 height=420>
|
||||||
<?=getMapHtml()?>
|
<?=getMapHtml()?>
|
||||||
</td>
|
</td>
|
||||||
<td width=98 valign=top><?=$nationStr?></td>
|
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$nationStr?></td>
|
||||||
<td width=78 valign=top><?=$powerStr?></td>
|
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$powerStr?></td>
|
||||||
<td width=58 valign=top><?=$genStr?></td>
|
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$genStr?></td>
|
||||||
<td width=58 valign=top><?=$cityStr?></td>
|
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$cityStr?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<table class="bg0" align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;">
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -16,14 +16,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("암행부", 2);
|
increaseRefresh("암행부", 2);
|
||||||
|
|
||||||
$query = "select conlimit from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
@@ -32,7 +29,7 @@ $query = "select level,secretlimit from nation where nation='{$me['nation']}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -53,15 +50,17 @@ $sel[$type] = "selected";
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>암행부</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>암 행 부<br><?=closeButton()?></td></tr>
|
<tr><td>암 행 부<br><?=closeButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
@@ -100,24 +99,28 @@ switch ($type) {
|
|||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$gencount = MYDB_num_rows($genresult);
|
$gencount = MYDB_num_rows($genresult);
|
||||||
|
|
||||||
echo"
|
?>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center id='general_list' class='tb_layout bg0'>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=98 align=center id=bg1>이 름</td>
|
<td width=98 align=center class=bg1>이 름</td>
|
||||||
<td width=98 align=center id=bg1>통무지</td>
|
<td width=98 align=center class=bg1>통무지</td>
|
||||||
<td width=98 align=center id=bg1>부 대</td>
|
<td width=98 align=center class=bg1>부 대</td>
|
||||||
<td width=58 align=center id=bg1>자 금</td>
|
<td width=58 align=center class=bg1>자 금</td>
|
||||||
<td width=58 align=center id=bg1>군 량</td>
|
<td width=58 align=center class=bg1>군 량</td>
|
||||||
<td width=48 align=center id=bg1>도시</td>
|
<td width=48 align=center class=bg1>도시</td>
|
||||||
<td width=28 align=center id=bg1>守</td>
|
<td width=28 align=center class=bg1>守</td>
|
||||||
<td width=58 align=center id=bg1>병 종</td>
|
<td width=58 align=center class=bg1>병 종</td>
|
||||||
<td width=68 align=center id=bg1>병 사</td>
|
<td width=68 align=center class=bg1>병 사</td>
|
||||||
<td width=48 align=center id=bg1>훈련</td>
|
<td width=48 align=center class=bg1>훈련</td>
|
||||||
<td width=48 align=center id=bg1>사기</td>
|
<td width=48 align=center class=bg1>사기</td>
|
||||||
<td width=148 align=center id=bg1>명 령</td>
|
<td width=148 align=center class=bg1>명 령</td>
|
||||||
<td width=58 align=center id=bg1>삭턴</td>
|
<td width=58 align=center class=bg1>삭턴</td>
|
||||||
<td width=58 align=center id=bg1>턴</td>
|
<td width=58 align=center class=bg1>턴</td>
|
||||||
</tr>";
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
for ($j=0; $j < $gencount; $j++) {
|
for ($j=0; $j < $gencount; $j++) {
|
||||||
$general = MYDB_fetch_array($genresult);
|
$general = MYDB_fetch_array($genresult);
|
||||||
$city = CityConst::byID($general['city'])->name;
|
$city = CityConst::byID($general['city'])->name;
|
||||||
@@ -165,24 +168,24 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>$name<br>Lv ".getExpLevel($general['experience'])."</td>
|
<td class='i_name' align=center><span class='t_name'>$name</span><br>Lv <span class='t_explevel'>".getExpLevel($general['experience'])."</span></td>
|
||||||
<td align=center>{$leader}∥{$power}∥{$intel}</td>
|
<td class='i_stat' align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||||
<td align=center>$troop</td>
|
<td class='i_troop' align=center>$troop</td>
|
||||||
<td align=center>{$general['gold']}</td>
|
<td class='i_gold' align=center>{$general['gold']}</td>
|
||||||
<td align=center>{$general['rice']}</td>
|
<td class='i_rice' align=center>{$general['rice']}</td>
|
||||||
<td align=center>$city</td>
|
<td class='i_city' align=center>$city</td>
|
||||||
<td align=center>$mode</td>
|
<td align=center>$mode</td>
|
||||||
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
<td class='i_crewtype' align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||||
<td align=center>{$general['crew']}</td>
|
<td class='i_crew' align=center>{$general['crew']}</td>
|
||||||
<td align=center>{$general['train']}</td>
|
<td class='i_train' align=center>{$general['train']}</td>
|
||||||
<td align=center>{$general['atmos']}</td>";
|
<td class='i_atmos' align=center>{$general['atmos']}</td>";
|
||||||
if ($general['npc'] >= 2) {
|
if ($general['npc'] >= 2) {
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td class='i_action'>
|
||||||
<font size=3>NPC 장수";
|
<font size=3>NPC 장수";
|
||||||
} else {
|
} else {
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td class='i_action'>
|
||||||
<font size=1>";
|
<font size=1>";
|
||||||
$turn = getTurn($general, 1, 0);
|
$turn = getTurn($general, 1, 0);
|
||||||
|
|
||||||
@@ -197,19 +200,19 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
<td align=center>{$general['killturn']}</td>
|
<td align=center>{$general['killturn']}</td>
|
||||||
<td align=center>".substr($general['turntime'], 14, 5)."</td>
|
<td class='i_turntime' align=center>".substr($general['turntime'], 14, 5)."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
";
|
";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -29,10 +29,12 @@ if($meLevel == 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>인사부</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function out() {
|
function out() {
|
||||||
return confirm('정말 추방하시겠습니까?');
|
return confirm('정말 추방하시겠습니까?');
|
||||||
@@ -42,7 +44,7 @@ function out() {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>인 사 부<br><?=backButton()?></td></tr>
|
<tr><td>인 사 부<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
@@ -72,7 +74,7 @@ $query = "select name,picture,firenum from general where nation='{$nation['natio
|
|||||||
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']} colspan=6>
|
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']} colspan=6>
|
||||||
<font size=5>【 {$nation['name']} 】</font>
|
<font size=5>【 {$nation['name']} 】</font>
|
||||||
@@ -131,7 +133,7 @@ echo "
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<form method=post action=c_myBossInfo.php>
|
<form method=post action=c_myBossInfo.php>
|
||||||
<tr><td colspan=6 height=5></td></tr>
|
<tr><td colspan=6 height=5></td></tr>
|
||||||
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
|
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
|
||||||
@@ -144,14 +146,14 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) {
|
|||||||
echo "
|
echo "
|
||||||
<select name=outlist size=1 style=color:white;background-color:black;>";
|
<select name=outlist size=1 style=color:white;background-color:black;>";
|
||||||
|
|
||||||
$query = "select no,name,level from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
|
$query = "select no,name,level,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount = MYDB_num_rows($result);
|
$gencount = MYDB_num_rows($result);
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
for($i=0; $i < $gencount; $i++) {
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
echo "
|
echo "
|
||||||
<option value={$general['no']}>{$general['name']}</option>";
|
<option value={$general['no']}>{$general['name']} <small>({$general['leader']}/{$general['power']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
@@ -167,7 +169,7 @@ echo "
|
|||||||
</tr>
|
</tr>
|
||||||
</form>
|
</form>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td colspan=4 height=5></td></tr>
|
<tr><td colspan=4 height=5></td></tr>
|
||||||
<tr><td colspan=4 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
|
<tr><td colspan=4 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -205,7 +207,10 @@ if($meLevel >= 5 && $nation['l11set'] == 0) {
|
|||||||
$query = "select name,city from general where nation='{$me['nation']}' and level='11'";
|
$query = "select name,city from general where nation='{$me['nation']}' and level='11'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
echo "{$general['name']} 【".CityConst::byID($general['city'])->name."】";
|
if($general){
|
||||||
|
echo "{$general['name']} 【".CityConst::byID($general['city'])->name."】";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
</td>
|
</td>
|
||||||
@@ -214,12 +219,12 @@ echo "
|
|||||||
";
|
";
|
||||||
|
|
||||||
$queries = [];
|
$queries = [];
|
||||||
$queries[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
$queries[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$queries[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
$queries[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$queries[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
$queries[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$queries[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
$queries[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$queries[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
$queries[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$queries[5] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
$queries[5] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
|
|
||||||
for($i=10; $i >= $lv; $i--) {
|
for($i=10; $i >= $lv; $i--) {
|
||||||
if($i % 2 == 0) { echo "<tr>"; }
|
if($i % 2 == 0) { echo "<tr>"; }
|
||||||
@@ -257,7 +262,9 @@ for($i=10; $i >= $lv; $i--) {
|
|||||||
$query = "select name,city from general where nation='{$me['nation']}' and level={$i}";
|
$query = "select name,city from general where nation='{$me['nation']}' and level={$i}";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
echo "{$general['name']} 【".CityConst::byID($general['city'])->name."】";
|
if($general){
|
||||||
|
echo "{$general['name']} 【".CityConst::byID($general['city'])->name."】";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</td></form>";
|
echo "</td></form>";
|
||||||
if($i % 2 == 1) { echo "</tr>"; }
|
if($i % 2 == 1) { echo "</tr>"; }
|
||||||
@@ -265,7 +272,7 @@ for($i=10; $i >= $lv; $i--) {
|
|||||||
echo "
|
echo "
|
||||||
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
|
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td colspan=5 height=5></td></tr>
|
<tr><td colspan=5 height=5></td></tr>
|
||||||
";
|
";
|
||||||
if($meLevel >= 5) {
|
if($meLevel >= 5) {
|
||||||
@@ -304,7 +311,7 @@ if($meLevel >= 5) {
|
|||||||
<option value=0>____공석____</option>
|
<option value=0>____공석____</option>
|
||||||
";
|
";
|
||||||
|
|
||||||
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$count = MYDB_num_rows($result);
|
$count = MYDB_num_rows($result);
|
||||||
for($i=0; $i < $count; $i++) {
|
for($i=0; $i < $count; $i++) {
|
||||||
@@ -358,7 +365,7 @@ if($meLevel >= 5) {
|
|||||||
<option value=0>____공석____</option>
|
<option value=0>____공석____</option>
|
||||||
";
|
";
|
||||||
|
|
||||||
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$count = MYDB_num_rows($result);
|
$count = MYDB_num_rows($result);
|
||||||
for($i=0; $i < $count; $i++) {
|
for($i=0; $i < $count; $i++) {
|
||||||
@@ -500,10 +507,9 @@ for($j=0; $j < $citycount; $j++) {
|
|||||||
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
|
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -36,15 +36,21 @@ $sel = [$type => "selected"];
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>세력도시</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 세력도시</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.expand_city.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>세 력 도 시<br><?=backButton()?></td></tr>
|
<tr><td>세 력 도 시<br><?=backButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
@@ -123,23 +129,23 @@ for ($j=0; $j < $citycount; $j++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table align=center width=1000 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</font></td>
|
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</font></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=48 id=bg1>주민</td>
|
<td align=center width=46 id=bg1>주민</td>
|
||||||
<td align=center width=112>{$city['pop']}/{$city['pop2']}</td>
|
<td align=center width=140>{$city['pop']}/{$city['pop2']}</td>
|
||||||
<td align=center width=48 id=bg1>농업</td>
|
<td align=center width=46 id=bg1>농업</td>
|
||||||
<td align=center width=108>{$city['agri']}/{$city['agri2']}</td>
|
<td align=center width=140>{$city['agri']}/{$city['agri2']}</td>
|
||||||
<td align=center width=48 id=bg1>상업</td>
|
<td align=center width=46 id=bg1>상업</td>
|
||||||
<td align=center width=108>{$city['comm']}/{$city['comm2']}</td>
|
<td align=center width=140>{$city['comm']}/{$city['comm2']}</td>
|
||||||
<td align=center width=48 id=bg1>치안</td>
|
<td align=center width=46 id=bg1>치안</td>
|
||||||
<td align=center width=108>{$city['secu']}/{$city['secu2']}</td>
|
<td align=center width=140>{$city['secu']}/{$city['secu2']}</td>
|
||||||
<td align=center width=48 id=bg1>수비</td>
|
<td align=center width=46 id=bg1>수비</td>
|
||||||
<td align=center width=108>{$city['def']}/{$city['def2']}</td>
|
<td align=center width=140>{$city['def']}/{$city['def2']}</td>
|
||||||
<td align=center width=48 id=bg1>성벽</td>
|
<td align=center width=46 id=bg1>성벽</td>
|
||||||
<td align=center width=108>{$city['wall']}/{$city['wall2']}</td>
|
<td align=center width=140>{$city['wall']}/{$city['wall2']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1>민심</td>
|
<td align=center id=bg1>민심</td>
|
||||||
@@ -188,12 +194,11 @@ for ($j=0; $j < $citycount; $j++) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0 anchor'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
<div id="helper_genlist" style="display:none;"></div>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,17 @@ $sel = [$type => "selected"];
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>세력장수</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>세 력 장 수<br><?=backButton()?></td></tr>
|
<tr><td>세 력 장 수<br><?=backButton()?></td></tr>
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
<tr><td><form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
@@ -114,7 +116,7 @@ $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect)
|
|||||||
$gencount = MYDB_num_rows($genresult);
|
$gencount = MYDB_num_rows($genresult);
|
||||||
|
|
||||||
echo"
|
echo"
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 align=center id=bg1>얼 굴</td>
|
<td width=64 align=center id=bg1>얼 굴</td>
|
||||||
<td width=98 align=center id=bg1>이 름</td>
|
<td width=98 align=center id=bg1>이 름</td>
|
||||||
@@ -191,11 +193,10 @@ for($j=0; $j < $gencount; $j++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("세력정보", 1);
|
increaseRefresh("세력정보", 1);
|
||||||
@@ -25,15 +26,17 @@ if($me['level'] == 0) {
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>세력정보</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>세 력 정 보<br><?=backButton()?></td></tr>
|
<tr><td>세 력 정 보<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
@@ -65,9 +68,7 @@ $query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general wh
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select gold_rate,rice_rate from game limit 1";
|
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
// 금 수지
|
// 금 수지
|
||||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ if($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; }
|
|||||||
else { $budgetricediff = "$budgetricediff"; }
|
else { $budgetricediff = "$budgetricediff"; }
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table align=center width=1000 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 ";echo $me['nation']==0?"공 백 지":"{$nation['name']}";echo " 】</td>
|
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 ";echo $me['nation']==0?"공 백 지":"{$nation['name']}";echo " 】</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -156,11 +157,10 @@ echo"
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -5,16 +5,13 @@ include "lib.php";
|
|||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getReq('btn');
|
||||||
$map = Util::getReq('map', 'int', 0);
|
|
||||||
$mode = Util::getReq('mode', 'int', 2);
|
$mode = Util::getReq('mode', 'int', 2);
|
||||||
$tnmt = Util::getReq('tnmt', 'int', 1);
|
$tnmt = Util::getReq('tnmt', 'int', 1);
|
||||||
|
//$detachNPC = Util::getReq('detachNPC', 'bool');
|
||||||
|
$detachNPC = false;
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
if($map < 0 || $map > 2){
|
|
||||||
$map = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($mode < 0 || $mode > 2){
|
if($mode < 0 || $mode > 2){
|
||||||
$mode = 2;
|
$mode = 2;
|
||||||
}
|
}
|
||||||
@@ -28,89 +25,96 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("내정보", 1);
|
increaseRefresh("내정보", 1);
|
||||||
|
|
||||||
$query = "select myset from general where owner='{$userID}'";
|
$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
|
||||||
if ($me['myset'] > 0) {
|
if ($me['myset'] > 0) {
|
||||||
$submit = 'submit';
|
$submit = 'submit';
|
||||||
} else {
|
} else {
|
||||||
$submit = 'hidden';
|
$submit = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($btn == "설정저장" && $me['myset'] > 0) {
|
if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||||
if ($me['myset'] > 1) {
|
if ($me['myset'] > 1) {
|
||||||
$submit = 'submit';
|
$submit = 'submit';
|
||||||
} else {
|
} else {
|
||||||
$submit = 'hidden';
|
$submit = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$me['myset'] -= 1;
|
||||||
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'myset'=>$db->sqleval('myset-1'),
|
'myset'=>$db->sqleval('myset-1'),
|
||||||
'map'=>$map,
|
|
||||||
'mode'=>$mode,
|
'mode'=>$mode,
|
||||||
'tnmt'=>$tnmt
|
'tnmt'=>$tnmt
|
||||||
], 'owner=%i', $userID);
|
], 'owner=%i', $userID);
|
||||||
}
|
|
||||||
|
|
||||||
$query = "select no,map,mode,tnmt,myset from general where owner='{$userID}'";
|
if($me['npc'] == 1 && $detachNPC){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$turnterm = $gameStor->turnterm;
|
||||||
$me = MYDB_fetch_array($result);
|
|
||||||
|
if($turnterm < 10){
|
||||||
|
$targetKillTurn = 30 / $turnterm;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$targetKillTurn = 60 / $turnterm;
|
||||||
|
}
|
||||||
|
$db->update('general', [
|
||||||
|
'killturn'=>$targetKillTurn
|
||||||
|
], 'owner=%i AND npc=1', $userID);
|
||||||
|
|
||||||
|
$me['killturn']=$targetKillTurn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>내정보</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link href="../d_shared/common.css" rel="stylesheet">
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel=stylesheet href="css/common.css">
|
<title><?=UniqueConst::$serverName?>: 내정보</title>
|
||||||
<script type="text/javascript">
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
function go(type) {
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
if(type == 0){
|
|
||||||
location.replace('c_vacation.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>내 정 보<br><?=backButton()?></td></tr>
|
<tr><td>내 정 보<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=50%>
|
<td width=50%>
|
||||||
<?php myInfo(); ?>
|
<?php myInfo(); ?>
|
||||||
<?php myInfo2(); ?>
|
<?php myInfo2(); ?>
|
||||||
</td>
|
</td>
|
||||||
<td width=50% valign=top>
|
<td width=50% valign=top style="padding-left:4ch;">
|
||||||
<form name=form1 action=b_myPage.php method=post>
|
<form name=form1 action=b_myPage.php method=post>
|
||||||
지도수준 【
|
토너먼트 【
|
||||||
<input type=radio name=map value=0 <?=$me['map']==0?"checked":""; ?>>상세
|
|
||||||
<input type=radio name=map value=1 <?=$me['map']==1?"checked":""; ?>>간단
|
|
||||||
<input type=radio name=map value=2 <?=$me['map']==2?"checked":""; ?>>생략
|
|
||||||
】<br><br>
|
|
||||||
토너먼트 【
|
|
||||||
<input type=radio name=tnmt value=0 <?=$me['tnmt']==0?"checked":""; ?>>수동참여
|
<input type=radio name=tnmt value=0 <?=$me['tnmt']==0?"checked":""; ?>>수동참여
|
||||||
<input type=radio name=tnmt value=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
|
<input type=radio name=tnmt value=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
|
||||||
】<br>
|
】<br>
|
||||||
∞<font color=orange>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</font><br><br>
|
∞<font color=orange>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</font><br><br>
|
||||||
수비 【
|
수비 【
|
||||||
<input type=radio name=mode value=2 <?=$me['mode']==2?"checked":""; ?>>◎(훈사80)
|
<input type=radio name=mode value=2 <?=$me['mode']==2?"checked":""; ?>>◎(훈사80)
|
||||||
<input type=radio name=mode value=1 <?=$me['mode']==1?"checked":""; ?>>○(훈사60)
|
<input type=radio name=mode value=1 <?=$me['mode']==1?"checked":""; ?>>○(훈사60)
|
||||||
<input type=radio name=mode value=0 <?=$me['mode']==0?"checked":""; ?>>×
|
<input type=radio name=mode value=0 <?=$me['mode']==0?"checked":""; ?>>×
|
||||||
】<br><br>
|
】<br><br>
|
||||||
<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
|
<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
|
||||||
∞<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
|
∞<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
|
||||||
</form>
|
</form>
|
||||||
휴 가 신 청<br>
|
휴 가 신 청<br>
|
||||||
<input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=휴가신청 onclick='go(0)'>
|
<a href="c_vacation.php"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button></a><br><br>
|
||||||
|
<!--빙의 해제용 삭턴 조절<br>
|
||||||
|
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>-->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -138,11 +142,10 @@ function go(type) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?></td></tr>
|
<tr><td><?=banner()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -20,15 +20,18 @@ $me = MYDB_fetch_array($result);
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>회의실</title>
|
<title><?=UniqueConst::$serverName?>: 회의실</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style='width:1000px;margin:auto'>
|
||||||
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>회 의 실<br><?=backButton()?></td></tr>
|
<tr><td>회 의 실<br><?=backButton()?></td></tr>
|
||||||
<form name=form1 method=post action=c_nationboard.php>
|
<form name=form1 method=post action=c_nationboard.php>
|
||||||
<tr><td align=center>
|
<tr><td align=center>
|
||||||
@@ -60,11 +63,11 @@ for($i=0; $i < 20; $i++) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -15,15 +15,17 @@ increaseRefresh("국법", 1);
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>국법</title>
|
<title><?=UniqueConst::$serverName?>: 국법</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>국 법<br><?=backButton()?></td></tr>
|
<tr><td>국 법<br><?=backButton()?></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
||||||
@@ -52,7 +54,6 @@ if($me['level'] >= 5) {
|
|||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("토너먼트", 1);
|
increaseRefresh("토너먼트", 1);
|
||||||
@@ -17,11 +18,9 @@ $query = "select no,tournament,con,turntime from general where owner='{$userID}'
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select conlimit,tournament,phase,tnmt_msg,tnmt_type,develcost,tnmt_trig from game limit 1";
|
$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
printLimitMsg($me['turntime']);
|
printLimitMsg($me['turntime']);
|
||||||
exit();
|
exit();
|
||||||
@@ -42,26 +41,19 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
|||||||
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
||||||
} ?>
|
} ?>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>토너먼트</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<style>
|
<meta name="viewport" content="width=1024" />
|
||||||
body { color:white; background-color:black; border-width:1px; border-color:gray; }
|
<title><?=UniqueConst::$serverName?>: 토너먼트</title>
|
||||||
table { font-family:'맑은 고딕'; line-height:110%; }
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
font { font-family:'맑은 고딕'; line-height:110%; }
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
|
|
||||||
select { font-family:'굴림'; line-height:100%; }
|
|
||||||
#bg0 { background-image:url(<?=ServConfig::$gameImagePath?>/back_walnut.jpg); }
|
|
||||||
#bg1 { background-image:url(<?=ServConfig::$gameImagePath?>/back_green.jpg); }
|
|
||||||
#bg2 { background-image:url(<?=ServConfig::$gameImagePath?>/back_blue.jpg); }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=2000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=2000 class='tb_layout bg0'>
|
||||||
<tr><td>삼모전 토너먼트<br><?=closeButton()?></td></tr>
|
<tr><td>삼모전 토너먼트<br><?=closeButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center class='tb_layout bg0'>
|
||||||
<?php
|
<?php
|
||||||
if ($session->userGrade >= 5) {
|
if ($session->userGrade >= 5) {
|
||||||
$sel = [];
|
$sel = [];
|
||||||
@@ -176,10 +168,16 @@ if ($session->userGrade >= 5) {
|
|||||||
|
|
||||||
$str1 = getTournament($admin['tournament']);
|
$str1 = getTournament($admin['tournament']);
|
||||||
$str2 = getTournamentTime();
|
$str2 = getTournamentTime();
|
||||||
|
if($str2){
|
||||||
|
$str2 = ', '.$str2;
|
||||||
|
}
|
||||||
$str3 = getTournamentTerm();
|
$str3 = getTournamentTerm();
|
||||||
|
if($str3){
|
||||||
|
$str3 = ', '.$str3;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr>
|
<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><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 id=bg2><font color=magenta size=5>16강 승자전</font></td></tr>
|
||||||
<tr><td height=10 colspan=8 align=center></td></tr>
|
<tr><td height=10 colspan=8 align=center></td></tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -187,7 +185,7 @@ $str3 = getTournamentTerm();
|
|||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=8>
|
<td colspan=8>
|
||||||
<table align=center width=2000 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=2000 class='bg0 mimic_flex'>
|
||||||
<tr align=center>";
|
<tr align=center>";
|
||||||
|
|
||||||
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
|
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
|
||||||
@@ -397,12 +395,14 @@ for ($i=0; $i < 16; $i++) {
|
|||||||
echo"
|
echo"
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
$query = "select tournament,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
|
$betting = $gameStor->getValues(['tournament','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$betting['bet'] = 0;
|
||||||
$betting = MYDB_fetch_array($result);
|
for($i=0;$i<16;$i+=1){
|
||||||
|
$betting['bet'] += $betting['bet'.$i];
|
||||||
|
}
|
||||||
$bet = [];
|
$bet = [];
|
||||||
for ($i=0; $i < 16; $i++) {
|
for ($i=0; $i < 16; $i++) {
|
||||||
if($betting['bet'] == 0){
|
if($betting["bet{$i}"] == 0){
|
||||||
$bet[$i] = '∞';
|
$bet[$i] = '∞';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -438,7 +438,7 @@ for ($i=0; $i < 8; $i++) {
|
|||||||
$grp = $i + 10;
|
$grp = $i + 10;
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td>
|
||||||
<table align=center width=250 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=250 class='tb_layout bg0'>
|
||||||
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
|
<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 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>";
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ for ($i=0; $i < 8; $i++) {
|
|||||||
$grp = $i;
|
$grp = $i;
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td>
|
||||||
<table align=center width=250 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=250 class='tb_layout bg0'>
|
||||||
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
|
<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 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>";
|
||||||
|
|
||||||
@@ -500,10 +500,9 @@ if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
|
|||||||
</font>
|
</font>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=2000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table align=center width=2000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr><td><?=closeButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php PrintElapsedTime(); ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -24,26 +24,33 @@ $troopcount = MYDB_num_rows($result);
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<title>부대편성</title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<div style="width:1000px;margin:auto;">
|
||||||
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
<tr><td>부 대 편 성<br><?=backButton()?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<form name=form1 method=post action=c_troop.php>
|
<form name=form1 method=post action=c_troop.php>
|
||||||
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table id="troop_list" class='tb_layout bg0'>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=64 id=bg1>선 택</td>
|
<td width=64 class='bg1 center'>선 택</td>
|
||||||
<td align=center width=98 id=bg1>부 대 정 보</td>
|
<td width=130 class='bg1 center'>부 대 정 보</td>
|
||||||
<td align=center width=64 id=bg1>부 대 장</td>
|
<td width=100 class='bg1 center'>부 대 장</td>
|
||||||
<td align=center width=662 id=bg1 style=table-layout:fixed;word-break:break-all;>장 수</td>
|
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
||||||
<td align=center width=98 id=bg1 style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for($i=0; $i < $troopcount; $i++) {
|
for($i=0; $i < $troopcount; $i++) {
|
||||||
$troop = MYDB_fetch_array($result);
|
$troop = MYDB_fetch_array($result);
|
||||||
@@ -83,7 +90,7 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
<td align=center rowspan=2><input "; echo $i==0?"checked ":""; echo "type=radio name=troop value='{$troop['troop']}'></td>
|
<td align=center rowspan=2><input "; echo $i==0?"checked ":""; echo "type=radio name=troop value='{$troop['troop']}'></td>
|
||||||
<td align=center >{$troop['name']}<br>【 $cityname 】</td>
|
<td align=center >{$troop['name']}<br>【 $cityname 】</td>
|
||||||
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
||||||
<td rowspan=2 width=662>$genlist</td>
|
<td rowspan=2 width=62>$genlist</td>
|
||||||
<td rowspan=2>$turn</td>
|
<td rowspan=2>$turn</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
|
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
|
||||||
@@ -94,7 +101,7 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
<td align=center rowspan=2> </td>
|
<td align=center rowspan=2> </td>
|
||||||
<td align=center >{$troop['name']}<br>【 $cityname 】</td>
|
<td align=center >{$troop['name']}<br>【 $cityname 】</td>
|
||||||
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
||||||
<td rowspan=2 width=662>$genlist</td>
|
<td rowspan=2 width=576>$genlist</td>
|
||||||
<td rowspan=2>";
|
<td rowspan=2>";
|
||||||
|
|
||||||
if($troop['no'] == $me['no']) {
|
if($troop['no'] == $me['no']) {
|
||||||
@@ -102,7 +109,7 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$genCount = MYDB_num_rows($genresult);
|
$genCount = MYDB_num_rows($genresult);
|
||||||
echo "
|
echo "
|
||||||
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:98px;>";
|
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>";
|
||||||
for($k=0; $k < $genCount; $k++) {
|
for($k=0; $k < $genCount; $k++) {
|
||||||
$general = MYDB_fetch_array($genresult);
|
$general = MYDB_fetch_array($genresult);
|
||||||
echo "
|
echo "
|
||||||
@@ -110,7 +117,7 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
</select><br>
|
</select><br>
|
||||||
<input type=submit name=btn value='부 대 추 방' style=width:100px;height:25px;>";
|
<input type=submit name=btn value='부 대 추 방' style=width:130px;height:25px;>";
|
||||||
} else {
|
} else {
|
||||||
echo $turn;
|
echo $turn;
|
||||||
}
|
}
|
||||||
@@ -122,8 +129,11 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
<tr><td colspan=5>";
|
<tr><td colspan=5>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo "</tbody>
|
||||||
if($me['troop'] == 0) {
|
<tfoot>";
|
||||||
|
if ($troopcount == 0) {
|
||||||
|
}
|
||||||
|
else if($me['troop'] == 0) {
|
||||||
echo"
|
echo"
|
||||||
<input type=submit name=btn value='부 대 가 입'>";
|
<input type=submit name=btn value='부 대 가 입'>";
|
||||||
} else {
|
} else {
|
||||||
@@ -133,14 +143,15 @@ if($me['troop'] == 0) {
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<br>";
|
<br>";
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 id=bg1>부 대 명</td>
|
<td width=80 id=bg1>부 대 명</td>
|
||||||
<td width=100><input type=text style=color:white;background-color:black; size=12 maxlength=6 name=name></td>";
|
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=9 name=name></td>";
|
||||||
if($me['troop'] == 0) {
|
if($me['troop'] == 0) {
|
||||||
echo "
|
echo "
|
||||||
<td><input type=submit name=btn value='부 대 창 설'></td>";
|
<td><input type=submit name=btn value='부 대 창 설'></td>";
|
||||||
@@ -153,12 +164,12 @@ echo "
|
|||||||
</table>";
|
</table>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<?php PrintElapsedTime(); ?>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -34,13 +34,12 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
increaseRefresh("입찰", 1);
|
increaseRefresh("입찰", 1);
|
||||||
|
|
||||||
$query = "select turnterm from game limit 1";
|
$turnterm = $gameStor->turnterm;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,name,gold,rice,special from general where owner='{$userID}'";
|
$query = "select no,name,gold,rice,special from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||||
@@ -56,7 +55,7 @@ $bidCount = MYDB_num_rows($result);
|
|||||||
|
|
||||||
$btCount = $tradeCount + $bidCount;
|
$btCount = $tradeCount + $bidCount;
|
||||||
|
|
||||||
$unit = $admin['turnterm'] * 60;
|
$unit = $turnterm * 60;
|
||||||
|
|
||||||
$amount = Util::round($amount / 10) * 10;
|
$amount = Util::round($amount / 10) * 10;
|
||||||
$cost = Util::round($cost / 10) * 10;
|
$cost = Util::round($cost / 10) * 10;
|
||||||
@@ -92,11 +91,11 @@ if ($btn == "판매") {
|
|||||||
$msg = "ㆍ<span class='ev_warning'>시작판매가는 50% ~ 200% 이어야 합니다.</span>";
|
$msg = "ㆍ<span class='ev_warning'>시작판매가는 50% ~ 200% 이어야 합니다.</span>";
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
}
|
}
|
||||||
if ($topv < $amount*1.1 || $topv > $amount * 2) {
|
if ($topv * 10 < $amount * 11 || $topv > $amount * 2) {
|
||||||
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 110% ~ 200% 이어야 합니다.</span>";
|
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 110% ~ 200% 이어야 합니다.</span>";
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
}
|
}
|
||||||
if ($topv < $cost*1.1) {
|
if ($topv * 10 < $cost * 11) {
|
||||||
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 시작판매가의 110% 이상이어야 합니다.</span>";
|
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 시작판매가의 110% 이상이어야 합니다.</span>";
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,10 +38,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
increaseRefresh("베팅", 1);
|
increaseRefresh("베팅", 1);
|
||||||
|
|
||||||
$tournament = $db->queryFirstField('SELECT tournament FROM game LIMIT 1');
|
$tournament = $gameStor->tournament;
|
||||||
if($tournament != 6) {
|
if($tournament != 6) {
|
||||||
header('Location: b_betting.php');
|
header('Location: b_betting.php');
|
||||||
exit();
|
exit();
|
||||||
@@ -59,9 +60,8 @@ if($betGold + 500 <= $myGold && $betGold + $oldBet <= 1000 && $betGold + $totalB
|
|||||||
"bet{$betTarget}"=>$db->sqleval("bet{$betTarget} + %i", $betGold),
|
"bet{$betTarget}"=>$db->sqleval("bet{$betTarget} + %i", $betGold),
|
||||||
'betgold'=>$db->sqleval('betgold + %i', $betGold)
|
'betgold'=>$db->sqleval('betgold + %i', $betGold)
|
||||||
], 'owner = %i', $userID);
|
], 'owner = %i', $userID);
|
||||||
$db->update('game', [
|
|
||||||
"bet{$betTarget}"=>$db->sqleval("bet{$betTarget} + %i", $betGold)
|
$gameStor->setValue("bet{$betTarget}", $gameStor->getValue("bet{$betTarget}") + $betGold);//TODO: +로 증가하는 storage값은 별도로 분리
|
||||||
], true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header('location: b_betting.php');
|
header('location: b_betting.php');
|
||||||
|
|||||||
@@ -19,11 +19,8 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
$me = $db->queryFirstRow('SELECT `no`,nation,`level` FROM general WHERE `owner`=%i', $userID);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$me = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
//내가 수뇌부이어야함
|
//내가 수뇌부이어야함
|
||||||
if($me['level'] < 5) {
|
if($me['level'] < 5) {
|
||||||
@@ -32,40 +29,47 @@ if($me['level'] < 5) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($btn == "국가방침") {
|
if($btn == "국가방침") {
|
||||||
$msg = BadTag2Code(addslashes(SQ2DQ($msg)));
|
$msg = mb_substr($msg, 0, 16384);
|
||||||
$query = "update nation set msg='$msg' where nation='{$me['nation']}'";
|
//$msg = StringUtil::
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->update('nation', [
|
||||||
|
'msg'=>WebUtil::htmlPurify($msg)
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "임관권유") {
|
} elseif($btn == "임관권유") {
|
||||||
$scoutmsg = BadTag2Code(addslashes(SQ2DQ($scoutmsg)));
|
$scoutmsg = mb_substr($scoutmsg, 0, 1000);
|
||||||
$query = "update nation set scoutmsg='$scoutmsg' where nation='{$me['nation']}'";
|
$db->update('nation', [
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'scoutmsg'=>WebUtil::htmlPurify($scoutmsg)
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "세율") {
|
} elseif($btn == "세율") {
|
||||||
if($rate < 5) { $rate = 5; }
|
$rate = Util::valueFit($rate, 5, 30);
|
||||||
if($rate > 30) { $rate = 30; }
|
$db->update('nation', [
|
||||||
$query = "update nation set rate='$rate' where nation='{$me['nation']}'";
|
'rate'=>$rate,
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
], 'nation=%i', $me['nation']);
|
||||||
} elseif($btn == "지급율") {
|
} elseif($btn == "지급율") {
|
||||||
if($bill < 20) { $bill = 20; }
|
$bill = Util::valueFit($bill, 20, 200);
|
||||||
if($bill > 200) { $bill = 200; }
|
$db->update('nation', [
|
||||||
$query = "update nation set bill='$bill' where nation='{$me['nation']}'";
|
'bill'=>$bill
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "기밀권한") {
|
} elseif($btn == "기밀권한") {
|
||||||
if($secretlimit < 1) { $secretlimit = 1; }
|
$secretlimit = Util::valueFit($secretlimit, 1, 99);
|
||||||
if($secretlimit > 99) { $secretlimit = 99; }
|
$db->update('nation', [
|
||||||
$query = "update nation set secretlimit='$secretlimit' where nation='{$me['nation']}'";
|
'secretlimit'=>$secretlimit
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "임관 금지") {
|
} elseif($btn == "임관 금지") {
|
||||||
$query = "update nation set scout='1' where nation='{$me['nation']}'";
|
$db->update('nation', [
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'scout'=>1
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "임관 허가") {
|
} elseif($btn == "임관 허가") {
|
||||||
$query = "update nation set scout='0' where nation='{$me['nation']}'";
|
$db->update('nation', [
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'scout'=>0
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "전쟁 금지") {
|
} elseif($btn == "전쟁 금지") {
|
||||||
$query = "update nation set war='1' where nation='{$me['nation']}'";
|
$db->update('nation', [
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'war'=>1
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
} elseif($btn == "전쟁 허가") {
|
} elseif($btn == "전쟁 허가") {
|
||||||
$query = "update nation set war='0' where nation='{$me['nation']}'";
|
$db->update('nation', [
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'war'=>0
|
||||||
|
], 'nation=%i',$me['nation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
header('location:b_dipcenter.php');
|
header('location:b_dipcenter.php');
|
||||||
|
|||||||
@@ -44,12 +44,8 @@ $comStr = EncodeCommand($fourth, $third, $double, $command);
|
|||||||
|
|
||||||
// 건국
|
// 건국
|
||||||
if($command == 46) {
|
if($command == 46) {
|
||||||
$name = addslashes(SQ2DQ($name));
|
$name = StringUtil::neutralize($name);
|
||||||
$name = str_replace("|", "", $name);
|
|
||||||
$name = str_replace(" ", "", $name);
|
|
||||||
$name = str_replace(" ", "뷁", $name);
|
|
||||||
if($name == "") { $name = "무명"; }
|
if($name == "") { $name = "무명"; }
|
||||||
$name = StringUtil::subStringForWidth($name, 0, 12);
|
|
||||||
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'makenation'=>$name
|
'makenation'=>$name
|
||||||
@@ -72,15 +68,12 @@ if($command == 53) {
|
|||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
if($me['level'] >= 5) {
|
if($me['level'] >= 5) {
|
||||||
$nationname = addslashes(SQ2DQ($nationname));
|
$nationname = StringUtil::neutralize($nationname, 18);
|
||||||
$nationname = str_replace("|", "", $nationname);
|
|
||||||
$nationname = str_replace(" ", "", $nationname);
|
|
||||||
$nationname = str_replace(" ", "뷁", $nationname);
|
|
||||||
if($nationname == "") { $nationname = "무명"; }
|
if($nationname == "") { $nationname = "무명"; }
|
||||||
$nationname = StringUtil::subStringForWidth($nationname, 0, 12);
|
|
||||||
|
$db->update('general', [
|
||||||
$query = "update general set makenation='{$nationname}' where level>=5 and nation='{$me['nation']}'";
|
'makenation'=>$nationname
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
], 'level>=5 and nation=%i', $me['nation']);
|
||||||
|
|
||||||
$count = count($turn);
|
$count = count($turn);
|
||||||
$str = "type=type";
|
$str = "type=type";
|
||||||
@@ -101,11 +94,7 @@ if($command == 61) {
|
|||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
if($me['level'] >= 5) {
|
if($me['level'] >= 5) {
|
||||||
$note = addslashes(SQ2DQ($note));
|
$note = StringUtil::neutralize($note, 90);
|
||||||
$note = str_replace("|", "", $note);
|
|
||||||
$note = str_replace(" ", "", $note);
|
|
||||||
$note = str_replace(" ", "뷁", $note);
|
|
||||||
$note = StringUtil::subStringForWidth($note, 0, 90);
|
|
||||||
|
|
||||||
$query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'";
|
$query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|||||||
@@ -18,11 +18,10 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select startyear,year,month from game limit 1";
|
$admin = $gameStor->getValues(['startyear','year','month','scenario']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -39,24 +38,29 @@ if($meLevel < 5){
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($btn == "임명") {
|
if($btn == "임명") {
|
||||||
$query = "select no,nation,level,leader,power,intel from general where no='$genlist'";
|
if($genlist==0){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$general = [];
|
||||||
$general = MYDB_fetch_array($result);
|
}
|
||||||
|
else{
|
||||||
|
$general = $db->queryFirstRow('SELECT `no`,nation,`level`,leader,`power`,intel FROM general WHERE no = %i', $genlist);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$general){
|
if($genlist != 0 && !$general){
|
||||||
header('location:b_myBossInfo.php');
|
header('location:b_myBossInfo.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
||||||
if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $genlist != 0)) {
|
if($meLevel < 5 || ($genlist != 0 && $general['nation'] != $me['nation']) || ($genlist != 0 && $general['level'] == 12)) {
|
||||||
|
|
||||||
header('location:b_myBossInfo.php');
|
header('location:b_myBossInfo.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} elseif($btn == "추방") {
|
} elseif($btn == "추방") {
|
||||||
|
if(!$outlist){
|
||||||
|
header('location:b_myBossInfo.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr from general where no='$outlist'";
|
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr from general where no='$outlist'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
@@ -74,13 +78,13 @@ if($btn == "임명") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//나와 대상 장수는 국가가 같아야 함
|
//나와 대상 장수는 국가가 같아야 함
|
||||||
if($me['nation'] != $general['nation']){
|
if($genlist != 0 && $me['nation'] != $general['nation']){
|
||||||
header('location:b_myBossInfo.php');
|
header('location:b_myBossInfo.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($btn == "추방") {
|
if($btn == "추방") {
|
||||||
$query = "select name,l{$meLevel}set,chemi from nation where nation='{$me['nation']}'";
|
$query = "select name,l{$meLevel}set,chemi,color from nation where nation='{$me['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$nation = MYDB_fetch_array($result);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
@@ -109,21 +113,24 @@ if($btn == "추방") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($dipcount1 > 0) {
|
if($dipcount1 > 0) {
|
||||||
$alllog[] = "<C>●</>{$admin['month']}월:통합에 반대하던 <Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
|
$alllog[] = "<C>●</>{$admin['month']}월:통합에 반대하던 <Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
||||||
$log[] = "<C>●</>통합에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
$log[] = "<C>●</>통합에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
||||||
|
|
||||||
// 재야로, 국가 무소속으로
|
// 재야로, 국가 무소속으로
|
||||||
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
|
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} elseif($dipcount2 > 0) {
|
} elseif($dipcount2 > 0) {
|
||||||
$alllog[] = "<C>●</>{$admin['month']}월:합병에 반대하던 <Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
|
$alllog[] = "<C>●</>{$admin['month']}월:합병에 반대하던 <Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
||||||
$log[] = "<C>●</>합병에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
$log[] = "<C>●</>합병에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
|
||||||
|
|
||||||
// 재야로, 국가 무소속으로
|
// 재야로, 국가 무소속으로
|
||||||
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
|
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} else {
|
} else {
|
||||||
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
|
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
|
||||||
$log[] = "<C>●</><D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
|
$log[] = "<C>●</><D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
|
||||||
|
|
||||||
// 재야로, 국가 무소속으로, 명성/공헌 N*10%감소
|
// 재야로, 국가 무소속으로, 명성/공헌 N*10%감소
|
||||||
@@ -165,7 +172,24 @@ if($btn == "추방") {
|
|||||||
case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break;
|
case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $str);
|
$src = new MessageTarget(
|
||||||
|
$general['no'],
|
||||||
|
$general['name'],
|
||||||
|
$general['nation'],
|
||||||
|
$nation['name'],
|
||||||
|
$nation['color'],
|
||||||
|
GetImageURL($general['imgsvr'], $general['picture'])
|
||||||
|
);
|
||||||
|
$msg = new Message(
|
||||||
|
Message::MSGTYPE_PUBLIC,
|
||||||
|
$src,
|
||||||
|
$src,
|
||||||
|
$str,
|
||||||
|
new \DateTime(),
|
||||||
|
new \DateTime('9999-12-31'),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
$msg->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
//국가 기술력 그대로
|
//국가 기술력 그대로
|
||||||
@@ -173,7 +197,7 @@ if($btn == "추방") {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount = MYDB_num_rows($result);
|
$gencount = MYDB_num_rows($result);
|
||||||
$gennum = $gencount;
|
$gennum = $gencount;
|
||||||
if($gencount < 10) $gencount = 10;
|
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
|
||||||
|
|
||||||
$nation['chemi'] -= 1;
|
$nation['chemi'] -= 1;
|
||||||
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
|
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
|
||||||
@@ -191,13 +215,11 @@ if($btn == "추방") {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
list($year, $month) = $gameStor->getValuesAsArray(['year','month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
pushGeneralHistory($general, "<C>●</>{$year}년 {$month}월:<D>{$nation['name']}</>에서 추방됨");
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
|
|
||||||
|
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $year, $month);
|
||||||
}
|
}
|
||||||
header('location:b_myBossInfo.php');
|
header('location:b_myBossInfo.php');
|
||||||
die();
|
die();
|
||||||
@@ -216,7 +238,7 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
|
|||||||
$nation['chemi'] -= 1;
|
$nation['chemi'] -= 1;
|
||||||
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
|
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
|
||||||
|
|
||||||
$query = "update nation set chemi='{$nation['chemi']}' where nation='{$general['nation']}'";
|
$query = "update nation set chemi='{$nation['chemi']}' where nation='{$me['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
//기존 장수 일반으로
|
//기존 장수 일반으로
|
||||||
@@ -225,12 +247,12 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
|
|||||||
if($genlist != 0) {
|
if($genlist != 0) {
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
switch($level) {
|
switch($level) {
|
||||||
case 10: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
|
case 10: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 9: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
|
case 9: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 8: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
|
case 8: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 7: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
|
case 7: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 6: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
|
case 6: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 5: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
|
case 5: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
default: $valid = 1; break;
|
default: $valid = 1; break;
|
||||||
}
|
}
|
||||||
if($valid == 1) {
|
if($valid == 1) {
|
||||||
@@ -282,8 +304,8 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
|
|||||||
if($genlist != 0) {
|
if($genlist != 0) {
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
switch($level) {
|
switch($level) {
|
||||||
case 4: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
|
case 4: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
case 3: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
|
case 3: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
|
||||||
default: $valid = 1; break;
|
default: $valid = 1; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ include "func.php";
|
|||||||
$title = Util::getReq('title');
|
$title = Util::getReq('title');
|
||||||
$msg = Util::getReq('msg');
|
$msg = Util::getReq('msg');
|
||||||
$num = Util::getReq('num', 'int');
|
$num = Util::getReq('num', 'int');
|
||||||
|
$reply = Util::getReq('reply');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
extractMissingPostToGlobals();
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,10 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select tournament,phase,tnmt_type,develcost from game limit 1";
|
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,name,tournament from general where owner='{$userID}'";
|
$query = "select no,name,tournament from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -60,7 +59,7 @@ if($btn == '참가') {
|
|||||||
}
|
}
|
||||||
$map = [];
|
$map = [];
|
||||||
for($i=0; $i < 8; $i++) {
|
for($i=0; $i < 8; $i++) {
|
||||||
if($occupied[$i] == 0) {
|
if(!Util::array_get($occupied[$i])) {
|
||||||
$map[] = $i;
|
$map[] = $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,8 +79,8 @@ if($btn == '참가') {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$grpCount = MYDB_num_rows($result);
|
$grpCount = MYDB_num_rows($result);
|
||||||
if($grpCount >= 8) {
|
if($grpCount >= 8) {
|
||||||
$query = "update game set tournament=2, phase=0";
|
$gameStor->tournament = 2;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->phase = 0;
|
||||||
}
|
}
|
||||||
header('location:b_tournament.php');
|
header('location:b_tournament.php');
|
||||||
die();
|
die();
|
||||||
@@ -93,15 +92,13 @@ if($session->userGrade < 5) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($btn == "자동개최설정") {
|
if($btn == "자동개최설정") {
|
||||||
$db->update('game', ['tnmt_trig'=>$trig], true);
|
$gameStor->tnmt_trig = $trig;
|
||||||
} elseif($btn == "개최") {
|
} elseif($btn == "개최") {
|
||||||
startTournament($auto, $type);
|
startTournament($auto, $type);
|
||||||
} elseif($btn == "중단") {
|
} elseif($btn == "중단") {
|
||||||
$db->update('game', [
|
$gameStor->tnmt_auto = 0;
|
||||||
'tnmt_auto'=>0,
|
$gameStor->tournament = 0;
|
||||||
'tournament'=>0,
|
$gameStor->phase = 0;
|
||||||
'phase'=>0
|
|
||||||
], true);
|
|
||||||
} elseif($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") {
|
} elseif($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") {
|
||||||
if($btn == "투입") {
|
if($btn == "투입") {
|
||||||
$query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'";
|
$query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'";
|
||||||
@@ -164,7 +161,7 @@ if($btn == "자동개최설정") {
|
|||||||
}
|
}
|
||||||
$map = [];
|
$map = [];
|
||||||
for($i=0; $i < 8; $i++) {
|
for($i=0; $i < 8; $i++) {
|
||||||
if($occupied[$i] == 0) {
|
if(!isset($occupied[$i]) || $occupied[$i] == 0) {
|
||||||
$map[] = $i;
|
$map[] = $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,8 +181,8 @@ if($btn == "자동개최설정") {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$grpCount = MYDB_num_rows($result);
|
$grpCount = MYDB_num_rows($result);
|
||||||
if($grpCount >= 8) {
|
if($grpCount >= 8) {
|
||||||
$query = "update game set tournament=2, phase=0";
|
$gameStor->tournament=2;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->phase=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") {
|
} elseif($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") {
|
||||||
@@ -241,8 +238,8 @@ if($btn == "자동개최설정") {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "update game set tournament=2, phase=0";
|
$gameStor->tournament = 2;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->phase = 0;
|
||||||
} elseif($btn == "무명전부투입") {
|
} elseif($btn == "무명전부투입") {
|
||||||
fillLowGenAll();
|
fillLowGenAll();
|
||||||
} elseif($btn == "예선") {
|
} elseif($btn == "예선") {
|
||||||
@@ -261,8 +258,9 @@ if($btn == "자동개최설정") {
|
|||||||
final16set();
|
final16set();
|
||||||
} elseif($btn == "베팅마감") {
|
} elseif($btn == "베팅마감") {
|
||||||
$dt = date("Y-m-d H:i:s", time() + 60);
|
$dt = date("Y-m-d H:i:s", time() + 60);
|
||||||
$query = "update game set tournament='7',phase='0',tnmt_time='$dt'";
|
$gameStor->tournament=7;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->phase=0;
|
||||||
|
$gameStor->tnmt_time = $dt;
|
||||||
} elseif($btn == "16강") {
|
} elseif($btn == "16강") {
|
||||||
finalFight($admin['tnmt_type'], $admin['tournament'], $admin['phase'], 16);
|
finalFight($admin['tnmt_type'], $admin['tournament'], $admin['phase'], 16);
|
||||||
} elseif($btn == "8강") {
|
} elseif($btn == "8강") {
|
||||||
@@ -276,9 +274,7 @@ if($btn == "자동개최설정") {
|
|||||||
} elseif($btn == "회수") {
|
} elseif($btn == "회수") {
|
||||||
setRefund();
|
setRefund();
|
||||||
} elseif($btn == "메시지") {
|
} elseif($btn == "메시지") {
|
||||||
$msg = addslashes(SQ2DQ($msg));
|
$gameStor->tnmt_msg = $msg;
|
||||||
$query = "update game set tnmt_msg='$msg'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header('location:b_tournament.php');
|
header('location:b_tournament.php');
|
||||||
@@ -8,16 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
|
|||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$query = "select killturn from game limit 1";
|
$killturn = $gameStor->killturn;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$admin['killturn'] *= 3;
|
$db->update('general', ['killturn'=>$killturn*3], 'owner=%i', $userID);
|
||||||
|
|
||||||
$query = "update general set killturn='{$admin['killturn']}' where owner='{$userID}'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
|
|
||||||
header('location:b_myPage.php');
|
header('location:b_myPage.php');
|
||||||
|
|||||||
@@ -16,12 +16,14 @@ extractMissingPostToGlobals();
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
|
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||||
|
$isVoteAdmin |= $session->userGrade >= 5;
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select develcost,vote,votecomment from game limit 1";
|
$admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votecomment']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,vote,name,nation,horse,weap,book,item,npc from general where owner='{$userID}'";
|
$query = "select no,vote,name,nation,horse,weap,book,item,npc from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -36,25 +38,19 @@ if($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
|
|||||||
$log = uniqueItem($me, $log, 1);
|
$log = uniqueItem($me, $log, 1);
|
||||||
pushGenLog($me, $log);
|
pushGenLog($me, $log);
|
||||||
}
|
}
|
||||||
else if($btn == "댓글" && $comment != "") {
|
else if($btn == "댓글" && trim($comment) != "") {
|
||||||
$comment = str_replace("|", " ", $comment);
|
|
||||||
$comment = str_replace(":", " ", $comment);
|
|
||||||
$comment = trim($comment);
|
$comment = trim($comment);
|
||||||
$comment = addslashes(SQ2DQ($comment));
|
|
||||||
|
|
||||||
$nation = getNationStaticInfo($me['nation']);
|
$nation = getNationStaticInfo($me['nation']);
|
||||||
|
|
||||||
if($admin['votecomment'] != "") { $admin['votecomment'] .= "|"; }
|
if(!$admin['votecomment']){
|
||||||
$admin['votecomment'] .= "{$nation['name']}:{$me['name']}:{$comment}";
|
$admin['votecomment'] = [];
|
||||||
|
}
|
||||||
$query = "update game set votecomment='{$admin['votecomment']}'";
|
$admin['votecomment'][] = [$nation['name'],$me['name'],$comment];
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->votecomment = $admin['votecomment'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($session->userGrade < 5){
|
if(!$isVoteAdmin){
|
||||||
header('location:a_vote.php');
|
header('location:a_vote.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -62,22 +58,21 @@ if($session->userGrade < 5){
|
|||||||
|
|
||||||
if($btn == "수정") {
|
if($btn == "수정") {
|
||||||
if($title != "") {
|
if($title != "") {
|
||||||
$vote = explode("|", $admin['vote']);
|
$gameStor->vote_title = WebUtil::htmlPurify($title);
|
||||||
$vote[0] = addslashes(SQ2DQ($title));
|
|
||||||
$admin['vote'] = implode("|", $vote);
|
|
||||||
$query = "update game set vote='{$admin['vote']}'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
}
|
}
|
||||||
} elseif($btn == "추가") {
|
} elseif($btn == "추가") {
|
||||||
if($str != "") {
|
if($str != "") {
|
||||||
$str = addslashes(SQ2DQ($str));
|
if(!$admin['vote']){
|
||||||
$admin['vote'] .= "|{$str}";
|
$admin['vote'] = [];
|
||||||
$query = "update game set vote='{$admin['vote']}'";
|
}
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$admin['vote'][] = WebUtil::htmlPurify($str);
|
||||||
|
$gameStor->vote=$admin['vote'];
|
||||||
}
|
}
|
||||||
} elseif($btn == "리셋") {
|
} elseif($btn == "리셋") {
|
||||||
$query = "update game set voteopen=1,vote='',votecomment=''";
|
$gameStor->voteopen=1;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->vote=['-'];
|
||||||
|
$gameStor->vote_title = '-';
|
||||||
|
$gameStor->votecomment=[];
|
||||||
|
|
||||||
$query = "update general set vote='0'";
|
$query = "update general set vote='0'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -85,14 +80,11 @@ if($btn == "수정") {
|
|||||||
$query = "update general set newvote='1' where vote=0";
|
$query = "update general set newvote='1' where vote=0";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} elseif($btn == "숨김") {
|
} elseif($btn == "숨김") {
|
||||||
$query = "update game set voteopen=0";
|
$gameStor->voteopen = 0;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
} elseif($btn == "전체통계만") {
|
} elseif($btn == "전체통계만") {
|
||||||
$query = "update game set voteopen=1";
|
$gameStor->voteopen = 1;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
} elseif($btn == "전부") {
|
} elseif($btn == "전부") {
|
||||||
$query = "update game set voteopen=2";
|
$gameStor->voteopen = 2;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header('location:a_vote.php');
|
header('location:a_vote.php');
|
||||||
@@ -4,22 +4,23 @@ namespace sammo;
|
|||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::getInstance()->setReadOnly();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>커맨드리스트</title>
|
<title>커맨드리스트</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel='stylesheet' href='css/common.css' type='text/css'>
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php
|
<?php
|
||||||
if(!$session->isLoggedIn()){
|
if(!$session->isGameLoggedIn()){
|
||||||
echo 'window.parent.location.href = "../";';
|
echo 'window.parent.location.href = "../";';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -67,22 +68,22 @@ myCommandList();
|
|||||||
|
|
||||||
function myCommandList() {
|
function myCommandList() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// 명령 목록
|
// 명령 목록
|
||||||
$query = "select year,month,turnterm from game limit 1";
|
$admin = $gameStor->getValues(['year','month','turnterm']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where owner='{$userID}'";
|
$me = $db->queryFirstRow("SELECT `no`,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 FROM general WHERE `owner`=%s", $userID);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
if(!$me){
|
||||||
$me = MYDB_fetch_array($result);
|
echo "로그인 되어있지 않습니다.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
$turn = getTurn($me, 2);
|
$turn = getTurn($me, 2);
|
||||||
|
|
||||||
echo "<table width=300 height=700 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
echo "<table width=300 height=700 class='tb_layout bg2'>
|
||||||
<form name=clock>
|
<form name=clock>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 align=center id=bg0><b>- 명령 목록 - <input value='$date' type=text name=clock size=19 style=background-color:black;color:white;border-style:none;></b></td>
|
<td colspan=4 align=center id=bg0><b>- 명령 목록 - <input value='$date' type=text name=clock size=19 style=background-color:black;color:white;border-style:none;></b></td>
|
||||||
@@ -105,10 +106,10 @@ function myCommandList() {
|
|||||||
$turndate = substr($totaldate,11, 5);
|
$turndate = substr($totaldate,11, 5);
|
||||||
echo "
|
echo "
|
||||||
<tr height=28>
|
<tr height=28>
|
||||||
<td width=30 align=center height=24 id=bg0><b>$j</b></td>
|
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
|
||||||
<td width=75 align=center height=24 id=bg1><b>{$year}年 {$month}月</b></td>
|
<td width=71 align=center height=24 id=bg1><b>{$year}年 {$month}月</b></td>
|
||||||
<td width=45 align=center bgcolor=black><b>$turndate</b></td>
|
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
|
||||||
<td width=137 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
|
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
$month++;
|
$month++;
|
||||||
$totaldate = addTurn($totaldate, $admin['turnterm']);
|
$totaldate = addTurn($totaldate, $admin['turnterm']);
|
||||||
|
|||||||
@@ -1,15 +1,75 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
/* font-boostring Block */
|
||||||
|
html * {max-height:1000000px;}
|
||||||
|
|
||||||
|
|
||||||
html, body{
|
html, body{
|
||||||
background-color:black;
|
background-color:black;
|
||||||
color:white;
|
color:white;
|
||||||
|
line-height:1.3;
|
||||||
|
font-family:'맑은 고딕';
|
||||||
|
font-size:13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table { font-family:'맑은 고딕'; line-height:110%; }
|
table { font-family:'맑은 고딕'; }
|
||||||
font { font-family:'맑은 고딕'; line-height:110%; }
|
font { font-family:'맑은 고딕'; }
|
||||||
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
|
input { font-family:'맑은 고딕'; font-size:13px; }
|
||||||
select { font-family:'굴림'; line-height:100%; }
|
select { font-family:'굴림'; line-height:100%; }
|
||||||
|
|
||||||
|
.center{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.mimic_flex{
|
||||||
|
border-collapse: collapse;
|
||||||
|
border:none;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mimic_flex td, .mimic_flex th {
|
||||||
|
border:none !important;
|
||||||
|
padding: 0px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
table.tb_layout {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 0px;
|
||||||
|
font-size: 13px;
|
||||||
|
word-break: break-all;
|
||||||
|
font-family: '맑은 고딕';
|
||||||
|
}
|
||||||
|
|
||||||
|
.tb_layout td, .tb_layout th {
|
||||||
|
border:solid 1px gray;
|
||||||
|
padding: 0px;
|
||||||
|
word-break: break-all;
|
||||||
|
font-family: '맑은 고딕';;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.bar_out{
|
||||||
|
position:relative;
|
||||||
|
border-top:solid 1px #888888;
|
||||||
|
border-bottom:solid 1px #333333;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
width:100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.bar_out div{
|
||||||
|
position:absolute;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.bar_out div.bar_in{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
.ev_warning{
|
.ev_warning{
|
||||||
@@ -76,6 +136,7 @@ select { font-family:'굴림'; line-height:100%; }
|
|||||||
|
|
||||||
.small_war_log .crew_plate{
|
.small_war_log .crew_plate{
|
||||||
color:orangered;
|
color:orangered;
|
||||||
|
font-size:90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_date{
|
.t_date{
|
||||||
@@ -126,3 +187,39 @@ select { font-family:'굴림'; line-height:100%; }
|
|||||||
float:left;
|
float:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tooltip{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip .tooltiptext {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 120px;
|
||||||
|
background-color: #555;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 5px 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
bottom: 125%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -60px;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip .tooltiptext::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-width: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #555 transparent transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover .tooltiptext {
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
|
||||||
|
.rankView {
|
||||||
|
width:1100px;
|
||||||
|
margin:auto;
|
||||||
|
position:relative;
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView h3{
|
||||||
|
text-align:center;
|
||||||
|
margin:0;
|
||||||
|
padding:2px;
|
||||||
|
border-bottom:1px solid gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView ul{
|
||||||
|
list-style:none;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top:-1px;
|
||||||
|
margin-bottom:-1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView li{
|
||||||
|
display:inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width:110px;
|
||||||
|
height:149px;
|
||||||
|
text-align:center;
|
||||||
|
border-right:1px solid gray;
|
||||||
|
border-top:1px solid gray;
|
||||||
|
margin:0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView li.no_value{
|
||||||
|
height:128px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView li.has_server {
|
||||||
|
height:168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView li.no_value.has_server {
|
||||||
|
height:146px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_server{
|
||||||
|
border-top:1px solid gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .tooltip .tooltiptext{
|
||||||
|
width:220px;
|
||||||
|
margin-left: -110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.rankView .no_value .hall_value{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_nation{
|
||||||
|
font-size:11px;
|
||||||
|
border-top:1px solid gray;
|
||||||
|
border-bottom:1px solid gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_name{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
resize: vertical;
|
||||||
|
font-size:11px;
|
||||||
|
height:28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_name p{
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_owner{
|
||||||
|
font-size:95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rankView .hall_value{
|
||||||
|
line-height:13px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-top:1px solid gray;
|
||||||
|
padding-top:3px;
|
||||||
|
padding-bottom:3px;
|
||||||
|
}
|
||||||
@@ -63,4 +63,8 @@ color:white;
|
|||||||
font-size:13px;
|
font-size:13px;
|
||||||
margin:0;
|
margin:0;
|
||||||
display:block;
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nation_info td{
|
||||||
|
height:18px;
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,11 @@
|
|||||||
}
|
}
|
||||||
/*임시용 끝*/
|
/*임시용 끝*/
|
||||||
|
|
||||||
|
#message_board{
|
||||||
|
height:1370px;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
#message_board section{
|
#message_board section{
|
||||||
overflow-y:auto;
|
overflow-y:auto;
|
||||||
overflow-x:hidden;
|
overflow-x:hidden;
|
||||||
@@ -17,9 +22,9 @@
|
|||||||
|
|
||||||
.msg_plate{
|
.msg_plate{
|
||||||
width:100%;
|
width:100%;
|
||||||
border-bottom:groove 0.1em;
|
border-bottom:solid 1px gray;
|
||||||
border-left:groove 0.1em;
|
border-left:solid 1px gray;
|
||||||
border-right:groove 0.1em;
|
border-right:solid 1px gray;
|
||||||
height:64px;
|
height:64px;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
@@ -30,6 +35,10 @@
|
|||||||
background-color:#5d1e1a;
|
background-color:#5d1e1a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.msg_plate_private.msg_plate_dest{
|
||||||
|
background-color:#5d461a;
|
||||||
|
}
|
||||||
|
|
||||||
.msg_plate_public{
|
.msg_plate_public{
|
||||||
background-color:#141c65;
|
background-color:#141c65;
|
||||||
|
|
||||||
@@ -37,7 +46,14 @@
|
|||||||
|
|
||||||
.msg_plate_national, .msg_plate_diplomacy{
|
.msg_plate_national, .msg_plate_diplomacy{
|
||||||
background-color:#00582c;
|
background-color:#00582c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msg_plate_national.msg_plate_dest, .msg_plate_diplomacy.msg_plate_dest {
|
||||||
|
background-color:#704615;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msg_plate_national.msg_plate_src, .msg_plate_diplomacy.msg_plate_src {
|
||||||
|
background-color:#70153b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.public_message{
|
.public_message{
|
||||||
@@ -56,7 +72,7 @@
|
|||||||
float:left;
|
float:left;
|
||||||
width:64px;
|
width:64px;
|
||||||
height:64px;
|
height:64px;
|
||||||
border-right:groove 0.1em;
|
border-right:solid 1px gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_time{
|
.msg_time{
|
||||||
@@ -70,34 +86,47 @@
|
|||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.message_input_form{
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
#msg_input{
|
#msg_input{
|
||||||
color:white;
|
color:white;
|
||||||
background-color:black;
|
background-color:black;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
width:720px;
|
width:715px;
|
||||||
|
margin:0 2px;
|
||||||
height:15px;
|
height:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#msg_submit{
|
||||||
|
position:absolute;
|
||||||
|
right:0;
|
||||||
|
margin-right:2px;
|
||||||
|
}
|
||||||
|
|
||||||
#mailbox_list{
|
#mailbox_list{
|
||||||
|
float:left;
|
||||||
color:white;
|
color:white;
|
||||||
background-color:black;
|
background-color:black;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
width:160px;
|
width:160px;
|
||||||
|
height:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board_header{
|
.board_header{
|
||||||
color:white;
|
color:white;
|
||||||
border:groove 0.1em;
|
border:solid 1px gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board_side{
|
.board_side{
|
||||||
|
position:absolute;
|
||||||
height:1370px;
|
height:1370px;
|
||||||
width:498px;
|
width:498px;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
display:inline-block;
|
border-left:solid 1px;
|
||||||
border-left:groove 1px;
|
border-right:solid 1px;
|
||||||
border-right:groove 1px;
|
border-bottom:solid 1px;
|
||||||
border-bottom:groove 1px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_body{
|
.msg_body{
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
.container{
|
||||||
|
width:1000px;
|
||||||
|
margin:0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_holder{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.general_card{
|
||||||
|
width:125px;
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card h4 {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card p {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.general_card .select_btn {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card label {
|
||||||
|
display: block;
|
||||||
|
padding-left: 15px;
|
||||||
|
text-indent: -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card input {
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
padding: 0;
|
||||||
|
margin:0;
|
||||||
|
vertical-align: bottom;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
*overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#outdate_token{
|
||||||
|
color:red;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
class GameCustomConst
|
||||||
|
{
|
||||||
|
/** @var int 유저 스탯 총합 */
|
||||||
|
public static $defaultStatTotal = _tK_statTotal_;
|
||||||
|
public static $defaultStatMin = _tK_statMin_;
|
||||||
|
public static $defaultStatMax = _tK_statMax_;
|
||||||
|
public static $defaultStatNPCMax = _tK_statNPCMax_;
|
||||||
|
public static $chiefStatMin = _tK_statChiefMin_;
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ namespace sammo;
|
|||||||
|
|
||||||
class UniqueConst{
|
class UniqueConst{
|
||||||
public static $serverID = '_tK_serverID_';
|
public static $serverID = '_tK_serverID_';
|
||||||
|
public static $serverName = '_tK_serverName_';
|
||||||
|
|
||||||
private function __construct(){}
|
private function __construct(){}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<div class="buttonPlate bg1">
|
||||||
|
<div>
|
||||||
|
<a href="a_status.php" target="_blank"><button class="toolbarButton">세력도</button></a>
|
||||||
|
<a href="a_kingdomList.php" target="_blank"><button class="toolbarButton">세력일람</button></a>
|
||||||
|
<a href="a_genList.php" target="_blank"><button class="toolbarButton">장수일람</button></a>
|
||||||
|
<a href="a_bestGeneral.php" target="_blank"><button class="toolbarButton">명장일람</button></a>
|
||||||
|
<a href="a_history.php" target="_blank"><button class="toolbarButton">연감</button></a>
|
||||||
|
<a href="a_hallOfFame.php" target="_blank"><button class="toolbarButton">명예의전당</button></a>
|
||||||
|
<a href="a_emperior.php" target="_blank"><button class="toolbarButton">왕조일람</button></a>
|
||||||
|
<a href="a_traffic.php" target="_blank"><button class="toolbarButton">접속량정보</button></a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="/bbs/board" target="_blank"><button class="toolbarButton2">삼모게시판</button></a>
|
||||||
|
<a href="/bbs/tip" target="_blank"><button class="toolbarButton">팁/강좌</button></a>
|
||||||
|
<a href="/bbs/news" target="_blank"><button class="toolbarButton">삼국 일보</button></a>
|
||||||
|
<a href="/bbs/history2" target="_blank"><button class="toolbarButton">개인 열전</button></a>
|
||||||
|
<a href="/bbs/history3" target="_blank"><button class="toolbarButton">국가 열전</button></a>
|
||||||
|
<a href="/bbs/patch" target="_blank"><button class="toolbarButton">패치 내역</button></a>
|
||||||
|
<a href="../i_other/help.php" target="_blank"><button class="toolbarButton">튜토리얼</button></a>
|
||||||
|
<a href="<?=$site?>" target="_blank"><button class="toolbarButton"><?=$call?></button></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -89,20 +89,19 @@ function GetImageURL($imgsvr, $filepath='') {
|
|||||||
* @param null|int $con 장수의 벌점
|
* @param null|int $con 장수의 벌점
|
||||||
* @param null|int $conlimit 최대 벌점
|
* @param null|int $conlimit 최대 벌점
|
||||||
*/
|
*/
|
||||||
function checkLimit($con = null, $conlimit = null) {
|
function checkLimit($con = null) {
|
||||||
$session = Session::getInstance();
|
$session = Session::getInstance();
|
||||||
if($session->userGrade>=4){
|
if($session->userGrade>=4){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
if($con === null){
|
if($con === null){
|
||||||
$con = $db->queryFirstField('SELECT con FROM general WHERE `owner`=%i', Session::getUserID());
|
$con = $db->queryFirstField('SELECT con FROM general WHERE `owner`=%i', Session::getUserID());
|
||||||
}
|
}
|
||||||
if($conlimit === null){
|
$conlimit = $gameStor->conlimit;
|
||||||
$conlimit = $db->queryFirstField('SELECT conlimit FROM game LIMIT 1');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($con > $conlimit) {
|
if($con > $conlimit) {
|
||||||
return 2;
|
return 2;
|
||||||
@@ -173,9 +172,9 @@ function cityInfo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($nation['color'] == "" ) { $nation['color'] = "#000000"; }
|
if($nation['color'] == "" ) { $nation['color'] = "#000000"; }
|
||||||
echo "<table width=640 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
echo "<table style='width:100%;' class='tb_layout bg2'>
|
||||||
<tr><td colspan=8 align=center style=height:20px;color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</td></tr>
|
<tr><td colspan=8 style=text-align:center;height:20px;color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</td></tr>
|
||||||
<tr><td colspan=8 align=center style=height:20px;color:".newColor($nation['color']).";background-color:{$nation['color']}><b>";
|
<tr><td colspan=8 style=text-align:center;height:20px;color:".newColor($nation['color']).";background-color:{$nation['color']}><b>";
|
||||||
|
|
||||||
if($city['nation'] == 0) {
|
if($city['nation'] == 0) {
|
||||||
echo "공 백 지";
|
echo "공 백 지";
|
||||||
@@ -211,46 +210,46 @@ function cityInfo() {
|
|||||||
</b></td>
|
</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan=2 align=center id=bg1><b>주민</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>주민</b></td>
|
||||||
<td height=7 colspan=3>".bar($pop)."</td>
|
<td height=7 colspan=3>".bar($pop)."</td>
|
||||||
<td rowspan=2 align=center id=bg1><b>민심</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>민심</b></td>
|
||||||
<td height=7>".bar($rate)."</td>
|
<td height=7>".bar($rate)."</td>
|
||||||
<td rowspan=2 align=center id=bg1><b>태수</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>태수</b></td>
|
||||||
<td rowspan=2 align=center>{$gen1['name']}</td>
|
<td rowspan=2 style='text-align:center;'>{$gen1['name']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=3 align=center>{$city['pop']}/{$city['pop2']}</td>
|
<td colspan=3 style='text-align:center;'>{$city['pop']}/{$city['pop2']}</td>
|
||||||
<td align=center>{$city['rate']}</td>
|
<td style='text-align:center;'>{$city['rate']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=50 rowspan=2 align=center id=bg1><b>농업</b></td>
|
<td width=50 rowspan=2 style='text-align:center;' class='bg1'><b>농업</b></td>
|
||||||
<td width=100 height=7>".bar($agri)."</td>
|
<td width=100 height=7>".bar($agri)."</td>
|
||||||
<td width=50 rowspan=2 align=center id=bg1><b>상업</b></td>
|
<td width=50 rowspan=2 style='text-align:center;' class='bg1'><b>상업</b></td>
|
||||||
<td width=100 height=7>".bar($comm)."</td>
|
<td width=100 height=7>".bar($comm)."</td>
|
||||||
<td width=50 rowspan=2 align=center id=bg1><b>치안</b></td>
|
<td width=50 rowspan=2 style='text-align:center;' class='bg1'><b>치안</b></td>
|
||||||
<td width=100 height=7>".bar($secu)."</td>
|
<td width=100 height=7>".bar($secu)."</td>
|
||||||
<td width=50 rowspan=2 align=center id=bg1><b>군사</b></td>
|
<td width=50 rowspan=2 style='text-align:center;' class='bg1'><b>군사</b></td>
|
||||||
<td rowspan=2 align=center>{$gen2['name']}</td>
|
<td rowspan=2 style='text-align:center;'>{$gen2['name']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>{$city['agri']}/{$city['agri2']}</td>
|
<td style='text-align:center;'>{$city['agri']}/{$city['agri2']}</td>
|
||||||
<td align=center>{$city['comm']}/{$city['comm2']}</td>
|
<td style='text-align:center;'>{$city['comm']}/{$city['comm2']}</td>
|
||||||
<td align=center>{$city['secu']}/{$city['secu2']}</td>
|
<td style='text-align:center;'>{$city['secu']}/{$city['secu2']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan=2 align=center id=bg1><b>수비</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>수비</b></td>
|
||||||
<td height=7>".bar($def)."</td>
|
<td height=7>".bar($def)."</td>
|
||||||
<td rowspan=2 align=center id=bg1><b>성벽</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>성벽</b></td>
|
||||||
<td height=7>".bar($wall)."</td>
|
<td height=7>".bar($wall)."</td>
|
||||||
<td rowspan=2 align=center id=bg1><b>시세</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>시세</b></td>
|
||||||
<td height=7>".bar($trade)."</td>
|
<td height=7>".bar($trade)."</td>
|
||||||
<td rowspan=2 align=center id=bg1><b>시중</b></td>
|
<td rowspan=2 style='text-align:center;' class='bg1'><b>시중</b></td>
|
||||||
<td rowspan=2 align=center>{$gen3['name']}</td>
|
<td rowspan=2 style='text-align:center;'>{$gen3['name']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>{$city['def']}/{$city['def2']}</td>
|
<td style='text-align:center;'>{$city['def']}/{$city['def2']}</td>
|
||||||
<td align=center>{$city['wall']}/{$city['wall2']}</td>
|
<td style='text-align:center;'>{$city['wall']}/{$city['wall2']}</td>
|
||||||
<td align=center>{$tradeStr}</td>
|
<td style='text-align:center;'>{$tradeStr}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
";
|
";
|
||||||
@@ -258,12 +257,11 @@ function cityInfo() {
|
|||||||
|
|
||||||
function myNationInfo() {
|
function myNationInfo() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$query = "select startyear,year from game limit 1";
|
$admin = $gameStor->getValues(['startyear','year']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation from general where owner='{$userID}'";
|
$query = "select no,nation from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -289,43 +287,43 @@ function myNationInfo() {
|
|||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level11 = MYDB_fetch_array($genresult);
|
$level11 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
echo "<table width=498 height=190 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
echo "<table width=498 class='tb_layout bg2 nation_info'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 align=center ";
|
<td colspan=4 ";
|
||||||
|
|
||||||
if($me['nation'] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13px;>【재 야】"; }
|
if($me['nation'] == 0) { echo "style='color:white;background-color:000000;font-weight:bold;font-size:13px;text-align:center;'>【재 야】"; }
|
||||||
else { echo "style=color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>국가【 {$nation['name']} 】"; }
|
else { echo "style='color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;text-align:center'>국가【 {$nation['name']} 】"; }
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>성 향</b></td>
|
<td class='bg1 center'><b>성 향</b></td>
|
||||||
<td align=center colspan=3><font color=\"yellow\">".getNationType($nation['type'])."</font> (".getNationType2($nation['type']).")</td>
|
<td colspan=3 class='center'><font color=\"yellow\">".getNationType($nation['type'])."</font> (".getNationType2($nation['type']).")</td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=68 align=center id=bg1><b>".getLevel(12, $nation['level'])."</b></td>
|
<td width=68 class='bg1 center'><b>".getLevel(12, $nation['level'])."</b></td>
|
||||||
<td width=178 align=center>";echo $level12?$level12['name']:"-"; echo "</td>
|
<td width=178 class='center'>";echo $level12?$level12['name']:"-"; echo "</td>
|
||||||
<td width=68 align=center id=bg1><b>".getLevel(11, $nation['level'])."</b></td>
|
<td width=68 class='bg1 center'><b>".getLevel(11, $nation['level'])."</b></td>
|
||||||
<td width=178 align=center>";echo $level11?$level11['name']:"-"; echo "</td>
|
<td width=178 class='center'>";echo $level11?$level11['name']:"-"; echo "</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>총주민</b></td>
|
<td class='bg1 center'><b>총주민</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"해당 없음":"{$city['totpop']}/{$city['maxpop']}";echo "</td>
|
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$city['totpop']}/{$city['maxpop']}";echo "</td>
|
||||||
<td align=center id=bg1><b>총병사</b></td>
|
<td class='bg1 center'><b>총병사</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"해당 없음":"{$general['totcrew']}/{$general['maxcrew']}"; echo "</td>
|
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$general['totcrew']}/{$general['maxcrew']}"; echo "</td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>국 고</b></td>
|
<td class='bg1 center'><b>국 고</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"해당 없음":"{$nation['gold']}";echo "</td>
|
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$nation['gold']}";echo "</td>
|
||||||
<td align=center id=bg1><b>병 량</b></td>
|
<td class='bg1 center'><b>병 량</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"해당 없음":"{$nation['rice']}";echo "</td>
|
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$nation['rice']}";echo "</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>지급율</b></td>
|
<td class='bg1 center'><b>지급율</b></td>
|
||||||
<td align=center>";
|
<td class='center'>";
|
||||||
if($me['nation'] == 0) {
|
if($me['nation'] == 0) {
|
||||||
echo "해당 없음";
|
echo "해당 없음";
|
||||||
} else {
|
} else {
|
||||||
@@ -333,8 +331,8 @@ function myNationInfo() {
|
|||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
</td>
|
</td>
|
||||||
<td align=center id=bg1><b>세 율</b></td>
|
<td class='bg1 center'><b>세 율</b></td>
|
||||||
<td align=center>";
|
<td class='center'>";
|
||||||
if($me['nation'] == 0) {
|
if($me['nation'] == 0) {
|
||||||
echo "해당 없음";
|
echo "해당 없음";
|
||||||
} else {
|
} else {
|
||||||
@@ -374,28 +372,28 @@ function myNationInfo() {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>속 령</b></td>
|
<td style='text-align:center;' class='bg1'><b>속 령</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"-":"{$city['cnt']}"; echo "</td>
|
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$city['cnt']}"; echo "</td>
|
||||||
<td align=center id=bg1><b>장 수</b></td>
|
<td style='text-align:center;' class='bg1'><b>장 수</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"-":"{$general['cnt']}"; echo "</td>
|
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$general['cnt']}"; echo "</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>국 력</b></td>
|
<td style='text-align:center;' class='bg1'><b>국 력</b></td>
|
||||||
<td align=center>{$nation['power']}</td>
|
<td style='text-align:center;'>{$nation['power']}</td>
|
||||||
<td align=center id=bg1><b>기술력</b></td>
|
<td style='text-align:center;' class='bg1'><b>기술력</b></td>
|
||||||
<td align=center>";echo $me['nation']==0?"-":"{$nation['tech']}"; echo "</td>
|
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$nation['tech']}"; echo "</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>전 략</b></td>
|
<td style='text-align:center;' class='bg1'><b>전 략</b></td>
|
||||||
<td align=center>{$nation['sabotagelimit']}</td>
|
<td style='text-align:center;'>{$nation['sabotagelimit']}</td>
|
||||||
<td align=center id=bg1><b>외 교</b></td>
|
<td style='text-align:center;' class='bg1'><b>외 교</b></td>
|
||||||
<td align=center>{$nation['surlimit']}</td>
|
<td style='text-align:center;'>{$nation['surlimit']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>임 관</b></td>
|
<td style='text-align:center;' class='bg1'><b>임 관</b></td>
|
||||||
<td align=center>{$nation['scout']}</td>
|
<td style='text-align:center;'>{$nation['scout']}</td>
|
||||||
<td align=center id=bg1><b>전 쟁</b></td>
|
<td style='text-align:center;' class='bg1'><b>전 쟁</b></td>
|
||||||
<td align=center>{$nation['war']}</td>
|
<td style='text-align:center;'>{$nation['war']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
";
|
";
|
||||||
@@ -435,12 +433,11 @@ function commandGroup($typename, $type=0) {
|
|||||||
|
|
||||||
function commandTable() {
|
function commandTable() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$query = "select startyear,year,develcost,scenario from game limit 1";
|
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost', 'scenario']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where owner='{$userID}'";
|
$query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -556,15 +553,13 @@ function commandTable() {
|
|||||||
} else {
|
} else {
|
||||||
addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0);
|
addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0);
|
||||||
}
|
}
|
||||||
//TODO:등용장 재 디자인
|
|
||||||
//xxx:등용장 일단 끔
|
|
||||||
/*
|
|
||||||
if($me['level'] >= 1 && $city['supply'] != 0) {
|
if($me['level'] >= 1 && $city['supply'] != 0) {
|
||||||
addCommand("등용(자금{$develcost5}+장수가치)", 22);
|
addCommand("등용(자금{$develcost5}+장수가치)", 22);
|
||||||
} else {
|
} else {
|
||||||
addCommand("등용(자금{$develcost5}+장수가치)", 22, 0);
|
addCommand("등용(자금{$develcost5}+장수가치)", 22, 0);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if($me['no'] == $troop['no'] && $citycount > 0 && $city['supply'] != 0 && $city['nation'] == $me['nation']) {
|
if($me['no'] == $troop['no'] && $citycount > 0 && $city['supply'] != 0 && $city['nation'] == $me['nation']) {
|
||||||
addCommand("집합(통솔경험)", 26);
|
addCommand("집합(통솔경험)", 26);
|
||||||
} else {
|
} else {
|
||||||
@@ -646,7 +641,13 @@ function commandTable() {
|
|||||||
if($me['level'] == 12) {
|
if($me['level'] == 12) {
|
||||||
addCommand("선양", 54);
|
addCommand("선양", 54);
|
||||||
if($citycount != 0) {
|
if($citycount != 0) {
|
||||||
addCommand("방랑", 47);
|
if ($admin['year'] + 3 < $admin['startyear']) {
|
||||||
|
addCommand("방랑", 47, 0);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
addCommand("방랑", 47);
|
||||||
|
}
|
||||||
|
|
||||||
addCommand("해산", 56, 0);
|
addCommand("해산", 56, 0);
|
||||||
} else {
|
} else {
|
||||||
addCommand("방랑", 47, 0);
|
addCommand("방랑", 47, 0);
|
||||||
@@ -671,12 +672,11 @@ function commandTable() {
|
|||||||
|
|
||||||
function CoreCommandTable() {
|
function CoreCommandTable() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$query = "select develcost from game limit 1";
|
$develcost = $gameStor->develcost;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,nation,city,level from general where owner='{$userID}'";
|
$query = "select no,nation,city,level from general where owner='{$userID}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -723,8 +723,8 @@ function CoreCommandTable() {
|
|||||||
commandGroup("", 1);
|
commandGroup("", 1);
|
||||||
commandGroup("====== 특 수 ======");
|
commandGroup("====== 특 수 ======");
|
||||||
addCommand("초토화", 65, $valid);
|
addCommand("초토화", 65, $valid);
|
||||||
addCommand("천도/3턴(금쌀{$admin['develcost']}0)", 66, $valid);
|
addCommand("천도/3턴(금쌀{$develcost}0)", 66, $valid);
|
||||||
$cost = $admin['develcost'] * 500 + 60000; // 7만~13만
|
$cost = $develcost * 500 + 60000; // 7만~13만
|
||||||
addCommand("증축/6턴(금쌀{$cost})", 67, $valid);
|
addCommand("증축/6턴(금쌀{$cost})", 67, $valid);
|
||||||
addCommand("감축/6턴", 68, $valid);
|
addCommand("감축/6턴", 68, $valid);
|
||||||
commandGroup("", 1);
|
commandGroup("", 1);
|
||||||
@@ -773,11 +773,10 @@ function myInfo() {
|
|||||||
|
|
||||||
function generalInfo($no) {
|
function generalInfo($no) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select show_img_level from game limit 1";
|
$show_img_level = $gameStor->show_img_level;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leader,leader2,power,power2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
|
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leader,leader2,power,power2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -873,77 +872,77 @@ function generalInfo($no) {
|
|||||||
else { $general['mode'] = "<font color=red>수비 안함</font>"; }
|
else { $general['mode'] = "<font color=red>수비 안함</font>"; }
|
||||||
|
|
||||||
$weapImage = ServConfig::$gameImagePath."/weap{$general['crewtype']}.png";
|
$weapImage = ServConfig::$gameImagePath."/weap{$general['crewtype']}.png";
|
||||||
if($admin['show_img_level'] < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
|
if($show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
|
||||||
$imageTemp = GetImageURL($general['imgsvr']);
|
$imageTemp = GetImageURL($general['imgsvr']);
|
||||||
echo "<table width=498 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
echo "<table width=498 class='tb_layout bg2'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 height=64 align=center rowspan=3 style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;'> </td>
|
<td width=64 height=64 rowspan=3 style='text-align:center;background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;'> </td>
|
||||||
<td align=center colspan=9 height=16 style=color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$general['name']} 【 {$level} | {$call} | {$color}{$injury}</font> 】 ".substr($general['turntime'], 11)."</td>
|
<td colspan=9 height=16 style=text-align:center;color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$general['name']} 【 {$level} | {$call} | {$color}{$injury}</font> 】 ".substr($general['turntime'], 11)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td align=center id=bg1><b>통솔</b></td>
|
<td style='text-align:center;' class='bg1'><b>통솔</b></td>
|
||||||
<td align=center> {$color}{$leader}</font>{$lbonus} </td>
|
<td style='text-align:center;'> {$color}{$leader}</font>{$lbonus} </td>
|
||||||
<td align=center width=45>".bar(expStatus($general['leader2']), 20)."</td>
|
<td style='text-align:center;' width=45>".bar(expStatus($general['leader2']), 20)."</td>
|
||||||
<td align=center id=bg1><b>무력</b></td>
|
<td style='text-align:center;' class='bg1'><b>무력</b></td>
|
||||||
<td align=center> {$color}{$power}</font> </td>
|
<td style='text-align:center;'> {$color}{$power}</font> </td>
|
||||||
<td align=center width=45>".bar(expStatus($general['power2']), 20)."</td>
|
<td style='text-align:center;' width=45>".bar(expStatus($general['power2']), 20)."</td>
|
||||||
<td align=center id=bg1><b>지력</b></td>
|
<td style='text-align:center;' class='bg1'><b>지력</b></td>
|
||||||
<td align=center> {$color}{$intel}</font> </td>
|
<td style='text-align:center;'> {$color}{$intel}</font> </td>
|
||||||
<td align=center width=45>".bar(expStatus($general['intel2']), 20)."</td>
|
<td style='text-align:center;' width=45>".bar(expStatus($general['intel2']), 20)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>명마</b></td>
|
<td style='text-align:center;' class='bg1'><b>명마</b></td>
|
||||||
<td align=center colspan=2><font size=1>$horsename</font></td>
|
<td style='text-align:center;' colspan=2><font size=1>$horsename</font></td>
|
||||||
<td align=center id=bg1><b>무기</b></td>
|
<td style='text-align:center;' class='bg1'><b>무기</b></td>
|
||||||
<td align=center colspan=2><font size=1>$weapname</font></td>
|
<td style='text-align:center;' colspan=2><font size=1>$weapname</font></td>
|
||||||
<td align=center id=bg1><b>서적</b></td>
|
<td style='text-align:center;' class='bg1'><b>서적</b></td>
|
||||||
<td align=center colspan=2><font size=1>$bookname</font></td>
|
<td style='text-align:center;' colspan=2><font size=1>$bookname</font></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center height=64 rowspan=3 style='background:no-repeat center url(\"{$weapImage}\");background-size:64px;'></td>
|
<td height=64 rowspan=3 style='text-align:center;background:no-repeat center url(\"{$weapImage}\");background-size:64px;'></td>
|
||||||
<td align=center id=bg1><b>자금</b></td>
|
<td style='text-align:center;' class='bg1'><b>자금</b></td>
|
||||||
<td align=center colspan=2>{$general['gold']}</td>
|
<td style='text-align:center;' colspan=2>{$general['gold']}</td>
|
||||||
<td align=center id=bg1><b>군량</b></td>
|
<td style='text-align:center;' class='bg1'><b>군량</b></td>
|
||||||
<td align=center colspan=2>{$general['rice']}</td>
|
<td style='text-align:center;' colspan=2>{$general['rice']}</td>
|
||||||
<td align=center id=bg1><b>도구</b></td>
|
<td style='text-align:center;' class='bg1'><b>도구</b></td>
|
||||||
<td align=center colspan=2><font size=1>$itemname</font></td>
|
<td style='text-align:center;' colspan=2><font size=1>$itemname</font></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>병종</b></td>
|
<td style='text-align:center;' class='bg1'><b>병종</b></td>
|
||||||
<td align=center colspan=2>$typename</td>
|
<td style='text-align:center;' colspan=2>$typename</td>
|
||||||
<td align=center id=bg1><b>병사</b></td>
|
<td style='text-align:center;' class='bg1'><b>병사</b></td>
|
||||||
<td align=center colspan=2>{$general['crew']}</td>
|
<td style='text-align:center;' colspan=2>{$general['crew']}</td>
|
||||||
<td align=center id=bg1><b>성격</b></td>
|
<td style='text-align:center;' class='bg1'><b>성격</b></td>
|
||||||
<td align=center colspan=2>".getGenChar($general['personal'])."</td>
|
<td style='text-align:center;' colspan=2>".getGenChar($general['personal'])."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>훈련</b></td>
|
<td style='text-align:center;' class='bg1'><b>훈련</b></td>
|
||||||
<td align=center colspan=2>$train</td>
|
<td style='text-align:center;' colspan=2>$train</td>
|
||||||
<td align=center id=bg1><b>사기</b></td>
|
<td style='text-align:center;' class='bg1'><b>사기</b></td>
|
||||||
<td align=center colspan=2>$atmos</td>
|
<td style='text-align:center;' colspan=2>$atmos</td>
|
||||||
<td align=center id=bg1><b>특기</b></td>
|
<td style='text-align:center;' class='bg1'><b>특기</b></td>
|
||||||
<td align=center colspan=2>$special / $special2</td>
|
<td style='text-align:center;' colspan=2>$special / $special2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=20>
|
<tr height=20>
|
||||||
<td align=center id=bg1><b>Lv</b></td>
|
<td style='text-align:center;' class='bg1'><b>Lv</b></td>
|
||||||
<td align=center> {$general['explevel']} </td>
|
<td style='text-align:center;'> {$general['explevel']} </td>
|
||||||
<td align=center colspan=5>".bar(getLevelPer($general['experience'], $general['explevel']), 20)."</td>
|
<td style='text-align:center;' colspan=5>".bar(getLevelPer($general['experience'], $general['explevel']), 20)."</td>
|
||||||
<td align=center id=bg1><b>연령</b></td>
|
<td style='text-align:center;' class='bg1'><b>연령</b></td>
|
||||||
<td align=center colspan=2>{$general['age']}</td>
|
<td style='text-align:center;' colspan=2>{$general['age']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=20>
|
<tr height=20>
|
||||||
<td align=center id=bg1><b>수비</b></td>
|
<td style='text-align:center;' class='bg1'><b>수비</b></td>
|
||||||
<td align=center colspan=3>{$general['mode']}</td>
|
<td style='text-align:center;' colspan=3>{$general['mode']}</td>
|
||||||
<td align=center id=bg1><b>삭턴</b></td>
|
<td style='text-align:center;' class='bg1'><b>삭턴</b></td>
|
||||||
<td align=center colspan=2>{$general['killturn']} 턴</td>
|
<td style='text-align:center;' colspan=2>{$general['killturn']} 턴</td>
|
||||||
<td align=center id=bg1><b>실행</b></td>
|
<td style='text-align:center;' class='bg1'><b>실행</b></td>
|
||||||
<td align=center colspan=2>$remaining 분 남음</td>
|
<td style='text-align:center;' colspan=2>$remaining 분 남음</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=20>
|
<tr height=20>
|
||||||
<td align=center id=bg1><b>부대</b></td>
|
<td style='text-align:center;' class='bg1'><b>부대</b></td>
|
||||||
<td align=center colspan=3>{$troop['name']}</td>
|
<td style='text-align:center;' colspan=3>{$troop['name']}</td>
|
||||||
<td align=center id=bg1><b>벌점</b></td>
|
<td style='text-align:center;' class='bg1'><b>벌점</b></td>
|
||||||
<td align=center colspan=5>".getConnect($general['connect'])." {$general['connect']}({$general['con']})</td>
|
<td style='text-align:center;' colspan=5>".getConnect($general['connect'])." {$general['connect']}({$general['con']})</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>";
|
</table>";
|
||||||
}
|
}
|
||||||
@@ -998,104 +997,107 @@ function generalInfo2($no) {
|
|||||||
if($dex30 > 100) { $dex30 = 100; }
|
if($dex30 > 100) { $dex30 = 100; }
|
||||||
if($dex40 > 100) { $dex40 = 100; }
|
if($dex40 > 100) { $dex40 = 100; }
|
||||||
|
|
||||||
$general['dex0'] = getDexCall($general['dex0']);
|
$general['dex0_text'] = getDexCall($general['dex0']);
|
||||||
$general['dex10'] = getDexCall($general['dex10']);
|
$general['dex10_text'] = getDexCall($general['dex10']);
|
||||||
$general['dex20'] = getDexCall($general['dex20']);
|
$general['dex20_text'] = getDexCall($general['dex20']);
|
||||||
$general['dex30'] = getDexCall($general['dex30']);
|
$general['dex30_text'] = getDexCall($general['dex30']);
|
||||||
$general['dex40'] = getDexCall($general['dex40']);
|
$general['dex40_text'] = getDexCall($general['dex40']);
|
||||||
|
|
||||||
echo "<table width=498 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
$general['dex0_short'] = sprintf('%.1fK', $general['dex0']/1000);
|
||||||
<tr><td align=center colspan=6 id=bg1><b>추 가 정 보</b></td></tr>
|
$general['dex10_short'] = sprintf('%.1fK', $general['dex10']/1000);
|
||||||
|
$general['dex20_short'] = sprintf('%.1fK', $general['dex20']/1000);
|
||||||
|
$general['dex30_short'] = sprintf('%.1fK', $general['dex30']/1000);
|
||||||
|
$general['dex40_short'] = sprintf('%.1fK', $general['dex40']/1000);
|
||||||
|
|
||||||
|
echo "<table width=498 class='tb_layout bg2'>
|
||||||
|
<tr><td style='text-align:center;' colspan=6 class='bg1'><b>추 가 정 보</b></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>명성</b></td>
|
<td style='text-align:center;' class='bg1'><b>명성</b></td>
|
||||||
<td align=center>$experience</td>
|
<td style='text-align:center;'>$experience</td>
|
||||||
<td align=center id=bg1><b>계급</b></td>
|
<td style='text-align:center;' class='bg1'><b>계급</b></td>
|
||||||
<td align=center colspan=3>$dedication</td>
|
<td style='text-align:center;' colspan=3>$dedication</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 align=center id=bg1><b>전투</b></td>
|
<td width=64 style='text-align:center;' class='bg1'><b>전투</b></td>
|
||||||
<td width=132 align=center>{$general['warnum']}</td>
|
<td width=132 style='text-align:center;'>{$general['warnum']}</td>
|
||||||
<td width=48 align=center id=bg1><b>계략</b></td>
|
<td width=48 style='text-align:center;' class='bg1'><b>계략</b></td>
|
||||||
<td width=98 align=center>{$general['firenum']}</td>
|
<td width=98 style='text-align:center;'>{$general['firenum']}</td>
|
||||||
<td width=48 align=center id=bg1><b>사관</b></td>
|
<td width=48 style='text-align:center;' class='bg1'><b>사관</b></td>
|
||||||
<td width=98 align=center>{$general['belong']}년</td>
|
<td width=98 style='text-align:center;'>{$general['belong']}년</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>승률</b></td>
|
<td style='text-align:center;' class='bg1'><b>승률</b></td>
|
||||||
<td align=center>{$general['winrate']} %</td>
|
<td style='text-align:center;'>{$general['winrate']} %</td>
|
||||||
<td align=center id=bg1><b>승리</b></td>
|
<td style='text-align:center;' class='bg1'><b>승리</b></td>
|
||||||
<td align=center>{$general['killnum']}</td>
|
<td style='text-align:center;'>{$general['killnum']}</td>
|
||||||
<td align=center id=bg1><b>패배</b></td>
|
<td style='text-align:center;' class='bg1'><b>패배</b></td>
|
||||||
<td align=center>{$general['deathnum']}</td>
|
<td style='text-align:center;'>{$general['deathnum']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><b>살상률</b></td>
|
<td style='text-align:center;' class='bg1'><b>살상률</b></td>
|
||||||
<td align=center>{$general['killrate']} %</td>
|
<td style='text-align:center;'>{$general['killrate']} %</td>
|
||||||
<td align=center id=bg1><b>사살</b></td>
|
<td style='text-align:center;' class='bg1'><b>사살</b></td>
|
||||||
<td align=center>{$general['killcrew']}</td>
|
<td style='text-align:center;'>{$general['killcrew']}</td>
|
||||||
<td align=center id=bg1><b>피살</b></td>
|
<td style='text-align:center;' class='bg1'><b>피살</b></td>
|
||||||
<td align=center>{$general['deathcrew']}</td>
|
<td style='text-align:center;'>{$general['deathcrew']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table width=498 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
|
<table width=498 class='tb_layout bg2'>
|
||||||
<tr><td align=center colspan=3 id=bg1><b>숙 련 도</b></td></tr>
|
<tr><td style='text-align:center;' colspan=4 class='bg1'><b>숙 련 도</b></td></tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td width=64 align=center id=bg1><b>보병</b></td>
|
<td width=64 style='text-align:center;' class='bg1'><b>보병</b></td>
|
||||||
<td width=64> {$general['dex0']}</td>
|
<td width=40> {$general['dex0_text']}</td>
|
||||||
<td width=366 align=center>".bar($dex0, 16)."</td>
|
<td width=60 align=right>{$general['dex0_short']} </td>
|
||||||
|
<td width=330 style='text-align:center;'>".bar($dex0, 16)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td align=center id=bg1><b>궁병</b></td>
|
<td style='text-align:center;' class='bg1'><b>궁병</b></td>
|
||||||
<td> {$general['dex10']}</td>
|
<td> {$general['dex10_text']}</td>
|
||||||
<td align=center>".bar($dex10, 16)."</td>
|
<td align=right>{$general['dex10_short']} </td>
|
||||||
|
<td style='text-align:center;'>".bar($dex10, 16)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td align=center id=bg1><b>기병</b></td>
|
<td style='text-align:center;' class='bg1'><b>기병</b></td>
|
||||||
<td> {$general['dex20']}</td>
|
<td> {$general['dex20_text']}</td>
|
||||||
<td align=center>".bar($dex20, 16)."</td>
|
<td align=right>{$general['dex20_short']} </td>
|
||||||
|
<td style='text-align:center;'>".bar($dex20, 16)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td align=center id=bg1><b>귀병</b></td>
|
<td style='text-align:center;' class='bg1'><b>귀병</b></td>
|
||||||
<td> {$general['dex30']}</td>
|
<td> {$general['dex30_text']}</td>
|
||||||
<td align=center>".bar($dex30, 16)."</td>
|
<td align=right>{$general['dex30_short']} </td>
|
||||||
|
<td style='text-align:center;'>".bar($dex30, 16)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr height=16>
|
<tr height=16>
|
||||||
<td align=center id=bg1><b>차병</b></td>
|
<td style='text-align:center;' class='bg1'><b>차병</b></td>
|
||||||
<td> {$general['dex40']}</td>
|
<td> {$general['dex40_text']}</td>
|
||||||
<td align=center>".bar($dex40, 16)."</td>
|
<td align=right>{$general['dex40_short']} </td>
|
||||||
|
<td style='text-align:center;'>".bar($dex40, 16)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>";
|
</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function adminMsg() {
|
function adminMsg() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$msg = $gameStor->msg;
|
||||||
|
|
||||||
$query = "select msg from game limit 1";
|
return "운영자 메세지 : <span style='color:yellow;'>$msg</span>";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "운영자 메세지 : <font color=yellow>";
|
|
||||||
echo $admin['msg']."</font>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOnlineNum() {
|
function getOnlineNum() {
|
||||||
return DB::db()->queryFirstField('select `online` from `game` where `no`=1');
|
return KVStorage::getStorage(DB::db(), 'game_env')->online;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlinegen() {
|
function onlinegen() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$onlinegen = "";
|
$onlinegen = "";
|
||||||
$generalID = Session::getInstance()->generalID;
|
$generalID = Session::getInstance()->generalID;
|
||||||
$nationID = DB::db()->queryFirstField('select `nation` from `general` where `no` = %i', $generalID);
|
$nationID = DB::db()->queryFirstField('select `nation` from `general` where `no` = %i', $generalID);
|
||||||
if($nationID === null || Util::toInt($nationID) === 0) {
|
if($nationID === null || Util::toInt($nationID) === 0) {
|
||||||
$query = "select onlinegen from game limit 1";
|
$onlinegen = $gameStor->onlinegen;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$game = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$onlinegen = $game['onlinegen'];
|
|
||||||
} else {
|
} else {
|
||||||
$onlinegen = DB::db()->queryFirstField('select onlinegen from nation where nation=%i',$nationID);
|
$onlinegen = DB::db()->queryFirstField('select onlinegen from nation where nation=%i',$nationID);
|
||||||
}
|
}
|
||||||
@@ -1104,12 +1106,9 @@ function onlinegen() {
|
|||||||
|
|
||||||
function onlineNation() {
|
function onlineNation() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$query = "select onlinenation from game limit 1";
|
return $gameStor->onlinenation;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$game = MYDB_fetch_array($result);
|
|
||||||
return $game['onlinenation'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function nationMsg() {
|
function nationMsg() {
|
||||||
@@ -1117,32 +1116,12 @@ function nationMsg() {
|
|||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$query = "select no,nation from general where owner='{$userID}'";
|
$msg = $db->queryFirstField(
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'SELECT msg FROM nation WHERE nation = (SELECT nation FROM general WHERE `owner` = %i)',
|
||||||
$me = MYDB_fetch_array($result);
|
$userID
|
||||||
|
);
|
||||||
|
|
||||||
$query = "select msg from nation where nation='{$me['nation']}'";
|
return $msg?:'';
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$nation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "<font color=orange>".$nation['msg']."</font>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) {
|
|
||||||
if($nation == 0) { $nation = 0; }
|
|
||||||
if($fromcolor == "") { $fromcolor = "#FFFFFF"; }
|
|
||||||
if($to == "") { $to = "재야"; }
|
|
||||||
if($tocolor == "") { $tocolor = "#FFFFFF"; }
|
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
|
||||||
if($type == 1) { $file = "_all_msg.txt"; }
|
|
||||||
else { $file = "_nation_msg{$nation}.txt"; }
|
|
||||||
$fp = fopen("logs/{$file}", "a");
|
|
||||||
//로그 파일에 기록
|
|
||||||
$str = "{$type}|".StringUtil::padStringAlignRight($from,12," ")."|".StringUtil::padStringAlignRight($to,12," ")."|".$date."|".$msg."|".$fromcolor."|".$tocolor."|".$picture."|".$imgsvr;
|
|
||||||
fwrite($fp, "{$str}\n");
|
|
||||||
fclose($fp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
||||||
@@ -1161,15 +1140,15 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
|||||||
|
|
||||||
$imageTemp = GetImageURL($imgsvr);
|
$imageTemp = GetImageURL($imgsvr);
|
||||||
echo "
|
echo "
|
||||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
<table style='text-align:center;' width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 align=center id=bg1><font size=1>$name</font></td>
|
<td width=90 style='text-align:center;' class='bg1'><font size=1>$name</font></td>
|
||||||
<td width=772 align=center id=bg1><font size=4><b>$message[0]</b></font></td>
|
<td width=746 style='text-align:center;' class='bg1'><font size=4><b>$message[0]</b></font></td>
|
||||||
<td width=148 align=center id=bg1>$when</td>
|
<td width=148 style='text-align:center;' class='bg1'>$when</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 height=64 valign=top><img width='64' height='64' src={$imageTemp}/{$picture} border=0></td>
|
<td width=90 height=64 valign=top><img width='64' height='64' src={$imageTemp}/{$picture} border='0'></td>
|
||||||
<td width=932 colspan=2>$message[1]</td>
|
<td width=906 colspan=2>$message[1]</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
for($i=0; $i < $count; $i++) {
|
for($i=0; $i < $count; $i++) {
|
||||||
$who = Tag2Code($message[2+$i*2]);
|
$who = Tag2Code($message[2+$i*2]);
|
||||||
@@ -1179,16 +1158,16 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
|||||||
$regen = MYDB_fetch_array($result);
|
$regen = MYDB_fetch_array($result);
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td width=64 align=center><font size=1>{$regen['name']}</font></td>
|
<td width=90 style='text-align:center;'><font size=1>{$regen['name']}</font></td>
|
||||||
<td width=932 colspan=2>$reply</td>
|
<td width=906 colspan=2>$reply</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<form name=reply_form{$num} method=post action=$board>
|
<form name=reply_form{$num} method=post action=$board>
|
||||||
<td width=64 align=center>댓글달기</td>
|
<td width=90 style='text-align:center;'>댓글달기</td>
|
||||||
<td width=932 colspan=2>
|
<td width=906 colspan=2>
|
||||||
<input type=textarea name=reply maxlength=250 style=color:white;background-color:black;width:830px;>
|
<input type=textarea name=reply maxlength=250 style=color:white;background-color:black;width:804px;>
|
||||||
<input type=submit value=댓글달기>
|
<input type=submit value=댓글달기>
|
||||||
<input type=hidden name=num value=$num>
|
<input type=hidden name=num value=$num>
|
||||||
</td>
|
</td>
|
||||||
@@ -1264,14 +1243,14 @@ function cutDay($date, int $turnterm) {
|
|||||||
function increaseRefresh($type="", $cnt=1) {
|
function increaseRefresh($type="", $cnt=1) {
|
||||||
//FIXME: 로그인, 비로그인 시 처리가 명확하지 않음
|
//FIXME: 로그인, 비로그인 시 처리가 명확하지 않음
|
||||||
$session = Session::getInstance();
|
$session = Session::getInstance();
|
||||||
|
$userID = $session->userID;
|
||||||
$generalID = $session->generalID;
|
$generalID = $session->generalID;
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$db->update('game', [
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
'refresh'=>$db->sqleval('refresh+%i', $cnt)
|
$gameStor->refresh = $gameStor->refresh+$cnt; //TODO: +로 증가하는 값은 별도로 분리
|
||||||
], true);
|
|
||||||
|
|
||||||
if($generalID) {
|
if($generalID) {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
@@ -1280,14 +1259,14 @@ function increaseRefresh($type="", $cnt=1) {
|
|||||||
'connect'=>$db->sqleval('connect + %i', $cnt),
|
'connect'=>$db->sqleval('connect + %i', $cnt),
|
||||||
'refcnt'=>$db->sqleval('refcnt + %i', $cnt),
|
'refcnt'=>$db->sqleval('refcnt + %i', $cnt),
|
||||||
'refresh'=>$db->sqleval('refresh + %i', $cnt)
|
'refresh'=>$db->sqleval('refresh + %i', $cnt)
|
||||||
], 'owner=%i', $generalID);
|
], 'owner=%i', $userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = date('Y_m_d H:i:s');
|
$date = date('Y_m_d H:i:s');
|
||||||
$date2 = substr($date, 0, 10);
|
$date2 = substr($date, 0, 10);
|
||||||
$online = getOnlineNum();
|
$online = getOnlineNum();
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
"logs/_{$date2}_refresh.txt",
|
__dir__."/logs/".UniqueConst::$serverID."/_{$date2}_refresh.txt",
|
||||||
sprintf(
|
sprintf(
|
||||||
"%s, %s, %s, %s, %s, %d\n",
|
"%s, %s, %s, %s, %s, %d\n",
|
||||||
$date,
|
$date,
|
||||||
@@ -1324,7 +1303,7 @@ function increaseRefresh($type="", $cnt=1) {
|
|||||||
}
|
}
|
||||||
if($str != "") {
|
if($str != "") {
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
"logs/_{$date2}_ipcheck.txt",
|
__dir__."/logs/".UniqueConst::$serverID."/_{$date2}_ipcheck.txt",
|
||||||
sprintf(
|
sprintf(
|
||||||
"%s, %s, %s%s\n",
|
"%s, %s, %s%s\n",
|
||||||
$session->userName,
|
$session->userName,
|
||||||
@@ -1339,49 +1318,49 @@ function increaseRefresh($type="", $cnt=1) {
|
|||||||
function updateTraffic() {
|
function updateTraffic() {
|
||||||
$online = getOnlineNum();
|
$online = getOnlineNum();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$game = $db->queryFirstRow('SELECT year,month,refresh,maxonline,maxrefresh from game limit 1');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$admin = $gameStor->getValues(['year','month','refresh','maxonline','maxrefresh']);
|
||||||
|
|
||||||
//최다갱신자
|
//최다갱신자
|
||||||
$user = $db->queryFirstRow('select name,refresh from general order by refresh desc limit 1');
|
$user = $db->queryFirstRow('select name,refresh from general order by refresh desc limit 1');
|
||||||
|
|
||||||
if($game['maxrefresh'] < $game['refresh']) {
|
if($admin['maxrefresh'] < $admin['refresh']) {
|
||||||
$game['maxrefresh'] = $game['refresh'];
|
$admin['maxrefresh'] = $admin['refresh'];
|
||||||
}
|
}
|
||||||
if($game['maxonline'] < $online) {
|
if($admin['maxonline'] < $online) {
|
||||||
$game['maxonline'] = $online;
|
$admin['maxonline'] = $online;
|
||||||
}
|
}
|
||||||
$db->update('game',[
|
$gameStor->refresh = 0;
|
||||||
'refresh'=>0,
|
$gameStor->maxrefresh = $admin['maxrefresh'];
|
||||||
'maxrefresh'=>$game['maxrefresh'],
|
$gameStor->maxonline = $admin['maxonline'];
|
||||||
'maxonline'=>$game['maxonline']
|
|
||||||
], true);
|
|
||||||
|
|
||||||
$db->update('general', ['refresh'=>0], true);
|
$db->update('general', ['refresh'=>0], true);
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
//일시|년|월|총갱신|접속자|최다갱신자
|
//일시|년|월|총갱신|접속자|최다갱신자
|
||||||
file_put_contents(__dir__."/logs/_traffic.txt",
|
file_put_contents(__dir__."/logs/".UniqueConst::$serverID."/_traffic.txt",
|
||||||
StringUtil::padStringAlignRight($date,20," ")
|
Json::encode([
|
||||||
."|".StringUtil::padStringAlignRight($game['year'],3," ")
|
$date,
|
||||||
."|".StringUtil::padStringAlignRight($game['month'],2," ")
|
$admin['year'],
|
||||||
."|".StringUtil::padStringAlignRight($game['refresh'],8," ")
|
$admin['month'],
|
||||||
."|".StringUtil::padStringAlignRight($online,5," ")
|
$admin['refresh'],
|
||||||
."|".StringUtil::padStringAlignRight($user['name']."(".$user['refresh'].")",20," ")
|
$online,
|
||||||
|
$user['name']."(".$user['refresh'].")"
|
||||||
|
])."\n"
|
||||||
, FILE_APPEND);
|
, FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CheckOverhead() {
|
function CheckOverhead() {
|
||||||
//서버정보
|
//서버정보
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$admin = $db->queryFirstRow('SELECT turnterm, conlimit from GAME LIMIT 1');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
list($turnterm, $conlimit) = $gameStor->getValuesAsArray(['turnterm', 'conlimit']);
|
||||||
|
|
||||||
$con = Util::round(pow($admin['turnterm'], 0.6) * 3) * 10;
|
$con = Util::round(pow($turnterm, 0.6) * 3) * 10;
|
||||||
|
|
||||||
|
|
||||||
if($con != $admin['conlimit']){
|
if($con != $conlimit){
|
||||||
$db->update('game', [
|
$gameStor->conlimit = $con;
|
||||||
'conlimit' => $con
|
|
||||||
], true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1419,27 +1398,30 @@ function unlock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function timeover() {
|
function timeover() {
|
||||||
$admin = DB::db()->queryFirstRow(
|
$db = DB::db();
|
||||||
'SELECT turnterm,TIMESTAMPDIFF(SECOND,turntime,now()) as diff from game limit 1'
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
);
|
|
||||||
|
|
||||||
$t = min($admin['turnterm'], 5);
|
list($turnterm, $turntime) = $gameStor->getValuesAsArray(['turnterm', 'turntime']);
|
||||||
|
$diff = (new \DateTime())->getTimestamp() - (new \DateTime($turntime))->getTimestamp();
|
||||||
|
|
||||||
$term = $admin['diff'];
|
$t = min($turnterm, 5);
|
||||||
|
|
||||||
|
$term = $diff;
|
||||||
if($term >= $t || $term < 0) { return 1; }
|
if($term >= $t || $term < 0) { return 1; }
|
||||||
else { return 0; }
|
else { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkDelay() {
|
function checkDelay() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
//서버정보
|
//서버정보
|
||||||
$query = "select turnterm,now() as now,TIMESTAMPDIFF(MINUTE,turntime,now()) as offset from game limit 1";
|
$now = new \DateTimeImmutable();
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$turntime = new \DateTimeImmutable($gameStor->turntime);
|
||||||
$admin = MYDB_fetch_array($result);
|
$timeMinDiff = intdiv($now->getTimestamp() - $turntime->getTimestamp(), 60);
|
||||||
|
|
||||||
// 1턴이상 갱신 없었으면 서버 지연
|
// 1턴이상 갱신 없었으면 서버 지연
|
||||||
$term = $admin['turnterm'];
|
$term = $gameStor->turnterm;
|
||||||
if($term >= 20){
|
if($term >= 20){
|
||||||
$threshold = 1;
|
$threshold = 1;
|
||||||
}
|
}
|
||||||
@@ -1450,20 +1432,28 @@ function checkDelay() {
|
|||||||
$threshold = 3;
|
$threshold = 3;
|
||||||
}
|
}
|
||||||
//지연 해야할 밀린 턴 횟수
|
//지연 해야할 밀린 턴 횟수
|
||||||
$iter = intdiv($admin['offset'], $term);
|
$iter = intdiv($timeMinDiff, $term);
|
||||||
if($iter > $threshold) {
|
if($iter > $threshold) {
|
||||||
$minute = $iter * $term;
|
$minute = $iter * $term;
|
||||||
$query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)";
|
$newTurntime = $turntime->add(new \DateInterval("PT{$minute}M"));
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$newNextTurntime = $turntime->add(new \DateInterval("PT{$term}M"));
|
||||||
$query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE) where turntime<=DATE_ADD(turntime, INTERVAL $term MINUTE)";
|
$gameStor->turntime = $newTurntime->format('Y-m-d H:i:s');
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->starttime = (new \DateTimeImmutable($gameStor->starttime))
|
||||||
$query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)";
|
->add(new \DateInterval("PT{$minute}M"))
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$db->update('general', [
|
||||||
|
'turntime'=> $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], 'turntime<=DATE_ADD(turntime, INTERVAL %i MINUTE)', $term);
|
||||||
|
$db->update('auction', [
|
||||||
|
'expire'=> $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||||
|
], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateOnline() {
|
function updateOnline() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$nationname = ["재야"];
|
$nationname = ["재야"];
|
||||||
|
|
||||||
@@ -1497,8 +1487,7 @@ function updateOnline() {
|
|||||||
$onnationstr .= "【{$nationname[$key]}】, ";
|
$onnationstr .= "【{$nationname[$key]}】, ";
|
||||||
|
|
||||||
if($key == 0) {
|
if($key == 0) {
|
||||||
$query = "update game set onlinegen='$onnation[0]'";
|
$gameStor->onlinegen = $onnation[0];
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
} else {
|
} else {
|
||||||
$query = "update nation set onlinegen='$onnation[$key]' where nation='$key'";
|
$query = "update nation set onlinegen='$onnation[$key]' where nation='$key'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -1507,12 +1496,13 @@ function updateOnline() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//접속중인 국가
|
//접속중인 국가
|
||||||
$query = "update game set online='$onlinenum',onlinenation='$onnationstr'";
|
$gameStor->online = $onlinenum;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->onlinenation = $onnationstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkTurn() {
|
function checkTurn() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$alllog = [];
|
$alllog = [];
|
||||||
@@ -1523,7 +1513,7 @@ function checkTurn() {
|
|||||||
|
|
||||||
// 파일락 획득
|
// 파일락 획득
|
||||||
//FIXME:이미 DB 테이블로 lock을 시도하는데 이게 따로 필요한가?
|
//FIXME:이미 DB 테이블로 lock을 시도하는데 이게 따로 필요한가?
|
||||||
$fp = fopen('lock.txt', 'r');
|
$fp = fopen(__dir__.'/lock.txt', 'r');
|
||||||
if(!flock($fp, LOCK_EX)) {
|
if(!flock($fp, LOCK_EX)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1547,14 +1537,11 @@ function checkTurn() {
|
|||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', 진입');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', 진입');
|
||||||
|
|
||||||
//천통시에는 동결
|
//천통시에는 동결
|
||||||
$query = "select turntime from game where isUnited=2";
|
if($gameStor->isunited == 2) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->update('plock', ['plock'=>1], true);
|
||||||
$down = MYDB_num_rows($result);
|
|
||||||
if($down > 0) {
|
|
||||||
$query = "update plock set plock=1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$gameStor->cacheAll();
|
||||||
// 1턴이상 갱신 없었으면 서버 지연
|
// 1턴이상 갱신 없었으면 서버 지연
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay');
|
||||||
checkDelay();
|
checkDelay();
|
||||||
@@ -1565,14 +1552,11 @@ function checkTurn() {
|
|||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', CheckOverhead');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', CheckOverhead');
|
||||||
CheckOverhead();
|
CheckOverhead();
|
||||||
//서버정보
|
//서버정보
|
||||||
$query = "select * from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
// 최종 처리 월턴의 다음 월턴시간 구함
|
// 최종 처리 월턴의 다음 월턴시간 구함
|
||||||
$prevTurn = cutTurn($admin['turntime'], $admin['turnterm']);
|
$prevTurn = cutTurn($gameStor->turntime, $gameStor->turnterm);
|
||||||
$nextTurn = addTurn($prevTurn, $admin['turnterm']);
|
$nextTurn = addTurn($prevTurn, $gameStor->turnterm);
|
||||||
// 현재 턴 이전 월턴까지 모두처리.
|
// 현재 턴 이전 월턴까지 모두처리.
|
||||||
//최종 처리 이후 다음 월턴이 현재 시간보다 전이라면
|
//최종 처리 이후 다음 월턴이 현재 시간보다 전이라면
|
||||||
while($nextTurn <= $date) {
|
while($nextTurn <= $date) {
|
||||||
@@ -1610,15 +1594,15 @@ function checkTurn() {
|
|||||||
|
|
||||||
// 잡금 해제
|
// 잡금 해제
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock');
|
||||||
|
$gameStor->resetCache(true);
|
||||||
unlock();
|
unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 그 시각 년도,월 저장
|
// 그 시각 년도,월 저장
|
||||||
$dt = turnDate($nextTurn);
|
list($gameStor->year, $gameStor->month) = turnDate($nextTurn);
|
||||||
$admin['year'] = $dt[0]; $admin['month'] = $dt[1];
|
|
||||||
|
|
||||||
pushLockLog(["-- checkTurn() ".$admin['month']."월 : ".date('Y-m-d H:i:s')." : ".$session->userName]);
|
pushLockLog(["-- checkTurn() ".$gameStor->month."월 : ".date('Y-m-d H:i:s')." : ".$session->userName]);
|
||||||
|
|
||||||
// 이벤트 핸들러 동작
|
// 이벤트 핸들러 동작
|
||||||
foreach (DB::db()->query('SELECT * from event') as $rawEvent) {
|
foreach (DB::db()->query('SELECT * from event') as $rawEvent) {
|
||||||
@@ -1627,13 +1611,12 @@ function checkTurn() {
|
|||||||
$action = Json::decode($rawEvent['action']);
|
$action = Json::decode($rawEvent['action']);
|
||||||
$event = new Event\EventHandler($cond, $action);
|
$event = new Event\EventHandler($cond, $action);
|
||||||
|
|
||||||
$event->tryRunEvent(['currentEventID'=>$eventID] + $admin);
|
$event->tryRunEvent(['currentEventID'=>$eventID] + $gameStor->getAll(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 분기계산. 장수들 턴보다 먼저 있다면 먼저처리
|
// 분기계산. 장수들 턴보다 먼저 있다면 먼저처리
|
||||||
if($admin['month'] == 1) {
|
if($gameStor->month == 1) {
|
||||||
// NPC 등장
|
// NPC 등장
|
||||||
//if($admin['scenario'] > 0 && $admin['scenario'] < 20) { RegNPC(); }
|
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processGoldIncome');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processGoldIncome');
|
||||||
processGoldIncome();
|
processGoldIncome();
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processSpring');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processSpring');
|
||||||
@@ -1649,14 +1632,14 @@ function checkTurn() {
|
|||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge');
|
||||||
addAge();
|
addAge();
|
||||||
// 새해 알림
|
// 새해 알림
|
||||||
$alllog[] = "<C>◆</>{$admin['month']}월:<C>{$admin['year']}</>년이 되었습니다.";
|
$alllog[] = "<C>◆</>{$gameStor->month}월:<C>{$gameStor->year}</>년이 되었습니다.";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $gameStor->year, $gameStor->month);
|
||||||
} elseif($admin['month'] == 4) {
|
} elseif($gameStor->month == 4) {
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
||||||
updateQuaterly();
|
updateQuaterly();
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster');
|
||||||
disaster();
|
disaster();
|
||||||
} elseif($admin['month'] == 7) {
|
} elseif($gameStor->month == 7) {
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processRiceIncome');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processRiceIncome');
|
||||||
processRiceIncome();
|
processRiceIncome();
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processFall');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processFall');
|
||||||
@@ -1667,7 +1650,7 @@ function checkTurn() {
|
|||||||
disaster();
|
disaster();
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate');
|
||||||
tradeRate();
|
tradeRate();
|
||||||
} elseif($admin['month'] == 10) {
|
} elseif($gameStor->month == 10) {
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly');
|
||||||
updateQuaterly();
|
updateQuaterly();
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster');
|
||||||
@@ -1678,18 +1661,16 @@ function checkTurn() {
|
|||||||
|
|
||||||
// 다음달로 넘김
|
// 다음달로 넘김
|
||||||
$prevTurn = $nextTurn;
|
$prevTurn = $nextTurn;
|
||||||
$nextTurn = addTurn($prevTurn, $admin['turnterm']);
|
$nextTurn = addTurn($prevTurn, $gameStor->turnterm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__);
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__);
|
||||||
|
|
||||||
// 이시각 정각 시까지 업데이트 완료했음
|
// 이시각 정각 시까지 업데이트 완료했음
|
||||||
$query = "update game set turntime='$prevTurn'";
|
$gameStor->turntime = $prevTurn;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
// 그 시각 년도,월 저장
|
// 그 시각 년도,월 저장
|
||||||
$dt = turnDate($prevTurn);
|
list($gameStor->year, $gameStor->month) = turnDate($prevTurn);
|
||||||
$admin['year'] = $dt[0]; $admin['month'] = $dt[1];
|
|
||||||
// 현재시간의 월턴시간 이후 분단위 장수 처리
|
// 현재시간의 월턴시간 이후 분단위 장수 처리
|
||||||
do {
|
do {
|
||||||
$query = "select no,name,turntime,turn0,npc from general where turntime<='$date' order by turntime";
|
$query = "select no,name,turntime,turn0,npc from general where turntime<='$date' order by turntime";
|
||||||
@@ -1717,8 +1698,7 @@ function checkTurn() {
|
|||||||
|
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__);
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__);
|
||||||
|
|
||||||
$query = "update game set turntime='$date'";
|
$gameStor->turntime = $date;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
// 부상 과도 제한
|
// 부상 과도 제한
|
||||||
$query = "update general set injury='80' where injury>'80'";
|
$query = "update general set injury='80' where injury>'80'";
|
||||||
@@ -1731,6 +1711,7 @@ function checkTurn() {
|
|||||||
processAuction();
|
processAuction();
|
||||||
// 잡금 해제
|
// 잡금 해제
|
||||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock');
|
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock');
|
||||||
|
$gameStor->resetCache(true);
|
||||||
unlock();
|
unlock();
|
||||||
|
|
||||||
pushLockLog(["- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$session->userName]);
|
pushLockLog(["- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$session->userName]);
|
||||||
@@ -1742,15 +1723,14 @@ function checkTurn() {
|
|||||||
|
|
||||||
function addAge() {
|
function addAge() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
//나이와 호봉 증가
|
//나이와 호봉 증가
|
||||||
$query = "update general set age=age+1,belong=belong+1";
|
$query = "update general set age=age+1,belong=belong+1";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$query = "select startyear,year,month from game limit 1";
|
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
if($admin['year'] >= $admin['startyear']+3) {
|
if($admin['year'] >= $admin['startyear']+3) {
|
||||||
$query = "select no,name,nation,leader,power,intel from general where specage<=age and special='0'";
|
$query = "select no,name,nation,leader,power,intel from general where specage<=age and special='0'";
|
||||||
@@ -1763,8 +1743,9 @@ function addAge() {
|
|||||||
$query = "update general set special='$special' where no='{$general['no']}'";
|
$query = "update general set special='$special' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special)."</></b>】(을)를 습득");
|
$josaUl = JosaUtil::pick($special, '을');
|
||||||
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special)."</></b>】(을)를 익혔습니다!");
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special)."</></b>】{$josaUl} 습득");
|
||||||
|
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special)."</></b>】{$josaUl} 익혔습니다!");
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'";
|
$query = "select no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'";
|
||||||
@@ -1778,33 +1759,34 @@ function addAge() {
|
|||||||
$query = "update general set special2='$special2' where no='{$general['no']}'";
|
$query = "update general set special2='$special2' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
|
$josaUl = JosaUtil::pick($special2, '을');
|
||||||
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】(을)를 익혔습니다!");
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】{$josaUl} 습득");
|
||||||
|
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】{$josaUl} 익혔습니다!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function turnDate($curtime) {
|
function turnDate($curtime) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$admin = $gameStor->getValues(['startyear', 'starttime', 'turnterm', 'year', 'month']);
|
||||||
$query = "select startyear,starttime,turnterm,year,month from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$turn = $admin['starttime'];
|
$turn = $admin['starttime'];
|
||||||
$curturn = cutTurn($curtime, $admin['turnterm']);
|
$curturn = cutTurn($curtime, $admin['turnterm']);
|
||||||
$num = 0;
|
$term = $admin['turnterm'];
|
||||||
$term = $admin['turnterm']*60;
|
|
||||||
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term);
|
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term*60);
|
||||||
|
|
||||||
$year = $admin['startyear'] + intdiv($num, 12);
|
$date = $admin['startyear'] * 12;
|
||||||
$month = 1 + (12+$num) % 12;
|
$date += $num;
|
||||||
|
|
||||||
|
$year = intdiv($date, 12);
|
||||||
|
$month = 1 + $date % 12;
|
||||||
|
|
||||||
// 바뀐 경우만 업데이트
|
// 바뀐 경우만 업데이트
|
||||||
if($admin['month'] != $month || $admin['year'] != $year) {
|
if($admin['month'] != $month || $admin['year'] != $year) {
|
||||||
$query = "update game set year='$year',month='$month'";
|
$gameStor->year = $year;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->month = $month;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [$year, $month];
|
return [$year, $month];
|
||||||
@@ -1813,16 +1795,14 @@ function turnDate($curtime) {
|
|||||||
|
|
||||||
function triggerTournament() {
|
function triggerTournament() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$query = "select tournament,tnmt_trig from game limit 1";
|
$admin = $gameStor->getValues(['tournament', 'tnmt_trig']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
//현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
|
//현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
|
||||||
if($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
|
if($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
|
||||||
$type = rand() % 6; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
$type = rand() % 5; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
||||||
//전력전 50%, 통, 일, 설 각 17%
|
//전력전 40%, 통, 일, 설 각 20%
|
||||||
if($type > 3) { $type = 0; }
|
if($type > 3) { $type = 0; }
|
||||||
startTournament($admin['tnmt_trig'], $type);
|
startTournament($admin['tnmt_trig'], $type);
|
||||||
}
|
}
|
||||||
@@ -1864,7 +1844,8 @@ function PreprocessCommand($no) {
|
|||||||
$query = "update general set injury=0 where no='{$patient['no']}'";
|
$query = "update general set injury=0 where no='{$patient['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
pushGenLog($patient, "<C>●</><Y>{$general['name']}</>(이)가 <C>의술</>로써 치료해줍니다!");
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
|
pushGenLog($patient, "<C>●</><Y>{$general['name']}</>{$josaYi} <C>의술</>로써 치료해줍니다!");
|
||||||
|
|
||||||
if($patientName == "") {
|
if($patientName == "") {
|
||||||
$patientName = $patient['name'];
|
$patientName = $patient['name'];
|
||||||
@@ -1872,7 +1853,8 @@ function PreprocessCommand($no) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($patientCount == 1) {
|
if($patientCount == 1) {
|
||||||
pushGenLog($general, "<C>●</><C>의술</>을 펼쳐 도시의 장수 <Y>{$patientName}</>(을)를 치료합니다!");
|
$josaUl = JosaUtil::pick($patientName, '을');
|
||||||
|
pushGenLog($general, "<C>●</><C>의술</>을 펼쳐 도시의 장수 <Y>{$patientName}</>{$josaUl} 치료합니다!");
|
||||||
} else {
|
} else {
|
||||||
$patientCount -= 1;
|
$patientCount -= 1;
|
||||||
pushGenLog($general, "<C>●</><C>의술</>을 펼쳐 도시의 장수들 <Y>{$patientName}</> 외 <C>{$patientCount}</>명을 치료합니다!");
|
pushGenLog($general, "<C>●</><C>의술</>을 펼쳐 도시의 장수들 <Y>{$patientName}</> 외 <C>{$patientCount}</>명을 치료합니다!");
|
||||||
@@ -1886,7 +1868,8 @@ function PreprocessCommand($no) {
|
|||||||
$query = "update general set injury=0 where no='$no'";
|
$query = "update general set injury=0 where no='$no'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>(을)를 사용하여 치료합니다!";
|
$josaUl = JosaUtil::pick($general['item'], '을');
|
||||||
|
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>{$josaUl} 사용하여 치료합니다!";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
} elseif($general['injury'] > 10 && $general['item'] == 1 && $general['turn0'] != EncodeCommand(0, 0, 0, 50)) {
|
} elseif($general['injury'] > 10 && $general['item'] == 1 && $general['turn0'] != EncodeCommand(0, 0, 0, 50)) {
|
||||||
//환약 사용
|
//환약 사용
|
||||||
@@ -1910,13 +1893,12 @@ function PreprocessCommand($no) {
|
|||||||
|
|
||||||
function updateTurntime($no) {
|
function updateTurntime($no) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$alllog = [];
|
$alllog = [];
|
||||||
$log = [];
|
$log = [];
|
||||||
|
|
||||||
$query = "select year,month,isUnited,turnterm from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month', 'isunited', 'turnterm']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,name,name2,nation,troop,age,turntime,killturn,level,deadyear,npc,npc_org,affinity,npcid from general where no='$no'";
|
$query = "select no,name,name2,nation,troop,age,turntime,killturn,level,deadyear,npc,npc_org,affinity,npcid from general where no='$no'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -1928,16 +1910,22 @@ function updateTurntime($no) {
|
|||||||
if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) {
|
if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) {
|
||||||
$general['killturn'] = ($general['deadyear'] - $admin['year']) * 12;
|
$general['killturn'] = ($general['deadyear'] - $admin['year']) * 12;
|
||||||
$general['npc'] = $general['npc_org'];
|
$general['npc'] = $general['npc_org'];
|
||||||
$query = "update general set owner=-1,npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>(이)가 <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
$db->update('general', [
|
||||||
|
'owner'=>-1,
|
||||||
|
'npc'=>$general['npc_org'],
|
||||||
|
'killturn'=>$general['killturn'],
|
||||||
|
'mode'=>2,
|
||||||
|
'name2'=>null
|
||||||
|
], 'no=%i',$no);
|
||||||
|
|
||||||
|
$josaYi = JosaUtil::pick($general['name2'], '이');
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name2']}</>{$josaYi} <Y>{$general['name']}</>의 육체에서 <S>유체이탈</>합니다!";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
if($admin['isUnited'] == 0) {
|
|
||||||
CheckHall($no);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
storeOldGeneral($general['no'], $admin['year'], $admin['month']);
|
||||||
|
|
||||||
// 군주였으면 유지 이음
|
// 군주였으면 유지 이음
|
||||||
if($general['level'] == 12) {
|
if($general['level'] == 12) {
|
||||||
nextRuler($general);
|
nextRuler($general);
|
||||||
@@ -1976,72 +1964,73 @@ function updateTurntime($no) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount = MYDB_num_rows($result);
|
$gencount = MYDB_num_rows($result);
|
||||||
$gennum = $gencount;
|
$gennum = $gencount;
|
||||||
if($gencount < 10) $gencount = 10;
|
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
|
||||||
|
|
||||||
$query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$general['nation']}'";
|
$query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
// 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견
|
// 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견
|
||||||
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
switch(rand()%42) {
|
switch(rand()%42) {
|
||||||
case 0: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 역병에 걸려 <R>죽고</> 말았습니다."; break;
|
case 0: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 역병에 걸려 <R>죽고</> 말았습니다."; break;
|
||||||
case 1: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>요절</>하고 말았습니다."; break;
|
case 1: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <R>요절</>하고 말았습니다."; break;
|
||||||
case 2: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 거리에서 갑자기 <R>객사</>하고 말았습니다."; break;
|
case 2: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 거리에서 갑자기 <R>객사</>하고 말았습니다."; break;
|
||||||
case 3: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 안타깝게도 번개에 맞아 <R>죽고</> 말았습니다."; break;
|
case 3: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 안타깝게도 번개에 맞아 <R>죽고</> 말았습니다."; break;
|
||||||
case 4: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 고리대금에 시달리다가 <R>자살</>하고 말았습니다."; break;
|
case 4: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 고리대금에 시달리다가 <R>자살</>하고 말았습니다."; break;
|
||||||
case 5: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 일확천금에 놀라 심장마비로 <R>죽고</> 말았습니다."; break;
|
case 5: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 일확천금에 놀라 심장마비로 <R>죽고</> 말았습니다."; break;
|
||||||
case 6: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 산속에서 호랑이에게 물려 <R>죽고</> 말았습니다."; break;
|
case 6: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 산속에서 호랑이에게 물려 <R>죽고</> 말았습니다."; break;
|
||||||
case 7: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 산책중 곰에게 할퀴어 <R>죽고</> 말았습니다."; break;
|
case 7: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 산책중 곰에게 할퀴어 <R>죽고</> 말았습니다."; break;
|
||||||
case 8: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 수영을 하다 <R>익사</>하고 말았습니다."; break;
|
case 8: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 수영을 하다 <R>익사</>하고 말았습니다."; break;
|
||||||
case 9: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 황제를 모독하다가 <R>처형</>당하고 말았습니다."; break;
|
case 9: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 황제를 모독하다가 <R>처형</>당하고 말았습니다."; break;
|
||||||
case 10: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 이튿날 침실에서 <R>죽은채로</>발견되었습니다."; break;
|
case 10: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 이튿날 침실에서 <R>죽은채로</>발견되었습니다."; break;
|
||||||
case 11: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 색에 빠져 기력이 쇠진해 <R>죽고</>말았습니다."; break;
|
case 11: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 색에 빠져 기력이 쇠진해 <R>죽고</>말았습니다."; break;
|
||||||
case 12: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 미녀를 보고 심장마비로 <R>죽고</>말았습니다."; break;
|
case 12: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 미녀를 보고 심장마비로 <R>죽고</>말았습니다."; break;
|
||||||
case 13: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 우울증에 걸려 <R>자살</>하고 말았습니다."; break;
|
case 13: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 우울증에 걸려 <R>자살</>하고 말았습니다."; break;
|
||||||
case 14: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 천하 정세를 비관하며 <R>분신</>하고 말았습니다."; break;
|
case 14: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 천하 정세를 비관하며 <R>분신</>하고 말았습니다."; break;
|
||||||
case 15: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 어떤 관심도 못받고 쓸쓸히 <R>죽고</>말았습니다."; break;
|
case 15: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 어떤 관심도 못받고 쓸쓸히 <R>죽고</>말았습니다."; break;
|
||||||
case 16: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 유산 상속 문제로 다투다가 <R>살해</>당했습니다."; break;
|
case 16: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 유산 상속 문제로 다투다가 <R>살해</>당했습니다."; break;
|
||||||
case 17: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 누군가의 사주로 자객에게 <R>암살</>당했습니다."; break;
|
case 17: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 누군가의 사주로 자객에게 <R>암살</>당했습니다."; break;
|
||||||
case 18: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 바람난 배우자에게 <R>독살</>당하고 말았습니다."; break;
|
case 18: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 바람난 배우자에게 <R>독살</>당하고 말았습니다."; break;
|
||||||
case 19: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 농약을 술인줄 알고 마셔 <R>죽고</>말았습니다."; break;
|
case 19: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 농약을 술인줄 알고 마셔 <R>죽고</>말았습니다."; break;
|
||||||
case 20: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 아무 이유 없이 <R>죽고</>말았습니다."; break;
|
case 20: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 아무 이유 없이 <R>죽고</>말았습니다."; break;
|
||||||
case 21: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 전재산을 잃고 화병으로 <R>죽고</>말았습니다."; break;
|
case 21: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 전재산을 잃고 화병으로 <R>죽고</>말았습니다."; break;
|
||||||
case 22: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 단식운동을 하다가 굶어 <R>죽고</>말았습니다."; break;
|
case 22: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 단식운동을 하다가 굶어 <R>죽고</>말았습니다."; break;
|
||||||
case 23: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 귀신에게 홀려 시름 앓다가 <R>죽고</>말았습니다."; break;
|
case 23: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 귀신에게 홀려 시름 앓다가 <R>죽고</>말았습니다."; break;
|
||||||
case 24: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 사람들에게 집단으로 맞아서 <R>죽고</>말았습니다."; break;
|
case 24: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 사람들에게 집단으로 맞아서 <R>죽고</>말았습니다."; break;
|
||||||
case 25: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 갑자기 성벽에서 뛰어내려 <R>죽고</>말았습니다."; break;
|
case 25: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 갑자기 성벽에서 뛰어내려 <R>죽고</>말았습니다."; break;
|
||||||
case 26: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 농사중 호미에 머리를 맞아 <R>죽고</>말았습니다."; break;
|
case 26: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 농사중 호미에 머리를 맞아 <R>죽고</>말았습니다."; break;
|
||||||
case 27: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 저세상이 궁금하다며 <R>자살</>하고 말았습니다."; break;
|
case 27: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 저세상이 궁금하다며 <R>자살</>하고 말았습니다."; break;
|
||||||
case 28: $alllog[0] = "<C>●</>{$admin['month']}월:운좋기로 소문난 <Y>{$general['name']}</>(이)가 불운하게도 <R>죽고</>말았습니다."; break;
|
case 28: $alllog[0] = "<C>●</>{$admin['month']}월:운좋기로 소문난 <Y>{$general['name']}</>{$josaYi} 불운하게도 <R>죽고</>말았습니다."; break;
|
||||||
case 29: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 무리하게 단련을 하다가 <R>죽고</>말았습니다."; break;
|
case 29: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 무리하게 단련을 하다가 <R>죽고</>말았습니다."; break;
|
||||||
case 30: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 생활고를 비관하며 <R>자살</>하고 말았습니다."; break;
|
case 30: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 생활고를 비관하며 <R>자살</>하고 말았습니다."; break;
|
||||||
case 31: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 평생 결혼도 못해보고 <R>죽고</> 말았습니다."; break;
|
case 31: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 평생 결혼도 못해보고 <R>죽고</> 말았습니다."; break;
|
||||||
case 32: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 과식하다 배가 터져 <R>죽고</> 말았습니다."; break;
|
case 32: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 과식하다 배가 터져 <R>죽고</> 말았습니다."; break;
|
||||||
case 33: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 웃다가 숨이 넘어가 <R>죽고</> 말았습니다."; break;
|
case 33: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 웃다가 숨이 넘어가 <R>죽고</> 말았습니다."; break;
|
||||||
case 34: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 추녀를 보고 놀라서 <R>죽고</> 말았습니다."; break;
|
case 34: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 추녀를 보고 놀라서 <R>죽고</> 말았습니다."; break;
|
||||||
case 35: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 물에 빠진 사람을 구하려다 같이 <R>죽고</> 말았습니다."; break;
|
case 35: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 물에 빠진 사람을 구하려다 같이 <R>죽고</> 말았습니다."; break;
|
||||||
case 36: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 독살을 준비하다 독에 걸려 <R>죽고</> 말았습니다."; break;
|
case 36: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 독살을 준비하다 독에 걸려 <R>죽고</> 말았습니다."; break;
|
||||||
case 37: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 뒷간에서 너무 힘을 주다가 <R>죽고</> 말았습니다."; break;
|
case 37: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 뒷간에서 너무 힘을 주다가 <R>죽고</> 말았습니다."; break;
|
||||||
case 38: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 돌팔이 의사에게 치료받다가 <R>죽고</> 말았습니다."; break;
|
case 38: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 돌팔이 의사에게 치료받다가 <R>죽고</> 말았습니다."; break;
|
||||||
case 39: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 남의 보약을 훔쳐먹다 부작용으로 <R>죽고</> 말았습니다."; break;
|
case 39: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 남의 보약을 훔쳐먹다 부작용으로 <R>죽고</> 말았습니다."; break;
|
||||||
case 40: $alllog[0] = "<C>●</>{$admin['month']}월:희대의 사기꾼 <Y>{$general['name']}</>(이)가 <R>사망</>했습니다."; break;
|
case 40: $alllog[0] = "<C>●</>{$admin['month']}월:희대의 사기꾼 <Y>{$general['name']}</>{$josaYi} <R>사망</>했습니다."; break;
|
||||||
case 41: $alllog[0] = "<C>●</>{$admin['month']}월:희대의 호색한 <Y>{$general['name']}</>(이)가 <R>사망</>했습니다."; break;
|
case 41: $alllog[0] = "<C>●</>{$admin['month']}월:희대의 호색한 <Y>{$general['name']}</>{$josaYi} <R>사망</>했습니다."; break;
|
||||||
default: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>사망</>했습니다."; break;
|
default: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <R>사망</>했습니다."; break;
|
||||||
}
|
}
|
||||||
// 엔피씨,엠피씨,의병 사망로그
|
// 엔피씨,엠피씨,의병 사망로그
|
||||||
if($general['npc'] == 2) {
|
if($general['npc'] == 2) {
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>사망</>했습니다.";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <R>사망</>했습니다.";
|
||||||
} elseif($general['npc'] >= 3) {
|
} elseif($general['npc'] >= 3) {
|
||||||
switch(rand()%10) {
|
switch(rand()%10) {
|
||||||
case 0: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 푸대접에 실망하여 떠났습니다."; break;
|
case 0: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 푸대접에 실망하여 떠났습니다."; break;
|
||||||
case 1: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 갑자기 화를 내며 떠났습니다."; break;
|
case 1: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 갑자기 화를 내며 떠났습니다."; break;
|
||||||
case 2: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 의견차이를 좁히지 못하고 떠났습니다."; break;
|
case 2: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 의견차이를 좁히지 못하고 떠났습니다."; break;
|
||||||
case 3: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 판단 착오였다며 떠났습니다."; break;
|
case 3: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 판단 착오였다며 떠났습니다."; break;
|
||||||
case 4: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 생활고가 나아지지 않는다며 떠났습니다."; break;
|
case 4: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 생활고가 나아지지 않는다며 떠났습니다."; break;
|
||||||
case 5: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 기대가 너무 컸다며 떠났습니다."; break;
|
case 5: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 기대가 너무 컸다며 떠났습니다."; break;
|
||||||
case 6: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 아무 이유 없이 떠났습니다."; break;
|
case 6: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 아무 이유 없이 떠났습니다."; break;
|
||||||
case 7: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 자기 목적은 달성했다며 떠났습니다."; break;
|
case 7: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 자기 목적은 달성했다며 떠났습니다."; break;
|
||||||
case 8: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 자기가 없어도 될것 같다며 떠났습니다."; break;
|
case 8: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 자기가 없어도 될것 같다며 떠났습니다."; break;
|
||||||
case 9: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 처자식이 그립다며 떠났습니다."; break;
|
case 9: $alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} 처자식이 그립다며 떠났습니다."; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2052,14 +2041,15 @@ function updateTurntime($no) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($general['age'] >= 80 && $general['npc'] == 0) {
|
if($general['age'] >= 80 && $general['npc'] == 0) {
|
||||||
if($admin['isUnited'] == 0) {
|
if($admin['isunited'] == 0) {
|
||||||
CheckHall($no);
|
CheckHall($no);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'";
|
$query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <R>은퇴</>하고 그 자손이 유지를 이어받았습니다.";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <R>은퇴</>하고 그 자손이 유지를 이어받았습니다.";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
$log[0] = "<C>●</>나이가 들어 <R>은퇴</>하고 자손에게 자리를 물려줍니다.";
|
$log[0] = "<C>●</>나이가 들어 <R>은퇴</>하고 자손에게 자리를 물려줍니다.";
|
||||||
@@ -2075,9 +2065,9 @@ function updateTurntime($no) {
|
|||||||
|
|
||||||
function CheckHall($no) {
|
function CheckHall($no) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$type = array(
|
$types = array(
|
||||||
"experience",
|
"experience",
|
||||||
"dedication",
|
"dedication",
|
||||||
"firenum",
|
"firenum",
|
||||||
@@ -2101,65 +2091,84 @@ function CheckHall($no) {
|
|||||||
"betrate"
|
"betrate"
|
||||||
);
|
);
|
||||||
|
|
||||||
$query = "select name,nation,picture,
|
$general = $db->queryFirstRow('SELECT name,name2,owner,nation,picture,imgsvr,
|
||||||
experience,dedication,warnum,firenum,killnum,
|
experience,dedication,warnum,firenum,killnum,
|
||||||
killnum/warnum*10000 as winrate,killcrew,killcrew/deathcrew*10000 as killrate,
|
killnum/warnum as winrate,killcrew,killcrew/deathcrew as killrate,
|
||||||
dex0,dex10,dex20,dex30,dex40,
|
dex0,dex10,dex20,dex30,dex40,
|
||||||
ttw/(ttw+ttd+ttl)*10000 as ttrate, ttw+ttd+ttl as tt,
|
ttw/(ttw+ttd+ttl) as ttrate, ttw+ttd+ttl as tt,
|
||||||
tlw/(tlw+tld+tll)*10000 as tlrate, tlw+tld+tll as tl,
|
tlw/(tlw+tld+tll) as tlrate, tlw+tld+tll as tl,
|
||||||
tpw/(tpw+tpd+tpl)*10000 as tprate, tpw+tpd+tpl as tp,
|
tpw/(tpw+tpd+tpl) as tprate, tpw+tpd+tpl as tp,
|
||||||
tiw/(tiw+tid+til)*10000 as tirate, tiw+tid+til as ti,
|
tiw/(tiw+tid+til) as tirate, tiw+tid+til as ti,
|
||||||
betgold, betwin, betwingold, betwingold/betgold*10000 as betrate
|
betgold, betwin, betwingold, betwingold/betgold as betrate
|
||||||
from general where no='$no'";
|
from general where no=%i', $no);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
|
if(!$general){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$unitedDate = date('Y-m-d H:i:s');
|
||||||
$nation = getNationStaticInfo($general['nation']);
|
$nation = getNationStaticInfo($general['nation']);
|
||||||
|
|
||||||
for($k=0; $k < 21; $k++) {
|
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
|
||||||
$query = "select * from hall where type='$k' order by data desc";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
[$scenarioIdx, $scenarioName, $startTime] = $gameStor->getValuesAsArray(['scenario', 'scenario_text', 'starttime']);
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
|
foreach($types as $idx=>$typeName) {
|
||||||
|
|
||||||
|
|
||||||
//승률,살상률인데 10회 미만 전투시 스킵
|
//승률,살상률인데 10회 미만 전투시 스킵
|
||||||
if(($k == 5 || $k == 7) && $general['warnum']<10) { continue; }
|
if(($typeName === 'winrate' || $typeName === 'killrate') && $general['warnum']<10) { continue; }
|
||||||
//토너승률인데 50회 미만시 스킵
|
//토너승률인데 50회 미만시 스킵
|
||||||
if($k == 13 && $general['tt'] < 50) { continue; }
|
if($typeName === 'ttrate' && $general['tt'] < 50) { continue; }
|
||||||
//토너승률인데 50회 미만시 스킵
|
//토너승률인데 50회 미만시 스킵
|
||||||
if($k == 14 && $general['tl'] < 50) { continue; }
|
if($typeName === 'tlrate' && $general['tl'] < 50) { continue; }
|
||||||
//토너승률인데 50회 미만시 스킵
|
//토너승률인데 50회 미만시 스킵
|
||||||
if($k == 15 && $general['tp'] < 50) { continue; }
|
if($typeName === 'tprate' && $general['tp'] < 50) { continue; }
|
||||||
//토너승률인데 50회 미만시 스킵
|
//토너승률인데 50회 미만시 스킵
|
||||||
if($k == 16 && $general['ti'] < 50) { continue; }
|
if($typeName === 'tirate' && $general['ti'] < 50) { continue; }
|
||||||
//수익률인데 1000미만시 스킵
|
//수익률인데 1000미만시 스킵
|
||||||
if($k == 20 && $general['betgold'] < 1000) { continue; }
|
if($typeName === 'betrate' && $general['betgold'] < 1000) { continue; }
|
||||||
|
|
||||||
$rank = 10;
|
if($general[$typeName]<=0){
|
||||||
for($i=0; $i < $count; $i++) {
|
continue;
|
||||||
$ranker = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
if($general[$type[$k]] >= $ranker['data']) {
|
|
||||||
$rank = $i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for($i=8; $i >= $rank; $i--) {
|
|
||||||
$j = $i + 1;
|
|
||||||
$query = "select * from hall where type='$k' and rank='$i'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$ranker = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "update hall set name='{$ranker['name']}', nation='{$ranker['nation']}', data='{$ranker['data']}', color='{$ranker['color']}', picture='{$ranker['picture']}' where type='$k' and rank='$j'";
|
$aux = [
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'name'=>$general['name'],
|
||||||
}
|
'nationName'=>$nation['name'],
|
||||||
$query = "update hall set name='{$general['name']}', nation='{$nation['name']}', data='{$general[$type[$k]]}', color='{$nation['color']}', picture='{$general['picture']}' where type='$k' and rank='$rank'";
|
'bgColor'=>$nation['color'],
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'fgColor'=>newColor($nation['color']),
|
||||||
|
'picture'=>$general['picture'],
|
||||||
|
'imgsvr'=>$general['imgsvr'],
|
||||||
|
'startTime'=>$startTime,
|
||||||
|
'unitedTime'=>$unitedDate,
|
||||||
|
'owner_name'=>$general['name2'],
|
||||||
|
'serverID'=>UniqueConst::$serverID,
|
||||||
|
'serverIdx'=>$serverCnt,
|
||||||
|
'serverName'=>UniqueConst::$serverName,
|
||||||
|
'scenarioName'=>$scenarioName,
|
||||||
|
];
|
||||||
|
$jsonAux = Json::encode($aux);
|
||||||
|
|
||||||
|
$db->insertUpdate('ng_hall', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'scenario'=>$scenarioIdx,
|
||||||
|
'general_no'=>$no,
|
||||||
|
'type'=>$idx,
|
||||||
|
'value'=>$general[$typeName]??0,
|
||||||
|
'owner'=>$general['owner']??null,
|
||||||
|
'aux'=>$jsonAux
|
||||||
|
],[
|
||||||
|
'value'=>$general[$typeName]??0,
|
||||||
|
'aux'=>$jsonAux
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function uniqueItem($general, $log, $vote=0) {
|
function uniqueItem($general, $log, $vote=0) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$alllog = [];
|
$alllog = [];
|
||||||
$history = [];
|
$history = [];
|
||||||
@@ -2169,15 +2178,13 @@ function uniqueItem($general, $log, $vote=0) {
|
|||||||
if($general['npc'] >= 2) { return $log; }
|
if($general['npc'] >= 2) { return $log; }
|
||||||
if($general['weap'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
|
if($general['weap'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
|
||||||
|
|
||||||
$query = "select year,month,scenario from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month', 'scenario']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$game = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select count(*) as cnt from general where npc<2";
|
$query = "select count(*) as cnt from general where npc<2";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gen = MYDB_fetch_array($result);
|
$gen = MYDB_fetch_array($result);
|
||||||
|
|
||||||
if($game['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장
|
if($admin['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장
|
||||||
else { $prob = $gen['cnt']; } // 1~2개월에 하나씩 등장
|
else { $prob = $gen['cnt']; } // 1~2개월에 하나씩 등장
|
||||||
|
|
||||||
if($vote == 1) { $prob = Util::round($gen['cnt'] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장
|
if($vote == 1) { $prob = Util::round($gen['cnt'] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장
|
||||||
@@ -2204,11 +2211,11 @@ function uniqueItem($general, $log, $vote=0) {
|
|||||||
$occupied[$gen[$type]] = 1;
|
$occupied[$gen[$type]] = 1;
|
||||||
}
|
}
|
||||||
for($i=7; $i <= 26; $i++) {
|
for($i=7; $i <= 26; $i++) {
|
||||||
if($occupied[$i] == 0) {
|
if(!Util::array_get($occupied[$i])) {
|
||||||
$item[] = $i;
|
$item[] = $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$it = $item[rand() % count($item)];
|
$it = $item[rand() % count($item)]??0;
|
||||||
|
|
||||||
$query = "update general set {$type}='$it' where no='{$general['no']}'";
|
$query = "update general set {$type}='$it' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -2217,64 +2224,72 @@ function uniqueItem($general, $log, $vote=0) {
|
|||||||
|
|
||||||
switch($sel) {
|
switch($sel) {
|
||||||
case 0:
|
case 0:
|
||||||
$log[] = "<C>●</><C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$josaUl = JosaUtil::pick(getWeapName($it), '을');
|
||||||
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
pushGeneralHistory($general, "<C>●</>{$game['year']}년 {$game['month']}월:<C>".getWeapName($it)."</>(을)를 습득");
|
$log[] = "<C>●</><C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getWeapName($it)."</>{$josaUl} 습득");
|
||||||
if($vote == 0) {
|
if($vote == 0) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 1) {
|
} elseif($vote == 1) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 2) {
|
} elseif($vote == 2) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 3) {
|
} elseif($vote == 3) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getWeapName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getWeapName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
$log[] = "<C>●</><C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$josaUl = JosaUtil::pick(getBookName($it), '을');
|
||||||
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
pushGeneralHistory($general, "<C>●</>{$game['year']}년 {$game['month']}월:<C>".getBookName($it)."</>(을)를 습득");
|
$log[] = "<C>●</><C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getBookName($it)."</>{$josaUl} 습득");
|
||||||
if($vote == 0) {
|
if($vote == 0) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 1) {
|
} elseif($vote == 1) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 2) {
|
} elseif($vote == 2) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 3) {
|
} elseif($vote == 3) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getBookName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getBookName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$log[] = "<C>●</><C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$josaUl = JosaUtil::pick(getHorseName($it), '을');
|
||||||
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
pushGeneralHistory($general, "<C>●</>{$game['year']}년 {$game['month']}월:<C>".getHorseName($it)."</>(을)를 습득");
|
$log[] = "<C>●</><C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getHorseName($it)."</>{$josaUl} 습득");
|
||||||
if($vote == 0) {
|
if($vote == 0) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 1) {
|
} elseif($vote == 1) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 2) {
|
} elseif($vote == 2) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 3) {
|
} elseif($vote == 3) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getHorseName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getHorseName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$log[] = "<C>●</><C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$josaUl = JosaUtil::pick(getItemName($it), '을');
|
||||||
$alllog[0] = "<C>●</>{$game['month']}월:<Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$josaYi = JosaUtil::pick($general['name'], '이');
|
||||||
pushGeneralHistory($general, "<C>●</>{$game['year']}년 {$game['month']}월:<C>".getItemName($it)."</>(을)를 습득");
|
$log[] = "<C>●</><C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
|
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C>".getItemName($it)."</>{$josaUl} 습득");
|
||||||
if($vote == 0) {
|
if($vote == 0) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【아이템】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 1) {
|
} elseif($vote == 1) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【설문상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 2) {
|
} elseif($vote == 2) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【랜덤임관상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
} elseif($vote == 3) {
|
} elseif($vote == 3) {
|
||||||
$history[0] = "<C>●</>{$game['year']}년 {$game['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>(이)가 <C>".getItemName($it)."</>(을)를 습득했습니다!";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【건국상품】</b></><D><b>{$nation['name']}</b></>의 <Y>{$general['name']}</>{$josaYi} <C>".getItemName($it)."</>{$josaUl} 습득했습니다!";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pushGeneralPublicRecord($alllog, $game['year'], $game['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushWorldHistory($history, $game['year'], $game['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $log;
|
return $log;
|
||||||
@@ -2339,11 +2354,13 @@ function checkDedication($general, $log) {
|
|||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
// 승급했다면
|
// 승급했다면
|
||||||
|
$josaRoDed = JosaUtil::pick(getDed($general['dedication']), '로');
|
||||||
|
$josaRoBill = JosaUtil::pick(getBill($general['dedication']), '로');
|
||||||
if($general['dedlevel'] < $dedlevel) {
|
if($general['dedlevel'] < $dedlevel) {
|
||||||
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>(으)로 <C>승급</>하여 봉록이 <C>".getBill($general['dedication'])."</>(으)로 <C>상승</>했습니다!";
|
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>{$josaRoDed} <C>승급</>하여 봉록이 <C>".getBill($general['dedication'])."</>{$josaRoBill} <C>상승</>했습니다!";
|
||||||
// 강등했다면
|
// 강등했다면
|
||||||
} elseif($general['dedlevel'] > $dedlevel) {
|
} elseif($general['dedlevel'] > $dedlevel) {
|
||||||
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>(으)로 <R>강등</>되어 봉록이 <C>".getBill($general['dedication'])."</>(으)로 <R>하락</>했습니다!";
|
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>{$josaRoDed} <R>강등</>되어 봉록이 <C>".getBill($general['dedication'])."</>{$josaRoBill} <R>하락</>했습니다!";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $log;
|
return $log;
|
||||||
@@ -2371,13 +2388,8 @@ function checkExperience($general, $log) {
|
|||||||
|
|
||||||
function getAdmin() {
|
function getAdmin() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
return $gameStor->getAll();
|
||||||
$query = "select * from game limit 1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
return $admin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMe() {
|
function getMe() {
|
||||||
@@ -2427,18 +2439,23 @@ function getNation($nation) {
|
|||||||
|
|
||||||
function deleteNation($general) {
|
function deleteNation($general) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$history = [];
|
$history = [];
|
||||||
$date = substr($general['turntime'],11,5);
|
$date = substr($general['turntime'],11,5);
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$nation = getNationStaticInfo($general['nation']);
|
$nation = getNationStaticInfo($general['nation']);
|
||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【멸망】</b></><D><b>{$nation['name']}</b></>은(는) <R>멸망</>했습니다.";
|
$josaUn = JosaUtil::pick($nation['name'], '은');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【멸망】</b></><D><b>{$nation['name']}</b></>{$josaUn} <R>멸망</>했습니다.";
|
||||||
|
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $general['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $general['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
// 전 장수 재야로 // 전 장수 소속 무소속으로
|
// 전 장수 재야로 // 전 장수 소속 무소속으로
|
||||||
$query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'";
|
$query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'";
|
||||||
@@ -2450,6 +2467,13 @@ function deleteNation($general) {
|
|||||||
$query = "delete from troop where nation='{$general['nation']}'";
|
$query = "delete from troop where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 국가 삭제
|
// 국가 삭제
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$general['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$general['nation']}'";
|
$query = "delete from nation where nation='{$general['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 외교 삭제
|
// 외교 삭제
|
||||||
@@ -2462,11 +2486,10 @@ function deleteNation($general) {
|
|||||||
|
|
||||||
function nextRuler($general) {
|
function nextRuler($general) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select nation,name from nation where nation='{$general['nation']}'";
|
$query = "select nation,name from nation where nation='{$general['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -2522,10 +2545,11 @@ function nextRuler($general) {
|
|||||||
$query = "update city set gen3=0 where gen3='{$nextruler['no']}'";
|
$query = "update city set gen3=0 where gen3='{$nextruler['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받았습니다"];
|
$josaYi = JosaUtil::pick($nextruler['name'], '이');
|
||||||
|
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>의 유지를 이어 받았습니다"];
|
||||||
|
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>(이)가 <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
|
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【유지】</b></><Y>{$nextruler['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>의 유지를 이어 받음.");
|
||||||
// 장수 삭제 및 부대처리는 checkTurn에서
|
// 장수 삭제 및 부대처리는 checkTurn에서
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2576,7 +2600,7 @@ function searchDistance(int $from, int $maxDist=99, bool $distForm = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isClose(int $nation1, int $nation2, bool $includeNoSupply=true) {
|
function isNeighbor(int $nation1, int $nation2, bool $includeNoSupply=true) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
$nation1Cities = [];
|
$nation1Cities = [];
|
||||||
@@ -2669,12 +2693,11 @@ function CharCritical($rate, $personal) {
|
|||||||
|
|
||||||
function SabotageInjury($city, $type=0) {
|
function SabotageInjury($city, $type=0) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
$log = [];
|
$log = [];
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select no,name,nation from general where city='$city'";
|
$query = "select no,name,nation from general where city='$city'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|||||||
@@ -18,11 +18,10 @@ function GetStuffName($stuff) {
|
|||||||
|
|
||||||
function registerAuction() {
|
function registerAuction() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select startyear,year,month,turnterm from game limit 1";
|
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'turnterm']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$unit = 60 * $admin['turnterm'];
|
$unit = 60 * $admin['turnterm'];
|
||||||
|
|
||||||
@@ -83,8 +82,10 @@ function registerAuction() {
|
|||||||
$query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ암시장상인', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')";
|
$query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ암시장상인', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<C>".GetStuffName($stuff)."</>(이)가 거래장에 등장했습니다!";
|
$josaYi = JosaUtil::pick(GetStuffName($stuff), '이');
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>ⓝ암시장상인</>(이)가 <C>".GetStuffName($stuff)."</>(을)를 판다는 소문이 돌고 있습니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<C>".GetStuffName($stuff)."</>{$josaYi} 거래장에 등장했습니다!";
|
||||||
|
$josaUl = JosaUtil::pick(GetStuffName($stuff), '을');
|
||||||
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>ⓝ암시장상인</>이 <C>".GetStuffName($stuff)."</>{$josaUl} 판다는 소문이 돌고 있습니다!";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
@@ -142,6 +143,7 @@ function registerAuction() {
|
|||||||
|
|
||||||
function processAuction() {
|
function processAuction() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$trader = [];
|
$trader = [];
|
||||||
@@ -153,9 +155,7 @@ function processAuction() {
|
|||||||
|
|
||||||
$date = date("Y-m-d H:i:s");
|
$date = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select * from auction where expire<='$date'";
|
$query = "select * from auction where expire<='$date'";
|
||||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -164,10 +164,14 @@ function processAuction() {
|
|||||||
for($i=0; $i < $count2; $i++) {
|
for($i=0; $i < $count2; $i++) {
|
||||||
$auction = MYDB_fetch_array($result2);
|
$auction = MYDB_fetch_array($result2);
|
||||||
|
|
||||||
|
$josaYi1 = JosaUtil::pick($auction['name1'], '이');
|
||||||
|
$josaYi2 = JosaUtil::pick($auction['name2'], '이');
|
||||||
|
|
||||||
// 유닉템 처리
|
// 유닉템 처리
|
||||||
if($auction['stuff'] != 0) {
|
if($auction['stuff'] != 0) {
|
||||||
if($auction['no2'] == 0) {
|
if($auction['no2'] == 0) {
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 판매, 그러나 입찰자 부재";
|
$josaUl = JosaUtil::pick(GetStuffName($auction['stuff']), '을');
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} <C>".GetStuffName($auction['stuff'])."</>{$josaUl} 판매, 그러나 입찰자 부재";
|
||||||
pushAuctionLog($auctionLog);
|
pushAuctionLog($auctionLog);
|
||||||
} else {
|
} else {
|
||||||
$trader['no'] = 0;
|
$trader['no'] = 0;
|
||||||
@@ -196,7 +200,9 @@ function processAuction() {
|
|||||||
if($count > 0) {
|
if($count > 0) {
|
||||||
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <M>유찰</>! 이미 아이템을 누군가가 가로챘습니다!";
|
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <M>유찰</>! 이미 아이템을 누군가가 가로챘습니다!";
|
||||||
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <M>유찰</>! 이미 아이템을 누군가가 가로챘습니다!";
|
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <M>유찰</>! 이미 아이템을 누군가가 가로챘습니다!";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 아이템 이미 매진!";
|
$josaUl = JosaUtil::pick(GetStuffName($auction['stuff']), '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} <C>".GetStuffName($auction['stuff'])."</>$josaUl 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 아이템 이미 매진!";
|
||||||
} elseif($auction['value'] > $bidder['gold'] - 1000) {
|
} elseif($auction['value'] > $bidder['gold'] - 1000) {
|
||||||
$gold = Util::round($auction['value'] * 0.01);
|
$gold = Util::round($auction['value'] * 0.01);
|
||||||
$bidder['gold'] -= $gold;
|
$bidder['gold'] -= $gold;
|
||||||
@@ -206,18 +212,23 @@ function processAuction() {
|
|||||||
|
|
||||||
$traderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 <C>".GetStuffName($auction['stuff'])."</> 거래 <M>유찰</>!";
|
$traderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 <C>".GetStuffName($auction['stuff'])."</> 거래 <M>유찰</>!";
|
||||||
$bidderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 <C>".GetStuffName($auction['stuff'])."</> 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
$bidderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 <C>".GetStuffName($auction['stuff'])."</> 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
|
$josaUl = JosaUtil::pick(GetStuffName($auction['stuff']), '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} <C>".GetStuffName($auction['stuff'])."</>$josaUl 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
|
||||||
} else {
|
} else {
|
||||||
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 <C>".GetStuffName($auction['stuff'])."</>(을)를 판매, 금 <C>{$auction['value']}</>(을)를 획득!";
|
$josaUl = JosaUtil::pick(GetStuffName($auction['stuff']), '을');
|
||||||
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>(을)를 지불, <C>".GetStuffName($auction['stuff'])."</> 구입!";
|
$josaUlGold = JosaUtil::pick($auction['value'], '을');
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 구매";
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
|
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 <C>".GetStuffName($auction['stuff'])."</>$josaUl 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!";
|
||||||
|
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, <C>".GetStuffName($auction['stuff'])."</> 구입!";
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} <C>".GetStuffName($auction['stuff'])."</>$josaUl 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 구매";
|
||||||
$auctionLog[0] .= " <M>★ 아이템 거래 ★</>";
|
$auctionLog[0] .= " <M>★ 아이템 거래 ★</>";
|
||||||
|
|
||||||
$query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='{$auction['no2']}'";
|
$query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='{$auction['no2']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
$alllog[0] = "<C>●</>{$admin['month']}월:<Y>{$auction['name2']}</>{$josaYi2} <C>".GetStuffName($auction['stuff'])."</>$josaUl 구매했습니다!";
|
||||||
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>{$auction['name2']}</>(이)가 <C>".GetStuffName($auction['stuff'])."</>(을)를 구매했습니다!";
|
$history[0] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<C><b>【암시장】</b></><Y>{$auction['name2']}</>{$josaYi2} <C>".GetStuffName($auction['stuff'])."</>$josaUl 구매했습니다!";
|
||||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
}
|
}
|
||||||
@@ -236,9 +247,11 @@ function processAuction() {
|
|||||||
|
|
||||||
$traderLog[0] = "<S>◆</>입찰자 부재로 {$auction['no']}번 거래 <M>유찰</>!";
|
$traderLog[0] = "<S>◆</>입찰자 부재로 {$auction['no']}번 거래 <M>유찰</>!";
|
||||||
if($auction['type'] == 0) {
|
if($auction['type'] == 0) {
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 판매, 그러나 입찰자 부재";
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 그러나 입찰자 부재";
|
||||||
} else {
|
} else {
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 구매, 그러나 입찰자 부재";
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, 그러나 입찰자 부재";
|
||||||
}
|
}
|
||||||
pushGenLog($trader, $traderLog);
|
pushGenLog($trader, $traderLog);
|
||||||
pushAuctionLog($auctionLog);
|
pushAuctionLog($auctionLog);
|
||||||
@@ -267,9 +280,11 @@ function processAuction() {
|
|||||||
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
|
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
$traderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
$traderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
||||||
$bidderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
$bidderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 판매자 군량부족, 벌금 <C>{$gold}</>";
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 판매자 군량부족, 벌금 <C>{$gold}</>";
|
||||||
} elseif($auction['value'] > $bidder['gold'] - 1000) {
|
} elseif($auction['value'] > $bidder['gold'] - 1000) {
|
||||||
$gold = Util::round($auction['value'] * 0.01);
|
$gold = Util::round($auction['value'] * 0.01);
|
||||||
$bidder['gold'] -= $gold;
|
$bidder['gold'] -= $gold;
|
||||||
@@ -277,13 +292,18 @@ function processAuction() {
|
|||||||
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
|
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
$traderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
$traderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
||||||
$bidderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
$bidderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
|
||||||
} else {
|
} else {
|
||||||
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>(을)를 판매, 금 <C>{$auction['value']}</>(을)를 획득!";
|
$josaUlGold = JosaUtil::pick($auction['value'], '을');
|
||||||
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>(을)를 지불, 쌀 <C>{$auction['amount']}</>(을)를 구입!";
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 판매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 구매";
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
|
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!";
|
||||||
|
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!";
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 구매";
|
||||||
if($auction['value'] >= $auction['amount'] * 2) {
|
if($auction['value'] >= $auction['amount'] * 2) {
|
||||||
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
|
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
|
||||||
} elseif($auction['value'] >= $auction['topv']) {
|
} elseif($auction['value'] >= $auction['topv']) {
|
||||||
@@ -308,9 +328,11 @@ function processAuction() {
|
|||||||
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
|
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
$traderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
$traderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
||||||
$bidderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
$bidderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 구매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 입찰자 군량부족, 벌금 <C>{$gold}</>";
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 군량부족, 벌금 <C>{$gold}</>";
|
||||||
} elseif($auction['value'] > $trader['gold'] - 1000) {
|
} elseif($auction['value'] > $trader['gold'] - 1000) {
|
||||||
$gold = Util::round($auction['value'] * 0.01);
|
$gold = Util::round($auction['value'] * 0.01);
|
||||||
$trader['gold'] -= $gold;
|
$trader['gold'] -= $gold;
|
||||||
@@ -318,13 +340,18 @@ function processAuction() {
|
|||||||
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
|
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
$traderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
$traderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
|
||||||
$bidderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
$bidderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 구매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 입찰, 그러나 구매자 자금부족, 벌금 <C>{$gold}</>";
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 구매자 자금부족, 벌금 <C>{$gold}</>";
|
||||||
} else {
|
} else {
|
||||||
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>(을)를 지불, 쌀 <C>{$auction['amount']}</>(을)를 구입!";
|
$josaUlGold = JosaUtil::pick($auction['value'], '을');
|
||||||
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>(을)를 판매, 금 <C>{$auction['value']}</>(을)를 획득!";
|
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
|
||||||
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <C>성사</> : <Y>{$auction['name1']}</>(이)가 쌀 <C>{$auction['amount']}</>(을)를 구매, <Y>{$auction['name2']}</>(이)가 금 <C>{$auction['value']}</>(으)로 판매";
|
$josaRo = JosaUtil::pick($auction['value'], '로');
|
||||||
|
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!";
|
||||||
|
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!";
|
||||||
|
$auctionLog[0] = "<S>◆</>{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 <S>구매</> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 판매";
|
||||||
if($auction['value'] >= $auction['amount'] * 2) {
|
if($auction['value'] >= $auction['amount'] * 2) {
|
||||||
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
|
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
|
||||||
} elseif($auction['value'] * 2 <= $auction['amount']) {
|
} elseif($auction['value'] * 2 <= $auction['amount']) {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
function getTurn($general, $type, $font=1) {
|
function getTurn(array $general, $type, $font=1) {
|
||||||
|
//TODO: 왜 'Type' 인가. 그냥 count로 하자.
|
||||||
$str = [];
|
$str = [];
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
@@ -78,7 +79,8 @@ function getTurn($general, $type, $font=1) {
|
|||||||
case 16: //전쟁
|
case 16: //전쟁
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(으)로 출병";
|
$josaRo = JosaUtil::pick($city['name'], '로');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaRo} 출병";
|
||||||
break;
|
break;
|
||||||
case 17: //소집해제
|
case 17: //소집해제
|
||||||
$str[$i] = "소집 해제";
|
$str[$i] = "소집 해제";
|
||||||
@@ -87,7 +89,8 @@ function getTurn($general, $type, $font=1) {
|
|||||||
case 21: //이동
|
case 21: //이동
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(으)로 이동";
|
$josaRo = JosaUtil::pick($city['name'], '로');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaRo} 이동";
|
||||||
break;
|
break;
|
||||||
case 22: //등용
|
case 22: //등용
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
@@ -96,7 +99,8 @@ function getTurn($general, $type, $font=1) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$str[$i] = "【{$general['name']}】(을)를 등용";
|
$josaUl = JosaUtil::pick($general['name'], '을');
|
||||||
|
$str[$i] = "【{$general['name']}】{$josaUl} 등용";
|
||||||
break;
|
break;
|
||||||
case 25: //임관
|
case 25: //임관
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
@@ -105,7 +109,8 @@ function getTurn($general, $type, $font=1) {
|
|||||||
|
|
||||||
if(!$nation['name']) { $nation['name'] = '????'; }
|
if(!$nation['name']) { $nation['name'] = '????'; }
|
||||||
|
|
||||||
$str[$i] = "【{$nation['name']}】(으)로 임관";
|
$josaRo = JosaUtil::pick($nation['name'], '로');
|
||||||
|
$str[$i] = "【{$nation['name']}】{$josaRo} 임관";
|
||||||
break;
|
break;
|
||||||
case 26: //집합
|
case 26: //집합
|
||||||
$str[$i] = "집합";
|
$str[$i] = "집합";
|
||||||
@@ -119,7 +124,8 @@ function getTurn($general, $type, $font=1) {
|
|||||||
case 30: //강행
|
case 30: //강행
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(으)로 강행";
|
$josaRo = JosaUtil::pick($city['name'], '로');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaRo} 강행";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31: //첩보
|
case 31: //첩보
|
||||||
@@ -177,11 +183,10 @@ function getTurn($general, $type, $font=1) {
|
|||||||
$str[$i] = "하야";
|
$str[$i] = "하야";
|
||||||
break;
|
break;
|
||||||
case 46: //건국
|
case 46: //건국
|
||||||
$query = "select makenation from general where no='{$general['no']}'";
|
$nationName = $db->queryFirstField('SELECT makenation FROM general WHERE `no`=%i', $general['no'])??'';
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$str[$i] = "【{$general['makenation']}】(을)를 건국";
|
$josaUl = JosaUtil::pick($nationName, '을');
|
||||||
|
$str[$i] = "【{$nationName}】{$josaUl} 건국";
|
||||||
break;
|
break;
|
||||||
case 47: //방랑
|
case 47: //방랑
|
||||||
$str[$i] = "방랑";
|
$str[$i] = "방랑";
|
||||||
@@ -197,13 +202,17 @@ function getTurn($general, $type, $font=1) {
|
|||||||
} elseif($double == 300) {
|
} elseif($double == 300) {
|
||||||
$str[$i] = "도구를 판매";
|
$str[$i] = "도구를 판매";
|
||||||
} elseif($double < 100) {
|
} elseif($double < 100) {
|
||||||
$str[$i] = "【".getWeapName($double)."】(을)를 구입";
|
$josaUl = JosaUtil::pick(getWeapName($double), '을');
|
||||||
|
$str[$i] = "【".getWeapName($double)."】{$josaUl} 구입";
|
||||||
} elseif($double < 200) {
|
} elseif($double < 200) {
|
||||||
$str[$i] = "【".getBookName($double-100)."】(을)를 구입";
|
$josaUl = JosaUtil::pick(getBookName($double-100), '을');
|
||||||
|
$str[$i] = "【".getBookName($double-100)."】{$josaUl} 구입";
|
||||||
} elseif($double < 300) {
|
} elseif($double < 300) {
|
||||||
$str[$i] = "【".getHorseName($double-200)."】(을)를 구입";
|
$josaUl = JosaUtil::pick(getHorseName($double-200), '을');
|
||||||
|
$str[$i] = "【".getHorseName($double-200)."】{$josaUl} 구입";
|
||||||
} elseif($double < 400) {
|
} elseif($double < 400) {
|
||||||
$str[$i] = "【".getItemName($double-300)."】(을)를 구입";
|
$josaUl = JosaUtil::pick(getItemName($double-300), '을');
|
||||||
|
$str[$i] = "【".getItemName($double-300)."】{$josaUl} 구입";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 49: //군량 매매
|
case 49: //군량 매매
|
||||||
@@ -286,8 +295,8 @@ function getCoreTurn($nation, $level) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
if($fourth == 1) { $str[$i] = "【{$general['name']}】에게 금 {$double}00을 포상"; }
|
if($fourth == 1) { $str[$i] = "【{$general['name']}】에게 금 {$double}00 포상"; }
|
||||||
else { $str[$i] = "【{$general['name']}】에게 쌀 {$double}00을 포상"; }
|
else { $str[$i] = "【{$general['name']}】에게 쌀 {$double}00 포상"; }
|
||||||
break;
|
break;
|
||||||
case 24: //몰수
|
case 24: //몰수
|
||||||
$fourth = $command[3];
|
$fourth = $command[3];
|
||||||
@@ -298,8 +307,8 @@ function getCoreTurn($nation, $level) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
if($fourth == 1) { $str[$i] = "【{$general['name']}】에게서 금 {$double}00을 몰수"; }
|
if($fourth == 1) { $str[$i] = "【{$general['name']}】의 금 {$double}00 몰수"; }
|
||||||
else { $str[$i] = "【{$general['name']}】에게서 쌀 {$double}00을 몰수"; }
|
else { $str[$i] = "【{$general['name']}】의 쌀 {$double}00 몰수"; }
|
||||||
break;
|
break;
|
||||||
case 27: //발령
|
case 27: //발령
|
||||||
$third = $command[2];
|
$third = $command[2];
|
||||||
@@ -309,8 +318,8 @@ function getCoreTurn($nation, $level) {
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
|
$josaRo = JosaUtil::pick($city['name'], '로');
|
||||||
$str[$i] = "【{$general['name']}】【{$city['name']}】(으)로 발령";
|
$str[$i] = "【{$general['name']}】【{$city['name']}】{$josaRo} 발령";
|
||||||
break;
|
break;
|
||||||
case 51: //항복권고
|
case 51: //항복권고
|
||||||
$double = (int)$command[1];
|
$double = (int)$command[1];
|
||||||
@@ -331,15 +340,13 @@ function getCoreTurn($nation, $level) {
|
|||||||
$str[$i] = "【{$nation['name']}】에게 국고 {$third} 병량 {$fourth} 원조";
|
$str[$i] = "【{$nation['name']}】에게 국고 {$third} 병량 {$fourth} 원조";
|
||||||
break;
|
break;
|
||||||
case 53: //통합제의
|
case 53: //통합제의
|
||||||
$query = "select makenation from general where level='$level' and nation='{$nation['nation']}'";
|
$nationName = $db->queryFirstField('SELECT makenation FROM general WHERE `level`=%i AND `nation`=%i', $level, $nation['nation'])??'';
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$double = (int)$command[1];
|
$double = (int)$command[1];
|
||||||
|
|
||||||
$nation = getNationStaticInfo($double);
|
$nation = getNationStaticInfo($double);
|
||||||
|
$josaRo = JosaUtil::pick($nationName, '로');
|
||||||
$str[$i] = "【{$nation['name']}】에 【{$general['makenation']}】(으)로 통합 제의";
|
$str[$i] = "【{$nation['name']}】에 【{$nationName}】{$josaRo} 통합 제의";
|
||||||
break;
|
break;
|
||||||
case 61: //불가침제의
|
case 61: //불가침제의
|
||||||
$third = $command[2];
|
$third = $command[2];
|
||||||
@@ -373,22 +380,26 @@ function getCoreTurn($nation, $level) {
|
|||||||
case 65: //초토
|
case 65: //초토
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(을)를 초토화";
|
$josaUl = JosaUtil::pick($city['name'], '을');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaUl} 초토화";
|
||||||
break;
|
break;
|
||||||
case 66: //천도
|
case 66: //천도
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(으)로 천도";
|
$josaRo = JosaUtil::pick($city['name'], '로');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaRo} 천도";
|
||||||
break;
|
break;
|
||||||
case 67: //증축
|
case 67: //증축
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(을)를 증축";
|
$josaUl = JosaUtil::pick($city['name'], '을');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaUl} 증축";
|
||||||
break;
|
break;
|
||||||
case 68: //감축
|
case 68: //감축
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(을)를 감축";
|
$josaUl = JosaUtil::pick($city['name'], '을');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaUl} 감축";
|
||||||
break;
|
break;
|
||||||
case 71: //필사즉생
|
case 71: //필사즉생
|
||||||
$str[$i] = "필사즉생";
|
$str[$i] = "필사즉생";
|
||||||
@@ -401,7 +412,8 @@ function getCoreTurn($nation, $level) {
|
|||||||
case 73: //수몰
|
case 73: //수몰
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
$city = getCity($double, "name");
|
$city = getCity($double, "name");
|
||||||
$str[$i] = "【{$city['name']}】(을)를 수몰";
|
$josaUl = JosaUtil::pick($city['name'], '을');
|
||||||
|
$str[$i] = "【{$city['name']}】{$josaUl} 수몰";
|
||||||
break;
|
break;
|
||||||
case 74: //허보
|
case 74: //허보
|
||||||
$double = $command[1];
|
$double = $command[1];
|
||||||
@@ -456,28 +468,27 @@ function getCoreTurn($nation, $level) {
|
|||||||
function processCommand($no) {
|
function processCommand($no) {
|
||||||
$session = Session::getInstance();
|
$session = Session::getInstance();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'";
|
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select month,killturn from game limit 1";
|
list($month, $killturn) = $gameStor->getValuesAsArray(['month', 'killturn']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
$log = [];
|
$log = [];
|
||||||
|
|
||||||
// 블럭자는 미실행. 삭턴 감소
|
// 블럭자는 미실행. 삭턴 감소
|
||||||
if($general['block'] == 2) {
|
if($general['block'] == 2) {
|
||||||
$date = substr($general['turntime'],11,5);
|
$date = substr($general['turntime'],11,5);
|
||||||
$log[] = "<C>●</>{$admin['month']}월:현재 멀티, 또는 비매너로 인한<R>블럭</> 대상자입니다. <1>$date</>";
|
$log[] = "<C>●</>{$month}월:현재 멀티, 또는 비매너로 인한<R>블럭</> 대상자입니다. <1>$date</>";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
|
|
||||||
$query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
$query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} elseif($general['block'] == 3) {
|
} elseif($general['block'] == 3) {
|
||||||
$date = substr($general['turntime'],11,5);
|
$date = substr($general['turntime'],11,5);
|
||||||
$log[] = "<C>●</>{$admin['month']}월:현재 악성유저로 분류되어 <R>블럭, 발언권 무효</> 대상자입니다. <1>$date</>";
|
$log[] = "<C>●</>{$month}월:현재 악성유저로 분류되어 <R>블럭, 발언권 무효</> 대상자입니다. <1>$date</>";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
|
|
||||||
$query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
$query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||||
@@ -522,23 +533,25 @@ function processCommand($no) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//장수정보 재로드
|
//장수정보 재로드
|
||||||
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'";
|
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$command = DecodeCommand($general['turn0']);
|
$command = DecodeCommand($general['turn0']);
|
||||||
//삭턴 처리
|
//삭턴 처리
|
||||||
if($general['npc'] >= 2 || $general['killturn'] > $admin['killturn']) {
|
if($general['npc'] >= 2 || $general['killturn'] > $killturn) {
|
||||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} elseif(intval($command[0]) == 0 && $session->userGrade < 5) {
|
} elseif($command[0] == 0) {
|
||||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
} else {
|
} else {
|
||||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='{$admin['killturn']}' where no='{$general['no']}'";
|
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='{$killturn}' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
}
|
}
|
||||||
|
//FIXME: 운영자 같이 사망하면 안되는 인물에 대한 처리가 필요
|
||||||
|
|
||||||
//연속턴 아닌경우 텀 리셋
|
//연속턴 아닌경우 텀 리셋
|
||||||
if($general['term']%100 != $command[0]) {
|
if($general['term']%100 != $command[0]) {
|
||||||
$query = "update general set term=0 where no='{$general['no']}'";
|
$query = "update general set term=0 where no='{$general['no']}'";
|
||||||
@@ -548,7 +561,7 @@ function processCommand($no) {
|
|||||||
switch($command[0]) {
|
switch($command[0]) {
|
||||||
case 0: //휴식
|
case 0: //휴식
|
||||||
$date = substr($general['turntime'],11,5);
|
$date = substr($general['turntime'],11,5);
|
||||||
$log[] = "<C>●</>{$admin['month']}월:아무것도 실행하지 않았습니다. <1>$date</>";
|
$log[] = "<C>●</>{$month}월:아무것도 실행하지 않았습니다. <1>$date</>";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
break;
|
break;
|
||||||
case 1: process_1($general, 1); break; //농업
|
case 1: process_1($general, 1); break; //농업
|
||||||
@@ -570,7 +583,7 @@ function processCommand($no) {
|
|||||||
case 17: process_17($general); break; //소집해제
|
case 17: process_17($general); break; //소집해제
|
||||||
|
|
||||||
case 21: process_21($general); break; //이동
|
case 21: process_21($general); break; //이동
|
||||||
//case 22: process_22($general); break; //등용 //TODO:등용장 재 디자인
|
case 22: process_22($general); break; //등용
|
||||||
case 25: process_25($general); break; //임관
|
case 25: process_25($general); break; //임관
|
||||||
case 26: process_26($general); break; //집합
|
case 26: process_26($general); break; //집합
|
||||||
case 28: process_28($general); break; //귀환
|
case 28: process_28($general); break; //귀환
|
||||||
@@ -681,19 +694,21 @@ where nation='{$general['nation']}'
|
|||||||
|
|
||||||
|
|
||||||
function command_Single($turn, $command) {
|
function command_Single($turn, $command) {
|
||||||
|
if(!$turn){
|
||||||
|
header('location:commandlist.php');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$command = EncodeCommand(0, 0, 0, $command);
|
$command = EncodeCommand(0, 0, 0, $command);
|
||||||
|
|
||||||
$count = count($turn);
|
$setValues = [];
|
||||||
$str = "con=con";
|
foreach($turn as $turnIdx){
|
||||||
for($i=0; $i < $count; $i++) {
|
$setValues["turn{$turnIdx}"] = $command;
|
||||||
$str .= ",turn{$turn[$i]}='{$command}'";
|
|
||||||
}
|
}
|
||||||
$query = "update general set {$str} where owner='{$userID}'";
|
$db->update('general', $setValues, 'owner=%i',$userID);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
header('location:commandlist.php');
|
header('location:commandlist.php');
|
||||||
}
|
}
|
||||||
@@ -732,8 +747,9 @@ function command_Other($turn, $commandtype) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
<script>
|
<script>
|
||||||
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -284,19 +284,19 @@ function getLevel($level, $nlevel=8) {
|
|||||||
|
|
||||||
function getCall($leader, $power, $intel) {
|
function getCall($leader, $power, $intel) {
|
||||||
$call = '평범';
|
$call = '평범';
|
||||||
if($leader >= GameConst::$goodgenleader && $power >= GameConst::$goodgenpower && $intel >= GameConst::$goodgenintel) {
|
if($leader >= GameConst::$chiefStatMin && $power >= GameConst::$chiefStatMin && $intel >= GameConst::$chiefStatMin) {
|
||||||
$call = '만능';
|
$call = '만능';
|
||||||
} elseif($leader >= GameConst::$goodgenleader && $power >= GameConst::$goodgenpower) {
|
} elseif($leader >= GameConst::$chiefStatMin && $power >= GameConst::$chiefStatMin) {
|
||||||
$call = '용장';
|
$call = '용장';
|
||||||
} elseif($leader >= GameConst::$goodgenleader && $intel >= GameConst::$goodgenintel) {
|
} elseif($leader >= GameConst::$chiefStatMin && $intel >= GameConst::$chiefStatMin) {
|
||||||
$call = '지장';
|
$call = '지장';
|
||||||
} elseif($power >= GameConst::$goodgenpower && $intel >= GameConst::$goodgenintel) {
|
} elseif($power >= GameConst::$chiefStatMin && $intel >= GameConst::$chiefStatMin) {
|
||||||
$call = '명장';
|
$call = '명장';
|
||||||
} elseif($leader >= GameConst::$goodgenleader) {
|
} elseif($leader >= GameConst::$chiefStatMin) {
|
||||||
$call = '명사';
|
$call = '명사';
|
||||||
} elseif($power >= GameConst::$goodgenpower) {
|
} elseif($power >= GameConst::$chiefStatMin) {
|
||||||
$call = '용맹';
|
$call = '용맹';
|
||||||
} elseif($intel >= GameConst::$goodgenintel) {
|
} elseif($intel >= GameConst::$chiefStatMin) {
|
||||||
$call = '현명';
|
$call = '현명';
|
||||||
}
|
}
|
||||||
return $call;
|
return $call;
|
||||||
@@ -397,9 +397,6 @@ function getBill(int $dedication) : int{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCost(int $armtype) : int {
|
function getCost(int $armtype) : int {
|
||||||
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
|
|
||||||
//TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함
|
|
||||||
|
|
||||||
return GameUnitConst::byID($armtype)->cost;
|
return GameUnitConst::byID($armtype)->cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -794,7 +791,10 @@ function getItemCost($weap) : int {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function ConvertLog(string $str, $type=1) : string {
|
function ConvertLog(?string $str, $type=1) : string {
|
||||||
|
if(!$str){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
//TODO: 이 함수는 없애야 한다. CSS로 대신하자
|
//TODO: 이 함수는 없애야 한다. CSS로 대신하자
|
||||||
if($type > 0) {
|
if($type > 0) {
|
||||||
$str = str_replace("<1>", "<font size=1>", $str);
|
$str = str_replace("<1>", "<font size=1>", $str);
|
||||||
|
|||||||
@@ -5,77 +5,8 @@ namespace sammo;
|
|||||||
* 게임 룰에 해당하는 함수 모음
|
* 게임 룰에 해당하는 함수 모음
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 37.5 ~ 75
|
|
||||||
function abilityRand() {
|
|
||||||
$total = 150;
|
|
||||||
$leader = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$power = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$intel = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$rate = $leader + $power + $intel;
|
|
||||||
$leader = intdiv($leader * $total, $rate);
|
|
||||||
$power = intdiv($power * $total, $rate);
|
|
||||||
$intel = intdiv($intel * $total, $rate);
|
|
||||||
|
|
||||||
while($leader+$power+$intel < 150) {
|
/**
|
||||||
$leader++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array('leader' => $leader, 'power' => $power, 'intel' => $intel);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 14 ~ 75
|
|
||||||
function abilityLeadpow() {
|
|
||||||
$total = 150;
|
|
||||||
$leader = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$power = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$intel = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$rate = $leader + $power + $intel;
|
|
||||||
$leader = intdiv($leader * $total, $rate);
|
|
||||||
$power = intdiv($power * $total, $rate);
|
|
||||||
$intel = intdiv($intel * $total, $rate);
|
|
||||||
|
|
||||||
while($leader+$power+$intel < 150) {
|
|
||||||
$leader++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array('leader' => $leader, 'power' => $power, 'intel' => $intel);
|
|
||||||
}
|
|
||||||
|
|
||||||
function abilityLeadint() {
|
|
||||||
$total = 150;
|
|
||||||
$leader = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$power = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$intel = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$rate = $leader + $power + $intel;
|
|
||||||
$leader = intdiv($leader * $total, $rate);
|
|
||||||
$power = intdiv($power * $total, $rate);
|
|
||||||
$intel = intdiv($intel * $total, $rate);
|
|
||||||
|
|
||||||
while($leader+$power+$intel < 150) {
|
|
||||||
$leader++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array('leader' => $leader, 'power' => $power, 'intel' => $intel);
|
|
||||||
}
|
|
||||||
|
|
||||||
function abilityPowint() {
|
|
||||||
$total = 150;
|
|
||||||
$leader = (rand()%100 + 1) / 100.0 + 1.0;
|
|
||||||
$power = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$intel = (rand()%100 + 1) / 100.0 + 6.0;
|
|
||||||
$rate = $leader + $power + $intel;
|
|
||||||
$leader = intdiv($leader * $total, $rate);
|
|
||||||
$power = intdiv($power * $total, $rate);
|
|
||||||
$intel = intdiv($intel * $total, $rate);
|
|
||||||
|
|
||||||
while($leader+$power+$intel < 150) {
|
|
||||||
$leader++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array('leader' => $leader, 'power' => $power, 'intel' => $intel);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 게임 내부에 사용하는 유틸리티 함수들을 분리
|
* 게임 내부에 사용하는 유틸리티 함수들을 분리
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -213,7 +144,7 @@ function SetNationFront($nationNo) {
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$enemyCities = $db->queryFirstColumn(
|
$enemyCities = $db->queryFirstColumn(
|
||||||
'SELECT city from city where nation IN
|
'SELECT city from city where nation IN
|
||||||
(SELECT you from diplomacy where me = %i and (state=0 or (state=1 and term<=3)))'
|
(SELECT you from diplomacy where me = %i and (state=0 or (state=1 and term<=5)))'
|
||||||
, $nationNo
|
, $nationNo
|
||||||
);
|
);
|
||||||
if($enemyCities) {
|
if($enemyCities) {
|
||||||
@@ -245,45 +176,47 @@ function SetNationFront($nationNo) {
|
|||||||
|
|
||||||
function checkSupply() {
|
function checkSupply() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$cities = [];
|
$cities = [];
|
||||||
foreach($db->query('SELECT city, nation FROM city WHERE nation != 0') as $city){
|
foreach($db->query('SELECT city, nation FROM city WHERE nation != 0') as $city){
|
||||||
$cities[$city['city']] = [
|
$newCity = new \stdClass();
|
||||||
'id'=>$city['city'],
|
$newCity->id = Util::toInt($city['city']);
|
||||||
'nation'=>$city['nation'],
|
$newCity->nation = Util::toInt($city['nation']);
|
||||||
'supply'=>false
|
$newCity->supply = false;
|
||||||
];
|
|
||||||
|
$cities[$newCity->id] = $newCity;
|
||||||
}
|
}
|
||||||
|
|
||||||
$queue = new \SplQueue();
|
$queue = new \SplQueue();
|
||||||
foreach(getAllNationStaticInfo() as $nation){
|
foreach($db->queryAllLists('SELECT capital, nation FROM nation WHERE `level` > 0') as list($capitalID, $nationID)){
|
||||||
$capitalID = $nation['capital'];
|
if(!key_exists($capitalID, $cities)){
|
||||||
if(!$capitalID){
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$city = &$cities[$capitalID];
|
$city = $cities[$capitalID];
|
||||||
$city['supply'] = true;
|
if($nationID != $city->nation){
|
||||||
$queue->enqueue($city['id']);
|
continue;
|
||||||
|
}
|
||||||
|
$city->supply = true;
|
||||||
|
$queue->enqueue($city);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(!$queue->isEmpty()){
|
while(!$queue->isEmpty()){
|
||||||
$cityID = $queue->dequeue();
|
$cityLink = $queue->dequeue();
|
||||||
$city = &$cities[$cityID];
|
$city = CityConst::byID($cityLink->id);
|
||||||
|
|
||||||
foreach(array_keys(CityConst::byID($cityID)->path) as $connCityID){
|
foreach(array_keys($city->path) as $connCityID){
|
||||||
if(!key_exists($connCityID, $cities)){
|
if(!key_exists($connCityID, $cities)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$connCity = &$cities[$connCityID];
|
$connCity = $cities[$connCityID];
|
||||||
if($connCity['nation'] != $city['nation']){
|
if($connCity->nation != $cityLink->nation){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if($connCity['supply']){
|
if($connCity->supply){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$connCity['supply'] = true;
|
$connCity->supply = true;
|
||||||
$queue->enqueue($connCity['id']);
|
$queue->enqueue($connCity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,15 +224,15 @@ function checkSupply() {
|
|||||||
'supply'=>1
|
'supply'=>1
|
||||||
], 'nation=0');
|
], 'nation=0');
|
||||||
|
|
||||||
|
$db->update('city',[
|
||||||
|
'supply'=>0
|
||||||
|
], 'nation!=0');
|
||||||
|
|
||||||
$supply = [];
|
$supply = [];
|
||||||
$unsupply = [];
|
|
||||||
|
|
||||||
foreach($cities as $city){
|
foreach($cities as $city){
|
||||||
if($city['supply']){
|
if($city->supply){
|
||||||
$supply[] = $city['id'];
|
$supply[] = $city->id;
|
||||||
}
|
|
||||||
else{
|
|
||||||
$unsupply[] = $city['id'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,11 +242,6 @@ function checkSupply() {
|
|||||||
], 'city IN %li', $supply);
|
], 'city IN %li', $supply);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($unsupply){
|
|
||||||
$db->update('city', [
|
|
||||||
'supply'=>0
|
|
||||||
], 'city IN %li', $unsupply);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -338,6 +266,7 @@ function updateQuaterly() {
|
|||||||
// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정
|
// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정
|
||||||
function preUpdateMonthly() {
|
function preUpdateMonthly() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
//연감 월결산
|
//연감 월결산
|
||||||
@@ -346,9 +275,7 @@ function preUpdateMonthly() {
|
|||||||
|
|
||||||
if($result == false) { return false; }
|
if($result == false) { return false; }
|
||||||
|
|
||||||
$query = "select startyear,year,month from game limit 1";
|
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
//배신 횟수 최대 10회 미만
|
//배신 횟수 최대 10회 미만
|
||||||
$query = "update general set betray=9 where betray>9";
|
$query = "update general set betray=9 where betray>9";
|
||||||
@@ -379,7 +306,8 @@ function preUpdateMonthly() {
|
|||||||
$query = "update general set level=1 where no='{$city['gen1']}' or no='{$city['gen2']}' or no='{$city['gen3']}'";
|
$query = "update general set level=1 where no='{$city['gen1']}' or no='{$city['gen2']}' or no='{$city['gen3']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【고립】</b></><G><b>{$city['name']}</b></>(이)가 보급이 끊겨 <R>미지배</> 도시가 되었습니다.";
|
$josaYi = JosaUtil::pick($city['name'], '이');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【고립】</b></><G><b>{$city['name']}</b></>{$josaYi} 보급이 끊겨 <R>미지배</> 도시가 되었습니다.";
|
||||||
}
|
}
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
//민심30이하 공백지 처리
|
//민심30이하 공백지 처리
|
||||||
@@ -428,8 +356,10 @@ function preUpdateMonthly() {
|
|||||||
$ratio = 100;
|
$ratio = 100;
|
||||||
// 20 ~ 140원
|
// 20 ~ 140원
|
||||||
$develcost = ($admin['year'] - $admin['startyear'] + 10) * 2;
|
$develcost = ($admin['year'] - $admin['startyear'] + 10) * 2;
|
||||||
$query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost'";
|
$gameStor->gold_rate = $ratio;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->rice_rate = $ratio;
|
||||||
|
$gameStor->city_rate = $rate;
|
||||||
|
$gameStor->develcost = $develcost;
|
||||||
|
|
||||||
//매달 사망자 수입 결산
|
//매달 사망자 수입 결산
|
||||||
processDeadIncome($ratio);
|
processDeadIncome($ratio);
|
||||||
@@ -490,14 +420,22 @@ function preUpdateMonthly() {
|
|||||||
// 외교 로그처리, 외교 상태 처리
|
// 외교 로그처리, 외교 상태 처리
|
||||||
function postUpdateMonthly() {
|
function postUpdateMonthly() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select startyear,year,month,scenario from game limit 1";
|
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'scenario']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$history = [];
|
$history = [];
|
||||||
|
|
||||||
|
//도시 수 측정
|
||||||
|
$cityNations = [];
|
||||||
|
foreach($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $cityNation]){
|
||||||
|
if(!key_exists($cityNation, $cityNations)){
|
||||||
|
$cityNations[$cityNation] = [];
|
||||||
|
}
|
||||||
|
$cityNations[$cityNation][] = $cityName;
|
||||||
|
}
|
||||||
|
|
||||||
//각 국가 전월 장수수 대비 당월 장수수로 단합도 산정
|
//각 국가 전월 장수수 대비 당월 장수수로 단합도 산정
|
||||||
//각 국가 장수수를 구하고 국력 산정
|
//각 국가 장수수를 구하고 국력 산정
|
||||||
// $query = "select nation,gennum from nation where level>0";
|
// $query = "select nation,gennum from nation where level>0";
|
||||||
@@ -509,34 +447,33 @@ function postUpdateMonthly() {
|
|||||||
// 접속률
|
// 접속률
|
||||||
// 숙련도
|
// 숙련도
|
||||||
// 명성,공헌
|
// 명성,공헌
|
||||||
$query = "
|
$nations = $db->query('SELECT
|
||||||
select
|
A.nation,
|
||||||
A.nation,
|
A.gennum, A.gennum2, A.chemi, A.aux,
|
||||||
A.gennum, A.gennum2, A.chemi,
|
round((
|
||||||
round((
|
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
||||||
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
|
+A.tech
|
||||||
+A.tech
|
+if(A.level=0,0,(
|
||||||
+if(A.level=0,0,(
|
select round(
|
||||||
select round(
|
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100
|
||||||
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100
|
) from city where nation=A.nation and supply=1
|
||||||
) from city where nation=A.nation and supply=1
|
))
|
||||||
))
|
+(select sum(leader+power+intel) from general where nation=A.nation)
|
||||||
+(select sum(leader+power+intel) from general where nation=A.nation)
|
+(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation)
|
||||||
+(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation)
|
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
|
||||||
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
|
+(select round(avg(connect)) from general where nation=A.nation)
|
||||||
+(select round(avg(connect)) from general where nation=A.nation)
|
)/10)
|
||||||
)/10)
|
as power,
|
||||||
as power
|
(select sum(crew) from general where nation=A.nation) as totalCrew
|
||||||
from nation A
|
from nation A
|
||||||
group by A.nation
|
group by A.nation');
|
||||||
";
|
foreach($nations as $nation) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$nationCount = MYDB_num_rows($result);
|
|
||||||
$genNum = [];
|
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
|
||||||
$nation = MYDB_fetch_array($result);
|
|
||||||
$genNum[$nation['nation']] = $nation['gennum'];
|
$genNum[$nation['nation']] = $nation['gennum'];
|
||||||
|
|
||||||
|
$aux = Json::decode($nation['aux']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($nation['gennum'] > $nation['gennum2']) {
|
if($nation['gennum'] > $nation['gennum2']) {
|
||||||
// 장수가 증가했을때
|
// 장수가 증가했을때
|
||||||
$nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100);
|
$nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100);
|
||||||
@@ -550,9 +487,21 @@ group by A.nation
|
|||||||
if($nation['chemi'] > 100) { $nation['chemi'] = 100; }
|
if($nation['chemi'] > 100) { $nation['chemi'] = 100; }
|
||||||
|
|
||||||
//약간의 랜덤치 부여 (95% ~ 105%)
|
//약간의 랜덤치 부여 (95% ~ 105%)
|
||||||
|
|
||||||
$nation['power'] = Util::round($nation['power'] * (rand()%101 + 950) / 1000);
|
$nation['power'] = Util::round($nation['power'] * (rand()%101 + 950) / 1000);
|
||||||
$query = "update nation set power='{$nation['power']}',gennum2='{$nation['gennum']}',chemi='{$nation['chemi']}' where nation='{$nation['nation']}'";
|
$aux['maxPower'] = max($aux['maxPower']??0, $nation['power']);
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$aux['maxCrew'] = max($aux['maxCrew']??0, Util::toInt($nation['totalCrew']));
|
||||||
|
|
||||||
|
if(count($cityNations[$nation['nation']]??[]) > count($aux['maxCities']??[])){
|
||||||
|
$aux['maxCities'] = $cityNations[$nation['nation']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->update('nation', [
|
||||||
|
'power'=>$nation['power'],
|
||||||
|
'gennum2'=>$nation['gennum'],
|
||||||
|
'chemi'=>$nation['chemi'],
|
||||||
|
'aux'=>Json::encode($aux)
|
||||||
|
], 'nation=%i', $nation['nation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 전쟁기한 세팅
|
// 전쟁기한 세팅
|
||||||
@@ -582,7 +531,10 @@ group by A.nation
|
|||||||
$name1 = $nation1['name'];
|
$name1 = $nation1['name'];
|
||||||
$nation2 = getNationStaticInfo($dip['you']);
|
$nation2 = getNationStaticInfo($dip['you']);
|
||||||
$name2 = $nation2['name'];
|
$name2 = $nation2['name'];
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【개전】</b></><D><b>$name1</b></>(와)과 <D><b>$name2</b></>(이)가 <R>전쟁</>을 시작합니다.";
|
|
||||||
|
$josaYi = JosaUtil::pick($name2, '이');
|
||||||
|
$josaWa = JosaUtil::pick($name1, '와');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【개전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <R>전쟁</>을 시작합니다.";
|
||||||
}
|
}
|
||||||
//휴전국 로그
|
//휴전국 로그
|
||||||
$query = "select A.me as me,A.you as you,A.term as term1,B.term as term2 from diplomacy A, diplomacy B where A.me=B.you and A.you=B.me and A.state='0' and A.me<A.you";
|
$query = "select A.me as me,A.you as you,A.term as term1,B.term as term2 from diplomacy A, diplomacy B where A.me=B.you and A.you=B.me and A.state='0' and A.me<A.you";
|
||||||
@@ -597,7 +549,10 @@ group by A.nation
|
|||||||
$name1 = $nation1['name'];
|
$name1 = $nation1['name'];
|
||||||
$nation2 = getNationStaticInfo($dip['you']);
|
$nation2 = getNationStaticInfo($dip['you']);
|
||||||
$name2 = $nation2['name'];
|
$name2 = $nation2['name'];
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【휴전】</b></><D><b>$name1</b></>(와)과 <D><b>$name2</b></>(이)가 <S>휴전</>합니다.";
|
|
||||||
|
$josaWa = JosaUtil::pick($name1, '와');
|
||||||
|
$josaYi = JosaUtil::pick($name2, '이');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<R><b>【휴전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <S>휴전</>합니다.";
|
||||||
//기한 되면 휴전으로
|
//기한 되면 휴전으로
|
||||||
$query = "update diplomacy set state='2',term='0' where (me='{$dip['me']}' and you='{$dip['you']}') or (me='{$dip['you']}' and you='{$dip['me']}')";
|
$query = "update diplomacy set state='2',term='0' where (me='{$dip['me']}' and you='{$dip['you']}') or (me='{$dip['you']}' and you='{$dip['me']}')";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -644,11 +599,10 @@ group by A.nation
|
|||||||
|
|
||||||
function checkWander() {
|
function checkWander() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$needRefresh = false;
|
$needRefresh = false;
|
||||||
|
|
||||||
@@ -675,15 +629,14 @@ function checkWander() {
|
|||||||
|
|
||||||
function checkMerge() {
|
function checkMerge() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$mylog = [];
|
$mylog = [];
|
||||||
$youlog = [];
|
$youlog = [];
|
||||||
$history = [];
|
$history = [];
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select * from diplomacy where state='3' and term='0'";
|
$query = "select * from diplomacy where state='3' and term='0'";
|
||||||
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -722,35 +675,53 @@ function checkMerge() {
|
|||||||
$query = "select no,name,nation from general where nation='{$you['nation']}'";
|
$query = "select no,name,nation from general where nation='{$you['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount = MYDB_num_rows($result);
|
$gencount = MYDB_num_rows($result);
|
||||||
$genlog = ["<C>●</><D><b>{$mynation['name']}</b></>(와)과 통합에 성공했습니다."];
|
$josaWa = JosaUtil::pick($mynation['name'], '와');
|
||||||
|
$genlog = ["<C>●</><D><b>{$mynation['name']}</b></>{$josaWa} 통합에 성공했습니다."];
|
||||||
for($i=0; $i < $gencount; $i++) {
|
for($i=0; $i < $gencount; $i++) {
|
||||||
$gen = MYDB_fetch_array($result);
|
$gen = MYDB_fetch_array($result);
|
||||||
pushGenLog($gen, $genlog);
|
pushGenLog($gen, $genlog);
|
||||||
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
|
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} <D><b>{$you['makenation']}</b></>로 통합에 성공");
|
||||||
}
|
}
|
||||||
//항복국 장수들 역사 기록 및 로그 전달
|
//항복국 장수들 역사 기록 및 로그 전달
|
||||||
$query = "select no,name,nation from general where nation='{$me['nation']}'";
|
$query = "select no,name,nation from general where nation='{$me['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount2 = MYDB_num_rows($result);
|
$gencount2 = MYDB_num_rows($result);
|
||||||
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>(와)과 통합에 성공했습니다.";
|
$josaWa = JosaUtil::pick($younation['name'], '와');
|
||||||
|
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>{$josaWa} 통합에 성공했습니다.";
|
||||||
for($i=0; $i < $gencount2; $i++) {
|
for($i=0; $i < $gencount2; $i++) {
|
||||||
$gen = MYDB_fetch_array($result);
|
$gen = MYDB_fetch_array($result);
|
||||||
pushGenLog($gen, $genlog);
|
pushGenLog($gen, $genlog);
|
||||||
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$younation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합에 성공");
|
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$younation['name']}</b></>{$josaWa} <D><b>{$you['makenation']}</b></>로 통합에 성공");
|
||||||
}
|
}
|
||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통합】</b></><D><b>{$mynation['name']}</b></>(와)과 <D><b>{$younation['name']}</b></>(이)가 <D><b>{$you['makenation']}</b></>(으)로 통합하였습니다.";
|
$josaRo = JosaUtil::pick($you['makenation'], '로');
|
||||||
|
$josaYi = JosaUtil::pick($younation['name'], '이');
|
||||||
|
$josaWa = JosaUtil::pick($mynation['name'], '와');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통합】</b></><D><b>{$mynation['name']}</b></>{$josaWa} <D><b>{$younation['name']}</b></>{$josaYi} <D><b>{$you['makenation']}</b></>{$josaRo} 통합하였습니다.";
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$you['makenation']}</b></>에 혼란이 일고 있습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$you['makenation']}</b></>에 혼란이 일고 있습니다.";
|
||||||
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
|
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
|
||||||
|
|
||||||
$newGenCount = $gencount + $gencount2;
|
$newGenCount = $gencount + $gencount2;
|
||||||
if($newGenCount < 10) { $newGenCount = 10; }
|
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
||||||
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
||||||
$newTech = Util::round($newTotalTech / $newGenCount);
|
$newTech = Util::round($newTotalTech / $newGenCount);
|
||||||
|
|
||||||
|
// 국가 백업
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
// 자금 통합, 외교제한 5년, 기술유지
|
// 자금 통합, 외교제한 5년, 기술유지
|
||||||
$query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'";
|
$query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
//국가 삭제
|
//국가 삭제
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$me['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$me['nation']}'";
|
$query = "delete from nation where nation='{$me['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 아국 모든 도시들 상대국 소속으로
|
// 아국 모든 도시들 상대국 소속으로
|
||||||
@@ -797,11 +768,10 @@ function checkMerge() {
|
|||||||
|
|
||||||
function checkSurrender() {
|
function checkSurrender() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select * from diplomacy where state='5' and term='0'";
|
$query = "select * from diplomacy where state='5' and term='0'";
|
||||||
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -849,23 +819,32 @@ function checkSurrender() {
|
|||||||
pushGenLog($gen, $genlog);
|
pushGenLog($gen, $genlog);
|
||||||
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></> 합병에 성공");
|
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></> 합병에 성공");
|
||||||
}
|
}
|
||||||
|
$josaRo = JosaUtil::pick($younation['name'], '로');
|
||||||
//항복국 장수들 역사 기록 및 로그 전달
|
//항복국 장수들 역사 기록 및 로그 전달
|
||||||
$query = "select no,name,nation from general where nation='{$me['nation']}'";
|
$query = "select no,name,nation from general where nation='{$me['nation']}'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$gencount2 = MYDB_num_rows($result);
|
$gencount2 = MYDB_num_rows($result);
|
||||||
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>(으)로 항복하여 수도로 이동합니다.";
|
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>{$josaRo} 항복하여 수도로 이동합니다.";
|
||||||
for($i=0; $i < $gencount2; $i++) {
|
for($i=0; $i < $gencount2; $i++) {
|
||||||
$gen = MYDB_fetch_array($result);
|
$gen = MYDB_fetch_array($result);
|
||||||
pushGenLog($gen, $genlog);
|
pushGenLog($gen, $genlog);
|
||||||
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>가 <D><b>{$younation['name']}</b></>(으)로 항복");
|
pushGeneralHistory($gen, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>가 <D><b>{$younation['name']}</b></>{$josaRo} 항복");
|
||||||
}
|
}
|
||||||
|
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【투항】</b></><D><b>{$mynation['name']}</b></> (이)가 <D><b>{$younation['name']}</b></>(으)로 항복하였습니다.";
|
$josaYi = JosaUtil::pick($mynation['name'], '이');
|
||||||
|
$josaWa = JosaUtil::pick($mynation['name'], '와');
|
||||||
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【투항】</b></><D><b>{$mynation['name']}</b></>{$josaYi} <D><b>{$younation['name']}</b></>{$josaRo} 항복하였습니다.";
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
|
||||||
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>(와)과 합병");
|
pushNationHistory($younation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} 합병");
|
||||||
|
|
||||||
|
// 국가 백업
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
|
||||||
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
$newGenCount = $gencount + $gencount2;
|
$newGenCount = $gencount + $gencount2;
|
||||||
if($newGenCount < 10) { $newGenCount = 10; }
|
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
|
||||||
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
|
||||||
$newTech = Util::round($newTotalTech / $newGenCount);
|
$newTech = Util::round($newTotalTech / $newGenCount);
|
||||||
// 자금 통합, 외교제한 5년, 기술유지
|
// 자금 통합, 외교제한 5년, 기술유지
|
||||||
@@ -878,6 +857,13 @@ function checkSurrender() {
|
|||||||
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
|
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
//국가 삭제
|
//국가 삭제
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$me['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
$query = "delete from nation where nation='{$me['nation']}'";
|
$query = "delete from nation where nation='{$me['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
// 군주가 있는 위치 구함
|
// 군주가 있는 위치 구함
|
||||||
@@ -921,12 +907,11 @@ function checkSurrender() {
|
|||||||
|
|
||||||
function updateNationState() {
|
function updateNationState() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$history = array();
|
$history = array();
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select nation,name,level from nation";
|
$query = "select nation,name,level from nation";
|
||||||
$nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -966,8 +951,9 @@ function updateNationState() {
|
|||||||
|
|
||||||
switch($nationlevel) {
|
switch($nationlevel) {
|
||||||
case 7:
|
case 7:
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>(을)를 자칭하였습니다.";
|
$josaUl = JosaUtil::pick(getNationLevel($nationlevel), '을');
|
||||||
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>(을)를 자칭");
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>{$josaUl} 자칭하였습니다.";
|
||||||
|
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>{$josaUl} 자칭");
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극하였습니다.";
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극하였습니다.";
|
||||||
@@ -992,7 +978,7 @@ function updateNationState() {
|
|||||||
refreshNationStaticInfo();
|
refreshNationStaticInfo();
|
||||||
}
|
}
|
||||||
$gennum = $gencount;
|
$gennum = $gencount;
|
||||||
if($gencount < 10) $gencount = 10;
|
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
|
||||||
//기술 및 변경횟수 업데이트
|
//기술 및 변경횟수 업데이트
|
||||||
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -1002,55 +988,80 @@ function updateNationState() {
|
|||||||
|
|
||||||
function checkStatistic() {
|
function checkStatistic() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$query = "select year,month from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$nationHists = [];
|
$nationHists = [];
|
||||||
$specialHists = [];
|
$specialHists = [];
|
||||||
$personalHists = [];
|
$personalHists = [];
|
||||||
$specialHists2 = [0];
|
$specialHists2 = [];
|
||||||
|
$crewtypeHists = [];
|
||||||
|
|
||||||
$etc = '';
|
$etc = '';
|
||||||
|
|
||||||
$query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general";
|
$auxData = [
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'generals'=>[],
|
||||||
$general = MYDB_fetch_array($result);
|
'nations'=>[],
|
||||||
$general['avggold'] = Util::round($general['avggold']);
|
];
|
||||||
$general['avgrice'] = Util::round($general['avgrice']);
|
|
||||||
$general['avgdex'] = Util::round($general['avgdex']);
|
|
||||||
$general['avgexpded'] = Util::round($general['avgexpded']);
|
|
||||||
$etc .= "평균 금/쌀 ({$general['avggold']}/{$general['avgrice']}), 평균/최고 숙련({$general['avgdex']}/{$general['maxdex']}), 평균/최고 경험공헌({$general['avgexpded']}/{$general['maxexpded']}), ";
|
|
||||||
|
|
||||||
$query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0";
|
$avgGeneral = $db->queryFirstRow(
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex,
|
||||||
$nation = MYDB_fetch_array($result);
|
max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
|
||||||
$nation['avgtech'] = Util::round($nation['avgtech']);
|
FROM general'
|
||||||
$nation['avgpower'] = Util::round($nation['avgpower']);
|
);
|
||||||
$etc .= "최저/평균/최고 기술({$nation['mintech']}/{$nation['avgtech']}/{$nation['maxtech']}), ";
|
$auxData['generals']['avg'] = $avgGeneral;
|
||||||
$etc .= "최저/평균/최고 국력({$nation['minpower']}/{$nation['avgpower']}/{$nation['maxpower']}), ";
|
|
||||||
|
$avgGeneral['avggold'] = Util::round($avgGeneral['avggold']);
|
||||||
|
$avgGeneral['avgrice'] = Util::round($avgGeneral['avgrice']);
|
||||||
|
$avgGeneral['avgdex'] = Util::round($avgGeneral['avgdex']);
|
||||||
|
$avgGeneral['avgexpded'] = Util::round($avgGeneral['avgexpded']);
|
||||||
|
$etc .= "평균 금/쌀 ({$avgGeneral['avggold']}/{$avgGeneral['avgrice']}), 평균/최고 숙련({$avgGeneral['avgdex']}/{$avgGeneral['maxdex']}), 평균/최고 경험공헌({$avgGeneral['avgexpded']}/{$avgGeneral['maxexpded']}), ";
|
||||||
|
|
||||||
|
$avgNation = $db->queryFirstRow(
|
||||||
|
'SELECT min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech,
|
||||||
|
min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0');
|
||||||
|
$auxData['nations']['avg'] = $avgNation;
|
||||||
|
|
||||||
|
$avgNation['avgtech'] = Util::round($avgNation['avgtech']);
|
||||||
|
$avgNation['avgpower'] = Util::round($avgNation['avgpower']);
|
||||||
|
$etc .= "최저/평균/최고 기술({$avgNation['mintech']}/{$avgNation['avgtech']}/{$avgNation['maxtech']}), ";
|
||||||
|
$etc .= "최저/평균/최고 국력({$avgNation['minpower']}/{$avgNation['avgpower']}/{$avgNation['maxpower']}), ";
|
||||||
|
|
||||||
$nationName = '';
|
$nationName = '';
|
||||||
$power_hist = '';
|
$powerHist = '';
|
||||||
|
|
||||||
$query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice from nation where level>0 order by power desc";
|
$nations = Util::convertArrayToDict(
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query(
|
||||||
$nationCount = MYDB_num_rows($result);
|
'SELECT nation,name,type,power,gennum,gold+rice as goldrice from nation where level>0 order by power desc', 'nation'
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
),
|
||||||
$nation = MYDB_fetch_array($result);
|
'nation'
|
||||||
|
);
|
||||||
|
$nationCount = count($nations);
|
||||||
|
|
||||||
$query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'";
|
$nationGeneralInfos = Util::convertArrayToDict(
|
||||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query(
|
||||||
$general = MYDB_fetch_array($result2);
|
'SELECT nation, sum(leader+power+intel) as abil,sum(gold+rice) as goldrice,
|
||||||
|
sum(dex0+dex10+dex20+dex30) as dex,sum(experience+dedication) as expded
|
||||||
|
from general GROUP BY nation'
|
||||||
|
),
|
||||||
|
'nation'
|
||||||
|
);
|
||||||
|
|
||||||
$query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'";
|
$nationCityInfos = Util::convertArrayToDict(
|
||||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$db->query('SELECT nation, count(*) as cnt, sum(pop) as pop,sum(pop2) as pop2 from city GROUP BY nation'),
|
||||||
$city = MYDB_fetch_array($result2);
|
'nation'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach($nations as $nationNo=>&$nation) {
|
||||||
|
$general = $nationGeneralInfos[$nationNo];
|
||||||
|
$city = $nationCityInfos[$nationNo];
|
||||||
|
|
||||||
|
$nation['generalInfo'] = $general;
|
||||||
|
$nation['cityInfo'] = $city;
|
||||||
|
|
||||||
$nationName .= $nation['name'].'('.getNationType($nation['type']).'), ';
|
$nationName .= $nation['name'].'('.getNationType($nation['type']).'), ';
|
||||||
$power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), ";
|
$powerHist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), ";
|
||||||
|
|
||||||
if(!isset($nationHists[$nation['type']])){
|
if(!isset($nationHists[$nation['type']])){
|
||||||
$nationHists[$nation['type']] = 0;
|
$nationHists[$nation['type']] = 0;
|
||||||
@@ -1058,26 +1069,21 @@ function checkStatistic() {
|
|||||||
$nationHists[$nation['type']]++;
|
$nationHists[$nation['type']]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$auxData['nations']['all'] = $nations;
|
||||||
|
|
||||||
$nationHist = '';
|
$nationHist = '';
|
||||||
for($i=1; $i <= 13; $i++) {
|
for($i=1; $i <= 13; $i++) {
|
||||||
if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; }
|
if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; }
|
||||||
$nationHist .= getNationType($i)."({$nationHists[$i]}), ";
|
$nationHist .= getNationType($i)."({$nationHists[$i]}), ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select no from general where npc <= 1";
|
$generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general');
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$genCount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
$query = "select no from general where npc > 1";
|
$genCount = 0;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$npcCount = 0;
|
||||||
$npcCount = MYDB_num_rows($result);
|
$generalCount = count($generals);
|
||||||
|
|
||||||
$query = "select personal,special,special2 from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$generalCount = MYDB_num_rows($result);
|
|
||||||
for($i=0; $i < $generalCount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
|
foreach($generals as $general) {
|
||||||
if(!isset($personalHists[$general['personal']])){
|
if(!isset($personalHists[$general['personal']])){
|
||||||
$personalHists[$general['personal']] = 0;
|
$personalHists[$general['personal']] = 0;
|
||||||
}
|
}
|
||||||
@@ -1090,258 +1096,338 @@ function checkStatistic() {
|
|||||||
$specialHists2[$general['special2']] = 0;
|
$specialHists2[$general['special2']] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($general['npc'] < 2){
|
||||||
|
$genCount+=1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$npcCount+=1;
|
||||||
|
}
|
||||||
|
|
||||||
$personalHists[$general['personal']]++;
|
$personalHists[$general['personal']]++;
|
||||||
$specialHists[$general['special']]++;
|
$specialHists[$general['special']]++;
|
||||||
$specialHists2[$general['special2']]++;
|
$specialHists2[$general['special2']]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach($db->queryAllLists(
|
||||||
|
'SELECT crewtype, count(crewtype) AS cnt FROM general WHERE crew>=100 OR deathnum>0 GROUP BY crewtype'
|
||||||
|
) as [$crewtype, $cnt]
|
||||||
|
){
|
||||||
|
$crewtypeHists[$crewtype] = $cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
$auxData['generals']['hists'] = [
|
||||||
|
'personal' => $personalHists,
|
||||||
|
'special' => $specialHists,
|
||||||
|
'special2' => $specialHists2,
|
||||||
|
'crewtype' => $crewtypeHists,
|
||||||
|
'userCnt' => $genCount,
|
||||||
|
'npcCnt' => $npcCount,
|
||||||
|
];
|
||||||
|
|
||||||
$generalCountStr = "{$generalCount}({$genCount}+{$npcCount})";
|
$generalCountStr = "{$generalCount}({$genCount}+{$npcCount})";
|
||||||
|
|
||||||
$personalHist = '';
|
$personalHistStr = join(', ', array_map(function($histPair){
|
||||||
for($i=0; $i < 11; $i++) {
|
[$histKey, $cnt] = $histPair;
|
||||||
if(!Util::array_get($personalHists[$i])) { $personalHists[$i] = '-'; }
|
return getGenChar($histKey).'('.$cnt.')';
|
||||||
$personalHist .= getGenChar($i)."({$personalHists[$i]}), ";
|
}, Util::convertDictToArray($personalHists)));
|
||||||
}
|
|
||||||
$specialHist = '';
|
|
||||||
for($i=0; $i < 40; $i++) {
|
|
||||||
$call = getGenSpecial($i);
|
|
||||||
if($call) {
|
|
||||||
if(!Util::array_get($specialHists[$i])) { $specialHists[$i] = '-'; }
|
|
||||||
|
|
||||||
$specialHist .= $call."({$specialHists[$i]}), ";
|
$specialHistsStr = join(', ', array_map(function($histPair){
|
||||||
}
|
[$histKey, $cnt] = $histPair;
|
||||||
}
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
$specialHist .= '// ';
|
}, Util::convertDictToArray($specialHists)));
|
||||||
$specialHist .= "-({$specialHists2[0]}), ";
|
|
||||||
for($i=40; $i < 80; $i++) {
|
|
||||||
$call = getGenSpecial($i);
|
|
||||||
if($call) {
|
|
||||||
if(!Util::array_get($specialHists2[$i])) { $specialHists2[$i] = '-'; }
|
|
||||||
|
|
||||||
$specialHist .= $call."({$specialHists2[$i]}), ";
|
$specialHists2Str = join(', ', array_map(function($histPair){
|
||||||
}
|
[$histKey, $cnt] = $histPair;
|
||||||
}
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
|
}, Util::convertDictToArray($specialHists2)));
|
||||||
|
|
||||||
$crewtype = '';
|
$specialHistsAllStr = "$specialHistsStr // $specialHists2Str";
|
||||||
$types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43);
|
|
||||||
$count = count($types);
|
$crewtypeHistsStr = join(', ', array_map(function($histPair){
|
||||||
foreach(GameUnitConst::all() as $unit){
|
[$histKey, $cnt] = $histPair;
|
||||||
$userCnt = DB::db()->queryFirstField(
|
return getGenSpecial($histKey).'('.$cnt.')';
|
||||||
"SELECT count(*) as type from general where crewtype=%i and crew>=100",
|
}, Util::convertDictToArray($crewtypeHists)));
|
||||||
$unit->id
|
|
||||||
|
$db->insert('statistic', [
|
||||||
|
'year'=>$admin['year'],
|
||||||
|
'month'=>$admin['month'],
|
||||||
|
'nation_count'=>$nationCount,
|
||||||
|
'nation_name'=>$nationName,
|
||||||
|
'nation_hist'=>$nationHist,
|
||||||
|
'gen_count'=>$generalCountStr,
|
||||||
|
'personal_hist'=>$personalHistStr,
|
||||||
|
'special_hist'=>$specialHistsAllStr,
|
||||||
|
'power_hist'=>$powerHist,
|
||||||
|
'crewtype'=>$crewtypeHistsStr,
|
||||||
|
'etc'=>$etc,
|
||||||
|
'aux'=>Json::encode($auxData)
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function convForOldGeneral(array $general, int $year, int $month){
|
||||||
|
return [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'general_no'=>$general['no'],
|
||||||
|
'owner'=>$general['owner'],
|
||||||
|
'name'=>$general['name'],
|
||||||
|
'last_yearmonth'=>$year*100+$month,
|
||||||
|
'turntime'=>$general['turntime'],
|
||||||
|
'data'=>Json::encode($general)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeOldGeneral(int $no, int $year, int $month){
|
||||||
|
$db = DB::db();
|
||||||
|
$general = $db->queryFirstRow('SELECT * FROM general WHERE `no` = %i', $no);
|
||||||
|
if(!$general){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$data = convForOldGeneral($general, $year, $month);
|
||||||
|
$db->insertUpdate(
|
||||||
|
'ng_old_generals',
|
||||||
|
$data,
|
||||||
|
$data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeOldGenerals(int $nation, int $year, int $month){
|
||||||
|
$db = DB::db();
|
||||||
|
foreach($db->query('SELECT * FROM general WHERE nation = %i',$nation) as $general){
|
||||||
|
$data = convForOldGeneral($general, $year, $month);
|
||||||
|
$db->insertUpdate(
|
||||||
|
'ng_old_generals',
|
||||||
|
$data,
|
||||||
|
$data
|
||||||
);
|
);
|
||||||
$crewtype .= "{$unit->name}({$userCnt}), ";
|
|
||||||
}
|
}
|
||||||
for($i=0; $i < $count; $i++) {
|
|
||||||
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$query = "
|
|
||||||
insert into statistic (
|
|
||||||
year, month,
|
|
||||||
nation_count, nation_name, nation_hist,
|
|
||||||
gen_count, personal_hist, special_hist, power_hist,
|
|
||||||
crewtype, etc
|
|
||||||
) values (
|
|
||||||
'{$admin['year']}', '{$admin['month']}',
|
|
||||||
'$nationCount', '$nationName', '$nationHist',
|
|
||||||
'$generalCountStr', '$personalHist', '$specialHist', '$power_hist',
|
|
||||||
'$crewtype', '$etc'
|
|
||||||
)";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkEmperior() {
|
function checkEmperior() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select year,month,isUnited from game limit 1";
|
$admin = $gameStor->getValues(['year', 'month', 'isunited']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$admin = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select nation,name from nation where level>0";
|
$query = "select nation,name from nation where level>0";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$count = MYDB_num_rows($result);
|
$count = MYDB_num_rows($result);
|
||||||
|
|
||||||
if($count == 1 && $admin['isUnited'] == 0) {
|
if ($count != 1 || $admin['isunited'] != 0) {
|
||||||
$nation = MYDB_fetch_array($result);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$query = "select city from city where nation='{$nation['nation']}'";
|
$nation = MYDB_fetch_array($result);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
$query = "select city from city";
|
$count = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nation['nation']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
if(!$count){
|
||||||
$allcount = MYDB_num_rows($result);
|
return;
|
||||||
|
}
|
||||||
|
$allcount = $db->queryFirstField('SELECT count(city) FROM city');
|
||||||
|
|
||||||
if($count == $allcount) {
|
if ($count != $allcount) {
|
||||||
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>(이)가 전토를 통일");
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$query = "update game set isUnited=2,conlimit=conlimit*100";
|
checkStatistic();
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
|
||||||
$query = "select no from general where npc<2 and age>=45";
|
$josaYi = JosaUtil::pick($nation['name'], '이');
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $count; $i++) {
|
pushNationHistory($nation, "<C>●</>{$admin['year']}년 {$admin['month']}월:<D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일");
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
CheckHall($general['no']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'";
|
$gameStor->isunited = 2;
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$gameStor->conlimit = $gameStor->conlimit*100;
|
||||||
$nation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
$query = "select no from general where npc<2 and age>=40";
|
||||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$city = MYDB_fetch_array($cityresult);
|
$count = MYDB_num_rows($result);
|
||||||
$pop = "{$city['totalpop']} / {$city['maxpop']}";
|
|
||||||
$poprate = round($city['totalpop']/$city['maxpop']*100, 2);
|
|
||||||
$poprate .= " %";
|
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'";
|
for($i=0; $i < $count; $i++) {
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$general = MYDB_fetch_array($result);
|
||||||
$level12 = MYDB_fetch_array($genresult);
|
CheckHall($general['no']);
|
||||||
|
}
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='11'";
|
$query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level11 = MYDB_fetch_array($genresult);
|
$nation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='10'";
|
$query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level10 = MYDB_fetch_array($genresult);
|
$city = MYDB_fetch_array($cityresult);
|
||||||
|
$pop = "{$city['totalpop']} / {$city['maxpop']}";
|
||||||
|
$poprate = round($city['totalpop']/$city['maxpop']*100, 2);
|
||||||
|
$poprate .= " %";
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='9'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level9 = MYDB_fetch_array($genresult);
|
$level12 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='8'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='11'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level8 = MYDB_fetch_array($genresult);
|
$level11 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='7'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='10'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level7 = MYDB_fetch_array($genresult);
|
$level10 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='6'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='9'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level6 = MYDB_fetch_array($genresult);
|
$level9 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='5'";
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='8'";
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$level5 = MYDB_fetch_array($genresult);
|
$level8 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='7'";
|
||||||
$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$tigernum = MYDB_num_rows($tigerresult);
|
$level7 = MYDB_fetch_array($genresult);
|
||||||
$tigerstr = '';
|
|
||||||
for($i=0; $i < $tigernum; $i++) {
|
|
||||||
$tiger = MYDB_fetch_array($tigerresult);
|
|
||||||
if($tiger['killnum'] > 0) {
|
|
||||||
$tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='6'";
|
||||||
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$eaglenum = MYDB_num_rows($eagleresult);
|
$level6 = MYDB_fetch_array($genresult);
|
||||||
$eaglestr = '';
|
|
||||||
for($i=0; $i < $eaglenum; $i++) {
|
|
||||||
$eagle = MYDB_fetch_array($eagleresult);
|
|
||||||
if($eagle['firenum'] > 0) {
|
|
||||||
$eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$log = ["<C>●</>{$admin['year']}년 {$admin['month']}월: <D><b>{$nation['name']}</b></>(이)가 전토를 통일하였습니다."];
|
$query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='5'";
|
||||||
|
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$level5 = MYDB_fetch_array($genresult);
|
||||||
|
|
||||||
$query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc";
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
|
||||||
$gencount = MYDB_num_rows($result);
|
$oldNation['generals'] = $oldNationGenerals;
|
||||||
$gen = '';
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
$gen .= "{$general['name']}, ";
|
|
||||||
|
|
||||||
pushGenLog($general, $log);
|
$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군
|
||||||
}
|
$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$tigernum = MYDB_num_rows($tigerresult);
|
||||||
$nation['type'] = getNationType($nation['type']);
|
$tigerstr = '';
|
||||||
|
for($i=0; $i < $tigernum; $i++) {
|
||||||
$query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic";
|
$tiger = MYDB_fetch_array($tigerresult);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
if($tiger['killnum'] > 0) {
|
||||||
$stat = MYDB_fetch_array($result);
|
$tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, ";
|
||||||
|
|
||||||
$query = "select count(*) as cnt from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$statNC = "1 / {$stat['nc']}";
|
|
||||||
$statGC = "{$gencount['cnt']} / {$stat['gc']}";
|
|
||||||
|
|
||||||
$query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$statNation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$statGeneral = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$nationHistory = DB::db()->queryFirstField('SELECT `history` FROM `nation` WHERE `nation` = %i', $nation['nation']);
|
|
||||||
|
|
||||||
$db->insert('emperior', [
|
|
||||||
'phase'=>'-',
|
|
||||||
'nation_count'=>$statNC,
|
|
||||||
'nation_name'=>$statNation['nation_name'],
|
|
||||||
'nation_hist'=>$statNation['nation_hist'],
|
|
||||||
'gen_count'=>$statGC,
|
|
||||||
'personal_hist'=>$statGeneral['personal_hist'],
|
|
||||||
'special_hist'=>$statGeneral['special_hist'],
|
|
||||||
'name'=>$nation['name'],
|
|
||||||
'type'=>$nation['type'],
|
|
||||||
'color'=>$nation['color'],
|
|
||||||
'year'=>$admin['year'],
|
|
||||||
'month'=>$admin['month'],
|
|
||||||
'power'=>$nation['power'],
|
|
||||||
'gennum'=>$nation['gennum'],
|
|
||||||
'citynum'=>$allcount,
|
|
||||||
'pop'=>$pop,
|
|
||||||
'poprate'=>$poprate,
|
|
||||||
'gold'=>$nation['gold'],
|
|
||||||
'rice'=>$nation['rice'],
|
|
||||||
'l12name'=>$level12['name'],
|
|
||||||
'l12pic'=>$level12['picture'],
|
|
||||||
'l11name'=>$level11['name'],
|
|
||||||
'l11pic'=>$level11['picture'],
|
|
||||||
'l10name'=>$level10['name'],
|
|
||||||
'l10pic'=>$level10['picture'],
|
|
||||||
'l9name'=>$level9['name'],
|
|
||||||
'l9pic'=>$level9['picture'],
|
|
||||||
'l8name'=>$level8['name'],
|
|
||||||
'l8pic'=>$level8['picture'],
|
|
||||||
'l7name'=>$level7['name'],
|
|
||||||
'l7pic'=>$level7['picture'],
|
|
||||||
'l6name'=>$level6['name'],
|
|
||||||
'l6pic'=>$level6['picture'],
|
|
||||||
'l5name'=>$level5['name'],
|
|
||||||
'l5pic'=>$level5['picture'],
|
|
||||||
'tiger'=>$tigerstr,
|
|
||||||
'eagle'=>$eaglestr,
|
|
||||||
'gen'=>$gen,
|
|
||||||
'history'=>$nationHistory
|
|
||||||
]);
|
|
||||||
|
|
||||||
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>(이)가 전토를 통일하였습니다."];
|
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
|
||||||
|
|
||||||
//연감 월결산
|
|
||||||
LogHistory();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
|
||||||
|
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$eaglenum = MYDB_num_rows($eagleresult);
|
||||||
|
$eaglestr = '';
|
||||||
|
for($i=0; $i < $eaglenum; $i++) {
|
||||||
|
$eagle = MYDB_fetch_array($eagleresult);
|
||||||
|
if($eagle['firenum'] > 0) {
|
||||||
|
$eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$log = ["<C>●</>{$admin['year']}년 {$admin['month']}월: <D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
||||||
|
|
||||||
|
$query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$gencount = MYDB_num_rows($result);
|
||||||
|
$gen = '';
|
||||||
|
for($i=0; $i < $gencount; $i++) {
|
||||||
|
$general = MYDB_fetch_array($result);
|
||||||
|
$gen .= "{$general['name']}, ";
|
||||||
|
|
||||||
|
pushGenLog($general, $log);
|
||||||
|
}
|
||||||
|
|
||||||
|
$nation['type'] = getNationType($nation['type']);
|
||||||
|
|
||||||
|
$query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$stat = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$query = "select count(*) as cnt from general";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$gencount = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$statNC = "1 / {$stat['nc']}";
|
||||||
|
$statGC = "{$gencount['cnt']} / {$stat['gc']}";
|
||||||
|
|
||||||
|
$query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$statNation = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$query = "select gen_count,personal_hist,special_hist,aux from statistic order by no desc limit 0,1";
|
||||||
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
$statGeneral = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
|
||||||
|
$oldNation['generals'] = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
|
||||||
|
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||||
|
|
||||||
|
storeOldGenerals(0, $admin['year'], $admin['month']);
|
||||||
|
storeOldGenerals($nation['nation'], $admin['year'], $admin['month']);
|
||||||
|
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>$nation['nation'],
|
||||||
|
'data'=>Json::encode($oldNation)
|
||||||
|
]);
|
||||||
|
|
||||||
|
$noNationGeneral = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=0');
|
||||||
|
$db->insert('ng_old_nations', [
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation'=>0,
|
||||||
|
'data'=>Json::encode([
|
||||||
|
'nation'=>0,
|
||||||
|
'name'=>'재야',
|
||||||
|
'generals'=>$noNationGeneral
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
|
||||||
|
$nationHistory = DB::db()->queryFirstField('SELECT `history` FROM `nation` WHERE `nation` = %i', $nation['nation']);
|
||||||
|
|
||||||
|
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
|
||||||
|
$serverName = UniqueConst::$serverName;
|
||||||
|
|
||||||
|
$db->insert('emperior', [
|
||||||
|
'phase'=>$serverName.$serverCnt.'기',
|
||||||
|
'server_id'=>UniqueConst::$serverID,
|
||||||
|
'nation_count'=>$statNC,
|
||||||
|
'nation_name'=>$statNation['nation_name'],
|
||||||
|
'nation_hist'=>$statNation['nation_hist'],
|
||||||
|
'gen_count'=>$statGC,
|
||||||
|
'personal_hist'=>$statGeneral['personal_hist'],
|
||||||
|
'special_hist'=>$statGeneral['special_hist'],
|
||||||
|
'name'=>$nation['name'],
|
||||||
|
'type'=>$nation['type'],
|
||||||
|
'color'=>$nation['color'],
|
||||||
|
'year'=>$admin['year'],
|
||||||
|
'month'=>$admin['month'],
|
||||||
|
'power'=>$nation['power'],
|
||||||
|
'gennum'=>$nation['gennum'],
|
||||||
|
'citynum'=>$allcount,
|
||||||
|
'pop'=>$pop,
|
||||||
|
'poprate'=>$poprate,
|
||||||
|
'gold'=>$nation['gold'],
|
||||||
|
'rice'=>$nation['rice'],
|
||||||
|
'l12name'=>$level12['name'],
|
||||||
|
'l12pic'=>$level12['picture'],
|
||||||
|
'l11name'=>$level11['name'],
|
||||||
|
'l11pic'=>$level11['picture'],
|
||||||
|
'l10name'=>$level10['name'],
|
||||||
|
'l10pic'=>$level10['picture'],
|
||||||
|
'l9name'=>$level9['name'],
|
||||||
|
'l9pic'=>$level9['picture'],
|
||||||
|
'l8name'=>$level8['name'],
|
||||||
|
'l8pic'=>$level8['picture'],
|
||||||
|
'l7name'=>$level7['name'],
|
||||||
|
'l7pic'=>$level7['picture'],
|
||||||
|
'l6name'=>$level6['name'],
|
||||||
|
'l6pic'=>$level6['picture'],
|
||||||
|
'l5name'=>$level5['name'],
|
||||||
|
'l5pic'=>$level5['picture'],
|
||||||
|
'tiger'=>$tigerstr,
|
||||||
|
'eagle'=>$eaglestr,
|
||||||
|
'gen'=>$gen,
|
||||||
|
'history'=>$nationHistory,
|
||||||
|
'aux'=>$statGeneral['aux']
|
||||||
|
]);
|
||||||
|
|
||||||
|
$history = ["<C>●</>{$admin['year']}년 {$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
|
||||||
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|
||||||
|
//연감 월결산
|
||||||
|
LogHistory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace sammo;
|
|||||||
|
|
||||||
function delStepLog() {
|
function delStepLog() {
|
||||||
$date = date('Y_m_d');
|
$date = date('Y_m_d');
|
||||||
@unlink("logs/_{$date}_steplog.txt");
|
@unlink(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushRawFileLog($path, $lines){
|
function pushRawFileLog($path, $lines){
|
||||||
@@ -50,85 +50,116 @@ function eraseTnmtFightLogAll(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eraseTnmtFightLog(int $group){
|
function eraseTnmtFightLog(int $group){
|
||||||
$filepath = "logs/fight{$group}.txt";
|
$filepath = __dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt";
|
||||||
if(file_exists($filepath)){
|
if(file_exists($filepath)){
|
||||||
@unlink($filepath);
|
@unlink($filepath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushTnmtFightLog(int $group, $log) {
|
function pushTnmtFightLog(int $group, $log) {
|
||||||
pushRawFileLog("logs/fight{$group}.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTnmtFightLogAll(int $group) {
|
function getTnmtFightLogAll(int $group) {
|
||||||
return join('<br>',getFormattedFileLogAll("logs/fight{$group}.txt"));
|
return join('<br>',getFormattedFileLogAll(__dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushSabotageLog($log) {
|
function pushSabotageLog($log) {
|
||||||
pushRawFileLog("logs/_sabotagelog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSabotageLogRecent($count) {
|
function getSabotageLogRecent($count) {
|
||||||
return join('<br>', getFormattedFileLogRecent("logs/_sabotagelog.txt", $count, 150));
|
return join('<br>', getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $count, 150));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushProcessLog($log) {
|
function pushProcessLog($log) {
|
||||||
$date = date('Y_m_d');
|
$date = date('Y_m_d');
|
||||||
pushRawFileLog("logs/_{$date}_processlog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function pushStepLog($log) {
|
function pushStepLog($log) {
|
||||||
$date = date('Y_m_d');
|
$date = date('Y_m_d');
|
||||||
pushRawFileLog("logs/_{$date}_steplog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushLockLog($log) {
|
function pushLockLog($log) {
|
||||||
$date = date('Y_m_d');
|
$date = date('Y_m_d');
|
||||||
pushRawFileLog("logs/_{$date}_locklog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushAdminLog($log) {
|
function pushAdminLog($log) {
|
||||||
pushRawFileLog("logs/_adminlog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_adminlog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushAuctionLog($log) {
|
function pushAuctionLog($log) {
|
||||||
pushRawFileLog("logs/_auctionlog.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAuctionLogRecent(int $count) {
|
function getAuctionLogRecent(int $count) {
|
||||||
return join('<br>', array_reverse(getFormattedFileLogRecent("logs/_auctionlog.txt", $count, 300)));
|
return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $count, 300)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushGenLog($general, $log) {
|
function pushGenLog($general, $log) {
|
||||||
$no = Util::toInt($general['no']);
|
$no = Util::toInt($general['no']);
|
||||||
pushRawFileLog("logs/gen{$no}.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGenLogRecent(int $no, int $count) {
|
function getGenLogRecent(int $no, int $count) {
|
||||||
return join('<br>', array_reverse(getFormattedFileLogRecent("logs/gen{$no}.txt", $count, 300)));
|
return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $count, 300)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushBatRes($general, $log) {
|
function pushBatRes($general, $log) {
|
||||||
$no = Util::toInt($general['no']);
|
$no = Util::toInt($general['no']);
|
||||||
pushRawFileLog("logs/batres{$no}.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBatResRecent(int $no, int $count) {
|
function getBatResRecent(int $no, int $count) {
|
||||||
return join('<br>', array_reverse(getFormattedFileLogRecent("logs/batres{$no}.txt", $count, 300)));
|
return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $count, 300)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushBatLog($general, $log) {
|
function pushBatLog($general, $log) {
|
||||||
$no = Util::toInt($general['no']);
|
$no = Util::toInt($general['no']);
|
||||||
pushRawFileLog("logs/batlog{$no}.txt", $log);
|
pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBatLogRecent(int $no, int $count) {
|
function getBatLogRecent(int $no, int $count) {
|
||||||
return join('<br>', array_reverse(getFormattedFileLogRecent("logs/batlog{$no}.txt", $count, 300)));
|
return join('<br>', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300)));
|
||||||
|
}
|
||||||
|
|
||||||
|
function pushOldNationStop(int $no, int $nationNo){
|
||||||
|
$logPrefixList = ['batres', 'gen', 'batlog'];
|
||||||
|
|
||||||
|
$result = [];
|
||||||
|
foreach($logPrefixList as $logPrefix){
|
||||||
|
$path = __dir__."/logs/".UniqueConst::$serverID."/{$logPrefix}{$no}.txt";
|
||||||
|
if(file_exists($path)){
|
||||||
|
$fileLen = @filesize($path);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$fileLen = 0;
|
||||||
|
}
|
||||||
|
$result[$logPrefix] = $fileLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
$baseStopPath = __dir__."/logs/".UniqueConst::$serverID."/stop{$no}.txt";
|
||||||
|
if(file_exists($baseStopPath)){
|
||||||
|
$oldValues = Json::decode(file_get_contents($baseStopPath));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$oldValues = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$oldValues[$nationNo] = $result;
|
||||||
|
|
||||||
|
file_put_contents($baseStopPath, Json::encode($oldValues, Json::PRETTY));
|
||||||
}
|
}
|
||||||
|
|
||||||
//DB-based
|
//DB-based
|
||||||
function pushNationHistory($nation, $history) {
|
function pushNationHistory($nation, ?string $history) {
|
||||||
|
if(!$history){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!$nation || !$nation['nation']){
|
if(!$nation || !$nation['nation']){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -136,7 +167,10 @@ function pushNationHistory($nation, $history) {
|
|||||||
$history.'<br>', $nation['nation']);
|
$history.'<br>', $nation['nation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushGeneralHistory($me, $history) {
|
function pushGeneralHistory($me, ?string $history) {
|
||||||
|
if(!$history){
|
||||||
|
return;
|
||||||
|
}
|
||||||
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
|
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
|
||||||
$history.'<br>', $me['no']);
|
$history.'<br>', $me['no']);
|
||||||
}
|
}
|
||||||
@@ -146,15 +180,14 @@ function getGeneralHistoryAll(int $no) {
|
|||||||
return ConvertLog($history);
|
return ConvertLog($history);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushWorldHistory(array $history, $year=null, $month=null) {
|
function pushWorldHistory(?array $history, $year=null, $month=null) {
|
||||||
if(!$history){
|
if(!$history){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
if($year === null || $month === null){
|
if($year === null || $month === null){
|
||||||
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
$year = $game['year'];
|
|
||||||
$month = $game['month'];
|
|
||||||
}
|
}
|
||||||
$request = array_map(function($text) use ($year, $month) {
|
$request = array_map(function($text) use ($year, $month) {
|
||||||
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
||||||
@@ -194,15 +227,14 @@ function getWorldHistoryWithDate($year, $month) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function pushGeneralPublicRecord(array $history, $year=null, $month=null) {
|
function pushGeneralPublicRecord(?array $history, $year=null, $month=null) {
|
||||||
if(!$history){
|
if(!$history){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
if($year === null || $month === null){
|
if($year === null || $month === null){
|
||||||
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
$year = $game['year'];
|
|
||||||
$month = $game['month'];
|
|
||||||
}
|
}
|
||||||
$request = array_map(function($text) use ($year, $month) {
|
$request = array_map(function($text) use ($year, $month) {
|
||||||
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
|
||||||
@@ -249,7 +281,8 @@ function LogHistory($isFirst=0) {
|
|||||||
if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Start');
|
if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Start');
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$obj = $db->queryFirstRow('SELECT year, month, startyear FROM game limit 1');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$obj = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||||
|
|
||||||
//TODO: 새롭게 추가할 지도 값 받아오는 함수를 이용하여 재구성
|
//TODO: 새롭게 추가할 지도 값 받아오는 함수를 이용하여 재구성
|
||||||
$map = getWorldMap([
|
$map = getWorldMap([
|
||||||
@@ -291,14 +324,15 @@ function LogHistory($isFirst=0) {
|
|||||||
$cityCount = $db->queryFirstField('select count(*) from city where nation = %i',$nation['nation']);
|
$cityCount = $db->queryFirstField('select count(*) from city where nation = %i',$nation['nation']);
|
||||||
|
|
||||||
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
|
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
|
||||||
$powerStr .= "국력 {$nation['power']}<br>";
|
$powerStr .= "{$nation['power']}<br>";
|
||||||
$genStr .= "장수 {$nation['gennum']}<br>";
|
$genStr .= "{$nation['gennum']}<br>";
|
||||||
$cityStr .= "속령 $cityCount<br>";
|
$cityStr .= "$cityCount<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', contents collected');
|
if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', contents collected');
|
||||||
|
|
||||||
$db->insert('history', [
|
$db->insert('history', [
|
||||||
|
'server_id' => UniqueConst::$serverID,
|
||||||
'year' => $year,
|
'year' => $year,
|
||||||
'month' => $month,
|
'month' => $month,
|
||||||
'map' => $map_json,
|
'map' => $map_json,
|
||||||
|
|||||||