Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ff9ca3c99 | ||
|
|
fe55df8b2f | ||
|
|
457f605898 | ||
|
|
0f2625133f | ||
|
|
fa34dbdf6f | ||
|
|
050913b0b4 | ||
|
|
a47e47d42c | ||
|
|
43d994b59a | ||
|
|
e8204d46ce | ||
|
|
fece659cfb | ||
|
|
695265b299 | ||
|
|
b652ed0b33 | ||
|
|
9a641552e4 | ||
|
|
3d18aeb5bc | ||
|
|
b545afce50 | ||
|
|
8fca98c0c9 | ||
|
|
0a98c71dfe | ||
|
|
ed75f39094 | ||
|
|
456245f23a | ||
|
|
b4529c9338 | ||
|
|
0ca7a8ab8a | ||
|
|
02f2209e8f | ||
|
|
fb72d02912 | ||
|
|
665fb25fc1 | ||
|
|
742c3c7156 | ||
|
|
637dbbba0d | ||
|
|
f2a3bc4626 | ||
|
|
e8ffa44544 | ||
|
|
bc09287666 | ||
|
|
392d9055fe | ||
|
|
0ee833d7ae | ||
|
|
3074bc00d7 | ||
|
|
cb6fb590c4 | ||
|
|
a7270b2cd2 | ||
|
|
0d925af065 | ||
|
|
7c7991e8ae | ||
|
|
54461b6ea4 | ||
|
|
6a17497fbd | ||
|
|
84f18aa4b6 | ||
|
|
73ab38563f | ||
|
|
1f2b40e4d4 | ||
|
|
1d920c5935 | ||
|
|
037a1e9c0c | ||
|
|
87e324d4d9 | ||
|
|
d1e9b489e3 | ||
|
|
34f1d538d1 | ||
|
|
fb8d2a2e01 | ||
|
|
837db5183e | ||
|
|
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 | ||
|
|
da7fcafb27 | ||
|
|
7f7d8b2099 | ||
|
|
b5fb2e9cf4 | ||
|
|
d9ffdf9df8 | ||
|
|
f919187b91 | ||
|
|
d5ead5b74f | ||
|
|
ec1be2c887 | ||
|
|
af0c470923 | ||
|
|
78ce7d20e3 | ||
|
|
932ce9bf51 | ||
|
|
3d602b49bf | ||
|
|
33b7d228f9 | ||
|
|
95a8fd5495 | ||
|
|
87bc416fc7 | ||
|
|
8c21eec168 | ||
|
|
7ef3f0d5c5 | ||
|
|
e90e508005 | ||
|
|
816daed570 | ||
|
|
3626266763 | ||
|
|
6c117a628c | ||
|
|
d3225dfb41 | ||
|
|
bd7e7540d8 | ||
|
|
48088748df | ||
|
|
7a5eecc3e1 | ||
|
|
51d7dede55 | ||
|
|
bcad77ec06 | ||
|
|
9b79d12521 | ||
|
|
4b33461c70 | ||
|
|
bc3a8fefd8 | ||
|
|
db97400b43 | ||
|
|
3ad4032239 | ||
|
|
1d0fb7151d | ||
|
|
0c9099c868 | ||
|
|
c87cbaa0a6 | ||
|
|
5a94bf434a | ||
|
|
d567f3218a | ||
|
|
5d97c4ebea | ||
|
|
c3be464774 | ||
|
|
0d1e10a2ce | ||
|
|
723a7bbfba | ||
|
|
6a100ed2c1 | ||
|
|
5a6cd7fb46 | ||
|
|
871c99a67a | ||
|
|
7bdde2ac8a | ||
|
|
3564282acb | ||
|
|
13e24dbcb4 | ||
|
|
0026e9cb15 | ||
|
|
156795d7e9 | ||
|
|
e41d73b5bd | ||
|
|
655cd1700c | ||
|
|
9fb455d38a | ||
|
|
879a1e1c61 | ||
|
|
e614092690 | ||
|
|
4ebe51d978 | ||
|
|
10a29e584f | ||
|
|
a88982940b | ||
|
|
b92a95cc07 | ||
|
|
bffca5e163 | ||
|
|
b56919a343 | ||
|
|
b797bab7e0 | ||
|
|
a03d2cee63 | ||
|
|
67fef4b73d | ||
|
|
253a953dfe | ||
|
|
be7154284e | ||
|
|
02f90842fe | ||
|
|
0b17a289c8 | ||
|
|
c2298efaf0 | ||
|
|
e858ad0c33 | ||
|
|
fb1acfa09c | ||
|
|
033466edcc | ||
|
|
3a472506cf | ||
|
|
cea015bd4d | ||
|
|
8aaf161fd0 | ||
|
|
1529ab6469 | ||
|
|
1a3b456f39 | ||
|
|
ac3672a87e | ||
|
|
a866cb63a4 | ||
|
|
943251c56f | ||
|
|
4d2b10b979 | ||
|
|
c87614ab2d | ||
|
|
67dee551b6 | ||
|
|
2ee20ce92c | ||
|
|
cd8ec0687f | ||
|
|
6881b531d7 | ||
|
|
2eae9b2062 | ||
|
|
b055baa7d3 | ||
|
|
fc0ad32335 | ||
|
|
42cd2fafdd | ||
|
|
6220d030dc | ||
|
|
8961dd60a2 | ||
|
|
2726bc13c4 | ||
|
|
967c14a972 | ||
|
|
74d86b7897 | ||
|
|
5a176568e9 | ||
|
|
279478c15b | ||
|
|
f5f7c81c20 | ||
|
|
3c2499580c | ||
|
|
45a104f9c0 | ||
|
|
a5b0c7f99f | ||
|
|
643a2822a0 | ||
|
|
be8e22309f | ||
|
|
8273c3f231 | ||
|
|
e9ceb0bdd6 | ||
|
|
c204f36aa7 | ||
|
|
869ee4b233 | ||
|
|
f0c6243964 | ||
|
|
b46a197a5c | ||
|
|
d39c04da76 | ||
|
|
22f1f3c227 | ||
|
|
2b3efd0924 | ||
|
|
3004b20c87 | ||
|
|
5c8194b36d | ||
|
|
e487846c56 | ||
|
|
0437d45997 | ||
|
|
8dd5154de3 | ||
|
|
bc519284fb | ||
|
|
19e06cc12e | ||
|
|
16e5601651 | ||
|
|
8f9077dff8 | ||
|
|
9831685bb9 | ||
|
|
1412834b60 | ||
|
|
b8636763c1 | ||
|
|
fe4823bb8d | ||
|
|
7ef9a2fdca | ||
|
|
9f627ca2f8 | ||
|
|
2404ab2047 | ||
|
|
50d1c4cd34 | ||
|
|
269a40ca9d | ||
|
|
2a814dbbf9 | ||
|
|
59243bc34d | ||
|
|
da89d81ef9 | ||
|
|
27d313c594 | ||
|
|
eeaae898ae | ||
|
|
9673ecfaa1 | ||
|
|
4e22cf3515 | ||
|
|
5b926ae5c5 | ||
|
|
b78fe22633 | ||
|
|
ba4ff29e4a | ||
|
|
f060716a3c | ||
|
|
9108ce3f19 | ||
|
|
e36a50889b | ||
|
|
ee2bcb5329 | ||
|
|
bc7efae08c | ||
|
|
fe53fb9359 | ||
|
|
463994df42 | ||
|
|
48a560cb4c | ||
|
|
493b3c7d97 | ||
|
|
7875e6885f | ||
|
|
f36df49ed8 | ||
|
|
1c1fb247b1 | ||
|
|
cff76c9db9 | ||
|
|
3d06a13e72 | ||
|
|
85e6faf92c | ||
|
|
f5494a69a2 | ||
|
|
7afa36a2b8 | ||
|
|
0cc7ba368a | ||
|
|
183efd073b | ||
|
|
d6e2a84a36 | ||
|
|
3e069d14f2 | ||
|
|
6140da5783 | ||
|
|
28aa4c004b | ||
|
|
61857ce56d | ||
|
|
15d1c2829a | ||
|
|
a5bb9ba062 | ||
|
|
cfb2a2dbd5 | ||
|
|
0639fc3b83 | ||
|
|
d0e7358f68 | ||
|
|
ffc0fc0c6f | ||
|
|
2bce82c73e | ||
|
|
37339b91b0 | ||
|
|
95c8d7ec0f | ||
|
|
a1a34c30b3 | ||
|
|
5189a50b9d | ||
|
|
2d477d630c | ||
|
|
ceccb43f82 | ||
|
|
18101d9e90 | ||
|
|
56e6692817 | ||
|
|
11a9985543 | ||
|
|
35e8fa952a | ||
|
|
0e82005a26 | ||
|
|
1024f1c4dd | ||
|
|
7a6472d49d | ||
|
|
a0a2e2097c | ||
|
|
76543892bc | ||
|
|
9c445e02b9 | ||
|
|
aebae6f485 | ||
|
|
0c0ef213f9 | ||
|
|
51316abd42 | ||
|
|
b3e621fbfd | ||
|
|
fae86dbff8 | ||
|
|
65171b4413 | ||
|
|
90a81c91c4 | ||
|
|
3161ace557 | ||
|
|
d8b87f1e70 | ||
|
|
b507d3c844 | ||
|
|
36dd7fef19 | ||
|
|
0405bf9fab | ||
|
|
fcbd801dc7 | ||
|
|
e1c97b1ca0 | ||
|
|
6a62f5af0d | ||
|
|
0c64087c0f | ||
|
|
e0cbf34d43 | ||
|
|
cb56620728 | ||
|
|
63f14f0009 | ||
|
|
789714ee44 | ||
|
|
c2d7e44400 | ||
|
|
3c49925999 | ||
|
|
3e3f156359 | ||
|
|
427532f0a5 | ||
|
|
6e876d3b9c | ||
|
|
86ecf37da6 | ||
|
|
c0e2ed7013 | ||
|
|
0cac139f65 | ||
|
|
a70bf667a4 | ||
|
|
e1f646daa5 | ||
|
|
117643f592 | ||
|
|
4fab99b946 | ||
|
|
97c6904918 | ||
|
|
4f113f210e | ||
|
|
77ff1d9e9a | ||
|
|
6ee8066c80 | ||
|
|
1f5f7e3591 | ||
|
|
5860a14dae | ||
|
|
74390602d8 | ||
|
|
d062fac671 | ||
|
|
6edabd5bcb | ||
|
|
762e7f72c3 | ||
|
|
3eb0f22439 | ||
|
|
dbc877023b |
@@ -15,6 +15,7 @@ d_log/*.txt
|
||||
d_log/*.zip
|
||||
sess_*
|
||||
*/logs/*.txt
|
||||
*/logs/*/*.txt
|
||||
err.txt
|
||||
che/.htaccess
|
||||
kwe/.htaccess
|
||||
@@ -22,16 +23,15 @@ pwe/.htaccess
|
||||
twe/.htaccess
|
||||
hwe/.htaccess
|
||||
|
||||
d_shared
|
||||
|
||||
d_pic/*.jpg
|
||||
d_pic/*.gif
|
||||
d_pic/*.png
|
||||
|
||||
d_setting/*.php
|
||||
!d_setting/*.orig.php
|
||||
!d_setting/_*.php
|
||||
*/d_setting/*.php
|
||||
!*/d_setting/*.orig.php
|
||||
!*/d_setting/_*.php
|
||||
*/d_setting/templates/*.php
|
||||
|
||||
**/old/*
|
||||
test.php
|
||||
@@ -39,4 +39,9 @@ test.php
|
||||
/che
|
||||
/kwe
|
||||
/pwe
|
||||
/nya
|
||||
/pya
|
||||
/twe
|
||||
|
||||
phpinfo.php
|
||||
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This configuration will be read and overlaid on top of the
|
||||
* default configuration. Command line arguments will be applied
|
||||
* after this file is read.
|
||||
*/
|
||||
return [
|
||||
|
||||
// Supported values: '7.0', '7.1', '7.2', null.
|
||||
// If this is set to null,
|
||||
// then Phan assumes the PHP version which is closest to the minor version
|
||||
// of the php executable used to execute phan.
|
||||
"target_php_version" => '7.0',
|
||||
'backward_compatibility_checks ' => false,
|
||||
'ignore_undeclared_variables_in_global_scope' => false,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_LOW,
|
||||
|
||||
'file_list' => [
|
||||
'f_config/config.php',
|
||||
'hwe/MYDB.php',
|
||||
'hwe/lib.php',
|
||||
'hwe/func_auction.php',
|
||||
'hwe/func_command.php',
|
||||
'hwe/func_converter.php',
|
||||
'hwe/func_diplomacy.php',
|
||||
'hwe/func_gamerule.php',
|
||||
'hwe/func_history.php',
|
||||
'hwe/func_legacy.php',
|
||||
'hwe/func_map.php',
|
||||
'hwe/func_message.php',
|
||||
'hwe/func_npc.php',
|
||||
'hwe/func_process_chief.php',
|
||||
'hwe/func_process_personnel.php',
|
||||
'hwe/func_process_sabotage.php',
|
||||
'hwe/func_process.php',
|
||||
'hwe/func_string.php',
|
||||
'hwe/func_template.php',
|
||||
'hwe/func_time_event.php',
|
||||
'hwe/func_tournament.php',
|
||||
'hwe/process_war.php',
|
||||
'hwe/func.php'
|
||||
],
|
||||
|
||||
// A list of directories that should be parsed for class and
|
||||
// method information. After excluding the directories
|
||||
// defined in exclude_analysis_directory_list, the remaining
|
||||
// files will be statically analyzed for errors.
|
||||
//
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
'hwe/d_setting',
|
||||
'hwe/sammo',
|
||||
'd_setting',
|
||||
'src/sammo',
|
||||
'src/kakao',
|
||||
'vendor'
|
||||
],
|
||||
'exclude_file_regex' => '/.*\.orig\.php$/',
|
||||
|
||||
// A directory list that defines files that will be excluded
|
||||
// from static analysis, but whose class and method
|
||||
// information should be included.
|
||||
//
|
||||
// Generally, you'll want to include the directories for
|
||||
// third-party code (such as "vendor/") in this list.
|
||||
//
|
||||
// n.b.: If you'd like to parse but not analyze 3rd
|
||||
// party code, directories containing that code
|
||||
// should be added to the `directory_list` as
|
||||
// to `exclude_analysis_directory_list`.
|
||||
"exclude_analysis_directory_list" => [
|
||||
'vendor/'
|
||||
],
|
||||
|
||||
// A list of plugin files to execute.
|
||||
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
|
||||
// (Pass these in as relative paths.
|
||||
// The 0.10.2 release will allow passing 'AlwaysReturnPlugin' if referring to a plugin that is bundled with Phan)
|
||||
'plugins' => [
|
||||
// checks if a function, closure or method unconditionally returns.
|
||||
// Checks for syntactically unreachable statements in
|
||||
// the global scope or function bodies.
|
||||
'UnreachableCodePlugin',
|
||||
'DollarDollarPlugin',
|
||||
'DuplicateArrayKeyPlugin',
|
||||
'PregRegexCheckerPlugin',
|
||||
'PrintfCheckerPlugin',
|
||||
],
|
||||
];
|
||||
@@ -5,12 +5,24 @@
|
||||
"**/.hg": true,
|
||||
"**/CVS": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/logs/*.txt": true,
|
||||
"**/logs/**/*.txt": true,
|
||||
"**/session/sess*":true,
|
||||
"/che":true,
|
||||
"/kwe":true,
|
||||
"/pwe":true,
|
||||
"/nya":true,
|
||||
"/pya":true,
|
||||
"/twe":true,
|
||||
|
||||
},
|
||||
"search.exclude": {
|
||||
"e_lib/*":true,
|
||||
"vendor/*":true
|
||||
"vendor/*":true,
|
||||
"/che":true,
|
||||
"/kwe":true,
|
||||
"/pwe":true,
|
||||
"/nya":true,
|
||||
"/pya":true,
|
||||
"/twe":true,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Hide_D, 62che
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,60 @@
|
||||
# 삼국지 모의전투 HiDCHe
|
||||
|
||||
삼국지 모의전투 유기체서버를 기반으로 더욱 더 진화한 서버입니다.
|
||||
|
||||
|
||||
## 요구사항
|
||||
|
||||
* Apache2
|
||||
* <code>mpm_event</code> 권장
|
||||
* PHP 7.2 이상
|
||||
* <code>php-fpm</code> 권장
|
||||
* php에서 curl을 실행가능해야 합니다.
|
||||
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
|
||||
* <code>git</code>
|
||||
* <code>curl</code>
|
||||
|
||||
Linux는 Ubuntu 16.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
|
||||
|
||||
Docker를 이용한 설치는 계획중입니다.
|
||||
|
||||
## 설치
|
||||
|
||||
본 게임은 <code>git</code>을 이용한 업그레이드 시스템을 구현하였으므로, <code>git</code>이 필요합니다.
|
||||
또한 웹 서비스 데몬을 운영중인 사용자(일반적으로 <code>www-data</code>, <code>apache</code>)에게 디렉토리 권한이 주어져야합니다.
|
||||
|
||||
### 다운로드
|
||||
|
||||
웹 데몬 user가 <code>www-data</code>인 경우 다음과 같이 입력하여 최신 배포버전과 이미지 파일을 얻을 수 있습니다.
|
||||
|
||||
```
|
||||
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 hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
|
||||
|
||||
### 설치
|
||||
|
||||
이후 해당 경로를 웹 브라우저를 통해 접근하여 설치를 진행할 수 있습니다.
|
||||
|
||||
Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의 Database가 필요합니다. 내부 설정을 고쳐서 서버 수를 늘리거나 줄일 경우 그에 맞는 Database 수가 필요합니다. 또한 Database마다 관리할 별도의 계정을 만드는 것을 추천합니다.
|
||||
|
||||
설치 이후에는 서버관리 페이지에서 **업데이트** 명령을 통해 원 클릭 업데이트가 가능합니다.
|
||||
|
||||
|
||||
## 카카오로그인 연동
|
||||
|
||||
현재 카카오로그인 API KEY를 입력하는 작업이 설치과정에 추가되어있지 않습니다.
|
||||
|
||||
<code>f_install/templates/KakaoKey.orig.php</code> 를 <code>d_setting/KakaoKey.php</code>로 복사한 후 API 키를 입력하여야 합니다.
|
||||
|
||||
|
||||
## 라이선스
|
||||
|
||||
본 게임을 수정하거나 재배포할 경우 다음 중 하나의 라이선스를 선택하여 적용할 수 있습니다.
|
||||
|
||||
* MIT License
|
||||
* GPL 2.0 또는 이후
|
||||
|
||||
만약 별도의 라이선스를 적용하고자 할 경우 Hide_D에게 문의하여 주십시오.
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '.');
|
||||
}
|
||||
require_once(ROOT.'/f_config/config.php');
|
||||
|
||||
CustomHeader();
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name":"sammo-hid/sammo",
|
||||
"description":"삼국지 모의전투 HiD",
|
||||
"description":"삼국지 모의전투 HiDCHe",
|
||||
"license": [
|
||||
"MIT",
|
||||
"GPL-2.0-or-later",
|
||||
@@ -14,19 +14,31 @@
|
||||
"leafo/scssphp": "^0.7.5",
|
||||
"monolog/monolog": "^1.23",
|
||||
"firephp/firephp-core": "^0.4.0",
|
||||
"vlucas/valitron": "^1.4"
|
||||
"vlucas/valitron": "^1.4",
|
||||
"php-extended/php-tail": "^2.1",
|
||||
"pguardiario/phpuri": "^1.0",
|
||||
"symfony/lock": "^4.1",
|
||||
"ezyang/htmlpurifier": "^4.10",
|
||||
"xemlock/htmlpurifier-html5": "^0.1.7"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"sammo\\": [
|
||||
"d_setting",
|
||||
"src/sammo"
|
||||
],
|
||||
"kakao\\": [
|
||||
"d_setting",
|
||||
"src/kakao"
|
||||
]
|
||||
}
|
||||
},
|
||||
"classmap": [
|
||||
"d_setting/"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"**/*.orig.php"
|
||||
],
|
||||
"files":[
|
||||
"f_config/config.php"
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4659ec09c50a2ccd1b53194b3f53890a",
|
||||
"content-hash": "43da7d5e9d8441faa4311f32b16ee1c0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brandonwamboldt/utilphp",
|
||||
@@ -52,6 +52,53 @@
|
||||
],
|
||||
"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",
|
||||
"version": "v0.4.0",
|
||||
@@ -90,16 +137,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.1",
|
||||
"version": "6.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111"
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/49e42e6539f775e80c74086a710a882e1d5a8111",
|
||||
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -109,7 +156,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"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"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -151,7 +198,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-03-26T12:06:26+00:00"
|
||||
"time": "2018-04-22T15:46:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -271,16 +318,16 @@
|
||||
},
|
||||
{
|
||||
"name": "leafo/scssphp",
|
||||
"version": "v0.7.5",
|
||||
"version": "v0.7.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/leafo/scssphp.git",
|
||||
"reference": "8b538d828bbb75276974605c4a1a435e939da74e"
|
||||
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/8b538d828bbb75276974605c4a1a435e939da74e",
|
||||
"reference": "8b538d828bbb75276974605c4a1a435e939da74e",
|
||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -319,7 +366,7 @@
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2018-02-09T02:04:21+00:00"
|
||||
"time": "2018-05-24T02:18:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
@@ -454,6 +501,114 @@
|
||||
],
|
||||
"time": "2017-06-19T01:22:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pguardiario/phpuri",
|
||||
"version": "1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/monkeysuffrage/phpuri.git",
|
||||
"reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/monkeysuffrage/phpuri/zipball/ad0a5ec033fe616cfef55578b9c7f2458be8fbfc",
|
||||
"reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "project",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"phpuri.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"description": "A php library for converting relative urls to absolute.",
|
||||
"time": "2015-05-24T09:13:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-extended/php-system",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/php-extended/php-system.git",
|
||||
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-system/repository/archive.zip?sha=9e6b3c2009ef56dc123efc43900e40cdf217ace0",
|
||||
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpExtended\\System\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anastaszor",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A generic way to find informations about the running system",
|
||||
"homepage": "https://gitlab.com/php-extended/php-system",
|
||||
"keywords": [
|
||||
"operating system",
|
||||
"os",
|
||||
"php",
|
||||
"system"
|
||||
],
|
||||
"time": "2018-06-07T06:03:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-extended/php-tail",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/php-extended/php-tail.git",
|
||||
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-tail/repository/archive.zip?sha=19fbd3a79ccc071954f28296b2c44754335304a0",
|
||||
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php-extended/php-system": "^1.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpExtended\\Tail\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anastaszor",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A smart way to tail files depending of the environment",
|
||||
"homepage": "https://gitlab.com/php-extended/php-tail",
|
||||
"keywords": [
|
||||
"cheat",
|
||||
"mighty",
|
||||
"naive",
|
||||
"php",
|
||||
"tail"
|
||||
],
|
||||
"time": "2018-06-07T06:04:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
@@ -595,34 +750,98 @@
|
||||
"time": "2014-06-16T22:40:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.2",
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6"
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "a1df50492e927ad00ca271f29adb2949a14f2a5a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/87775d76268beda2afa085bdd6e44b17e98907c6",
|
||||
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/a1df50492e927ad00ca271f29adb2949a14f2a5a",
|
||||
"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": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"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",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Valitron": "src/"
|
||||
"psr-4": {
|
||||
"Valitron\\": "src/Valitron"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD"
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
@@ -638,7 +857,47 @@
|
||||
"validation",
|
||||
"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": [],
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
@charset "utf-8";
|
||||
|
||||
* { margin: 0px; padding: 0px; }
|
||||
body { color:white; background-color:black; border-width:1; border-color:gray; }
|
||||
table {
|
||||
body {
|
||||
color:white; background-color:black; font-family: '맑은 고딕';
|
||||
}
|
||||
|
||||
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;
|
||||
padding: 0px;
|
||||
font-size: 13px;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
font-family: '맑은 고딕'; line-height: 110%;
|
||||
font-family: '맑은 고딕';
|
||||
}
|
||||
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;
|
||||
@@ -16,21 +18,15 @@ th, td {
|
||||
font-size: 13px;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
font-family: '맑은 고딕'; line-height: 110%;
|
||||
font-family: '맑은 고딕';
|
||||
}
|
||||
|
||||
a.just_link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div {
|
||||
margin:0px;
|
||||
padding: 0px;
|
||||
word-break: break-all;
|
||||
font-family: '맑은 고딕';
|
||||
}
|
||||
|
||||
.with_border{
|
||||
margin:0;
|
||||
border: solid 1px;
|
||||
border-spacing: 0px;
|
||||
border-collapse: separate;
|
||||
@@ -45,6 +41,8 @@ div {
|
||||
line-height:50px;
|
||||
font-size: 30px; font-weight: bold;
|
||||
text-align: center;
|
||||
color:white;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.legacy_layout div {
|
||||
@@ -53,20 +51,9 @@ div {
|
||||
font-size: 13px;
|
||||
word-break: break-all;
|
||||
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{
|
||||
display:block;
|
||||
width:100%;
|
||||
@@ -77,36 +64,103 @@ button.with_skin {
|
||||
background-color: black; color: white;
|
||||
font-family: '맑은 고딕';
|
||||
font-size: 13px;
|
||||
line-height: 110%;
|
||||
}
|
||||
|
||||
button.with_skin:disabled {
|
||||
background-color:#333333;
|
||||
}
|
||||
|
||||
input.with_skin {
|
||||
background-color: black; color: white;
|
||||
font-family: '맑은 고딕';
|
||||
font-size: 13px;
|
||||
line-height: 110%;
|
||||
}
|
||||
|
||||
select {
|
||||
width: 100px; height: 18px;
|
||||
background-color: black; color: white;
|
||||
font-family: '맑은 고딕';
|
||||
font-size: 13px;
|
||||
line-height: 110%;
|
||||
input.with_skin:disabled {
|
||||
background-color: #333333;
|
||||
}
|
||||
button {
|
||||
width: 100px; height: 20px;
|
||||
background-color: black; color: white;
|
||||
font-family: '맑은 고딕';
|
||||
font-size: 13px;
|
||||
}
|
||||
.bg0 { background-image:url('/images/back_walnut.jpg'); }
|
||||
.bg1 { background-image:url('/images/back_green.jpg'); }
|
||||
.bg2 { background-image:url('/images/back_blue.jpg'); }
|
||||
|
||||
.font0 { font-size: 10px; }
|
||||
.font1 { font-size: 13px; }
|
||||
.font2 { font-size: 15px; }
|
||||
.font3 { font-size: 20px; }
|
||||
.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";
|
||||
|
||||
body{
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
#server_notice {
|
||||
margin:10px 0;
|
||||
border: none;
|
||||
@@ -55,77 +59,6 @@
|
||||
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 {
|
||||
width: 800px; height: 64px;
|
||||
border: none;
|
||||
@@ -195,27 +128,14 @@
|
||||
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 {
|
||||
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{
|
||||
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 {
|
||||
@@ -72,4 +85,32 @@ input::-webkit-input-placeholder {
|
||||
|
||||
display: flex;
|
||||
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;
|
||||
margin:6px;
|
||||
height:40px;
|
||||
line-height:40px;
|
||||
}
|
||||
|
||||
#btn_delete_me{
|
||||
@@ -37,15 +38,15 @@
|
||||
|
||||
#image_upload_filename{
|
||||
position:absolute;
|
||||
height:16px;
|
||||
height:20px;
|
||||
left:10px;
|
||||
width:130px;
|
||||
top:16px;
|
||||
top:12px;
|
||||
}
|
||||
|
||||
#image_upload_fake_btn{
|
||||
top:16px;
|
||||
height:20px;
|
||||
top:12px;
|
||||
height:22px;
|
||||
right:10px;
|
||||
position:absolute;
|
||||
}
|
||||
@@ -53,8 +54,7 @@
|
||||
#image_upload{
|
||||
opacity: 0;
|
||||
position:absolute;
|
||||
top:16px;
|
||||
height:22px;
|
||||
top:12px;
|
||||
left:0;
|
||||
height:20px;
|
||||
width:100%;
|
||||
@@ -70,7 +70,6 @@
|
||||
bottom:0;
|
||||
left:0;
|
||||
width:50%;
|
||||
height:20px;
|
||||
}
|
||||
|
||||
#btn_remove_icon{
|
||||
@@ -78,171 +77,10 @@
|
||||
bottom:0;
|
||||
right:0;
|
||||
width:50%;
|
||||
height:20px;
|
||||
}
|
||||
|
||||
#EntranceManage_00 {
|
||||
width: 500px; height: 409px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
#third_use_disallow{
|
||||
display:none;
|
||||
margin-left:10px;
|
||||
width:40px;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '..');
|
||||
}
|
||||
require_once(ROOT.'/f_config/config.php');
|
||||
|
||||
CustomHeader();
|
||||
|
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 |
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
jQuery Redirect v1.1.1
|
||||
|
||||
Copyright (c) 2013-2017 Miguel Galante
|
||||
Copyright (c) 2011-2013 Nemanja Avramovic, www.avramovic.info
|
||||
|
||||
Licensed under CC BY-SA 4.0 License: http://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
This means everyone is allowed to:
|
||||
|
||||
Share - copy and redistribute the material in any medium or format
|
||||
Adapt - remix, transform, and build upon the material for any purpose, even commercially.
|
||||
Under following conditions:
|
||||
|
||||
Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
||||
ShareAlike - If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
|
||||
|
||||
*/
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* jQuery Redirect
|
||||
* @param {string} url - Url of the redirection
|
||||
* @param {Object} values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url.
|
||||
* @param {string} method - (optional) The HTTP verb can be GET or POST (defaults to POST)
|
||||
* @param {string} target - (optional) The target of the form. "_blank" will open the url in a new window.
|
||||
* @param {boolean} traditional - (optional) This provides the same function as jquery's ajax function. The brackets are omitted on the field name if its an array. This allows arrays to work with MVC.net among others.
|
||||
* @param {boolean} redirectTop - (optional) If its called from a iframe, force to navigate the top window.
|
||||
*/
|
||||
$.redirect = function (url, values, method, target, traditional, redirectTop) {
|
||||
redirectTop = redirectTop || false;
|
||||
var generatedForm = $.redirect.getForm(url, values, method, target, traditional);
|
||||
$('body', redirectTop ? window.top.document : undefined).append(generatedForm.form);
|
||||
generatedForm.submit();
|
||||
};
|
||||
|
||||
|
||||
$.redirect.getForm = function (url, values, method, target, traditional) {
|
||||
method = (method && ["GET", "POST", "PUT", "DELETE"].indexOf(method.toUpperCase()) !== -1) ? method.toUpperCase() : 'POST';
|
||||
|
||||
url = url.split("#");
|
||||
var hash = url[1] ? ("#" + url[1]) : "";
|
||||
url = url[0];
|
||||
|
||||
if (!values) {
|
||||
var obj = $.parseUrl(url);
|
||||
url = obj.url;
|
||||
values = obj.params;
|
||||
}
|
||||
|
||||
values = removeNulls(values);
|
||||
|
||||
var form = $('<form>')
|
||||
.attr("method", method)
|
||||
.attr("action", url + hash);
|
||||
|
||||
|
||||
if (target) {
|
||||
form.attr("target", target);
|
||||
}
|
||||
|
||||
var submit = form[0].submit;
|
||||
iterateValues(values, [], form, null, traditional);
|
||||
|
||||
return { form: form, submit: function () { submit.call(form[0]); } };
|
||||
}
|
||||
//Utility Functions
|
||||
/**
|
||||
* Url and QueryString Parser.
|
||||
* @param {string} url - a Url to parse.
|
||||
* @returns {object} an object with the parsed url with the following structure {url: URL, params:{ KEY: VALUE }}
|
||||
*/
|
||||
$.parseUrl = function (url) {
|
||||
|
||||
if (url.indexOf('?') === -1) {
|
||||
return {
|
||||
url: url,
|
||||
params: {}
|
||||
};
|
||||
}
|
||||
var parts = url.split('?'),
|
||||
query_string = parts[1],
|
||||
elems = query_string.split('&');
|
||||
url = parts[0];
|
||||
|
||||
var i, pair, obj = {};
|
||||
for (i = 0; i < elems.length; i += 1) {
|
||||
pair = elems[i].split('=');
|
||||
obj[pair[0]] = pair[1];
|
||||
}
|
||||
|
||||
return {
|
||||
url: url,
|
||||
params: obj
|
||||
};
|
||||
};
|
||||
|
||||
//Private Functions
|
||||
var getInput = function (name, value, parent, array, traditional) {
|
||||
var parentString;
|
||||
if (parent.length > 0) {
|
||||
parentString = parent[0];
|
||||
var i;
|
||||
for (i = 1; i < parent.length; i += 1) {
|
||||
parentString += "[" + parent[i] + "]";
|
||||
}
|
||||
|
||||
if (array) {
|
||||
if (traditional)
|
||||
name = parentString;
|
||||
else
|
||||
name = parentString + "[" + name + "]";
|
||||
} else {
|
||||
name = parentString + "[" + name + "]";
|
||||
}
|
||||
}
|
||||
|
||||
return $("<input>").attr("type", "hidden")
|
||||
.attr("name", name)
|
||||
.attr("value", value);
|
||||
};
|
||||
|
||||
var iterateValues = function (values, parent, form, isArray, traditional) {
|
||||
var i, iterateParent = [];
|
||||
Object.keys(values).forEach(function (i) {
|
||||
if (typeof values[i] === "object") {
|
||||
iterateParent = parent.slice();
|
||||
iterateParent.push(i);
|
||||
iterateValues(values[i], iterateParent, form, Array.isArray(values[i]), traditional);
|
||||
} else {
|
||||
form.append(getInput(i, values[i], parent, isArray, traditional));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var removeNulls = function (values) {
|
||||
var propNames = Object.getOwnPropertyNames(values);
|
||||
for (var i = 0; i < propNames.length; i++) {
|
||||
var propName = propNames[i];
|
||||
if (values[propName] === null || values[propName] === undefined) {
|
||||
delete values[propName];
|
||||
} else if (typeof values[propName] === 'object') {
|
||||
values[propName] = removeNulls(values[propName]);
|
||||
} else if (values[propName].length < 1) {
|
||||
delete values[propName];
|
||||
}
|
||||
}
|
||||
return values;
|
||||
};
|
||||
|
||||
}(window.jQuery || window.Zepto || window.jqlite));
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '..');
|
||||
}
|
||||
require_once(ROOT.'/f_config/config.php');
|
||||
|
||||
CustomHeader();
|
||||
|
||||
@@ -1,14 +1,89 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
ob_start();
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
require_once(__dir__.'/func.php');
|
||||
define('ROOT', realpath(__dir__.'/..'));
|
||||
setlocale(LC_ALL, 'ko_KR.UTF-8');
|
||||
date_default_timezone_set('Asia/Seoul');
|
||||
mb_internal_encoding("UTF-8");
|
||||
mb_http_output('UTF-8');
|
||||
mb_regex_encoding('UTF-8');
|
||||
|
||||
ini_set("session.cache_expire", 10080); // minutes
|
||||
ini_set("session.gc_maxlifetime", 604800); // seconds
|
||||
|
||||
function getFriendlyErrorType($type)
|
||||
{
|
||||
switch($type)
|
||||
{
|
||||
case E_ERROR: // 1 //
|
||||
return 'E_ERROR';
|
||||
case E_WARNING: // 2 //
|
||||
return 'E_WARNING';
|
||||
case E_PARSE: // 4 //
|
||||
return 'E_PARSE';
|
||||
case E_NOTICE: // 8 //
|
||||
return 'E_NOTICE';
|
||||
case E_CORE_ERROR: // 16 //
|
||||
return 'E_CORE_ERROR';
|
||||
case E_CORE_WARNING: // 32 //
|
||||
return 'E_CORE_WARNING';
|
||||
case E_COMPILE_ERROR: // 64 //
|
||||
return 'E_COMPILE_ERROR';
|
||||
case E_COMPILE_WARNING: // 128 //
|
||||
return 'E_COMPILE_WARNING';
|
||||
case E_USER_ERROR: // 256 //
|
||||
return 'E_USER_ERROR';
|
||||
case E_USER_WARNING: // 512 //
|
||||
return 'E_USER_WARNING';
|
||||
case E_USER_NOTICE: // 1024 //
|
||||
return 'E_USER_NOTICE';
|
||||
case E_STRICT: // 2048 //
|
||||
return 'E_STRICT';
|
||||
case E_RECOVERABLE_ERROR: // 4096 //
|
||||
return 'E_RECOVERABLE_ERROR';
|
||||
case E_DEPRECATED: // 8192 //
|
||||
return 'E_DEPRECATED';
|
||||
case E_USER_DEPRECATED: // 16384 //
|
||||
return 'E_USER_DEPRECATED';
|
||||
}
|
||||
return "{$type}";
|
||||
}
|
||||
|
||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
|
||||
if (!(error_reporting() & $errno)) {
|
||||
// This error code is not included in error_reporting, so let it fall
|
||||
// through to the standard PHP error handler
|
||||
return false;
|
||||
}
|
||||
|
||||
$date = date("Ymd_His");
|
||||
$e = new \Exception();
|
||||
|
||||
$data = Json::encode([
|
||||
'date'=>$date,
|
||||
'err'=>getFriendlyErrorType($errno),
|
||||
'errstr'=>$errstr,
|
||||
'trace'=>explode("\n", $e->getTraceAsString())
|
||||
], Json::PRETTY);
|
||||
|
||||
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
|
||||
}
|
||||
set_error_handler("\sammo\logErrorByCustomHandler");
|
||||
|
||||
|
||||
function logExceptionByCustomHandler(\Throwable $e){
|
||||
|
||||
define('__LINE__',__FILE__." ".__FUNCTION__." ".__LINE__." : ");
|
||||
define('IMAGE', '../../image');
|
||||
define('IMAGES', '../../images');
|
||||
//define('IMAGE', 'http://115.68.28.99/image');
|
||||
//define('IMAGES', 'http://115.68.28.99/images');
|
||||
$date = date("Ymd_His");
|
||||
|
||||
$data = Json::encode([
|
||||
'date'=>$date,
|
||||
'err'=>get_class($e),
|
||||
'errstr'=>$e->getMessage(),
|
||||
'trace'=>explode("\n", $e->getTraceAsString())
|
||||
], Json::PRETTY);
|
||||
|
||||
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
|
||||
echo $e->getTraceAsString();
|
||||
throw $e;
|
||||
}
|
||||
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
function CustomHeader() {
|
||||
//xxx: CustomHeader를 제거하기 전까진 유지
|
||||
WebUtil::setHeaderNoCache();
|
||||
}
|
||||
|
||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
|
||||
if (!(error_reporting() & $errno)) {
|
||||
// This error code is not included in error_reporting, so let it fall
|
||||
// through to the standard PHP error handler
|
||||
return false;
|
||||
}
|
||||
|
||||
$date = date("Ymd_His");
|
||||
|
||||
file_put_contents(__DIR__.'/../d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n", FILE_APPEND);
|
||||
|
||||
/* Don't execute PHP internal error handler */
|
||||
//return true;
|
||||
}
|
||||
set_error_handler("\sammo\logErrorByCustomHandler");
|
||||
|
||||
function Error($msg) {
|
||||
file_put_contents(ROOT.'/d_log/err.txt', $msg."\n", FILE_APPEND);
|
||||
exit(1);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '..');
|
||||
}
|
||||
require_once(ROOT.'/f_config/config.php');
|
||||
|
||||
CustomHeader();
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require('_common.php');
|
||||
|
||||
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>설치</title>
|
||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="../e_lib/bootstrap.bundle.min.js"></script>
|
||||
<script src="../e_lib/jquery.validate.min.js"></script>
|
||||
<script src="../e_lib/sha512.min.js"></script>
|
||||
<script src="../js/install.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../e_lib/bootstrap.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="../css/install.css">
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||
<?=WebUtil::printJS('../js/common.js')?>
|
||||
<?=WebUtil::printJS('../js/install.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../css/install.css')?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiD 설치</h1>
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-12 col-md-10 col-lg-7">
|
||||
@@ -33,52 +33,76 @@ require('_common.php');
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-3 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host"
|
||||
placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-3 col-form-label">DB포트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port"
|
||||
placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-3 col-form-label">DB계정명</label>
|
||||
<div class="col-sm-9">
|
||||
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-3 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호"/>
|
||||
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw"
|
||||
placeholder="DB비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-3 col-form-label">DB명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo)"/>
|
||||
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name"
|
||||
placeholder="DB명(예:sammo)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="serv_host" class="col-sm-3 col-form-label">접속 경로</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="serv_host" id="serv_host" placeholder="접속경로(예:http://www.example.com)"/>
|
||||
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="serv_host" id="serv_host"
|
||||
placeholder="접속경로(예:http://www.example.com)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
|
||||
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/icons" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
|
||||
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
||||
value="../image/game" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
<button type="submit"
|
||||
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -94,7 +118,8 @@ require('_common.php');
|
||||
<div class="form-group row">
|
||||
<label for="username" class="col-sm-3 col-form-label">계정명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="username" id="username" placeholder="계정명"/>
|
||||
<input type="text" class="form-control" name="username" id="username"
|
||||
placeholder="계정명"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,21 +127,24 @@ require('_common.php');
|
||||
<div class="form-group row">
|
||||
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="비밀번호"/>
|
||||
<input type="password" class="form-control" name="password" id="password"
|
||||
placeholder="비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="비밀번호 확인"/>
|
||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
|
||||
placeholder="비밀번호 확인"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="nickname" id="nickname" placeholder="닉네임" value="운영자"/>
|
||||
<input type="text" class="form-control" name="nickname" id="nickname"
|
||||
placeholder="닉네임" value="운영자"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,7 +153,8 @@ require('_common.php');
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
||||
<button type="submit"
|
||||
class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
|
||||
require('_common.php');
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
|
||||
session_start();
|
||||
session_destroy();
|
||||
|
||||
$username = mb_strtolower(Util::array_get($_POST['username']), 'utf-8');
|
||||
$password = Util::array_get($_POST['password']);
|
||||
$nickname = Util::array_get($_POST['nickname']);
|
||||
$username = mb_strtolower(Util::getReq('username'), 'utf-8');
|
||||
$password = Util::getReq('password', 'string');
|
||||
$nickname = Util::getReq('nickname');
|
||||
|
||||
if(!$username || !$password || !$nickname){
|
||||
Json::die([
|
||||
@@ -18,7 +17,7 @@ if(!$username || !$password || !$nickname){
|
||||
]);
|
||||
}
|
||||
|
||||
if(strlen($password)!=128){
|
||||
if(strlen((string)$password)!=128){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'올바르지 않은 비밀번호 해시 포맷입니다.'
|
||||
@@ -65,12 +64,12 @@ $rootDB->insert('member_log', [
|
||||
'member_no'=>$userID,
|
||||
'date'=>$nowDate,
|
||||
'action_type'=>'reg',
|
||||
'action'=>json_encode([
|
||||
'action'=>Json::encode([
|
||||
'type'=>'none',
|
||||
'aux'=>'admin',
|
||||
'id'=>$username,
|
||||
'name'=>$nickname
|
||||
], JSON_UNESCAPED_UNICODE)
|
||||
])
|
||||
]);
|
||||
|
||||
Json::die([
|
||||
|
||||
@@ -1,20 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
|
||||
require('_common.php');
|
||||
|
||||
function dbConnFail($params){
|
||||
Json::die([
|
||||
'step'=>'conn_fail'
|
||||
]);
|
||||
}
|
||||
|
||||
function dbSQLFail($params){
|
||||
Json::die([
|
||||
'step'=>'sql_fail'
|
||||
]);
|
||||
}
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
|
||||
if(!class_exists('\\sammo\\RootDB')){
|
||||
Json::die([
|
||||
@@ -25,11 +12,20 @@ if(!class_exists('\\sammo\\RootDB')){
|
||||
$rootDB = RootDB::db();
|
||||
|
||||
$rootDB->throw_exception_on_nonsql_error = false;
|
||||
$rootDB->nonsql_error_handler = 'dbConnFail';
|
||||
$rootDB->error_handler = 'dbSQLFail';
|
||||
$rootDB->nonsql_error_handler = function($params){
|
||||
Json::die([
|
||||
'step'=>'conn_fail'
|
||||
]);
|
||||
};
|
||||
|
||||
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from MEMBER');
|
||||
if($memberCnt === 0){
|
||||
$rootDB->error_handler = function($params){
|
||||
Json::die([
|
||||
'step'=>'sql_fail'
|
||||
]);
|
||||
};
|
||||
|
||||
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
|
||||
if($memberCnt == 0){
|
||||
Json::die([
|
||||
'step'=>'admin',
|
||||
'globalSalt'=>RootDB::getGlobalSalt()
|
||||
|
||||
@@ -1,51 +1,39 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require('_common.php');
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
|
||||
function dbConnFail($params){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'DB 접속에 실패했습니다.'
|
||||
]);
|
||||
}
|
||||
$host = Util::getReq('db_host');
|
||||
$port = Util::getReq('db_port', 'int');
|
||||
$username = Util::getReq('db_id');
|
||||
$password = Util::getReq('db_pw');
|
||||
$dbName = Util::getReq('db_name');
|
||||
$servHost = Util::getReq('serv_host');
|
||||
$sharedIconPath = Util::getReq('shared_icon_path');
|
||||
$gameImagePath = Util::getReq('game_image_path');
|
||||
|
||||
function dbSQLFail($params){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
|
||||
]);
|
||||
}
|
||||
|
||||
$host = Util::array_get($_POST['db_host']);
|
||||
$port = Util::array_get($_POST['db_port']);
|
||||
$username = Util::array_get($_POST['db_id']);
|
||||
$password = Util::array_get($_POST['db_pw']);
|
||||
$dbName = Util::array_get($_POST['db_name']);
|
||||
$servHost = Util::array_get($_POST['serv_host']);
|
||||
|
||||
if(!$host || !$port || !$username || !$password || !$dbName || !$servHost){
|
||||
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'입력 값이 올바르지 않습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!filter_var($servHost, FILTER_VALIDATE_URL)){
|
||||
Json::die([
|
||||
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'접속 경로가 올바르지 않습니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
if(file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')){
|
||||
if (file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_setting/RootDB.php 가 디렉토리입니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(class_exists('\\sammo\\RootDB')){
|
||||
if (class_exists('\\sammo\\RootDB')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'이미 RootDB.php 파일이 있습니다'
|
||||
@@ -53,82 +41,131 @@ if(class_exists('\\sammo\\RootDB')){
|
||||
}
|
||||
|
||||
//파일 권한 검사
|
||||
if(file_exists(ROOT.'/d_pic') && !is_dir(ROOT.'/d_pic')){
|
||||
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_pic 이 디렉토리가 아닙니다'
|
||||
'reason'=>AppConf::$userIconPath.' 이 디렉토리가 아닙니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')){
|
||||
if (file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_log 가 디렉토리가 아닙니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/d_setting')){
|
||||
if (file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_setting 이 존재하지 않습니다'
|
||||
'reason'=>'d_shared 가 디렉토리가 아닙니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!is_writable(ROOT.'/d_pic')){
|
||||
if (file_exists(ROOT.'/d_setting') && !is_dir(ROOT.'/d_setting')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_pic 디렉토리의 쓰기 권한이 없습니다'
|
||||
'reason'=>'d_shared 가 디렉토리가 아닙니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!is_writable(ROOT.'/d_log')){
|
||||
if (!file_exists(ROOT.'/d_log')
|
||||
|| !file_exists(ROOT.'/d_shared')
|
||||
|| !file_exists(ROOT.'/d_setting')
|
||||
|| !file_exists(AppConf::getUserIconPathFS())
|
||||
) {
|
||||
if (!is_writable(ROOT)) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'하위 디렉토리 생성 권한이 없습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
//기본 파일 생성
|
||||
if (!file_exists(AppConf::getUserIconPathFS())) {
|
||||
mkdir(AppConf::getUserIconPathFS());
|
||||
}
|
||||
|
||||
if (!file_exists(ROOT.'/d_log')) {
|
||||
mkdir(ROOT.'/d_log');
|
||||
}
|
||||
|
||||
if (!file_exists(ROOT.'/d_setting')) {
|
||||
mkdir(ROOT.'/d_setting');
|
||||
}
|
||||
|
||||
if (!file_exists(ROOT.'/d_shared')) {
|
||||
mkdir(ROOT.'/d_shared');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!is_writable(AppConf::getUserIconPathFS())) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>AppConf::$userIconPath.' 디렉토리의 쓰기 권한이 없습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if (!is_writable(ROOT.'/d_log')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_log 디렉토리의 쓰기 권한이 없습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!is_writable(ROOT.'/d_setting')){
|
||||
if (!is_writable(ROOT.'/d_shared')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_shared 디렉토리의 쓰기 권한이 없습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if (!is_writable(ROOT.'/d_setting')) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
//기본 파일 생성
|
||||
if(!file_exists(ROOT.'/d_pic')){
|
||||
mkdir(ROOT.'/d_pic');
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/d_log')){
|
||||
mkdir(ROOT.'/d_log');
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/d_log/.htaccess')){
|
||||
if (!file_exists(ROOT.'/d_log/.htaccess')) {
|
||||
@file_put_contents(ROOT.'/d_log/.htaccess', 'Deny from all');
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/d_setting/.htaccess')){
|
||||
if (!file_exists(ROOT.'/d_setting/.htaccess')) {
|
||||
@file_put_contents(ROOT.'/d_setting/.htaccess', 'Deny from all');
|
||||
}
|
||||
|
||||
//DB 접근 권한 검사
|
||||
|
||||
$rootDB = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8mb4');
|
||||
$rootDB = new \MeekroDB($host, $username, $password, $dbName, $port, 'utf8mb4');
|
||||
$rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
|
||||
$rootDB->throw_exception_on_nonsql_error = false;
|
||||
$rootDB->nonsql_error_handler = 'dbConnFail';
|
||||
$rootDB->error_handler = 'dbSQLFail';
|
||||
$rootDB->nonsql_error_handler = function ($params) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'DB 접속에 실패했습니다.'
|
||||
]);
|
||||
};
|
||||
|
||||
$rootDB->error_handler = function ($params) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
|
||||
]);
|
||||
};
|
||||
|
||||
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
|
||||
|
||||
if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))){
|
||||
while(true){
|
||||
if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) {
|
||||
while (true) {
|
||||
if (!$mysqli_obj->more_results()) {
|
||||
break;
|
||||
}
|
||||
if(!$mysqli_obj->next_result()){
|
||||
if (!$mysqli_obj->next_result()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -143,20 +180,90 @@ $rootDB->insert('system', array(
|
||||
|
||||
$globalSalt = bin2hex(random_bytes(16));
|
||||
|
||||
'@phan-var-force string $servHost';
|
||||
'@phan-var-force string $sharedIconPath';
|
||||
'@phan-var-force string $gameImagePath';
|
||||
|
||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
ROOT.'/d_setting/RootDB.orig.php',
|
||||
ROOT.'/d_setting/RootDB.php',[
|
||||
__dir__.'/templates/ServConfig.orig.php',
|
||||
ROOT.'/d_setting/ServConfig.php',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
'sharedIconPath'=>$sharedIconPath,
|
||||
'gameImagePath'=>$gameImagePath
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result
|
||||
]);
|
||||
}
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/common_path.orig.js',
|
||||
ROOT.'/d_shared/common_path.js',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
'sharedIconPath'=>$sharedIconPath,
|
||||
'gameImagePath'=>$gameImagePath
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/menu.orig.js',
|
||||
ROOT.'/d_shared/menu.js',
|
||||
[],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/common.orig.css',
|
||||
ROOT.'/d_shared/common.css',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
'sharedIconPath'=>$sharedIconPath,
|
||||
'gameImagePath'=>$gameImagePath
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/RootDB.orig.php',
|
||||
ROOT.'/d_setting/RootDB.php',
|
||||
[
|
||||
'host'=>$host,
|
||||
'user'=>$username,
|
||||
'password'=>$password,
|
||||
'dbName'=>$dbName,
|
||||
'port'=>$port,
|
||||
'globalSalt'=>$globalSalt,
|
||||
'serverBasePath'=>$servHost
|
||||
]
|
||||
);
|
||||
|
||||
if($result !== true){
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result
|
||||
@@ -166,4 +273,4 @@ if($result !== true){
|
||||
Json::die([
|
||||
'result'=>true,
|
||||
'reason'=>'success'
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
DROP TABLE IF EXISTS `system`;
|
||||
DROP TABLE IF EXISTS `member`;
|
||||
DROP TABLE IF EXISTS `member_log`;
|
||||
DROP TABLE IF EXISTS `auth_kakao`;
|
||||
|
||||
-- 시스템 테이블
|
||||
-- TODO:장기적으로는 key-value(json) storage 형태로 바꾸는게 나을 듯.
|
||||
@@ -15,7 +14,7 @@ CREATE TABLE `system` (
|
||||
`MDF_DATE` DATETIME NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`NO`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=UTF8;
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 회원 테이블
|
||||
CREATE TABLE `member` (
|
||||
@@ -26,9 +25,11 @@ CREATE TABLE `member` (
|
||||
`EMAIL` VARCHAR(64) NULL DEFAULT NULL,
|
||||
`PW` CHAR(128) NOT NULL,
|
||||
`salt` CHAR(16) NOT NULL,
|
||||
`third_use` INT(1) NOT NULL DEFAULT '0',
|
||||
`NAME` VARCHAR(64) NOT NULL,
|
||||
`PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg',
|
||||
`IMGSVR` INT(1) NULL DEFAULT '0',
|
||||
`acl` text NOT NULL DEFAULT '{}' COMMENT 'json',
|
||||
`GRADE` INT(1) NULL DEFAULT '1',
|
||||
`REG_NUM` INT(3) NULL DEFAULT '0',
|
||||
`REG_DATE` DATETIME NOT NULL,
|
||||
@@ -41,7 +42,7 @@ CREATE TABLE `member` (
|
||||
UNIQUE INDEX `kauth_id` (`oauth_id`),
|
||||
INDEX `delete_after` (`delete_after`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=UTF8;
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 로그인 로그 테이블
|
||||
CREATE TABLE `member_log` (
|
||||
@@ -54,4 +55,18 @@ CREATE TABLE `member_log` (
|
||||
INDEX `action` (`member_no`, `action_type`, `date`),
|
||||
INDEX `member` (`member_no`, `date`)
|
||||
)
|
||||
ENGINE=MyISAM DEFAULT CHARSET=UTF8;
|
||||
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 @@
|
||||
Deny from all
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class RootDB{
|
||||
class RootDB
|
||||
{
|
||||
private static $uDB = null;
|
||||
|
||||
private static $host = '_tK_host_';
|
||||
@@ -13,21 +14,25 @@ class RootDB{
|
||||
|
||||
private static $globalSalt = '_tK_globalSalt_';
|
||||
|
||||
private static $serverWebPath = '_tK_serverBasePath';
|
||||
|
||||
private function __construct(){
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* DB 객체 생성
|
||||
*
|
||||
* @return \MeekroDB
|
||||
*
|
||||
* @return \MeekroDB
|
||||
* @suppress PhanTypeMismatchProperty
|
||||
*/
|
||||
public static function db(){
|
||||
if(self::$uDB === null){
|
||||
self::$uDB = new \MeekroDB(self::$host,self::$user,self::$password,self::$dbName,self::$port,self::$encoding);
|
||||
public static function db()
|
||||
{
|
||||
if (self::$uDB === null) {
|
||||
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
|
||||
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
|
||||
self::$uDB->error_handler= function(){};
|
||||
self::$uDB->throw_exception_on_error = true;
|
||||
self::$uDB->throw_exception_on_nonsql_error = true;
|
||||
}
|
||||
return self::$uDB;
|
||||
}
|
||||
@@ -35,20 +40,11 @@ class RootDB{
|
||||
/**
|
||||
* 비밀번호 해시용 전역 SALT 반환
|
||||
* 비밀번호는 sha512(usersalt|sha512(globalsalt|password|globalsalt)|usersalt); 순임
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getGlobalSalt(){
|
||||
public static function getGlobalSalt()
|
||||
{
|
||||
return self::$globalSalt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getServerBasepath(){
|
||||
//FIXME: 더 좋은 위치가 있을 것.
|
||||
return self::$globalSalt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class ServConfig
|
||||
{
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public static $serverWebPath = '_tK_serverBasePath_';
|
||||
public static $sharedIconPath = '_tK_sharedIconPath_';
|
||||
public static $gameImagePath = "_tK_gameImagePath_";
|
||||
|
||||
public static function getSharedIconPath(string $filepath='') : string
|
||||
{
|
||||
if($filepath){
|
||||
return static::$sharedIconPath."/{$filepath}";
|
||||
}
|
||||
return static::$sharedIconPath;
|
||||
}
|
||||
|
||||
public static function getUserIconPath(string $filepath='') : string
|
||||
{
|
||||
return AppConf::getUserIconPathWeb($filepath);
|
||||
}
|
||||
|
||||
public static function getGameImagePath(string $filepath='') : string
|
||||
{
|
||||
if($filepath){
|
||||
return static::$gameImagePath."/{$filepath}";
|
||||
}
|
||||
return static::$gameImagePath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getServerBasepath() : string
|
||||
{
|
||||
return self::$serverWebPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
@charset "utf-8";
|
||||
|
||||
.bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
||||
.bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
||||
.bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
||||
|
||||
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
|
||||
|
||||
/* 레거시. */
|
||||
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
||||
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
||||
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
||||
|
||||
.map_detail .map_title{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
||||
url('_tK_gameImagePath_/rtitle.jpg') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_spring .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/spring.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_summer .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/summer.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_fall .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/fall.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_winter .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/winter.gif') no-repeat right;
|
||||
}
|
||||
|
||||
/*체 지도*/
|
||||
.map_theme_che.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_che.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_che.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_che.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_che .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/che_road.png') no-repeat;
|
||||
}
|
||||
|
||||
/*미니체 지도*/
|
||||
.map_theme_miniche.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_theme_miniche .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
window.pathConfig = {
|
||||
root:"_tK_serverBasePath_",
|
||||
sharedIcon:"_tK_sharedIconPath_",
|
||||
gameImage:"_tK_gameImagePath_"
|
||||
};
|
||||
@@ -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']
|
||||
];
|
||||
@@ -1,42 +1,30 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
|
||||
function MYDB_connect($host, $id, $pw) {
|
||||
$conn = mysqli_connect($host, $id, $pw);
|
||||
mysqli_query($conn, 'set names utf8mb4');
|
||||
return $conn;
|
||||
}
|
||||
|
||||
function MYDB_select_db($db, $connect) {
|
||||
return mysqli_select_db($connect, $db);
|
||||
}
|
||||
|
||||
function MYDB_query($query, $connect) {
|
||||
function MYDB_query($query, $connect)
|
||||
{
|
||||
return mysqli_query($connect, $query);
|
||||
}
|
||||
|
||||
function MYDB_num_rows($result) {
|
||||
function MYDB_num_rows(\mysqli_result $result) : int
|
||||
{
|
||||
return mysqli_num_rows($result);
|
||||
}
|
||||
|
||||
function MYDB_fetch_array($result) {
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
function MYDB_fetch_array(\mysqli_result $result)
|
||||
{
|
||||
return mysqli_fetch_array($result);
|
||||
}
|
||||
|
||||
function MYDB_fetch_row($result) {
|
||||
function MYDB_fetch_row(\mysqli_result $result)
|
||||
{
|
||||
return mysqli_fetch_row($result);
|
||||
}
|
||||
|
||||
function MYDB_list_tables($db, $connect) {
|
||||
return mysqli_query($connect, "show tables");
|
||||
}
|
||||
|
||||
function MYDB_error($connect) {
|
||||
function MYDB_error($connect)
|
||||
{
|
||||
return mysqli_error($connect);
|
||||
}
|
||||
|
||||
function MYDB_close($connect) {
|
||||
return mysqli_close($connect);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,31 +4,33 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$connect=dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
if($session->userGrade < 4) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$query = "select turntime,tnmt_time from game";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
||||
|
||||
$query = "select plock from plock";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -37,16 +39,19 @@ $plock = MYDB_fetch_array($result);
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>삼국지 모의전투 PHP (유기체서버)</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title>삼국지 모의전투 HiDCHe</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
<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=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$admin['tnmt_time'];?><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='토너분지연'> 토너먼트 : <?=$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='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중";?><br>
|
||||
락 풀 기 : <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,53 +4,87 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$connect=dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5){
|
||||
//echo "<script>location.replace('_119.php');</script>";
|
||||
echo '_119.php';//TODO:debug all and replace
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
if($session->userGrade < 4){
|
||||
header('location:_119.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$v = new Validator($_POST);
|
||||
$v->rule('integer', [
|
||||
'minute',
|
||||
'minutes2'
|
||||
]);
|
||||
if(!$v->validate()){
|
||||
Error($v->errorStr());
|
||||
}
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$minute = Util::getReq('minute', 'int');
|
||||
$minute2 = Util::getReq('minute2', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
switch($btn) {
|
||||
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)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update general set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update auction set expire=DATE_SUB(expire, INTERVAL $minute MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
|
||||
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
|
||||
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
|
||||
|
||||
$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;
|
||||
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)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
|
||||
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
|
||||
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
|
||||
|
||||
$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;
|
||||
case "토너분당김":
|
||||
$query = "update game set tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute2 MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$tnmt_time = new \DateTime($gameStor->tnmt_time);
|
||||
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
|
||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||
break;
|
||||
case "토너분지연":
|
||||
$query = "update game set tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute2 MINUTE)";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
|
||||
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
|
||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||
break;
|
||||
case "금지급":
|
||||
processGoldIncome($connect);
|
||||
processGoldIncome();
|
||||
break;
|
||||
case "쌀지급":
|
||||
processRiceIncome($connect);
|
||||
processRiceIncome();
|
||||
break;
|
||||
case "락걸기":
|
||||
$query = "update plock set plock=1";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('plock', ['plock'=>1], true);
|
||||
break;
|
||||
case "락풀기":
|
||||
$query = "update plock set plock=0";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('plock', ['plock'=>0], true);
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_119.php');</script>";
|
||||
echo '_119.php';//TODO:debug all and replace
|
||||
header('Location:_119.php');
|
||||
@@ -4,73 +4,77 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$admin = getAdmin($connect);
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$admin = getAdmin();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>게임관리</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
<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><td width=110 align=right>중원정세추가</td>
|
||||
<td colspan=3><input type=textarea size=90 maxlength=80 style=color:white;background-color:black; name=log><input type=submit name=btn value=로그쓰기></td></td>
|
||||
</tr>
|
||||
<tr><td width=110 align=right>쿼리 요청</td>
|
||||
<td colspan=3><input type=textarea size=90 maxlength=150 style=color:white;background-color:black; name=q><input type=submit name=btn value=요청></td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right>시작시간변경</td>
|
||||
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=$admin['starttime'];?>'><input type=submit name=btn value=변경1></td>
|
||||
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=$admin['starttime']?>'><input type=submit name=btn value=변경1></td>
|
||||
<td width=110 align=right>현재도시훈사</td>
|
||||
<td width=285><?=$admin['city_rate'];?></td>
|
||||
<td width=285><?=$admin['city_rate']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right>최대 장수</td>
|
||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=maxgeneral value=<?=$admin['maxgeneral'];?>><input type=submit name=btn value=변경2></td>
|
||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=maxgeneral value=<?=$admin['maxgeneral']?>><input type=submit name=btn value=변경2></td>
|
||||
<td width=110 align=right>최대 국가</td>
|
||||
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation'];?>><input type=submit name=btn value=변경3></td>
|
||||
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation']?>><input type=submit name=btn value=변경3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right>기준 장수수</td>
|
||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=gen_rate value=<?=$admin['normgeneral'];?>><input type=submit name=btn value=변경5></td>
|
||||
<td width=110 align=right></td>
|
||||
<td width=285></td>
|
||||
<td width=110 align=right>현재 수입률</td>
|
||||
<td width=285><?=$admin['gold_rate'];?>%</td>
|
||||
<td width=285><?=$admin['gold_rate']?>%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right>시작 년도</td>
|
||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=startyear value='<?=$admin['startyear'];?>'><input type=submit name=btn value=변경4></td>
|
||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=startyear value='<?=$admin['startyear']?>'><input type=submit name=btn value=변경4></td>
|
||||
<td width=110 align=right>최근 갱신 시간</td>
|
||||
<td width=285> <?=$admin['turntime']?></td>
|
||||
</tr>
|
||||
@@ -80,7 +84,7 @@ $admin = getAdmin($connect);
|
||||
</tr>
|
||||
</table>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -4,51 +4,62 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
$admin = getAdmin($connect);
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
//echo "<script>location.replace('_admin1.php');</script>";
|
||||
echo '_admin1.php';//TODO:debug all and replace
|
||||
if ($session->userGrade < 5) {
|
||||
header('location:_admin1.php');
|
||||
die();
|
||||
}
|
||||
|
||||
switch($btn) {
|
||||
$v = new Validator($_POST);
|
||||
$v->rule('integer', [
|
||||
'maxgeneral',
|
||||
'minutes2'
|
||||
])->rule('dateFormat', [
|
||||
'starttime'
|
||||
], 'Y-m-d H:i:s');
|
||||
if (!$v->validate()) {
|
||||
Error($v->errorStr());
|
||||
}
|
||||
|
||||
$msg = Util::getReq('msg');
|
||||
$btn = Util::getReq('btn');
|
||||
$log = Util::getReq('log');
|
||||
$starttime = Util::getReq('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
|
||||
$maxgeneral = Util::getReq('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
|
||||
$maxnation = Util::getReq('maxnation', 'int', GameConst::$defaultMaxNation);
|
||||
$startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$admin = getAdmin();
|
||||
|
||||
switch ($btn) {
|
||||
case "변경":
|
||||
$msg = addslashes(SQ2DQ($msg));
|
||||
$query = "update game set msg='$msg'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
break;
|
||||
case "요청":
|
||||
$query = $q;
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->msg = $msg;
|
||||
break;
|
||||
case "로그쓰기":
|
||||
$lognum = $admin['historyindex'] + 1;
|
||||
if($lognum >= 29) { $lognum = 0; }
|
||||
$history[0] = "<R>★</><S>{$log}</>";
|
||||
pushHistory($history);
|
||||
if ($lognum >= 29) {
|
||||
$lognum = 0;
|
||||
}
|
||||
pushWorldHistory(["<R>★</><S>{$log}</>"]);
|
||||
break;
|
||||
case "변경1":
|
||||
$query = "update game set starttime='$starttime'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
|
||||
break;
|
||||
case "변경2":
|
||||
$query = "update game set maxgeneral='$maxgeneral'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->maxgeneral = $maxgeneral;
|
||||
break;
|
||||
case "변경3":
|
||||
$query = "update game set maxnation='$maxnation'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->maxnation = $maxnation;
|
||||
break;
|
||||
case "변경4":
|
||||
$query = "update game set startyear='$startyear'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
break;
|
||||
case "변경5":
|
||||
$query = "update game set normgeneral='$gen_rate'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->startyear = $startyear;
|
||||
break;
|
||||
case "1분턴":
|
||||
case "2분턴":
|
||||
@@ -58,7 +69,7 @@ switch($btn) {
|
||||
case "30분턴":
|
||||
case "60분턴":
|
||||
case "120분턴":
|
||||
switch($btn) {
|
||||
switch ($btn) {
|
||||
case "1분턴": $turnterm = 1; break;
|
||||
case "2분턴": $turnterm = 2; break;
|
||||
case "5분턴": $turnterm = 5; break;
|
||||
@@ -72,39 +83,37 @@ switch($btn) {
|
||||
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
|
||||
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
|
||||
$starttime = cutTurn($starttime, $turnterm);
|
||||
$query = "update game set turnterm='$turnterm',starttime='$starttime'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gameStor->turnterm = $turnterm;
|
||||
$gameStor->starttime = $starttime;
|
||||
// 턴시간이 길어지는 경우 랜덤턴 배정
|
||||
if($turnterm < $admin['turnterm']) {
|
||||
if ($turnterm < $admin['turnterm']) {
|
||||
$query = "select no from general";
|
||||
$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);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$gen = MYDB_fetch_array($result);
|
||||
$turntime = getRandTurn($turnterm);
|
||||
$query = "update general set turntime='$turntime' where no='{$gen['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
}
|
||||
// 턴시간이 너무 멀리 떨어진 선수 제대로 보정
|
||||
// 턴시간이 너무 멀리 떨어진 선수 제대로 보정
|
||||
} else {
|
||||
$query = "select no,turntime from general";
|
||||
$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);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$gen = MYDB_fetch_array($result);
|
||||
$num = floor((strtotime($gen['turntime']) - strtotime($admin['turntime'])) / $unit);
|
||||
if($num > 0) {
|
||||
$num = intdiv((strtotime($gen['turntime']) - strtotime($admin['turntime'])), $unit);
|
||||
if ($num > 0) {
|
||||
$gen['turntime'] = date("Y-m-d H:i:s", strtotime($gen['turntime']) - $unit * $num);
|
||||
$query = "update general set turntime='{$gen['turntime']}' where no='{$gen['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
}
|
||||
}
|
||||
}
|
||||
$history[] = "<R>★</>턴시간이 <C>$btn</>으로 변경됩니다.";
|
||||
pushHistory($history);
|
||||
|
||||
pushWorldHistory(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin1.php');</script>";
|
||||
echo '_admin1.php';//TODO:debug all and replace
|
||||
|
||||
header('location:_admin1.php');
|
||||
@@ -4,77 +4,68 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$query = "select conlimit,conweight from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$db = DB::db();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>회원관리</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
<td width=80 align=center>접속제한</td>
|
||||
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=80 align=center>제한등급</td>
|
||||
<td width=713 align=center>
|
||||
<input type=text size=3 maxlength=3 name=conweight value=<?=$admin['conweight'];?> style=color:white;background-color:black;font-size:13px;>
|
||||
<input type=submit name=btn value='접속가중치'>
|
||||
</td>
|
||||
</tr>
|
||||
</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 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>
|
||||
<?php
|
||||
|
||||
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:13px'>";
|
||||
$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)";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
foreach($generalList as $general){
|
||||
$style = "style=;";
|
||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
||||
if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; }
|
||||
|
||||
echo "
|
||||
<option value={$general['no']} $style>{$general['name']}</option>";
|
||||
@@ -85,7 +76,7 @@ echo "
|
||||
</td>
|
||||
<td width=100 align=center>아이템 지급</td>
|
||||
<td width=504>
|
||||
<select name=weap size=1 style=color:white;background-color:black;font-size:13>";
|
||||
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
|
||||
for($i=0; $i < 27; $i++) {
|
||||
echo "
|
||||
<option value={$i}>{$i}</option>";
|
||||
@@ -135,7 +126,7 @@ for($i=0; $i < 27; $i++) {
|
||||
</tr>
|
||||
</table>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -3,8 +3,14 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$weap = Util::getReq('weap', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireLogin()->loginGame();
|
||||
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
header('location:_admin2.php');
|
||||
@@ -13,295 +19,334 @@ if($session->userGrade < 5) {
|
||||
$generalID = $session->generalID;
|
||||
if(!$generalID){
|
||||
header('location:_admin2.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$connect = dbConn();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
|
||||
switch($btn) {
|
||||
case "전체 접속허용":
|
||||
$query = "update general set con=0";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'con'=>0
|
||||
], true);
|
||||
break;
|
||||
case "전체 접속제한":
|
||||
$query = "update general set con=1000";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
break;
|
||||
case "접속가중치":
|
||||
$query = "update game set conweight='$conweight'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'con'=>1000
|
||||
], true);
|
||||
break;
|
||||
case "블럭 해제":
|
||||
$db->update('general', [
|
||||
'block'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
||||
break;
|
||||
case "1단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$db = DB::db();
|
||||
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
|
||||
//FIXME: subquery로 하는게 더 빠를 듯.
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where no IN %ls', $date, $uid);
|
||||
$db->update('general', [
|
||||
'block'=>1,
|
||||
'killturn'=>24
|
||||
], '`no` IN %li', $genlist);
|
||||
$uid = $db->queryFirstColumn('SELECT `owner` FROM general WHERE `no` IN %li', $genlist);
|
||||
RootDB::db()->update('member',[
|
||||
'block_num'=>$db->sqleval('block_num+1'),
|
||||
'block_date'=>$date
|
||||
], 'id IN %li', $uid);
|
||||
break;
|
||||
case "2단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$db = DB::db();
|
||||
$db->query('update general set gold=0,rice=0,block=2,killturn=24 where no IN %li',$genlist);
|
||||
$db->update('general', [
|
||||
'gold'=>0,
|
||||
'rice'=>0,
|
||||
'block'=>2,
|
||||
'killturn'=>24
|
||||
], '`no` IN %li', $genlist);
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
RootDB::db()->update('member',[
|
||||
'block_num'=>$db->sqleval('block_num+1'),
|
||||
'block_date'=>$date
|
||||
], 'id IN %li', $uid);
|
||||
break;
|
||||
case "3단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$db = DB::db();
|
||||
$db->query('update general set gold=0,rice=0,block=3,killturn=24 where no IN %li',$genlist);
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
$db->update('general', [
|
||||
'gold'=>0,
|
||||
'rice'=>0,
|
||||
'block'=>3,
|
||||
'killturn'=>24
|
||||
], '`no` IN %li', $genlist);
|
||||
$uid = $db->queryFirstColumn('SELECT `owner` from general where no IN %li', $genlist);
|
||||
RootDB::db()->update('member',[
|
||||
'block_num'=>$db->sqleval('block_num+1'),
|
||||
'block_date'=>$date
|
||||
], 'id IN %li', $uid);
|
||||
break;
|
||||
case "무한삭턴":
|
||||
DB::db()->query('update general set killturn=8000 where no IN %li',$genlist);
|
||||
$db->update('general', [
|
||||
'killturn'=>8000
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "강제 사망":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
DB::db()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist);
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 0),
|
||||
'killturn'=>0,
|
||||
'turntime'=>$date,
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "특기 부여":
|
||||
$admin = DB::db()->queryFirstRow('select `year`, `month` from `game` where `no`=1');
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
$text = "특기 부여!";
|
||||
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "특기 부여!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "select no,leader,power,intel from general where no='$genlist[$i]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
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->send(true);
|
||||
|
||||
$special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel']);
|
||||
|
||||
$query = "update general set specage2=age,special2='$special2' where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$log[0] = "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】(을)를 익혔습니다!";
|
||||
addHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】(을)를 습득");
|
||||
pushGenLog($general, $log);
|
||||
$specialWar = SpecialityConst::pickSpecialWar($general);
|
||||
$db->update('general', [
|
||||
'specage2'=>$db->sqleval('age'),
|
||||
'special2'=>$specialWar
|
||||
], 'no=%i', $general['no']);
|
||||
$specialWarName = SpecialityConst::WAR[$specialWar][0];
|
||||
$josaUl = JosaUtil::pick($specialWarName, '을');
|
||||
pushGeneralHistory($general, "<C>●</>{$year}년 {$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
|
||||
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
|
||||
}
|
||||
|
||||
break;
|
||||
case "경험치1000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = $btn." 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set experience=experience+1000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$text = $btn." 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'experience'=>$db->sqleval('experience+1000')
|
||||
], '`no` IN %li', $genlist);
|
||||
|
||||
break;
|
||||
case "공헌치1000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = $btn." 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dedication=dedication+1000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$text = $btn." 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dedication'=>$db->sqleval('dedication+1000')
|
||||
], '`no` IN %li', $genlist);
|
||||
|
||||
break;
|
||||
case "보숙10000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "보병숙련도+10000 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dex0=dex0+10000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$text = "보병숙련도+10000 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dex0'=>$db->sqleval('dex0+10000')
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "궁숙10000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "궁병숙련도+10000 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dex10=dex10+10000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$text = "궁병숙련도+10000 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dex10'=>$db->sqleval('dex10+10000')
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "기숙10000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "기병숙련도+10000 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dex20=dex20+10000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
$text = "기병숙련도+10000 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dex20'=>$db->sqleval('dex20+10000')
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "귀숙10000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "귀병숙련도+10000 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dex30=dex30+10000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
$text = "귀병숙련도+10000 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dex30'=>$db->sqleval('dex30+10000')
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "차숙10000":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
$msg = "차병숙련도+10000 지급!";
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set dex40=dex40+10000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
$text = "차병숙련도+10000 지급!";
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
$db->update('general',[
|
||||
'dex40'=>$db->sqleval('dex40+10000')
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "접속 허용":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set con=0 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general',[
|
||||
'con'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "접속 제한":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set con=1000 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general',[
|
||||
'con'=>1000
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "메세지 전달":
|
||||
//TODO:새 갠메 시스템으로 변경
|
||||
$date = date('Y-m-d H:i:s');
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
$text = $msg;
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
break;
|
||||
case "무기지급":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
if($weap == 0) { $msg = "무기 회수!"; }
|
||||
else { $msg = getWeapName($weap)." 지급!"; }
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
|
||||
if($weap == 0) {
|
||||
$text = "무기 회수!";
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
if($weap == 0) {
|
||||
$query = "update general set weap='0' where no='$genlist[$i]'";
|
||||
} else {
|
||||
$query = "update general set weap='$weap' where no='$genlist[$i]' and weap<'$weap'";
|
||||
}
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
else {
|
||||
$text = getWeapName($weap)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
$db->update('general', [
|
||||
'weap'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'weap'=>$weap
|
||||
], '`no` IN %li AND weap < %i', $genlist, $weap);
|
||||
}
|
||||
break;
|
||||
case "책지급":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
if($weap == 0) { $msg = "서적 회수!"; }
|
||||
else { $msg = getBookName($weap)." 지급!"; }
|
||||
// 상대에게 발송
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
if($weap == 0) {
|
||||
$text = "책 회수!";
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
if($weap == 0) {
|
||||
$query = "update general set book='0' where no='$genlist[$i]'";
|
||||
} else {
|
||||
$query = "update general set book='$weap' where no='$genlist[$i]' and book<'$weap'";
|
||||
}
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
else {
|
||||
$text = getBookName($weap)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
$db->update('general', [
|
||||
'book'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'book'=>$weap
|
||||
], '`no` IN %li AND book < %i', $genlist, $weap);
|
||||
}
|
||||
break;
|
||||
case "말지급":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
if($weap == 0) { $msg = "말 회수!"; }
|
||||
else { $msg = getHorseName($weap)." 지급!"; }
|
||||
// 상대에게 발송
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
if($weap == 0) {
|
||||
$text = "말 회수!";
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
if($weap == 0) {
|
||||
$query = "update general set horse='0' where no='$genlist[$i]'";
|
||||
} else {
|
||||
$query = "update general set horse='$weap' where no='$genlist[$i]' and horse<'$weap'";
|
||||
}
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
else {
|
||||
$text = getHorseName($weap)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
$db->update('general', [
|
||||
'horse'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'horse'=>$weap
|
||||
], '`no` IN %li AND horse < %i', $genlist, $weap);
|
||||
}
|
||||
break;
|
||||
case "도구지급":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$you = DB::db()->queryFirstRow('select `no`, `nation` from `general` where `no` = %i', $genlist[$i]);
|
||||
if($weap == 0) { $msg = "특수도구 회수!"; }
|
||||
else { $msg = getItemName($weap)." 지급!"; }
|
||||
// 상대에게 발송
|
||||
sendMessage('private', ['id'=>$generalID, 'nation_id'=>0], ['id'=>$you['no'], 'nation_id'=>$you['nation']], $msg);
|
||||
if($weap == 0) {
|
||||
$text = "특수도구 회수!";
|
||||
}
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
if($weap == 0) {
|
||||
$query = "update general set item='0' where no='$genlist[$i]'";
|
||||
} else {
|
||||
$query = "update general set item='$weap' where no='$genlist[$i]' and item<'$weap'";
|
||||
}
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
else {
|
||||
$text = getItemName($weap)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
$db->update('general', [
|
||||
'item'=>0
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'item'=>$weap
|
||||
], '`no` IN %li AND item < %i', $genlist, $weap);
|
||||
}
|
||||
break;
|
||||
case "NPC해제":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set npc=1 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general', [
|
||||
'npc'=>1
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "하야입력":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set turn0='00000000000045' where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 45)
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "방랑해산":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set turn0='00000000000047',turn1='00000000000056' where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 47),
|
||||
'turn1'=>EncodeCommand(0, 0, 0, 56)
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "NPC설정":
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$query = "update general set npc=2 where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$db->update('general', [
|
||||
'npc'=>2
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "00턴":
|
||||
$query = "select turnterm from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$turnterm = $gameStor->turnterm;
|
||||
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$turntime = getRandTurn($admin['turnterm']);
|
||||
$cutTurn = cutTurn($turntime, $admin['turnterm']);
|
||||
$query = "update general set turntime='$cutTurn' where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
foreach($genlist as $generalID){
|
||||
$turntime = getRandTurn($turnterm);
|
||||
$cutTurn = cutTurn($turntime, $turnterm);
|
||||
$db->update('general', [
|
||||
'turntime'=>$curTurn
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
break;
|
||||
case "랜덤턴":
|
||||
$query = "select turnterm from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$turntime = getRandTurn($admin['turnterm']);
|
||||
$query = "update general set turntime='$turntime' where no='$genlist[$i]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
foreach($genlist as $generalID){
|
||||
$turntime = getRandTurn($turnterm);
|
||||
$db->update('general', [
|
||||
'turntime'=>$turntime
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin2.php');</script>";
|
||||
echo '_admin2.php';//TODO:debug all and replace
|
||||
|
||||
header('location:_admin2.php');
|
||||
@@ -4,64 +4,65 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$query = "select conlimit from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$conlimit = $gameStor->conlimit;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>멀티관리</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
<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>
|
||||
<?php
|
||||
|
||||
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:13px'>";
|
||||
|
||||
$query = "select no,name,npc,block from general where ip!='' order by npc,ip";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
||||
$style = "style=;";
|
||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
||||
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
||||
if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; }
|
||||
if($general['con'] > $conlimit) { $style .= "color:red;"; }
|
||||
|
||||
echo "
|
||||
<option value={$general['no']} $style>{$general['name']}</option>";
|
||||
@@ -86,13 +87,12 @@ echo "
|
||||
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
||||
</tr>
|
||||
</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 align=center width=100>장수명</td>
|
||||
<td align=center width=180>최근로그인</td>
|
||||
<td align=center width=129>IP</td>
|
||||
<td align=center width=100>ID</td>
|
||||
<td align=center width=278>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
@@ -103,11 +103,10 @@ $genName = "";
|
||||
$genDate = "";
|
||||
$genIP = "";
|
||||
$genID = "";
|
||||
$conMsg = "";
|
||||
for($i=0; $i < $ipCount; $i++) {
|
||||
$ip = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select name,ip,lastconnect,owner,block,conmsg from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
|
||||
$query = "select name,ip,lastconnect,owner,block from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
|
||||
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$genCount = MYDB_num_rows($genResult);
|
||||
for($k=0; $k < $genCount; $k++) {
|
||||
@@ -117,20 +116,17 @@ for($i=0; $i < $ipCount; $i++) {
|
||||
$genDate .= $gen['lastconnect']."<br>";
|
||||
$genIP .= $gen['ip']."<br>";
|
||||
$genID .= $gen['owner']."<br>";
|
||||
$conMsg .= $gen['conmsg']."<br>";
|
||||
}
|
||||
$genName .= "<br>";
|
||||
$genDate .= "<br>";
|
||||
$genIP .= "<br>";
|
||||
$genID .= "<br>";
|
||||
$conMsg .= "<br>";
|
||||
}
|
||||
echo "
|
||||
<td align=right>$genName</td>
|
||||
<td>$genDate</td>
|
||||
<td>$genIP</td>
|
||||
<td>$genID</td>
|
||||
<td>$conMsg</td>";
|
||||
<td>$genID</td>";
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -138,7 +134,7 @@ echo "
|
||||
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
||||
?>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -4,14 +4,21 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
//echo "<script>location.replace('_admin4.php');</script>";
|
||||
echo '_admin4.php';//TODO:debug all and replace
|
||||
if($session->userGrade < 5) {
|
||||
header('location:_admin4.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$genlist = Util::getReq('genlist', 'array_int');
|
||||
$msg = Util::getReq('msg','string', '메시지');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
||||
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
|
||||
switch($btn) {
|
||||
@@ -24,38 +31,49 @@ switch($btn) {
|
||||
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
|
||||
//FIXME: subquery로 하는게 더 빠를 듯.
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
break;
|
||||
case "2단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$db = DB::db();
|
||||
$db->query('update general set block=2,killturn=24 where no IN %li',$genlist);
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
break;
|
||||
case "3단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$db = DB::db();
|
||||
$db->query('update general set block=3,killturn=24 where no IN %li',$genlist);
|
||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||
RootDB::db()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||
break;
|
||||
case "무한삭턴":
|
||||
DB::db()->query('update general set killturn=8000 where no IN %li',$genlist);
|
||||
break;
|
||||
case "강제 사망":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
DB::db()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist);
|
||||
DB::db()->query('update general set turn0=%s,killturn=0,turntime=%s where no IN %li',EncodeCommand(0, 0, 0, 0),$date, $genlist);
|
||||
break;
|
||||
case "메세지 전달":
|
||||
//TODO:새 갠메 시스템으로 변경
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$msg;
|
||||
for($i=0; $i < sizeof($genlist); $i++) {
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
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;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin4.php');</script>";
|
||||
echo '_admin4.php'; //TODO:debug all and replace
|
||||
header('location:_admin4.php');
|
||||
|
||||
|
||||
@@ -3,82 +3,95 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
$type2 = Util::getReq('type2', 'int', 0);
|
||||
|
||||
if($type < 0 || $type > 17){
|
||||
$type = 0;
|
||||
}
|
||||
if($type2 < 0 || $type2 > 6){
|
||||
$type2 = 0;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
if($type2 == 0) {
|
||||
$type2 = 0;
|
||||
}
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$sel = [];
|
||||
$sel2 = [];
|
||||
$sel[$type] = "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>
|
||||
<html>
|
||||
<head>
|
||||
<title>일제정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
<form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>국력</option>
|
||||
<option <?=$sel[1];?> value=1>장수</option>
|
||||
<option <?=$sel[2];?> value=2>기술</option>
|
||||
<option <?=$sel[3];?> value=3>국고</option>
|
||||
<option <?=$sel[4];?> value=4>병량</option>
|
||||
<option <?=$sel[5];?> value=5>평금</option>
|
||||
<option <?=$sel[6];?> value=6>평쌀</option>
|
||||
<option <?=$sel[7];?> value=7>평통</option>
|
||||
<option <?=$sel[8];?> value=8>평무</option>
|
||||
<option <?=$sel[9];?> value=9>평지</option>
|
||||
<option <?=$sel[10];?> value=10>평Lv</option>
|
||||
<option <?=$sel[11];?> value=11>접속률</option>
|
||||
<option <?=$sel[12];?> value=12>단기접</option>
|
||||
<option <?=$sel[13];?> value=13>보숙</option>
|
||||
<option <?=$sel[14];?> value=14>궁숙</option>
|
||||
<option <?=$sel[15];?> value=15>기숙</option>
|
||||
<option <?=$sel[16];?> value=16>귀숙</option>
|
||||
<option <?=$sel[17];?> value=17>차숙</option>
|
||||
<option <?=$sel[0]??''?> value=0>국력</option>
|
||||
<option <?=$sel[1]??''?> value=1>장수</option>
|
||||
<option <?=$sel[2]??''?> value=2>기술</option>
|
||||
<option <?=$sel[3]??''?> value=3>국고</option>
|
||||
<option <?=$sel[4]??''?> value=4>병량</option>
|
||||
<option <?=$sel[5]??''?> value=5>평금</option>
|
||||
<option <?=$sel[6]??''?> value=6>평쌀</option>
|
||||
<option <?=$sel[7]??''?> value=7>평통</option>
|
||||
<option <?=$sel[8]??''?> value=8>평무</option>
|
||||
<option <?=$sel[9]??''?> value=9>평지</option>
|
||||
<option <?=$sel[10]??''?> value=10>평Lv</option>
|
||||
<option <?=$sel[11]??''?> value=11>접속률</option>
|
||||
<option <?=$sel[12]??''?> value=12>단기접</option>
|
||||
<option <?=$sel[13]??''?> value=13>보숙</option>
|
||||
<option <?=$sel[14]??''?> value=14>궁숙</option>
|
||||
<option <?=$sel[15]??''?> value=15>기숙</option>
|
||||
<option <?=$sel[16]??''?> value=16>귀숙</option>
|
||||
<option <?=$sel[17]??''?> value=17>차숙</option>
|
||||
</select>
|
||||
<select name=type2 size=1>
|
||||
<option <?=$sel2[0];?> value=0>국력</option>
|
||||
<option <?=$sel2[1];?> value=1>국가별성향</option>
|
||||
<option <?=$sel2[2];?> value=2>국가성향</option>
|
||||
<option <?=$sel2[3];?> value=3>장수성격</option>
|
||||
<option <?=$sel2[4];?> value=4>장수특기</option>
|
||||
<option <?=$sel2[5];?> value=5>병종수</option>
|
||||
<option <?=$sel2[6];?> value=6>기타</option>
|
||||
<option <?=$sel2[0]??''?> value=0>국력</option>
|
||||
<option <?=$sel2[1]??''?> value=1>국가별성향</option>
|
||||
<option <?=$sel2[2]??''?> value=2>국가성향</option>
|
||||
<option <?=$sel2[3]??''?> value=3>장수성격</option>
|
||||
<option <?=$sel2[4]??''?> value=4>장수특기</option>
|
||||
<option <?=$sel2[5]??''?> value=5>병종수</option>
|
||||
<option <?=$sel2[6]??''?> value=6>기타</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'>
|
||||
</form>
|
||||
@@ -102,7 +115,7 @@ for($i=1; $i <= $count; $i++) {
|
||||
</td></tr>
|
||||
</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>
|
||||
<td align=center>국명</td>
|
||||
<td align=center>접률</td>
|
||||
@@ -145,7 +158,7 @@ SELECT
|
||||
A.chemi,
|
||||
A.color,
|
||||
A.tech,
|
||||
A.tricklimit,
|
||||
A.sabotagelimit,
|
||||
A.gold,
|
||||
A.rice,
|
||||
COUNT(B.nation) AS gennum,
|
||||
@@ -220,7 +233,7 @@ for($i=0; $i < $nationCount; $i++) {
|
||||
<td align=center> {$gen['cnt']} </td>
|
||||
<td align=center> {$city['cnt']} </td>
|
||||
<td align=center> {$nation['tech']} </td>
|
||||
<td align=center> {$nation['tricklimit']} </td>
|
||||
<td align=center> {$nation['sabotagelimit']} </td>
|
||||
<td align=center> {$nation['gold']} </td>
|
||||
<td align=center> {$nation['rice']} </td>
|
||||
<td align=center> {$gen['avgg']} </td>
|
||||
@@ -249,11 +262,11 @@ for($i=0; $i < $nationCount; $i++) {
|
||||
|
||||
?>
|
||||
</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>
|
||||
<tr><td><?php TrickLog(20); ?></td></tr>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
|
||||
</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>
|
||||
<td width=30 align=center>년</td>
|
||||
<td width=30 align=center>월</td>
|
||||
@@ -304,7 +317,7 @@ for($i=0; $i < $count; $i++) {
|
||||
?>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -3,28 +3,40 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
//echo "<script>location.replace('_admin5.php');</script>";
|
||||
echo '_admin5.php';//TODO:debug all and replace
|
||||
$btn = Util::getReq('btn');
|
||||
$nation = Util::getReq('nation', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
header('location:_admin5.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
switch($btn) {
|
||||
case "국가변경":
|
||||
if($nation == 0) {
|
||||
$query = "update general set nation=0,level=0 where owner='{$_SESSION['userID']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'nation'=>0,
|
||||
'level'=>0,
|
||||
], 'owner=%i', $userID);
|
||||
} else {
|
||||
$query = "update general set nation='{$nation}',level=1 where owner='{$_SESSION['userID']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'nation'=>$nation,
|
||||
'level'=>1,
|
||||
], 'owner=%i', $userID);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin5.php');</script>";
|
||||
echo '_admin5.php';//TODO:debug all and replace
|
||||
header('location:_admin5.php');
|
||||
|
||||
|
||||
|
||||
@@ -3,32 +3,40 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
if($type < 0 || $type > 4){
|
||||
$type = 0;
|
||||
}
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$sel[$type] = "selected";
|
||||
|
||||
?>
|
||||
@@ -36,24 +44,27 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
<head>
|
||||
<title>접속정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>접속률</option>
|
||||
<option <?=$sel[1];?> value=1>총갱신</option>
|
||||
<option <?=$sel[2];?> value=2>갱신/턴</option>
|
||||
<option <?=$sel[3];?> value=3>총로그인</option>
|
||||
<option <?=$sel[4];?> value=4>갱신/로그인</option>
|
||||
<option <?=$sel[0]??''?> value=0>접속률</option>
|
||||
<option <?=$sel[1]??''?> value=1>총갱신</option>
|
||||
<option <?=$sel[2]??''?> value=2>갱신/턴</option>
|
||||
<option <?=$sel[3]??''?> value=3>총로그인</option>
|
||||
<option <?=$sel[4]??''?> value=4>갱신/로그인</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</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>
|
||||
<td align=center width=120>장수명</td>
|
||||
<td align=center width=50>접속률</td>
|
||||
@@ -92,7 +103,7 @@ for($i=0; $i < $gencount; $i++) {
|
||||
|
||||
?>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -3,56 +3,71 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
|
||||
if($type < 0 || $type > 3){
|
||||
$type = 0;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
if($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
$sel[$type] = "selected";
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>로그정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>최근턴</option>
|
||||
<option <?=$sel[1];?> value=1>최근전투</option>
|
||||
<option <?=$sel[2];?> value=2>장수명</option>
|
||||
<option <?=$sel[3];?> value=3>전투수</option>
|
||||
<option <?=$sel[0]??''?> value=0>최근턴</option>
|
||||
<option <?=$sel[1]??''?> value=1>최근전투</option>
|
||||
<option <?=$sel[2]??''?> value=2>장수명</option>
|
||||
<option <?=$sel[3]??''?> value=3>전투수</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
@@ -87,14 +102,14 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</form>
|
||||
</td></tr>
|
||||
</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 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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($connect, $gen); generalInfo2($connect, $gen); ?>
|
||||
<?php generalInfo($gen); generalInfo2($gen); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
</td>
|
||||
@@ -105,10 +120,10 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php MyLog($gen, 24); ?>
|
||||
<?=getGenLogRecent($gen, 24)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyBatLog($gen, 24); ?>
|
||||
<?=getBatLogRecent($gen, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -117,14 +132,14 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php MyHistory($connect, $gen); ?>
|
||||
<?=getGeneralHistoryAll($gen)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyBatRes($gen, 24); ?>
|
||||
<?=getBatResRecent($gen, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -3,94 +3,107 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
|
||||
if(Session::getUserGrade() < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = 0;
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if ($session->userGrade < 5) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>관리메뉴</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<body>
|
||||
관리자가 아닙니다.<br>
|
||||
";
|
||||
echo banner();
|
||||
echo "
|
||||
<?=banner()?>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
if($btn == '정렬하기') {
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
if ($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
$sel[$type] = "selected";
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>외교정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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>
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>상태</option>
|
||||
<option <?=$sel[0]??''?> value=0>상태</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
</form>
|
||||
</td></tr>
|
||||
</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 width=100 align=center id=bg1>국 가 명</td>
|
||||
<td width=100 align=center id=bg1>국 가 명</td>
|
||||
<td width=130 align=center id=bg1>국 가 명</td>
|
||||
<td width=130 align=center id=bg1>국 가 명</td>
|
||||
<td width=80 align=center id=bg1>상 태</td>
|
||||
<td width=60 align=center id=bg1>기 간</td>
|
||||
<td align=center id=bg1>비 고</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
$nationName = [];
|
||||
$nationColor = [];
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
$nationColor[$nation['nation']] = $nation['color'];
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
case 0: $query = "select * from diplomacy where me < you order by state desc"; break;
|
||||
}
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$query = "select * from diplomacy where me < you order by state desc";
|
||||
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$dipcount = MYDB_num_rows($result);
|
||||
for($i=0; $i < $dipcount; $i++) {
|
||||
for ($i=0; $i < $dipcount; $i++) {
|
||||
$dip = MYDB_fetch_array($result);
|
||||
|
||||
$me = $dip['me'];
|
||||
$you = $dip['you'];
|
||||
|
||||
$query = "select reserved,showing from diplomacy where you='$me' and me='$you'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$dip2 = MYDB_fetch_array($result2);
|
||||
|
||||
if($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
|
||||
if ($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch($dip['state']) {
|
||||
switch ($dip['state']) {
|
||||
case 0: $state = "<font color=red>교 전</font>"; break;
|
||||
case 1: $state = "<font color=magenta>선포중</font>"; break;
|
||||
case 2: $state = "통 상"; break;
|
||||
@@ -103,34 +116,36 @@ for($i=0; $i < $dipcount; $i++) {
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$note = "";
|
||||
if($dip['fixed'] != "") {
|
||||
if($dip['state'] == 7) {
|
||||
if ($dip['fixed'] != "") {
|
||||
if ($dip['state'] == 7) {
|
||||
$note .= $dip['fixed'];
|
||||
} else {
|
||||
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
||||
}
|
||||
if($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
if($dip['reserved'] != "") {
|
||||
if($dip['showing'] >= $date) {
|
||||
if ($dip['reserved'] != "") {
|
||||
if ($dip['showing'] >= $date) {
|
||||
$note .= "<font color=skyblue>아국측 제의</font>: {$dip['reserved']}";
|
||||
} else {
|
||||
$note .= "<font color=gray>아국측 제의: {$dip['reserved']}</font>";
|
||||
}
|
||||
if($dip2['reserved'] != "") {
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
if($dip2['reserved'] != "") {
|
||||
if($dip2['showing'] >= $date) {
|
||||
if ($dip2['reserved'] != "") {
|
||||
if ($dip2['showing'] >= $date) {
|
||||
$note .= "<font color=limegreen>상대측 제의</font>: {$dip2['reserved']}";
|
||||
} else {
|
||||
$note .= "<font color=gray>상대측 제의: {$dip2['reserved']}</font>";
|
||||
}
|
||||
}
|
||||
if($note == "") { $note = " "; }
|
||||
if ($note == "") {
|
||||
$note = " ";
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -143,7 +158,7 @@ for($i=0; $i < $dipcount; $i++) {
|
||||
}
|
||||
?>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -4,18 +4,29 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
//로그인 검사
|
||||
|
||||
$isgen = Util::array_get($_POST['isgen'], '');
|
||||
$tech1 = Util::array_get($_POST['tech1'], 0);
|
||||
$tech2 =Util::array_get($_POST['tech2'], 0);
|
||||
$dex10 = Util::array_get($_POST['dex10'], 0);
|
||||
$dex110 = Util::array_get($_POST['dex110'], 0);
|
||||
$dex120 = Util::array_get($_POST['dex120'], 0);
|
||||
$dex130 = Util::array_get($_POST['dex130'], 0);
|
||||
$dex140 = Util::array_get($_POST['dex140'], 0);
|
||||
$isgen = Util::getReq('isgen');
|
||||
|
||||
$leader1 = Util::getReq('leader1', 'int', 0);
|
||||
$power1 = Util::getReq('power1', 'int', 0);
|
||||
$intel1 = Util::getReq('intel1', 'int', 0);
|
||||
$type1 = Util::getReq('type1', 'int', 0);
|
||||
$crew1 = Util::getReq('crew1', 'int', 0);
|
||||
$train1 = Util::getReq('train1', 'int', 0);
|
||||
$atmos1 = Util::getReq('atmos1', 'int', 0);
|
||||
$level1 = Util::getReq('level1', 'int', 0);
|
||||
$explevel1 = Util::getReq('explevel1', 'int', 0);
|
||||
$tech1 = Util::getReq('tech1', 'int', 0);
|
||||
|
||||
$dex10 = Util::getReq('dex10', 'int', 0);
|
||||
$dex110 = Util::getReq('dex110', 'int', 0);
|
||||
$dex120 = Util::getReq('dex120', 'int', 0);
|
||||
$dex130 = Util::getReq('dex130', 'int', 0);
|
||||
$dex140 = Util::getReq('dex140', 'int', 0);
|
||||
|
||||
$dx10 = array_fill(0, 20, '');
|
||||
$dx110 = array_fill(0, 20, '');
|
||||
@@ -23,11 +34,22 @@ $dx120 = array_fill(0, 20, '');
|
||||
$dx130 = array_fill(0, 20, '');
|
||||
$dx140 = array_fill(0, 20, '');
|
||||
|
||||
$dex20 = Util::array_get($_POST['dex20'], 0);
|
||||
$dex210 = Util::array_get($_POST['dex210'], 0);
|
||||
$dex220 = Util::array_get($_POST['dex220'], 0);
|
||||
$dex230 = Util::array_get($_POST['dex230'], 0);
|
||||
$dex240 = Util::array_get($_POST['dex240'], 0);
|
||||
$leader2 = Util::getReq('leader2', 'int', 0);
|
||||
$power2 = Util::getReq('power2', 'int', 0);
|
||||
$intel2 = Util::getReq('intel2', 'int', 0);
|
||||
$type2 = Util::getReq('type2', 'int', 0);
|
||||
$crew2 = Util::getReq('crew2', 'int', 0);
|
||||
$train2 = Util::getReq('train2', 'int', 0);
|
||||
$atmos2 = Util::getReq('atmos2', 'int', 0);
|
||||
$level2 = Util::getReq('level2', 'int', 0);
|
||||
$explevel2 = Util::getReq('explevel2', 'int', 0);
|
||||
$tech2 = Util::getReq('tech2', 'int', 0);
|
||||
|
||||
$dex20 = Util::getReq('dex20', 'int', 0);
|
||||
$dex210 = Util::getReq('dex210', 'int', 0);
|
||||
$dex220 = Util::getReq('dex220', 'int', 0);
|
||||
$dex230 = Util::getReq('dex230', 'int', 0);
|
||||
$dex240 = Util::getReq('dex240', 'int', 0);
|
||||
|
||||
$dx20 = array_fill(0, 20, '');
|
||||
$dx210 = array_fill(0, 20, '');
|
||||
@@ -35,6 +57,11 @@ $dx220 = array_fill(0, 20, '');
|
||||
$dx230 = array_fill(0, 20, '');
|
||||
$dx240 = array_fill(0, 20, '');
|
||||
|
||||
$def = Util::getReq('def', 'int', 0);
|
||||
$wall = Util::getReq('wall', 'int', 0);
|
||||
$atmos3 = Util::getReq('atmos3', 'int', 0);
|
||||
$train3 = Util::getReq('train3', 'int', 0);
|
||||
|
||||
$sellevel1 = array_fill(0, 13, '');
|
||||
$sel1 = array_fill(0,44, '');
|
||||
$tch1 = array_fill(0,11, '');
|
||||
@@ -46,22 +73,21 @@ $tch2 = array_fill(0,11, '');
|
||||
$dec = 0;
|
||||
$rice = 0;
|
||||
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
increaseRefresh("시뮬", 2);
|
||||
|
||||
$query = "select no,tournament,con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,tournament,con,turntime from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select * from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$game = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getAll();
|
||||
|
||||
$con = checkLimit($me['con'], $game['conlimit']);
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
|
||||
if(Session::getUserGrade() < 3) {
|
||||
if($session->userGrade < 3) {
|
||||
echo "특별회원이 아닙니다.";
|
||||
exit();
|
||||
}
|
||||
@@ -79,6 +105,18 @@ if($isgen == "장수평균" || $isgen == "성벽평균") {
|
||||
$simulCount = 1;
|
||||
}
|
||||
|
||||
$general = [
|
||||
'no'=>1
|
||||
];
|
||||
$oppose = [
|
||||
'no'=>2
|
||||
];
|
||||
$city = [
|
||||
'gen1'=>0,
|
||||
'gen2'=>0,
|
||||
'gen3'=>0,
|
||||
];
|
||||
|
||||
if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평균" || $isgen == "성벽평균") {
|
||||
$msg2 = "";
|
||||
for($i=0; $i < $simulCount; $i++) {
|
||||
@@ -134,7 +172,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$opposecount = 0;
|
||||
}
|
||||
|
||||
$warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
||||
$warphase = getRate($admin, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
||||
|
||||
// 우선 스케일링
|
||||
$city['def'] *= 10;
|
||||
@@ -150,13 +188,14 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
while($phase < $warphase) {
|
||||
// 장수가 없어서 도시 공격
|
||||
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;
|
||||
while($phase < $warphase) {
|
||||
$phase++;
|
||||
$myAtt = getAtt($game, $general, $tech1, 0);
|
||||
$myDef = getDef($game, $general, $tech1);
|
||||
$myAtt = getAtt($general, $tech1, 0);
|
||||
$myDef = getDef($general, $tech1);
|
||||
$cityAtt = getCityAtt($city);
|
||||
$cityDef = getCityDef($city);
|
||||
|
||||
@@ -177,7 +216,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
|
||||
$avoid = 1;
|
||||
// 병종간 특성
|
||||
if(floor($general['crewtype']/10) == 3) { // 귀병
|
||||
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $general['intel'] + getBookEff($general['book']);
|
||||
if($general['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
@@ -262,7 +301,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
||||
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $avoid == 1) {
|
||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||
$myCrew /= 10; // 10%만 소모
|
||||
@@ -273,9 +312,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$cityCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
|
||||
$general['crew'] -= round($myCrew);
|
||||
$city['def'] -= round($cityCrew);
|
||||
$city['wall'] -= round($cityCrew);
|
||||
$general['crew'] -= Util::round($myCrew);
|
||||
$city['def'] -= Util::round($cityCrew);
|
||||
$city['wall'] -= Util::round($cityCrew);
|
||||
|
||||
$tempMyCrew = $myCrew; $tempCityCrew = $cityCrew;
|
||||
$tempGeneralCrew = $general['crew']; $tempCityDef = $city['def'];
|
||||
@@ -283,14 +322,14 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
if($city['wall'] <= 0) { $city['wall'] = 0; }
|
||||
|
||||
if($city['def'] < 0) {
|
||||
$offset = round($tempCityDef*$tempMyCrew/$tempCityCrew);
|
||||
$offset = Util::round($tempCityDef*$tempMyCrew/$tempCityCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$cityCrew += $tempCityDef;
|
||||
$city['def'] = 0;
|
||||
}
|
||||
if($general['crew'] < 0) {
|
||||
$offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew);
|
||||
$offset = Util::round($tempGeneralCrew*$tempCityCrew/$tempMyCrew);
|
||||
$cityCrew += $offset;
|
||||
$city['def'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
@@ -299,9 +338,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
|
||||
$exp += $cityCrew;
|
||||
$opexp += $myCrew;
|
||||
$general['crew'] = round($general['crew']);
|
||||
$cityCrew = round($cityCrew);
|
||||
$myCrew = round($myCrew);
|
||||
$general['crew'] = Util::round($general['crew']);
|
||||
$cityCrew = Util::round($cityCrew);
|
||||
$myCrew = Util::round($myCrew);
|
||||
$myAtt = round($myAtt, 2);
|
||||
$myDef = round($myDef, 2);
|
||||
$cityAtt = round($cityAtt, 2);
|
||||
@@ -315,14 +354,14 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
|
||||
// 도시쌀 소모 계산
|
||||
$opexp = round($opexp / 50);
|
||||
$rice = round($opexp * 4 * getCrewtypeRice($game, 0, 0) * ($train3/100 - 0.2));
|
||||
$opexp = Util::round($opexp / 50);
|
||||
$rice = Util::round($opexp * 4 * getCrewtypeRice(0, 0) * ($train3/100 - 0.2));
|
||||
|
||||
//원래대로 스케일링
|
||||
$city['def'] = round($city['def'] / 10);
|
||||
$city['wall'] = round($city['wall'] / 10);
|
||||
$city['def'] = Util::round($city['def'] / 10);
|
||||
$city['wall'] = Util::round($city['wall'] / 10);
|
||||
//내정 감소
|
||||
$dec = round($cityCrew / 10);
|
||||
$dec = Util::round($cityCrew / 10);
|
||||
$city['agri'] -= $dec;
|
||||
$city['comm'] -= $dec;
|
||||
$city['secu'] -= $dec;
|
||||
@@ -340,16 +379,18 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
// 장수 대결
|
||||
} 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;
|
||||
while($phase < $warphase) {
|
||||
$phase++;
|
||||
|
||||
$myAtt = getAtt($game, $general, $tech1, 0);
|
||||
$myDef = getDef($game, $general, $tech1);
|
||||
$opAtt = getAtt($game, $oppose, $tech2, 0);
|
||||
$opDef = getDef($game, $oppose, $tech2);
|
||||
$myAtt = getAtt($general, $tech1, 0);
|
||||
$myDef = getDef($general, $tech1);
|
||||
$opAtt = getAtt($oppose, $tech2, 0);
|
||||
$opDef = getDef($oppose, $tech2);
|
||||
// 감소할 병사 수
|
||||
$myCrew = GameConst::$armperphase + $opAtt - $myDef;
|
||||
$opCrew = GameConst::$armperphase + $myAtt - $opDef;
|
||||
@@ -367,7 +408,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$myAvoid = 1;
|
||||
$opAvoid = 1;
|
||||
// 병종간 특성
|
||||
if(floor($general['crewtype']/10) == 3) { // 귀병
|
||||
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $general['intel'] + getBookEff($general['book']);
|
||||
if($general['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
@@ -449,7 +490,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
|
||||
// 상대 장수 병종간 특성
|
||||
if(floor($oppose['crewtype']/10) == 3) { // 귀병
|
||||
if(intdiv($oppose['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $oppose['intel'] + getBookEff($oppose['book']);
|
||||
if($oppose['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
@@ -544,44 +585,44 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
|
||||
// my 입장 상성
|
||||
// 보병계열 > 궁병계열
|
||||
if(floor($general['crewtype']/10) == 0 && floor($oppose['crewtype']/10) == 1) {
|
||||
if(intdiv($general['crewtype'], 10) == 0 && intdiv($oppose['crewtype'], 10) == 1) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 궁병계열 > 기병계열
|
||||
if(floor($general['crewtype']/10) == 1 && floor($oppose['crewtype']/10) == 2) {
|
||||
if(intdiv($general['crewtype'], 10) == 1 && intdiv($oppose['crewtype'], 10) == 2) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 기병계열 > 보병계열
|
||||
if(floor($general['crewtype']/10) == 2 && floor($oppose['crewtype']/10) == 0) {
|
||||
if(intdiv($general['crewtype'], 10) == 2 && intdiv($oppose['crewtype'], 10) == 0) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 차병계열
|
||||
if(floor($general['crewtype']/10) == 4) {
|
||||
if(intdiv($general['crewtype'], 10) == 4) {
|
||||
$myCrew *= 1.2;
|
||||
$opCrew *= 0.8;
|
||||
}
|
||||
|
||||
// op 입장 상성
|
||||
// 보병계열 > 궁병계열
|
||||
if(floor($oppose['crewtype']/10) == 0 && floor($general['crewtype']/10) == 1) {
|
||||
if(intdiv($oppose['crewtype'], 10) == 0 && intdiv($general['crewtype'], 10) == 1) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 궁병계열 > 기병계열
|
||||
if(floor($oppose['crewtype']/10) == 1 && floor($general['crewtype']/10) == 2) {
|
||||
if(intdiv($oppose['crewtype'], 10) == 1 && intdiv($general['crewtype'], 10) == 2) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 기병계열 > 보병계열
|
||||
if(floor($oppose['crewtype']/10) == 2 && floor($general['crewtype']/10) == 0) {
|
||||
if(intdiv($oppose['crewtype'], 10) == 2 && intdiv($general['crewtype'], 10) == 0) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 차병계열
|
||||
if(floor($oppose['crewtype']/10) == 4) {
|
||||
if(intdiv($oppose['crewtype'], 10) == 4) {
|
||||
$opCrew *= 1.2;
|
||||
$myCrew *= 0.8;
|
||||
}
|
||||
@@ -626,7 +667,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
||||
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $myAvoid == 1) {
|
||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||
$myCrew /= 10; // 10%만 소모
|
||||
@@ -634,7 +675,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율
|
||||
$ratio2 = getRate($admin, $oppose['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $opAvoid == 1) {
|
||||
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
|
||||
$opCrew /= 10; // 10%만 소모
|
||||
@@ -645,8 +686,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$opCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
|
||||
$general['crew'] -= round($myCrew);
|
||||
$oppose['crew'] -= round($opCrew);
|
||||
$general['crew'] -= Util::round($myCrew);
|
||||
$oppose['crew'] -= Util::round($opCrew);
|
||||
$tempMyCrew = $myCrew; $tempOpCrew = $opCrew;
|
||||
$tempGeneralCrew = $general['crew']; $tempOpposeCrew = $oppose['crew'];
|
||||
if($general['crew'] <= 0 && $oppose['crew'] <= 0) {
|
||||
@@ -654,13 +695,13 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$r2 = $tempOpposeCrew / $tempOpCrew;
|
||||
|
||||
if($r1 > $r2) {
|
||||
$offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$opCrew += $tempOpposeCrew;
|
||||
$oppose['crew'] = 0;
|
||||
} else {
|
||||
$offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$opCrew += $offset;
|
||||
$oppose['crew'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
@@ -668,14 +709,14 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
} elseif($general['crew'] * $oppose['crew'] <= 0) {
|
||||
if($oppose['crew'] < 0) {
|
||||
$offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$opCrew += $tempOpposeCrew;
|
||||
$oppose['crew'] = 0;
|
||||
}
|
||||
if($general['crew'] < 0) {
|
||||
$offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$opCrew += $offset;
|
||||
$oppose['crew'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
@@ -685,10 +726,10 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
|
||||
$exp += $opCrew;
|
||||
$opexp += $myCrew;
|
||||
$general['crew'] = round($general['crew']);
|
||||
$oppose['crew'] = round($oppose['crew']);
|
||||
$myCrew = round($myCrew);
|
||||
$opCrew = round($opCrew);
|
||||
$general['crew'] = Util::round($general['crew']);
|
||||
$oppose['crew'] = Util::round($oppose['crew']);
|
||||
$myCrew = Util::round($myCrew);
|
||||
$opCrew = Util::round($opCrew);
|
||||
$myAtt = round($myAtt, 2);
|
||||
$myDef = round($myDef, 2);
|
||||
$opAtt = round($opAtt, 2);
|
||||
@@ -707,10 +748,10 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
}
|
||||
|
||||
// 공헌, 명성 상승
|
||||
$exp = round($exp / 50);
|
||||
$ricing = ($exp * 5 * getCrewtypeRice($game, $general['crewtype'], $tech1));
|
||||
$msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricing<br>";
|
||||
// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricing<br>";
|
||||
$exp = Util::round($exp / 50);
|
||||
$ricing = ($exp * 5 * getCrewtypeRice($general['crewtype'], $tech1));
|
||||
$msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricing<br>";
|
||||
// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricing<br>";
|
||||
|
||||
$msg = ConvertLog($msg, 1);
|
||||
|
||||
@@ -732,11 +773,11 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
$msg2 .= "{$simulCount}회 평균<br>";
|
||||
$msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnumSum</> vs <C>-$mykillnumSum</> ";
|
||||
$msg2 .= "<R>★</>【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2<br>";
|
||||
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricingSum<br>";
|
||||
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricingSum<br>";
|
||||
} elseif($isgen == "장수평균") {
|
||||
$msg2 .= "{$simulCount}회 평균<br>";
|
||||
$msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnumSum</> vs <C>-$mykillnumSum</> ";
|
||||
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricingSum<br>";
|
||||
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricingSum<br>";
|
||||
}
|
||||
|
||||
$msg2 = ConvertLog($msg2, 1);
|
||||
@@ -763,8 +804,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
|
||||
|
||||
$def = 7000;
|
||||
$wall = 7000;
|
||||
$train3 = $game['city_rate'];
|
||||
$atmos3 = $game['city_rate'];
|
||||
$train3 = $admin['city_rate'];
|
||||
$atmos3 = $admin['city_rate'];
|
||||
}
|
||||
|
||||
switch($level1) {
|
||||
@@ -1099,21 +1140,22 @@ switch($dex240) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title>전투시뮬레이션</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
select { background-color:black;color:white; }
|
||||
input { background-color:black;color:white; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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>
|
||||
<td>공격장수</td>
|
||||
<td>상대장수</td>
|
||||
@@ -1122,180 +1164,180 @@ input { background-color:black;color:white; }
|
||||
<tr>
|
||||
<td>관직
|
||||
<select name=level1 size=1>
|
||||
<option <?=$sellevel1[1];?> value=1>일반</option>
|
||||
<option <?=$sellevel1[5];?> value=5>제3모사</option>
|
||||
<option <?=$sellevel1[6];?> value=6>제3장군</option>
|
||||
<option <?=$sellevel1[7];?> value=7>제2모사</option>
|
||||
<option <?=$sellevel1[8];?> value=8>제2장군</option>
|
||||
<option <?=$sellevel1[9];?> value=9>제1모사</option>
|
||||
<option <?=$sellevel1[10];?> value=10>제1장군</option>
|
||||
<option <?=$sellevel1[11];?> value=11>참모</option>
|
||||
<option <?=$sellevel1[12];?> value=12>군주</option>
|
||||
<option <?=$sellevel1[1]?> value=1>일반</option>
|
||||
<option <?=$sellevel1[5]?> value=5>제3모사</option>
|
||||
<option <?=$sellevel1[6]?> value=6>제3장군</option>
|
||||
<option <?=$sellevel1[7]?> value=7>제2모사</option>
|
||||
<option <?=$sellevel1[8]?> value=8>제2장군</option>
|
||||
<option <?=$sellevel1[9]?> value=9>제1모사</option>
|
||||
<option <?=$sellevel1[10]?> value=10>제1장군</option>
|
||||
<option <?=$sellevel1[11]?> value=11>참모</option>
|
||||
<option <?=$sellevel1[12]?> value=12>군주</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>관직
|
||||
<select name=level2 size=1>
|
||||
<option <?=$sellevel2[1];?> value=1>일반</option>
|
||||
<option <?=$sellevel2[5];?> value=5>제3모사</option>
|
||||
<option <?=$sellevel2[6];?> value=6>제3장군</option>
|
||||
<option <?=$sellevel2[7];?> value=7>제2모사</option>
|
||||
<option <?=$sellevel2[8];?> value=8>제2장군</option>
|
||||
<option <?=$sellevel2[9];?> value=9>제1모사</option>
|
||||
<option <?=$sellevel2[10];?> value=10>제1장군</option>
|
||||
<option <?=$sellevel2[11];?> value=11>참모</option>
|
||||
<option <?=$sellevel2[12];?> value=12>군주</option>
|
||||
<option <?=$sellevel2[1]?> value=1>일반</option>
|
||||
<option <?=$sellevel2[5]?> value=5>제3모사</option>
|
||||
<option <?=$sellevel2[6]?> value=6>제3장군</option>
|
||||
<option <?=$sellevel2[7]?> value=7>제2모사</option>
|
||||
<option <?=$sellevel2[8]?> value=8>제2장군</option>
|
||||
<option <?=$sellevel2[9]?> value=9>제1모사</option>
|
||||
<option <?=$sellevel2[10]?> value=10>제1장군</option>
|
||||
<option <?=$sellevel2[11]?> value=11>참모</option>
|
||||
<option <?=$sellevel2[12]?> value=12>군주</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<tr>
|
||||
<td>Lv <input size=2 maxlength=2 name=explevel1 value=<?=$explevel1;?>></td>
|
||||
<td>Lv <input size=2 maxlength=2 name=explevel2 value=<?=$explevel2;?>></td>
|
||||
<td>Lv <input size=2 maxlength=2 name=explevel1 value=<?=$explevel1?>></td>
|
||||
<td>Lv <input size=2 maxlength=2 name=explevel2 value=<?=$explevel2?>></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>통솔 <input size=3 maxlength=3 name=leader1 value=<?=$leader1;?>></td>
|
||||
<td>통솔 <input size=3 maxlength=3 name=leader2 value=<?=$leader2;?>></td>
|
||||
<td>통솔 <input size=3 maxlength=3 name=leader1 value=<?=$leader1?>></td>
|
||||
<td>통솔 <input size=3 maxlength=3 name=leader2 value=<?=$leader2?>></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>무력 <input size=3 maxlength=3 name=power1 value=<?=$power1;?>></td>
|
||||
<td>무력 <input size=3 maxlength=3 name=power2 value=<?=$power2;?>></td>
|
||||
<td>무력 <input size=3 maxlength=3 name=power1 value=<?=$power1?>></td>
|
||||
<td>무력 <input size=3 maxlength=3 name=power2 value=<?=$power2?>></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>지력 <input size=3 maxlength=3 name=intel1 value=<?=$intel1;?>></td>
|
||||
<td>지력 <input size=3 maxlength=3 name=intel2 value=<?=$intel2;?>></td>
|
||||
<td>지력 <input size=3 maxlength=3 name=intel1 value=<?=$intel1?>></td>
|
||||
<td>지력 <input size=3 maxlength=3 name=intel2 value=<?=$intel2?>></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>병종
|
||||
<select name=type1 size=1>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel1[0];?> value=0>보병</option>
|
||||
<option <?=$sel1[1];?> value=1>청주병</option>
|
||||
<option <?=$sel1[2];?> value=2>수병</option>
|
||||
<option <?=$sel1[3];?> value=3>자객병</option>
|
||||
<option <?=$sel1[4];?> value=4>근위병</option>
|
||||
<option <?=$sel1[5];?> value=5>등갑병</option>
|
||||
<option <?=$sel1[0]?> value=0>보병</option>
|
||||
<option <?=$sel1[1]?> value=1>청주병</option>
|
||||
<option <?=$sel1[2]?> value=2>수병</option>
|
||||
<option <?=$sel1[3]?> value=3>자객병</option>
|
||||
<option <?=$sel1[4]?> value=4>근위병</option>
|
||||
<option <?=$sel1[5]?> value=5>등갑병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel1[10];?> value=10>궁병</option>
|
||||
<option <?=$sel1[11];?> value=11>궁기병</option>
|
||||
<option <?=$sel1[12];?> value=12>연노병</option>
|
||||
<option <?=$sel1[13];?> value=13>강궁병</option>
|
||||
<option <?=$sel1[14];?> value=14>석궁병</option>
|
||||
<option <?=$sel1[10]?> value=10>궁병</option>
|
||||
<option <?=$sel1[11]?> value=11>궁기병</option>
|
||||
<option <?=$sel1[12]?> value=12>연노병</option>
|
||||
<option <?=$sel1[13]?> value=13>강궁병</option>
|
||||
<option <?=$sel1[14]?> value=14>석궁병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel1[20];?> value=20>기병</option>
|
||||
<option <?=$sel1[21];?> value=21>백마병</option>
|
||||
<option <?=$sel1[22];?> value=22>중장기병</option>
|
||||
<option <?=$sel1[23];?> value=23>돌격기병</option>
|
||||
<option <?=$sel1[24];?> value=24>철기병</option>
|
||||
<option <?=$sel1[25];?> value=25>수렵기병</option>
|
||||
<option <?=$sel1[26];?> value=26>맹수병</option>
|
||||
<option <?=$sel1[27];?> value=27>호표기병</option>
|
||||
<option <?=$sel1[20]?> value=20>기병</option>
|
||||
<option <?=$sel1[21]?> value=21>백마병</option>
|
||||
<option <?=$sel1[22]?> value=22>중장기병</option>
|
||||
<option <?=$sel1[23]?> value=23>돌격기병</option>
|
||||
<option <?=$sel1[24]?> value=24>철기병</option>
|
||||
<option <?=$sel1[25]?> value=25>수렵기병</option>
|
||||
<option <?=$sel1[26]?> value=26>맹수병</option>
|
||||
<option <?=$sel1[27]?> value=27>호표기병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel1[30];?> value=30>귀병</option>
|
||||
<option <?=$sel1[31];?> value=31>신귀병</option>
|
||||
<option <?=$sel1[32];?> value=32>백귀병</option>
|
||||
<option <?=$sel1[33];?> value=33>흑귀병</option>
|
||||
<option <?=$sel1[34];?> value=34>악귀병</option>
|
||||
<option <?=$sel1[35];?> value=35>남귀병</option>
|
||||
<option <?=$sel1[36];?> value=36>황귀병</option>
|
||||
<option <?=$sel1[37];?> value=37>천귀병</option>
|
||||
<option <?=$sel1[38];?> value=38>마귀병</option>
|
||||
<option <?=$sel1[30]?> value=30>귀병</option>
|
||||
<option <?=$sel1[31]?> value=31>신귀병</option>
|
||||
<option <?=$sel1[32]?> value=32>백귀병</option>
|
||||
<option <?=$sel1[33]?> value=33>흑귀병</option>
|
||||
<option <?=$sel1[34]?> value=34>악귀병</option>
|
||||
<option <?=$sel1[35]?> value=35>남귀병</option>
|
||||
<option <?=$sel1[36]?> value=36>황귀병</option>
|
||||
<option <?=$sel1[37]?> value=37>천귀병</option>
|
||||
<option <?=$sel1[38]?> value=38>마귀병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel1[40];?> value=40>정란</option>
|
||||
<option <?=$sel1[41];?> value=41>충차</option>
|
||||
<option <?=$sel1[42];?> value=42>벽력거</option>
|
||||
<option <?=$sel1[43];?> value=43>목우</option>
|
||||
<option <?=$sel1[40]?> value=40>정란</option>
|
||||
<option <?=$sel1[41]?> value=41>충차</option>
|
||||
<option <?=$sel1[42]?> value=42>벽력거</option>
|
||||
<option <?=$sel1[43]?> value=43>목우</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>병종
|
||||
<select name=type2 size=1>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel2[0];?> value=0>보병</option>
|
||||
<option <?=$sel2[1];?> value=1>청주병</option>
|
||||
<option <?=$sel2[2];?> value=2>수병</option>
|
||||
<option <?=$sel2[3];?> value=3>자객병</option>
|
||||
<option <?=$sel2[4];?> value=4>근위병</option>
|
||||
<option <?=$sel2[5];?> value=5>등갑병</option>
|
||||
<option <?=$sel2[0]?> value=0>보병</option>
|
||||
<option <?=$sel2[1]?> value=1>청주병</option>
|
||||
<option <?=$sel2[2]?> value=2>수병</option>
|
||||
<option <?=$sel2[3]?> value=3>자객병</option>
|
||||
<option <?=$sel2[4]?> value=4>근위병</option>
|
||||
<option <?=$sel2[5]?> value=5>등갑병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel2[10];?> value=10>궁병</option>
|
||||
<option <?=$sel2[11];?> value=11>궁기병</option>
|
||||
<option <?=$sel2[12];?> value=12>연노병</option>
|
||||
<option <?=$sel2[13];?> value=13>강궁병</option>
|
||||
<option <?=$sel2[14];?> value=14>석궁병</option>
|
||||
<option <?=$sel2[10]?> value=10>궁병</option>
|
||||
<option <?=$sel2[11]?> value=11>궁기병</option>
|
||||
<option <?=$sel2[12]?> value=12>연노병</option>
|
||||
<option <?=$sel2[13]?> value=13>강궁병</option>
|
||||
<option <?=$sel2[14]?> value=14>석궁병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel2[20];?> value=20>기병</option>
|
||||
<option <?=$sel2[21];?> value=21>백마병</option>
|
||||
<option <?=$sel2[22];?> value=22>중장기병</option>
|
||||
<option <?=$sel2[23];?> value=23>돌격기병</option>
|
||||
<option <?=$sel2[24];?> value=24>철기병</option>
|
||||
<option <?=$sel2[25];?> value=25>수렵기병</option>
|
||||
<option <?=$sel2[26];?> value=26>맹수병</option>
|
||||
<option <?=$sel2[27];?> value=27>호표기병</option>
|
||||
<option <?=$sel2[20]?> value=20>기병</option>
|
||||
<option <?=$sel2[21]?> value=21>백마병</option>
|
||||
<option <?=$sel2[22]?> value=22>중장기병</option>
|
||||
<option <?=$sel2[23]?> value=23>돌격기병</option>
|
||||
<option <?=$sel2[24]?> value=24>철기병</option>
|
||||
<option <?=$sel2[25]?> value=25>수렵기병</option>
|
||||
<option <?=$sel2[26]?> value=26>맹수병</option>
|
||||
<option <?=$sel2[27]?> value=27>호표기병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel2[30];?> value=30>귀병</option>
|
||||
<option <?=$sel2[31];?> value=31>신귀병</option>
|
||||
<option <?=$sel2[32];?> value=32>백귀병</option>
|
||||
<option <?=$sel2[33];?> value=33>흑귀병</option>
|
||||
<option <?=$sel2[34];?> value=34>악귀병</option>
|
||||
<option <?=$sel2[35];?> value=35>남귀병</option>
|
||||
<option <?=$sel2[36];?> value=36>황귀병</option>
|
||||
<option <?=$sel2[37];?> value=37>천귀병</option>
|
||||
<option <?=$sel2[38];?> value=38>마귀병</option>
|
||||
<option <?=$sel2[30]?> value=30>귀병</option>
|
||||
<option <?=$sel2[31]?> value=31>신귀병</option>
|
||||
<option <?=$sel2[32]?> value=32>백귀병</option>
|
||||
<option <?=$sel2[33]?> value=33>흑귀병</option>
|
||||
<option <?=$sel2[34]?> value=34>악귀병</option>
|
||||
<option <?=$sel2[35]?> value=35>남귀병</option>
|
||||
<option <?=$sel2[36]?> value=36>황귀병</option>
|
||||
<option <?=$sel2[37]?> value=37>천귀병</option>
|
||||
<option <?=$sel2[38]?> value=38>마귀병</option>
|
||||
<option value=0>--------</option>
|
||||
<option <?=$sel2[40];?> value=40>정란</option>
|
||||
<option <?=$sel2[41];?> value=41>충차</option>
|
||||
<option <?=$sel2[42];?> value=42>벽력거</option>
|
||||
<option <?=$sel2[43];?> value=43>목우</option>
|
||||
<option <?=$sel2[40]?> value=40>정란</option>
|
||||
<option <?=$sel2[41]?> value=41>충차</option>
|
||||
<option <?=$sel2[42]?> value=42>벽력거</option>
|
||||
<option <?=$sel2[43]?> value=43>목우</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>성벽 <input size=4 maxlength=4 name=wall value=<?=$wall;?>></td>
|
||||
<td>성벽 <input size=4 maxlength=4 name=wall value=<?=$wall?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>병력 <input size=5 maxlength=5 name=crew1 value=<?=$crew1;?>></td>
|
||||
<td>병력 <input size=5 maxlength=5 name=crew2 value=<?=$crew2;?>></td>
|
||||
<td>수비 <input size=4 maxlength=4 name=def value=<?=$def;?>></td>
|
||||
<td>병력 <input size=5 maxlength=5 name=crew1 value=<?=$crew1?>></td>
|
||||
<td>병력 <input size=5 maxlength=5 name=crew2 value=<?=$crew2?>></td>
|
||||
<td>수비 <input size=4 maxlength=4 name=def value=<?=$def?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train1 value=<?=$train1;?>></td>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train2 value=<?=$train2;?>></td>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train3 value=<?=$train3;?>></td>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train1 value=<?=$train1?>></td>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train2 value=<?=$train2?>></td>
|
||||
<td>훈련 <input size=3 maxlength=3 name=train3 value=<?=$train3?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos1 value=<?=$atmos1;?>></td>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos2 value=<?=$atmos2;?>></td>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos3 value=<?=$atmos3;?>></td>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos1 value=<?=$atmos1?>></td>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos2 value=<?=$atmos2?>></td>
|
||||
<td>사기 <input size=3 maxlength=3 name=atmos3 value=<?=$atmos3?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>기술
|
||||
<select name=tech1 size=1>
|
||||
<option <?=$tch1[0];?> value=0>0등급</option>
|
||||
<option <?=$tch1[1];?> value=1000>1등급</option>
|
||||
<option <?=$tch1[2];?> value=2000>2등급</option>
|
||||
<option <?=$tch1[3];?> value=3000>3등급</option>
|
||||
<option <?=$tch1[4];?> value=4000>4등급</option>
|
||||
<option <?=$tch1[5];?> value=5000>5등급</option>
|
||||
<option <?=$tch1[6];?> value=6000>6등급</option>
|
||||
<option <?=$tch1[7];?> value=7000>7등급</option>
|
||||
<option <?=$tch1[8];?> value=8000>8등급</option>
|
||||
<option <?=$tch1[9];?> value=9000>9등급</option>
|
||||
<option <?=$tch1[10];?> value=10000>10등급</option>
|
||||
<option <?=$tch1[0]?> value=0>0등급</option>
|
||||
<option <?=$tch1[1]?> value=1000>1등급</option>
|
||||
<option <?=$tch1[2]?> value=2000>2등급</option>
|
||||
<option <?=$tch1[3]?> value=3000>3등급</option>
|
||||
<option <?=$tch1[4]?> value=4000>4등급</option>
|
||||
<option <?=$tch1[5]?> value=5000>5등급</option>
|
||||
<option <?=$tch1[6]?> value=6000>6등급</option>
|
||||
<option <?=$tch1[7]?> value=7000>7등급</option>
|
||||
<option <?=$tch1[8]?> value=8000>8등급</option>
|
||||
<option <?=$tch1[9]?> value=9000>9등급</option>
|
||||
<option <?=$tch1[10]?> value=10000>10등급</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>기술
|
||||
<select name=tech2 size=1>
|
||||
<option <?=$tch2[0];?> value=0>0등급</option>
|
||||
<option <?=$tch2[1];?> value=1000>1등급</option>
|
||||
<option <?=$tch2[2];?> value=2000>2등급</option>
|
||||
<option <?=$tch2[3];?> value=3000>3등급</option>
|
||||
<option <?=$tch2[4];?> value=4000>4등급</option>
|
||||
<option <?=$tch2[5];?> value=5000>5등급</option>
|
||||
<option <?=$tch2[6];?> value=6000>6등급</option>
|
||||
<option <?=$tch2[7];?> value=7000>7등급</option>
|
||||
<option <?=$tch2[8];?> value=8000>8등급</option>
|
||||
<option <?=$tch2[9];?> value=9000>9등급</option>
|
||||
<option <?=$tch2[10];?> value=10000>10등급</option>
|
||||
<option <?=$tch2[0]?> value=0>0등급</option>
|
||||
<option <?=$tch2[1]?> value=1000>1등급</option>
|
||||
<option <?=$tch2[2]?> value=2000>2등급</option>
|
||||
<option <?=$tch2[3]?> value=3000>3등급</option>
|
||||
<option <?=$tch2[4]?> value=4000>4등급</option>
|
||||
<option <?=$tch2[5]?> value=5000>5등급</option>
|
||||
<option <?=$tch2[6]?> value=6000>6등급</option>
|
||||
<option <?=$tch2[7]?> value=7000>7등급</option>
|
||||
<option <?=$tch2[8]?> value=8000>8등급</option>
|
||||
<option <?=$tch2[9]?> value=9000>9등급</option>
|
||||
<option <?=$tch2[10]?> value=10000>10등급</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>-</td>
|
||||
@@ -1303,224 +1345,224 @@ input { background-color:black;color:white; }
|
||||
<tr>
|
||||
<td>보
|
||||
<select name=dex10 size=1>
|
||||
<option <?=$dx10[0];?> value=0>F</option>
|
||||
<option <?=$dx10[1];?> value=2500>E-</option>
|
||||
<option <?=$dx10[2];?> value=7500>E</option>
|
||||
<option <?=$dx10[3];?> value=15000>E+</option>
|
||||
<option <?=$dx10[4];?> value=25000>D-</option>
|
||||
<option <?=$dx10[5];?> value=37500>D</option>
|
||||
<option <?=$dx10[6];?> value=52500>D+</option>
|
||||
<option <?=$dx10[7];?> value=70000>C-</option>
|
||||
<option <?=$dx10[8];?> value=90000>C</option>
|
||||
<option <?=$dx10[9];?> value=112500>C+</option>
|
||||
<option <?=$dx10[10];?> value=137500>B-</option>
|
||||
<option <?=$dx10[11];?> value=165000>B</option>
|
||||
<option <?=$dx10[12];?> value=195000>B+</option>
|
||||
<option <?=$dx10[13];?> value=227500>A-</option>
|
||||
<option <?=$dx10[14];?> value=262500>A</option>
|
||||
<option <?=$dx10[15];?> value=300000>A+</option>
|
||||
<option <?=$dx10[16];?> value=340000>S</option>
|
||||
<option <?=$dx10[17];?> value=382500>SS</option>
|
||||
<option <?=$dx10[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx10[0]?> value=0>F</option>
|
||||
<option <?=$dx10[1]?> value=2500>E-</option>
|
||||
<option <?=$dx10[2]?> value=7500>E</option>
|
||||
<option <?=$dx10[3]?> value=15000>E+</option>
|
||||
<option <?=$dx10[4]?> value=25000>D-</option>
|
||||
<option <?=$dx10[5]?> value=37500>D</option>
|
||||
<option <?=$dx10[6]?> value=52500>D+</option>
|
||||
<option <?=$dx10[7]?> value=70000>C-</option>
|
||||
<option <?=$dx10[8]?> value=90000>C</option>
|
||||
<option <?=$dx10[9]?> value=112500>C+</option>
|
||||
<option <?=$dx10[10]?> value=137500>B-</option>
|
||||
<option <?=$dx10[11]?> value=165000>B</option>
|
||||
<option <?=$dx10[12]?> value=195000>B+</option>
|
||||
<option <?=$dx10[13]?> value=227500>A-</option>
|
||||
<option <?=$dx10[14]?> value=262500>A</option>
|
||||
<option <?=$dx10[15]?> value=300000>A+</option>
|
||||
<option <?=$dx10[16]?> value=340000>S</option>
|
||||
<option <?=$dx10[17]?> value=382500>SS</option>
|
||||
<option <?=$dx10[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
궁
|
||||
<select name=dex110 size=1>
|
||||
<option <?=$dx110[0];?> value=0>F</option>
|
||||
<option <?=$dx110[1];?> value=2500>E-</option>
|
||||
<option <?=$dx110[2];?> value=7500>E</option>
|
||||
<option <?=$dx110[3];?> value=15000>E+</option>
|
||||
<option <?=$dx110[4];?> value=25000>D-</option>
|
||||
<option <?=$dx110[5];?> value=37500>D</option>
|
||||
<option <?=$dx110[6];?> value=52500>D+</option>
|
||||
<option <?=$dx110[7];?> value=70000>C-</option>
|
||||
<option <?=$dx110[8];?> value=90000>C</option>
|
||||
<option <?=$dx110[9];?> value=112500>C+</option>
|
||||
<option <?=$dx110[10];?> value=137500>B-</option>
|
||||
<option <?=$dx110[11];?> value=165000>B</option>
|
||||
<option <?=$dx110[12];?> value=195000>B+</option>
|
||||
<option <?=$dx110[13];?> value=227500>A-</option>
|
||||
<option <?=$dx110[14];?> value=262500>A</option>
|
||||
<option <?=$dx110[15];?> value=300000>A+</option>
|
||||
<option <?=$dx110[16];?> value=340000>S</option>
|
||||
<option <?=$dx110[17];?> value=382500>SS</option>
|
||||
<option <?=$dx110[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx110[0]?> value=0>F</option>
|
||||
<option <?=$dx110[1]?> value=2500>E-</option>
|
||||
<option <?=$dx110[2]?> value=7500>E</option>
|
||||
<option <?=$dx110[3]?> value=15000>E+</option>
|
||||
<option <?=$dx110[4]?> value=25000>D-</option>
|
||||
<option <?=$dx110[5]?> value=37500>D</option>
|
||||
<option <?=$dx110[6]?> value=52500>D+</option>
|
||||
<option <?=$dx110[7]?> value=70000>C-</option>
|
||||
<option <?=$dx110[8]?> value=90000>C</option>
|
||||
<option <?=$dx110[9]?> value=112500>C+</option>
|
||||
<option <?=$dx110[10]?> value=137500>B-</option>
|
||||
<option <?=$dx110[11]?> value=165000>B</option>
|
||||
<option <?=$dx110[12]?> value=195000>B+</option>
|
||||
<option <?=$dx110[13]?> value=227500>A-</option>
|
||||
<option <?=$dx110[14]?> value=262500>A</option>
|
||||
<option <?=$dx110[15]?> value=300000>A+</option>
|
||||
<option <?=$dx110[16]?> value=340000>S</option>
|
||||
<option <?=$dx110[17]?> value=382500>SS</option>
|
||||
<option <?=$dx110[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
기
|
||||
<select name=dex120 size=1>
|
||||
<option <?=$dx120[0];?> value=0>F</option>
|
||||
<option <?=$dx120[1];?> value=2500>E-</option>
|
||||
<option <?=$dx120[2];?> value=7500>E</option>
|
||||
<option <?=$dx120[3];?> value=15000>E+</option>
|
||||
<option <?=$dx120[4];?> value=25000>D-</option>
|
||||
<option <?=$dx120[5];?> value=37500>D</option>
|
||||
<option <?=$dx120[6];?> value=52500>D+</option>
|
||||
<option <?=$dx120[7];?> value=70000>C-</option>
|
||||
<option <?=$dx120[8];?> value=90000>C</option>
|
||||
<option <?=$dx120[9];?> value=112500>C+</option>
|
||||
<option <?=$dx120[10];?> value=137500>B-</option>
|
||||
<option <?=$dx120[11];?> value=165000>B</option>
|
||||
<option <?=$dx120[12];?> value=195000>B+</option>
|
||||
<option <?=$dx120[13];?> value=227500>A-</option>
|
||||
<option <?=$dx120[14];?> value=262500>A</option>
|
||||
<option <?=$dx120[15];?> value=300000>A+</option>
|
||||
<option <?=$dx120[16];?> value=340000>S</option>
|
||||
<option <?=$dx120[17];?> value=382500>SS</option>
|
||||
<option <?=$dx120[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx120[0]?> value=0>F</option>
|
||||
<option <?=$dx120[1]?> value=2500>E-</option>
|
||||
<option <?=$dx120[2]?> value=7500>E</option>
|
||||
<option <?=$dx120[3]?> value=15000>E+</option>
|
||||
<option <?=$dx120[4]?> value=25000>D-</option>
|
||||
<option <?=$dx120[5]?> value=37500>D</option>
|
||||
<option <?=$dx120[6]?> value=52500>D+</option>
|
||||
<option <?=$dx120[7]?> value=70000>C-</option>
|
||||
<option <?=$dx120[8]?> value=90000>C</option>
|
||||
<option <?=$dx120[9]?> value=112500>C+</option>
|
||||
<option <?=$dx120[10]?> value=137500>B-</option>
|
||||
<option <?=$dx120[11]?> value=165000>B</option>
|
||||
<option <?=$dx120[12]?> value=195000>B+</option>
|
||||
<option <?=$dx120[13]?> value=227500>A-</option>
|
||||
<option <?=$dx120[14]?> value=262500>A</option>
|
||||
<option <?=$dx120[15]?> value=300000>A+</option>
|
||||
<option <?=$dx120[16]?> value=340000>S</option>
|
||||
<option <?=$dx120[17]?> value=382500>SS</option>
|
||||
<option <?=$dx120[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
귀
|
||||
<select name=dex130 size=1>
|
||||
<option <?=$dx130[0];?> value=0>F</option>
|
||||
<option <?=$dx130[1];?> value=2500>E-</option>
|
||||
<option <?=$dx130[2];?> value=7500>E</option>
|
||||
<option <?=$dx130[3];?> value=15000>E+</option>
|
||||
<option <?=$dx130[4];?> value=25000>D-</option>
|
||||
<option <?=$dx130[5];?> value=37500>D</option>
|
||||
<option <?=$dx130[6];?> value=52500>D+</option>
|
||||
<option <?=$dx130[7];?> value=70000>C-</option>
|
||||
<option <?=$dx130[8];?> value=90000>C</option>
|
||||
<option <?=$dx130[9];?> value=112500>C+</option>
|
||||
<option <?=$dx130[10];?> value=137500>B-</option>
|
||||
<option <?=$dx130[11];?> value=165000>B</option>
|
||||
<option <?=$dx130[12];?> value=195000>B+</option>
|
||||
<option <?=$dx130[13];?> value=227500>A-</option>
|
||||
<option <?=$dx130[14];?> value=262500>A</option>
|
||||
<option <?=$dx130[15];?> value=300000>A+</option>
|
||||
<option <?=$dx130[16];?> value=340000>S</option>
|
||||
<option <?=$dx130[17];?> value=382500>SS</option>
|
||||
<option <?=$dx130[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx130[0]?> value=0>F</option>
|
||||
<option <?=$dx130[1]?> value=2500>E-</option>
|
||||
<option <?=$dx130[2]?> value=7500>E</option>
|
||||
<option <?=$dx130[3]?> value=15000>E+</option>
|
||||
<option <?=$dx130[4]?> value=25000>D-</option>
|
||||
<option <?=$dx130[5]?> value=37500>D</option>
|
||||
<option <?=$dx130[6]?> value=52500>D+</option>
|
||||
<option <?=$dx130[7]?> value=70000>C-</option>
|
||||
<option <?=$dx130[8]?> value=90000>C</option>
|
||||
<option <?=$dx130[9]?> value=112500>C+</option>
|
||||
<option <?=$dx130[10]?> value=137500>B-</option>
|
||||
<option <?=$dx130[11]?> value=165000>B</option>
|
||||
<option <?=$dx130[12]?> value=195000>B+</option>
|
||||
<option <?=$dx130[13]?> value=227500>A-</option>
|
||||
<option <?=$dx130[14]?> value=262500>A</option>
|
||||
<option <?=$dx130[15]?> value=300000>A+</option>
|
||||
<option <?=$dx130[16]?> value=340000>S</option>
|
||||
<option <?=$dx130[17]?> value=382500>SS</option>
|
||||
<option <?=$dx130[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
차
|
||||
<select name=dex140 size=1>
|
||||
<option <?=$dx140[0];?> value=0>F</option>
|
||||
<option <?=$dx140[1];?> value=2500>E-</option>
|
||||
<option <?=$dx140[2];?> value=7500>E</option>
|
||||
<option <?=$dx140[3];?> value=15000>E+</option>
|
||||
<option <?=$dx140[4];?> value=25000>D-</option>
|
||||
<option <?=$dx140[5];?> value=37500>D</option>
|
||||
<option <?=$dx140[6];?> value=52500>D+</option>
|
||||
<option <?=$dx140[7];?> value=70000>C-</option>
|
||||
<option <?=$dx140[8];?> value=90000>C</option>
|
||||
<option <?=$dx140[9];?> value=112500>C+</option>
|
||||
<option <?=$dx140[10];?> value=137500>B-</option>
|
||||
<option <?=$dx140[11];?> value=165000>B</option>
|
||||
<option <?=$dx140[12];?> value=195000>B+</option>
|
||||
<option <?=$dx140[13];?> value=227500>A-</option>
|
||||
<option <?=$dx140[14];?> value=262500>A</option>
|
||||
<option <?=$dx140[15];?> value=300000>A+</option>
|
||||
<option <?=$dx140[16];?> value=340000>S</option>
|
||||
<option <?=$dx140[17];?> value=382500>SS</option>
|
||||
<option <?=$dx140[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx140[0]?> value=0>F</option>
|
||||
<option <?=$dx140[1]?> value=2500>E-</option>
|
||||
<option <?=$dx140[2]?> value=7500>E</option>
|
||||
<option <?=$dx140[3]?> value=15000>E+</option>
|
||||
<option <?=$dx140[4]?> value=25000>D-</option>
|
||||
<option <?=$dx140[5]?> value=37500>D</option>
|
||||
<option <?=$dx140[6]?> value=52500>D+</option>
|
||||
<option <?=$dx140[7]?> value=70000>C-</option>
|
||||
<option <?=$dx140[8]?> value=90000>C</option>
|
||||
<option <?=$dx140[9]?> value=112500>C+</option>
|
||||
<option <?=$dx140[10]?> value=137500>B-</option>
|
||||
<option <?=$dx140[11]?> value=165000>B</option>
|
||||
<option <?=$dx140[12]?> value=195000>B+</option>
|
||||
<option <?=$dx140[13]?> value=227500>A-</option>
|
||||
<option <?=$dx140[14]?> value=262500>A</option>
|
||||
<option <?=$dx140[15]?> value=300000>A+</option>
|
||||
<option <?=$dx140[16]?> value=340000>S</option>
|
||||
<option <?=$dx140[17]?> value=382500>SS</option>
|
||||
<option <?=$dx140[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>보
|
||||
<select name=dex20 size=1>
|
||||
<option <?=$dx20[0];?> value=0>F</option>
|
||||
<option <?=$dx20[1];?> value=2500>E-</option>
|
||||
<option <?=$dx20[2];?> value=7500>E</option>
|
||||
<option <?=$dx20[3];?> value=15000>E+</option>
|
||||
<option <?=$dx20[4];?> value=25000>D-</option>
|
||||
<option <?=$dx20[5];?> value=37500>D</option>
|
||||
<option <?=$dx20[6];?> value=52500>D+</option>
|
||||
<option <?=$dx20[7];?> value=70000>C-</option>
|
||||
<option <?=$dx20[8];?> value=90000>C</option>
|
||||
<option <?=$dx20[9];?> value=112500>C+</option>
|
||||
<option <?=$dx20[10];?> value=137500>B-</option>
|
||||
<option <?=$dx20[11];?> value=165000>B</option>
|
||||
<option <?=$dx20[12];?> value=195000>B+</option>
|
||||
<option <?=$dx20[13];?> value=227500>A-</option>
|
||||
<option <?=$dx20[14];?> value=262500>A</option>
|
||||
<option <?=$dx20[15];?> value=300000>A+</option>
|
||||
<option <?=$dx20[16];?> value=340000>S</option>
|
||||
<option <?=$dx20[17];?> value=382500>SS</option>
|
||||
<option <?=$dx20[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx20[0]?> value=0>F</option>
|
||||
<option <?=$dx20[1]?> value=2500>E-</option>
|
||||
<option <?=$dx20[2]?> value=7500>E</option>
|
||||
<option <?=$dx20[3]?> value=15000>E+</option>
|
||||
<option <?=$dx20[4]?> value=25000>D-</option>
|
||||
<option <?=$dx20[5]?> value=37500>D</option>
|
||||
<option <?=$dx20[6]?> value=52500>D+</option>
|
||||
<option <?=$dx20[7]?> value=70000>C-</option>
|
||||
<option <?=$dx20[8]?> value=90000>C</option>
|
||||
<option <?=$dx20[9]?> value=112500>C+</option>
|
||||
<option <?=$dx20[10]?> value=137500>B-</option>
|
||||
<option <?=$dx20[11]?> value=165000>B</option>
|
||||
<option <?=$dx20[12]?> value=195000>B+</option>
|
||||
<option <?=$dx20[13]?> value=227500>A-</option>
|
||||
<option <?=$dx20[14]?> value=262500>A</option>
|
||||
<option <?=$dx20[15]?> value=300000>A+</option>
|
||||
<option <?=$dx20[16]?> value=340000>S</option>
|
||||
<option <?=$dx20[17]?> value=382500>SS</option>
|
||||
<option <?=$dx20[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
궁
|
||||
<select name=dex210 size=1>
|
||||
<option <?=$dx210[0];?> value=0>F</option>
|
||||
<option <?=$dx210[1];?> value=2500>E-</option>
|
||||
<option <?=$dx210[2];?> value=7500>E</option>
|
||||
<option <?=$dx210[3];?> value=15000>E+</option>
|
||||
<option <?=$dx210[4];?> value=25000>D-</option>
|
||||
<option <?=$dx210[5];?> value=37500>D</option>
|
||||
<option <?=$dx210[6];?> value=52500>D+</option>
|
||||
<option <?=$dx210[7];?> value=70000>C-</option>
|
||||
<option <?=$dx210[8];?> value=90000>C</option>
|
||||
<option <?=$dx210[9];?> value=112500>C+</option>
|
||||
<option <?=$dx210[10];?> value=137500>B-</option>
|
||||
<option <?=$dx210[11];?> value=165000>B</option>
|
||||
<option <?=$dx210[12];?> value=195000>B+</option>
|
||||
<option <?=$dx210[13];?> value=227500>A-</option>
|
||||
<option <?=$dx210[14];?> value=262500>A</option>
|
||||
<option <?=$dx210[15];?> value=300000>A+</option>
|
||||
<option <?=$dx210[16];?> value=340000>S</option>
|
||||
<option <?=$dx210[17];?> value=382500>SS</option>
|
||||
<option <?=$dx210[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx210[0]?> value=0>F</option>
|
||||
<option <?=$dx210[1]?> value=2500>E-</option>
|
||||
<option <?=$dx210[2]?> value=7500>E</option>
|
||||
<option <?=$dx210[3]?> value=15000>E+</option>
|
||||
<option <?=$dx210[4]?> value=25000>D-</option>
|
||||
<option <?=$dx210[5]?> value=37500>D</option>
|
||||
<option <?=$dx210[6]?> value=52500>D+</option>
|
||||
<option <?=$dx210[7]?> value=70000>C-</option>
|
||||
<option <?=$dx210[8]?> value=90000>C</option>
|
||||
<option <?=$dx210[9]?> value=112500>C+</option>
|
||||
<option <?=$dx210[10]?> value=137500>B-</option>
|
||||
<option <?=$dx210[11]?> value=165000>B</option>
|
||||
<option <?=$dx210[12]?> value=195000>B+</option>
|
||||
<option <?=$dx210[13]?> value=227500>A-</option>
|
||||
<option <?=$dx210[14]?> value=262500>A</option>
|
||||
<option <?=$dx210[15]?> value=300000>A+</option>
|
||||
<option <?=$dx210[16]?> value=340000>S</option>
|
||||
<option <?=$dx210[17]?> value=382500>SS</option>
|
||||
<option <?=$dx210[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
기
|
||||
<select name=dex220 size=1>
|
||||
<option <?=$dx220[0];?> value=0>F</option>
|
||||
<option <?=$dx220[1];?> value=2500>E-</option>
|
||||
<option <?=$dx220[2];?> value=7500>E</option>
|
||||
<option <?=$dx220[3];?> value=15000>E+</option>
|
||||
<option <?=$dx220[4];?> value=25000>D-</option>
|
||||
<option <?=$dx220[5];?> value=37500>D</option>
|
||||
<option <?=$dx220[6];?> value=52500>D+</option>
|
||||
<option <?=$dx220[7];?> value=70000>C-</option>
|
||||
<option <?=$dx220[8];?> value=90000>C</option>
|
||||
<option <?=$dx220[9];?> value=112500>C+</option>
|
||||
<option <?=$dx220[10];?> value=137500>B-</option>
|
||||
<option <?=$dx220[11];?> value=165000>B</option>
|
||||
<option <?=$dx220[12];?> value=195000>B+</option>
|
||||
<option <?=$dx220[13];?> value=227500>A-</option>
|
||||
<option <?=$dx220[14];?> value=262500>A</option>
|
||||
<option <?=$dx220[15];?> value=300000>A+</option>
|
||||
<option <?=$dx220[16];?> value=340000>S</option>
|
||||
<option <?=$dx220[17];?> value=382500>SS</option>
|
||||
<option <?=$dx220[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx220[0]?> value=0>F</option>
|
||||
<option <?=$dx220[1]?> value=2500>E-</option>
|
||||
<option <?=$dx220[2]?> value=7500>E</option>
|
||||
<option <?=$dx220[3]?> value=15000>E+</option>
|
||||
<option <?=$dx220[4]?> value=25000>D-</option>
|
||||
<option <?=$dx220[5]?> value=37500>D</option>
|
||||
<option <?=$dx220[6]?> value=52500>D+</option>
|
||||
<option <?=$dx220[7]?> value=70000>C-</option>
|
||||
<option <?=$dx220[8]?> value=90000>C</option>
|
||||
<option <?=$dx220[9]?> value=112500>C+</option>
|
||||
<option <?=$dx220[10]?> value=137500>B-</option>
|
||||
<option <?=$dx220[11]?> value=165000>B</option>
|
||||
<option <?=$dx220[12]?> value=195000>B+</option>
|
||||
<option <?=$dx220[13]?> value=227500>A-</option>
|
||||
<option <?=$dx220[14]?> value=262500>A</option>
|
||||
<option <?=$dx220[15]?> value=300000>A+</option>
|
||||
<option <?=$dx220[16]?> value=340000>S</option>
|
||||
<option <?=$dx220[17]?> value=382500>SS</option>
|
||||
<option <?=$dx220[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
귀
|
||||
<select name=dex230 size=1>
|
||||
<option <?=$dx230[0];?> value=0>F</option>
|
||||
<option <?=$dx230[1];?> value=2500>E-</option>
|
||||
<option <?=$dx230[2];?> value=7500>E</option>
|
||||
<option <?=$dx230[3];?> value=15000>E+</option>
|
||||
<option <?=$dx230[4];?> value=25000>D-</option>
|
||||
<option <?=$dx230[5];?> value=37500>D</option>
|
||||
<option <?=$dx230[6];?> value=52500>D+</option>
|
||||
<option <?=$dx230[7];?> value=70000>C-</option>
|
||||
<option <?=$dx230[8];?> value=90000>C</option>
|
||||
<option <?=$dx230[9];?> value=112500>C+</option>
|
||||
<option <?=$dx230[10];?> value=137500>B-</option>
|
||||
<option <?=$dx230[11];?> value=165000>B</option>
|
||||
<option <?=$dx230[12];?> value=195000>B+</option>
|
||||
<option <?=$dx230[13];?> value=227500>A-</option>
|
||||
<option <?=$dx230[14];?> value=262500>A</option>
|
||||
<option <?=$dx230[15];?> value=300000>A+</option>
|
||||
<option <?=$dx230[16];?> value=340000>S</option>
|
||||
<option <?=$dx230[17];?> value=382500>SS</option>
|
||||
<option <?=$dx230[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx230[0]?> value=0>F</option>
|
||||
<option <?=$dx230[1]?> value=2500>E-</option>
|
||||
<option <?=$dx230[2]?> value=7500>E</option>
|
||||
<option <?=$dx230[3]?> value=15000>E+</option>
|
||||
<option <?=$dx230[4]?> value=25000>D-</option>
|
||||
<option <?=$dx230[5]?> value=37500>D</option>
|
||||
<option <?=$dx230[6]?> value=52500>D+</option>
|
||||
<option <?=$dx230[7]?> value=70000>C-</option>
|
||||
<option <?=$dx230[8]?> value=90000>C</option>
|
||||
<option <?=$dx230[9]?> value=112500>C+</option>
|
||||
<option <?=$dx230[10]?> value=137500>B-</option>
|
||||
<option <?=$dx230[11]?> value=165000>B</option>
|
||||
<option <?=$dx230[12]?> value=195000>B+</option>
|
||||
<option <?=$dx230[13]?> value=227500>A-</option>
|
||||
<option <?=$dx230[14]?> value=262500>A</option>
|
||||
<option <?=$dx230[15]?> value=300000>A+</option>
|
||||
<option <?=$dx230[16]?> value=340000>S</option>
|
||||
<option <?=$dx230[17]?> value=382500>SS</option>
|
||||
<option <?=$dx230[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
차
|
||||
<select name=dex240 size=1>
|
||||
<option <?=$dx240[0];?> value=0>F</option>
|
||||
<option <?=$dx240[1];?> value=2500>E-</option>
|
||||
<option <?=$dx240[2];?> value=7500>E</option>
|
||||
<option <?=$dx240[3];?> value=15000>E+</option>
|
||||
<option <?=$dx240[4];?> value=25000>D-</option>
|
||||
<option <?=$dx240[5];?> value=37500>D</option>
|
||||
<option <?=$dx240[6];?> value=52500>D+</option>
|
||||
<option <?=$dx240[7];?> value=70000>C-</option>
|
||||
<option <?=$dx240[8];?> value=90000>C</option>
|
||||
<option <?=$dx240[9];?> value=112500>C+</option>
|
||||
<option <?=$dx240[10];?> value=137500>B-</option>
|
||||
<option <?=$dx240[11];?> value=165000>B</option>
|
||||
<option <?=$dx240[12];?> value=195000>B+</option>
|
||||
<option <?=$dx240[13];?> value=227500>A-</option>
|
||||
<option <?=$dx240[14];?> value=262500>A</option>
|
||||
<option <?=$dx240[15];?> value=300000>A+</option>
|
||||
<option <?=$dx240[16];?> value=340000>S</option>
|
||||
<option <?=$dx240[17];?> value=382500>SS</option>
|
||||
<option <?=$dx240[18];?> value=427500>SSS</option>
|
||||
<option <?=$dx240[0]?> value=0>F</option>
|
||||
<option <?=$dx240[1]?> value=2500>E-</option>
|
||||
<option <?=$dx240[2]?> value=7500>E</option>
|
||||
<option <?=$dx240[3]?> value=15000>E+</option>
|
||||
<option <?=$dx240[4]?> value=25000>D-</option>
|
||||
<option <?=$dx240[5]?> value=37500>D</option>
|
||||
<option <?=$dx240[6]?> value=52500>D+</option>
|
||||
<option <?=$dx240[7]?> value=70000>C-</option>
|
||||
<option <?=$dx240[8]?> value=90000>C</option>
|
||||
<option <?=$dx240[9]?> value=112500>C+</option>
|
||||
<option <?=$dx240[10]?> value=137500>B-</option>
|
||||
<option <?=$dx240[11]?> value=165000>B</option>
|
||||
<option <?=$dx240[12]?> value=195000>B+</option>
|
||||
<option <?=$dx240[13]?> value=227500>A-</option>
|
||||
<option <?=$dx240[14]?> value=262500>A</option>
|
||||
<option <?=$dx240[15]?> value=300000>A+</option>
|
||||
<option <?=$dx240[16]?> value=340000>S</option>
|
||||
<option <?=$dx240[17]?> value=382500>SS</option>
|
||||
<option <?=$dx240[18]?> value=427500>SSS</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>-</td>
|
||||
@@ -1529,11 +1571,11 @@ input { background-color:black;color:white; }
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type=submit name=isgen value=장수공격>
|
||||
<?='<input type=submit name=isgen value=장수평균>';?>
|
||||
<?='<input type=submit name=isgen value=장수평균>'?>
|
||||
</td>
|
||||
<td>
|
||||
<input type=submit name=isgen value=성벽공격>
|
||||
<?='<input type=submit name=isgen value=성벽평균>';?>
|
||||
<?='<input type=submit name=isgen value=성벽평균>'?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=3>
|
||||
@@ -1546,7 +1588,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
||||
?>
|
||||
</td></tr>
|
||||
</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>
|
||||
<td align=right></td>
|
||||
<td align=center>공격</td>
|
||||
@@ -1560,31 +1602,31 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
||||
|
||||
<?php
|
||||
for($i=0; $i <= 5; $i++) {
|
||||
printSimul($game, $i);
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=10; $i <= 14; $i++) {
|
||||
printSimul($game, $i);
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=20; $i <= 27; $i++) {
|
||||
printSimul($game, $i);
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=30; $i <= 38; $i++) {
|
||||
printSimul($game, $i);
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=40; $i <= 43; $i++) {
|
||||
printSimul($game, $i);
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
@@ -1592,20 +1634,19 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
function printSimul($game, $i) {
|
||||
$att = $game["att{$i}"];
|
||||
$def = $game["def{$i}"];
|
||||
$spd = $game["spd{$i}"];
|
||||
$avd = $game["avd{$i}"];
|
||||
$cst = $game["cst{$i}"];
|
||||
$ric = $game["ric{$i}"];
|
||||
function printSimul($admin, $i) {
|
||||
$att = $admin["att{$i}"];
|
||||
$def = $admin["def{$i}"];
|
||||
$spd = $admin["spd{$i}"];
|
||||
$avd = $admin["avd{$i}"];
|
||||
$cst = $admin["cst{$i}"];
|
||||
$ric = $admin["ric{$i}"];
|
||||
echo "
|
||||
<tr>
|
||||
<td align=right>".getTypename($i)."</td>
|
||||
<td align=right>".GameUnitConst::byId($i)->name."</td>
|
||||
<td align=center>$att</td>
|
||||
<td align=center>$def</td>
|
||||
<td align=center>$spd</td>
|
||||
|
||||
@@ -3,37 +3,44 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
increaseRefresh("명장일람", 2);
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$query = "select conlimit from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$query = "select con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
increaseRefresh("명장일람", 1);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>명장일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1136" />
|
||||
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
<tr><td align=center>
|
||||
<input type=submit name=btn value='유저 보기'>
|
||||
@@ -41,263 +48,226 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
</td></tr>
|
||||
</form>
|
||||
</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
|
||||
if(isset($btn) && $btn == "NPC 보기") {
|
||||
$sel = "npc>=2";
|
||||
} else {
|
||||
$sel = "npc<2";
|
||||
}
|
||||
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
|
||||
$nationName = [0=>'재야'];
|
||||
$nationColor = [0=>'#000000'];
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
$nationColor[$nation['nation']] = $nation['color'];
|
||||
}
|
||||
|
||||
$type = array(
|
||||
"명 성",
|
||||
"계 급",
|
||||
"계 략 성 공",
|
||||
"전 투 횟 수",
|
||||
"승 리",
|
||||
"승 률",
|
||||
"사 살",
|
||||
"살 상 률",
|
||||
"보 병 숙 련 도",
|
||||
"궁 병 숙 련 도",
|
||||
"기 병 숙 련 도",
|
||||
"귀 병 숙 련 도",
|
||||
"차 병 숙 련 도",
|
||||
"전 력 전 승 률",
|
||||
"통 솔 전 승 률",
|
||||
"일 기 토 승 률",
|
||||
"설 전 승 률",
|
||||
"베 팅 투 자 액",
|
||||
"베 팅 당 첨",
|
||||
"베 팅 수 익 금",
|
||||
"베 팅 수 익 률"
|
||||
);
|
||||
for($i=0; $i < 21; $i++) {
|
||||
switch($i) {
|
||||
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),"");
|
||||
|
||||
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] = $gen['nation'] == 0 ? "재야" : $nationName[$gen['nation']];
|
||||
$data[$k] = $gen['data'];
|
||||
$color[$k] = $gen['nation'] == 0 ? "#FFFFFF" : $nationColor[$gen['nation']];
|
||||
$pic[$k] = $gen['picture'];
|
||||
}else{
|
||||
$name[$k] = "-";
|
||||
$nation[$k] = "-";
|
||||
$data[$k] = "-";
|
||||
$color[$k] = $_basecolor4;
|
||||
$pic[$k] = "";
|
||||
}
|
||||
} else {
|
||||
$name[$k] = "???";
|
||||
$nation[$k] = "???";
|
||||
$data[$k] = $gen['data'];
|
||||
$color[$k] = $_basecolor4;
|
||||
$gen['imgsvr'] = 0;
|
||||
$pic[$k] = "9999.jpg";
|
||||
$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;
|
||||
}
|
||||
if($color[$k] == "") $color[$k] = $_basecolor4;
|
||||
if($nation[$k] == "") $nation[$k] = " ";
|
||||
if($pic[$k] == "") {
|
||||
echo "<td align=center> </td>";
|
||||
} else {
|
||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
||||
echo "<td align=center><img src={$imageTemp}/{$pic[$k]}></img></td>";
|
||||
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) {
|
||||
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
$general['nationName'] = $nationName[$general['nation']];
|
||||
|
||||
if(key_exists('picture', $general)){
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
}
|
||||
else{
|
||||
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
}
|
||||
|
||||
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++) {
|
||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
|
||||
}
|
||||
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||
$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($i == 5 || $i == 7 || $i == 20) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; }
|
||||
if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; }
|
||||
echo "<td align=center>{$data[$k]}</td>";
|
||||
}
|
||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
||||
if($typeValue == 'percent'){
|
||||
$general['printValue'] = number_format($value*100, 2).'%';
|
||||
}
|
||||
else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
return $general;
|
||||
}, $generals);
|
||||
|
||||
usort($typeGenerals, function($lhs, $rhs){
|
||||
//내림차순
|
||||
return -($lhs['value'] <=> $rhs['value']);
|
||||
});
|
||||
|
||||
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$typeName,
|
||||
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
|
||||
]);
|
||||
}
|
||||
|
||||
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(
|
||||
"getHorseName",
|
||||
"getWeapName",
|
||||
"getBookName",
|
||||
"getItemName"
|
||||
);
|
||||
|
||||
for($i=0; $i < 4; $i++) {
|
||||
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] = $gen['nation'] == 0 ? "재야" : $nationName[$gen['nation']];
|
||||
$color[$k] = $gen['nation'] == 0 ? "#FFFFFF" : $nationColor[$gen['nation']];
|
||||
$pic[$k] = $gen['picture'];
|
||||
}else{
|
||||
$name[$k] = "미발견";
|
||||
$nation[$k] = "-";
|
||||
$color[$k] = "";
|
||||
$pic[$k] = "";
|
||||
}
|
||||
if($color[$k] == "") $color[$k] = $_basecolor4;
|
||||
if($nation[$k] == "") $nation[$k] = " ";
|
||||
if($pic[$k] == "") {
|
||||
echo "<td align=center> </td>";
|
||||
} else {
|
||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
||||
echo "<td align=center><img 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] = $gen['nation'] == 0 ? "재야" : $nationName[$gen['nation']];
|
||||
$color[$k] = $gen['nation'] == 0 ? "#FFFFFF" : $nationColor[$gen['nation']];
|
||||
$pic[$k] = $gen['picture'];
|
||||
}else{
|
||||
$name[$k] = "미발견";
|
||||
$nation[$k] = "-";
|
||||
$color[$k] = "";
|
||||
$pic[$k] = "";
|
||||
}
|
||||
if($color[$k] == "") $color[$k] = $_basecolor4;
|
||||
if($nation[$k] == "") $nation[$k] = " ";
|
||||
if($pic[$k] == "") {
|
||||
echo "<td align=center> </td>";
|
||||
} else {
|
||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
||||
echo "<td align=center><img 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>
|
||||
<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>
|
||||
<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 displayItemInfo($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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,199 +3,116 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
increaseRefresh("왕조일람", 2);
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
increaseRefresh("왕조일람", 1);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>왕조일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
||||
<button onclick=window.close()>창 닫기</button><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
|
||||
if($select == 0) {
|
||||
$query = "select * from emperior order by no desc";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$empcount = MYDB_num_rows($result);
|
||||
$showCurrentNation = true;
|
||||
|
||||
for($i=0; $i < $empcount; $i++) {
|
||||
$emperior = MYDB_fetch_array($result);
|
||||
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
|
||||
|
||||
echo "
|
||||
<form action=a_emperior.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;color:white;' id=bg0>
|
||||
if($emperiors){
|
||||
$serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null);
|
||||
if($serverID == UniqueConst::$serverID){
|
||||
$showCurrentNation = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($showCurrentNation) {
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
?>
|
||||
|
||||
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td bgcolor=skyblue align=center colspan=8>
|
||||
<font size=5>{$emperior['phase']}</font>
|
||||
<input type=submit value='자세히'>
|
||||
<input type=hidden name=select value='{$emperior['no']}'>
|
||||
<td style="background-color:#333333;" align=center colspan=8>
|
||||
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
|
||||
|
||||
<a href="a_emperior_detail.php"><button>자세히</button></a>
|
||||
|
||||
<a href="a_history.php"><button>역사 보기</button></a>
|
||||
</td>
|
||||
</tr>
|
||||
<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>
|
||||
</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);
|
||||
|
||||
//background={$image}/{$emperior['l12pic']}
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
<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>
|
||||
<td bgcolor=skyblue align=center colspan=6>
|
||||
<font size=5>{$emperior['phase']}</font>
|
||||
<input type=submit value='전체보기'>
|
||||
<input type=hidden name=select value='0'>
|
||||
<td bgcolor=skyblue align=center colspan=8>
|
||||
<font size=5><?=$emperior['phase']?></font>
|
||||
|
||||
<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>
|
||||
</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 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 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>
|
||||
<td id=bg1 align=center width=80>국 력</td>
|
||||
<td align=center width=170><?=$emperior['power']?></td>
|
||||
<td id=bg1 align=center width=80>장 수</td>
|
||||
<td align=center width=170><?=$emperior['gennum']?></td>
|
||||
<td id=bg1 align=center width=80>속 령</td>
|
||||
<td align=center width=170><?=$emperior['citynum']?></td>
|
||||
<td id=bg1 align=center width=80>성 향</td>
|
||||
<td align=center width=170><?=$emperior['type']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>황 제</td>
|
||||
<td width=64> </td>
|
||||
<td width=332>{$emperior['l12name']}</td>
|
||||
<td align=center><?=$emperior['l12name']?></td>
|
||||
<td id=bg1 align=center>승 상</td>
|
||||
<td width=64> </td>
|
||||
<td width=332>{$emperior['l11name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><?=$emperior['l11name']?></td>
|
||||
<td id=bg1 align=center>위 장 군</td>
|
||||
<td width=64> </td>
|
||||
<td width=332>{$emperior['l10name']}</td>
|
||||
<td align=center><?=$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>
|
||||
<td align=center><?=$emperior['l9name']?></td>
|
||||
</tr>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -3,21 +3,31 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
|
||||
$select = Util::getReq('select', 'int', 0);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("왕조일람", 2);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>왕조일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<input type=button value='창 닫기' onclick=window.close()><br>
|
||||
</td></tr>
|
||||
@@ -25,17 +35,17 @@ increaseRefresh("왕조일람", 2);
|
||||
|
||||
<?php
|
||||
|
||||
if($select == 0) {
|
||||
if ($select == 0) {
|
||||
$query = "select * from emperior_table order by no desc";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$empcount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $empcount; $i++) {
|
||||
for ($i=0; $i < $empcount; $i++) {
|
||||
$emperior = MYDB_fetch_array($result);
|
||||
|
||||
echo "
|
||||
<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>
|
||||
<td bgcolor=skyblue align=center colspan=8>
|
||||
<font size=5>{$emperior['phase']}</font>
|
||||
@@ -49,38 +59,36 @@ if($select == 0) {
|
||||
</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>
|
||||
<td id=bg1 align=center width=80>국 력</td>
|
||||
<td align=center width=170>{$emperior['power']}</td>
|
||||
<td id=bg1 align=center width=80>장 수</td>
|
||||
<td align=center width=170>{$emperior['gennum']}</td>
|
||||
<td id=bg1 align=center width=80>속 령</td>
|
||||
<td align=center width=170>{$emperior['citynum']}</td>
|
||||
<td id=bg1 align=center width=80>성 향</td>
|
||||
<td align=center width=170>{$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>
|
||||
<td id=bg1 align=center>황 제</td>
|
||||
<td align=center>{$emperior['l12name']}</td>
|
||||
<td id=bg1 align=center>승 상</td>
|
||||
<td align=center>{$emperior['l11name']}</td>
|
||||
<td id=bg1 align=center>위 장 군</td>
|
||||
<td align=center>{$emperior['l10name']}</td>
|
||||
<td id=bg1 align=center>사 공</td>
|
||||
<td align=center>{$emperior['l9name']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>";
|
||||
}
|
||||
} else {
|
||||
$query = "select * from emperior_table where no='$select'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$emperior = MYDB_fetch_array($result);
|
||||
|
||||
//background={$image}/{$emperior['l12pic']}
|
||||
|
||||
echo "
|
||||
<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>
|
||||
<td bgcolor=skyblue align=center colspan=6>
|
||||
<font size=5>{$emperior['phase']}</font>
|
||||
@@ -192,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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</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>
|
||||
@@ -3,23 +3,32 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 9);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
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='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$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(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!isset($type) || $type == 0) {
|
||||
if ($type <= 0 || $type > 15) {
|
||||
$type = 9;
|
||||
}
|
||||
|
||||
@@ -28,15 +37,22 @@ if(!isset($type) || $type == 0) {
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>장수일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<script type="text/javascript" src=<?="../e_lib/jquery-3.2.1.min.js";?>></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select id='viewType' name='type' size=1>
|
||||
@@ -60,13 +76,15 @@ if(!isset($type) || $type == 0) {
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
$nationname[0] = "-";
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
switch ($type) { //FIXME: $query 처리 조심.
|
||||
case 1: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by nation"; break;
|
||||
case 2: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by leader desc"; break;
|
||||
case 3: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by power desc"; break;
|
||||
@@ -75,6 +93,7 @@ switch($type) {
|
||||
case 6: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by dedication desc"; break;
|
||||
case 7: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by level desc"; break;
|
||||
case 8: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by killturn"; break;
|
||||
default:
|
||||
case 9: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by connect desc"; break;
|
||||
case 10: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
|
||||
case 11: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by personal"; break;
|
||||
@@ -83,49 +102,49 @@ switch($type) {
|
||||
case 14: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by age desc"; break;
|
||||
case 15: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by npc desc"; break;
|
||||
}
|
||||
$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);
|
||||
|
||||
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 width=64 align=center id=bg1>얼 굴</td>
|
||||
<td width=100 align=center id=bg1>이 름</td>
|
||||
<td width=50 align=center id=bg1>연령</td>
|
||||
<td width=50 align=center id=bg1>성격</td>
|
||||
<td width=90 align=center id=bg1>특기</td>
|
||||
<td width=50 align=center id=bg1>레 벨</td>
|
||||
<td width=100 align=center id=bg1>국 가</td>
|
||||
<td width=60 align=center id=bg1>명 성</td>
|
||||
<td width=60 align=center id=bg1>계 급</td>
|
||||
<td width=80 align=center id=bg1>관 직</td>
|
||||
<td width=140 align=center id=bg1>이 름</td>
|
||||
<td width=45 align=center id=bg1>연령</td>
|
||||
<td width=45 align=center id=bg1>성격</td>
|
||||
<td width=80 align=center id=bg1>특기</td>
|
||||
<td width=45 align=center id=bg1>레 벨</td>
|
||||
<td width=140 align=center id=bg1>국 가</td>
|
||||
<td width=55 align=center id=bg1>명 성</td>
|
||||
<td width=55 align=center id=bg1>계 급</td>
|
||||
<td width=75 align=center id=bg1>관 직</td>
|
||||
<td width=45 align=center id=bg1>통솔</td>
|
||||
<td width=45 align=center id=bg1>무력</td>
|
||||
<td width=45 align=center id=bg1>지력</td>
|
||||
<td width=45 align=center id=bg1>삭턴</td>
|
||||
<td width=84 align=center id=bg1>벌점</td>
|
||||
<td width=70 align=center id=bg1>벌점</td>
|
||||
</tr>";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
for ($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
$nation = $nationname[$general['nation']];
|
||||
|
||||
if($general['level'] == 12) {
|
||||
if ($general['level'] == 12) {
|
||||
$lbonus = $nationlevel[$general['nation']] * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
} elseif ($general['level'] >= 5) {
|
||||
$lbonus = $nationlevel[$general['nation']];
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
}
|
||||
if($lbonus > 0) {
|
||||
if ($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
}
|
||||
|
||||
if($general['injury'] > 0) {
|
||||
$leader = floor($general['leader'] * (100 - $general['injury'])/100);
|
||||
$power = floor($general['power'] * (100 - $general['injury'])/100);
|
||||
$intel = floor($general['intel'] * (100 - $general['injury'])/100);
|
||||
if ($general['injury'] > 0) {
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$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>";
|
||||
@@ -135,44 +154,49 @@ for($j=0; $j < $gencount; $j++) {
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; }
|
||||
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
else { $name = "{$general['name']}"; }
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
$general['connect'] = round($general['connect'] / 10, 0) * 10;
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center><img src={$imageTemp}/{$general['picture']}></img></td>
|
||||
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>{$general['age']}세</td>
|
||||
<td align=center>".getGenChar($general['personal'])."</td>
|
||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
|
||||
<td align=center>{$nation}</td>
|
||||
<td align=center>".getHonor($general['experience'])."</td>
|
||||
<td align=center>".getDed($general['dedication'])."</td>
|
||||
<td align=center>"; echo getLevel($general['level']); echo "</td>
|
||||
<td align=center>";
|
||||
echo getLevel($general['level']);
|
||||
echo "</td>
|
||||
<td align=center>$leader</td>
|
||||
<td align=center>$power</td>
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['killturn']}</td>
|
||||
<td align=center>{$general['connect']}"; echo "<br>【".getConnect($general['connect'])."】</td>
|
||||
<td align=center>{$general['connect']}";
|
||||
echo "<br>【".getConnect($general['connect'])."】</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
MYDB_close($connect);
|
||||
?>
|
||||
|
||||
<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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#viewType").val("<?=$type?>").attr("selected", "selected");
|
||||
|
||||
@@ -3,104 +3,146 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
increaseRefresh("명예의전당", 2);
|
||||
|
||||
$session = Session::getInstance()->setReadOnly();
|
||||
$scenarioIdx = Util::getReq('scenarioIdx', 'int', null);
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>명예의 전당</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1136" />
|
||||
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=Font-size:13;word-break:break-all; id=bg0>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<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 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
|
||||
$type = array(
|
||||
"명 성",
|
||||
"계 급",
|
||||
"계 략 성 공",
|
||||
"전 투 횟 수",
|
||||
"승 리",
|
||||
"승 률",
|
||||
"사 살",
|
||||
"살 상 률",
|
||||
"보 병 숙 련 도",
|
||||
"궁 병 숙 련 도",
|
||||
"기 병 숙 련 도",
|
||||
"귀 병 숙 련 도",
|
||||
"차 병 숙 련 도",
|
||||
"전 력 전 승 률",
|
||||
"통 솔 전 승 률",
|
||||
"일 기 토 승 률",
|
||||
"설 전 승 률",
|
||||
"베 팅 투 자 액",
|
||||
"베 팅 당 첨",
|
||||
"베 팅 수 익 금",
|
||||
"베 팅 수 익 률"
|
||||
);
|
||||
for($i=0; $i < 21; $i++) {
|
||||
$query = "select * from hall where type={$i} order by rank";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$types = [
|
||||
["명 성", 'int'],
|
||||
["계 급", 'int'],
|
||||
["계 략 성 공", 'int'],
|
||||
["전 투 횟 수", 'int'],
|
||||
["승 리", 'int'],
|
||||
["승 률", 'percent'],
|
||||
["사 살", 'int'],
|
||||
["살 상 률", 'percent'],
|
||||
["보 병 숙 련 도", 'int'],
|
||||
["궁 병 숙 련 도", 'int'],
|
||||
["기 병 숙 련 도", 'int'],
|
||||
["귀 병 숙 련 도", 'int'],
|
||||
["차 병 숙 련 도", 'int'],
|
||||
["전 력 전 승 률", 'percent'],
|
||||
["통 솔 전 승 률", 'percent'],
|
||||
["일 기 토 승 률", 'percent'],
|
||||
["설 전 승 률", 'percent'],
|
||||
["베 팅 투 자 액", 'int'],
|
||||
["베 팅 당 첨", 'int'],
|
||||
["베 팅 수 익 금", 'int'],
|
||||
["베 팅 수 익 률", 'percent'],
|
||||
];
|
||||
|
||||
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>";
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
for($k=0; $k < 10; $k++) {
|
||||
$gen = MYDB_fetch_array($result);
|
||||
$name[$k] = $gen['name'];
|
||||
$nation[$k] = $gen['nation'];
|
||||
$data[$k] = $gen['data'];
|
||||
$color[$k] = $gen['color'];
|
||||
$pic[$k] = $gen['picture'];
|
||||
if($color[$k] == "") $color[$k] = $_basecolor4;
|
||||
if($nation[$k] == "") $nation[$k] = " ";
|
||||
/*
|
||||
if($pic[$k] == "") {
|
||||
echo "<td align=center> </td>";
|
||||
} else {
|
||||
$imageTemp = GetImageURL($gen['imgsvr']);
|
||||
echo "<td align=center><img src={$imageTemp}/{$pic[$k]}></img></td>";
|
||||
foreach($types as $idx=>[$typeName, $typeValue]) {
|
||||
$hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
|
||||
|
||||
$hallResult = array_map(function($general)use($typeValue){
|
||||
$aux = Json::decode($general['aux']);
|
||||
$general += $aux;
|
||||
if(!key_exists('bgColor', $general)){
|
||||
if(!key_exists('color', $general)){
|
||||
$general['bgColor'] = GameConst::$basecolor4;
|
||||
}
|
||||
else{
|
||||
$general['bgColor'] = $general['color'];
|
||||
}
|
||||
}
|
||||
|
||||
if(!key_exists('fgColor', $general)){
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// echo "</tr><tr>";
|
||||
if(key_exists('picture', $general)){
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
|
||||
}
|
||||
else{
|
||||
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
}
|
||||
|
||||
for($k=0; $k < 10; $k++) {
|
||||
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
|
||||
}
|
||||
if(!key_exists('printValue', $general)){
|
||||
$value = $general['value'];
|
||||
if($typeValue == 'percent'){
|
||||
$general['printValue'] = number_format($value*100, 2).'%';
|
||||
}
|
||||
else {
|
||||
$general['printValue'] = number_format($value);
|
||||
}
|
||||
}
|
||||
|
||||
echo "</tr><tr>";
|
||||
return $general;
|
||||
}, $hallResult);
|
||||
|
||||
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] = floor($data[$k]/100).".".($data[$k]%100)." %"; }
|
||||
if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; }
|
||||
echo "<td align=center>{$data[$k]}</td>";
|
||||
}
|
||||
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
|
||||
echo $templates->render('hallOfFrame', [
|
||||
'typeName'=>$typeName,
|
||||
'generals'=>$hallResult
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=Font-size:13;word-break:break-all; id=bg0>
|
||||
</div>
|
||||
<table align=center width=1100 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,54 +3,85 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$yearmonth = $_POST['yearmonth'];
|
||||
$btn = Util::getReq('btn');
|
||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||
$serverID = Util::getReq('serverID', 'string', null);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
increaseRefresh("연감", 5);
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$query = "select startyear,year,month,conlimit from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$query = "select map,con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
if(!$serverID){
|
||||
$serverID = UniqueConst::$serverID;
|
||||
}
|
||||
|
||||
if($serverID === UniqueConst::$serverID){
|
||||
increaseRefresh("연감", 1);
|
||||
}
|
||||
|
||||
$admin = $gameStor->getValues(['startyear','year','month','map_theme']);
|
||||
|
||||
$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(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
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),"");
|
||||
$history = MYDB_fetch_array($result);
|
||||
$e = ($history['year']*12) + $history['month'];
|
||||
|
||||
if(!$yearmonth) {
|
||||
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
|
||||
$s = $s_year * 12 + $s_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;
|
||||
|
||||
if($serverID !== UniqueConst::$serverID){
|
||||
$mapTheme = $db->queryFirstColumn('SELECT map FROM ng_games WHERE server_id=%s', $serverID)??'che';
|
||||
}
|
||||
else{
|
||||
$mapTheme = $admin['map_theme']??'che';
|
||||
}
|
||||
|
||||
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
||||
if($serverID !== UniqueConst::$serverID && !$yearmonth){
|
||||
$year = $s_year;
|
||||
$month = $s_month;
|
||||
}
|
||||
else if (!$yearmonth) {
|
||||
$year = $admin['year'];
|
||||
$month = $admin['month'] - 1;
|
||||
} else {
|
||||
$year = substr($yearmonth, 0, 3) - 0;
|
||||
$month = substr($yearmonth, 3, 2) - 0;
|
||||
$year = intdiv($yearmonth, 100);
|
||||
$month = $yearmonth % 100;
|
||||
|
||||
if($btn == "◀◀ 이전달") {
|
||||
if ($btn == "◀◀ 이전달") {
|
||||
$month -= 1;
|
||||
} elseif($btn == "다음달 ▶▶") {
|
||||
} elseif ($btn == "다음달 ▶▶") {
|
||||
$month += 1;
|
||||
}
|
||||
}
|
||||
$now = ($year*12) + $month;
|
||||
|
||||
if($now < $s) { $now = $s; }
|
||||
if($now > $e) { $now = $e; }
|
||||
if ($now < $s) {
|
||||
$now = $s;
|
||||
}
|
||||
if ($now > $e) {
|
||||
$now = $e;
|
||||
}
|
||||
|
||||
$year = floor($now / 12);
|
||||
$year = intdiv($now, 12);
|
||||
$month = $now % 12;
|
||||
if($month <= 0) {
|
||||
if ($month <= 0) {
|
||||
$year -= 1;
|
||||
$month += 12;
|
||||
}
|
||||
@@ -60,14 +91,24 @@ if($month <= 0) {
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>연감</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 연감</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<form name=form1 method=post>
|
||||
@@ -75,24 +116,19 @@ if($month <= 0) {
|
||||
<input type=submit name=btn value="◀◀ 이전달">
|
||||
<select name=yearmonth size=1>
|
||||
<?php
|
||||
$query = "select year,month from history";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$histCount = MYDB_num_rows($result);
|
||||
for($i=0; $i < $histCount; $i++) {
|
||||
$history = MYDB_fetch_array($result);
|
||||
$value = "".$history['year'].StringUtil::Fill2($history['month'], 2, "0");
|
||||
if($history['year'] == $year && $history['month'] == $month) {
|
||||
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC', $serverID);
|
||||
foreach($dates as [$hYear, $hMonth]){
|
||||
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
|
||||
if ($hYear == $year && $hMonth == $month) {
|
||||
echo "
|
||||
<option selected value={$value}>{$history['year']}년 {$history['month']}월</option>";
|
||||
<option selected value={$value}>{$hYear}년 {$hMonth}월</option>";
|
||||
} else {
|
||||
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'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$history = MYDB_fetch_array($result);
|
||||
$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);
|
||||
?>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
@@ -100,17 +136,16 @@ $history = MYDB_fetch_array($result);
|
||||
</form>
|
||||
</td></tr>
|
||||
</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 height=520>
|
||||
<td width=698>
|
||||
<iframe src='map_history.php?year=<?=$year;?>&month=<?=$month;?>' width=698 height=520 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no>
|
||||
</iframe>
|
||||
</td>
|
||||
<td width=98 valign=top><?=$history['nation'];?></td>
|
||||
<td width=78 valign=top><?=$history['power'];?></td>
|
||||
<td width=58 valign=top><?=$history['gen'];?></td>
|
||||
<td width=58 valign=top><?=$history['city'];?></td>
|
||||
<?=getMapHtml($mapTheme);?>
|
||||
|
||||
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$history['nation']?></td>
|
||||
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$history['power']?></td>
|
||||
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$history['gen']?></td>
|
||||
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$history['city']?></td>
|
||||
</tr>
|
||||
<tr><td colspan=5 align=center id=bg1>중 원 정 세</td></tr>
|
||||
<tr>
|
||||
@@ -125,11 +160,16 @@ $history = MYDB_fetch_array($result);
|
||||
</td>
|
||||
</tr>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
<script>
|
||||
reloadWorldMap({
|
||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||
showMe:false,
|
||||
neutralView:true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,33 +4,39 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
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='{$_SESSION['userID']}'";
|
||||
$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']);
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>세력일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
||||
<?=WebUtil::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>
|
||||
|
||||
<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>
|
||||
</table>
|
||||
<?php
|
||||
@@ -122,19 +128,19 @@ for($i=1; $i <= $count; $i++) {
|
||||
else { $l5 = $level5['name']; }
|
||||
|
||||
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>
|
||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=123 align=center id=bg1>성 향</td>
|
||||
<td width=123 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
||||
<td width=123 align=center id=bg1>작 위</td>
|
||||
<td width=123 align=center>".getNationLevel($nation['level'])."</td>
|
||||
<td width=123 align=center id=bg1>국 력</td>
|
||||
<td width=123 align=center>{$nation['power']}</td>
|
||||
<td width=123 align=center id=bg1>장수 / 속령</td>
|
||||
<td width=123 align=center>{$gencount} / {$citycount}</td>
|
||||
<td width=80 align=center id=bg1>성 향</td>
|
||||
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
|
||||
<td width=80 align=center id=bg1>작 위</td>
|
||||
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
|
||||
<td width=80 align=center id=bg1>국 력</td>
|
||||
<td width=170 align=center>{$nation['power']}</td>
|
||||
<td width=80 align=center id=bg1>장수 / 속령</td>
|
||||
<td width=170 align=center>{$gencount} / {$citycount}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
|
||||
@@ -204,7 +210,7 @@ $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
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>
|
||||
<td colspan=5 align=center>【 재 야 】</td>
|
||||
</tr>
|
||||
@@ -239,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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,12 +3,21 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
increaseRefresh("빙의일람", 2);
|
||||
|
||||
if($type == 0) {
|
||||
$type = Util::getReq('type', 'int', 1);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
if($type <= 0 || $type > 8){
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("빙의일람", 2);
|
||||
|
||||
$sel = [];
|
||||
$sel[$type] = "selected";
|
||||
|
||||
?>
|
||||
@@ -16,36 +25,46 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>빙의일람</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1];?> value=1>이름</option>
|
||||
<option <?=$sel[2];?> value=2>국가</option>
|
||||
<option <?=$sel[3];?> value=3>종능</option>
|
||||
<option <?=$sel[4];?> value=4>통솔</option>
|
||||
<option <?=$sel[5];?> value=5>무력</option>
|
||||
<option <?=$sel[6];?> value=6>지력</option>
|
||||
<option <?=$sel[7];?> value=7>명성</option>
|
||||
<option <?=$sel[8];?> value=8>계급</option>
|
||||
<option <?=$sel[1]??''?> value=1>이름</option>
|
||||
<option <?=$sel[2]??''?> value=2>국가</option>
|
||||
<option <?=$sel[3]??''?> value=3>종능</option>
|
||||
<option <?=$sel[4]??''?> value=4>통솔</option>
|
||||
<option <?=$sel[5]??''?> value=5>무력</option>
|
||||
<option <?=$sel[6]??''?> value=6>지력</option>
|
||||
<option <?=$sel[7]??''?> value=7>명성</option>
|
||||
<option <?=$sel[8]??''?> value=8>계급</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$nationname = [];
|
||||
$nationname[0] = "-";
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
switch ($type) {//FIXME: $query 처리 부실
|
||||
default:
|
||||
case 1: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by binary(name)"; break;
|
||||
case 2: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by nation"; break;
|
||||
case 3: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by sum desc"; break;
|
||||
@@ -55,11 +74,11 @@ switch($type) {
|
||||
case 7: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by experience"; break;
|
||||
case 8: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by dedication"; break;
|
||||
}
|
||||
$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);
|
||||
|
||||
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 width=102 align=center id=bg1>희생된 장수</td>
|
||||
<td width=102 align=center id=bg1>악령 이름</td>
|
||||
@@ -74,13 +93,17 @@ echo"
|
||||
<td width=78 align=center id=bg1>명성</td>
|
||||
<td width=78 align=center id=bg1>계급</td>
|
||||
</tr>";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
for ($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
$nation = $nationname[$general['nation']];
|
||||
|
||||
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; }
|
||||
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
else { $name = "{$general['name']}"; }
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -88,8 +111,8 @@ for($j=0; $j < $gencount; $j++) {
|
||||
<td align=center>{$general['name2']}</td>
|
||||
<td align=center>Lv {$general['explevel']}</td>
|
||||
<td align=center>{$nation}</td>
|
||||
<td align=center>".getGenChar($general['personal'])."</td>
|
||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>{$general['sum']}</td>
|
||||
<td align=center>{$general['leader']}</td>
|
||||
<td align=center>{$general['power']}</td>
|
||||
@@ -102,14 +125,12 @@ echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
MYDB_close($connect);
|
||||
?>
|
||||
|
||||
<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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,20 +4,23 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력도", 2);
|
||||
checkTurn($connect);
|
||||
checkTurn();
|
||||
|
||||
$query = "select conlimit from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$mapTheme = $gameStor->map_theme??'che';
|
||||
|
||||
$query = "select map,con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$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']);
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -25,11 +28,13 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>세력도</title>
|
||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/base_map.js"></script>
|
||||
<script src="js/map.js"></script>
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
@@ -40,36 +45,36 @@ $(function(){
|
||||
|
||||
});
|
||||
</script>
|
||||
<link href="css/normalize.css" rel="stylesheet">
|
||||
<link href="css/common.css" rel="stylesheet">
|
||||
<link href="css/map.css" rel="stylesheet">
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
<td width=498 valign=top>
|
||||
<?php AllLog(34); ?>
|
||||
<?=getGeneralPublicRecordRecent(34)?>
|
||||
</td>
|
||||
<td width=698>
|
||||
<?=getMapHtml()?>
|
||||
<?=getMapHtml($mapTheme)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 valign=top>
|
||||
<?php History(34); ?>
|
||||
<?=getWorldHistoryRecent(34)?>
|
||||
</td>
|
||||
</tr>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,258 +3,220 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("갱신정보", 2);
|
||||
|
||||
$query = "select year,month,refresh,maxrefresh,maxonline from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$game = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
|
||||
|
||||
$fp = @fopen("logs/_traffic.txt", "r");
|
||||
@fseek($fp, -1000, SEEK_END);
|
||||
$file = @fread($fp, 1000);
|
||||
@fclose($fp);
|
||||
$log = explode("\n",$file);
|
||||
$str = "";
|
||||
for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."<br>"; }
|
||||
echo $str;
|
||||
$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
|
||||
|
||||
$date = [];
|
||||
$year = [];
|
||||
$month = [];
|
||||
$refresh = [];
|
||||
$online = [];
|
||||
|
||||
$curonline = getOnlineNum();
|
||||
for($i=0; $i < 11; $i++) {
|
||||
$parse = explode("|", $log[count($log)-12+$i]);
|
||||
$date[$i] = trim($parse[0]);
|
||||
$year[$i] = trim($parse[1]);
|
||||
$month[$i] = trim($parse[2]);
|
||||
$refresh[$i] = trim($parse[3]);
|
||||
$online[$i] = trim($parse[4]);
|
||||
foreach($log as $i=>$value){
|
||||
$parse = Json::decode($value);
|
||||
$date[$i] = $parse[0];
|
||||
$year[$i] = $parse[1];
|
||||
$month[$i] = $parse[2];
|
||||
$refresh[$i] = $parse[3];
|
||||
$online[$i] = $parse[4];
|
||||
}
|
||||
$year[] = $admin['year'];
|
||||
$month[] = $admin['month'];
|
||||
$date[] = date('Y-m-d H:i:s');
|
||||
|
||||
if ($admin['maxrefresh'] == 0) {
|
||||
$admin['maxrefresh'] = 1;
|
||||
}
|
||||
if ($admin['maxrefresh'] < $admin['refresh']) {
|
||||
$admin['maxrefresh'] = $admin['refresh'];
|
||||
}
|
||||
if ($admin['maxonline'] == 0) {
|
||||
$admin['maxonline'] = 1;
|
||||
}
|
||||
if ($admin['maxonline'] < $curonline) {
|
||||
$admin['maxonline'] = $curonline;
|
||||
}
|
||||
if($game['maxrefresh'] == 0) { $game['maxrefresh'] = 1; }
|
||||
if($game['maxrefresh'] < $game['refresh']) { $game['maxrefresh'] = $game['refresh']; }
|
||||
if($game['maxonline'] == 0) { $game['maxonline'] = 1; }
|
||||
if($game['maxonline'] < $curonline) { $game['maxonline'] = $curonline; }
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>트래픽정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/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>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
<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>
|
||||
<?php
|
||||
for($i=0; $i < 11; $i++) {
|
||||
$w = round($refresh[$i] / $game['maxrefresh'] * 100, 1);
|
||||
if($w >= 100) { $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 = getColor($w);
|
||||
$dt = substr($date[$i], 11, 5);
|
||||
echo "
|
||||
$refresh[] = $admin['refresh'];
|
||||
foreach($refresh as $i=>$value){
|
||||
$w = round($value / $admin['maxrefresh'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center>{$year[$i]}년 {$month[$i]}월</td>
|
||||
<td width=60 align=center id=bg2>{$dt}</td>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||
<td width=2 align=center id=bg1></td>
|
||||
<td width=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>{$refresh[$i]} </td>
|
||||
<td width={$w2}% id=bg0><font size=1> </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<td width=320>
|
||||
<?php if($w == 0): ?>
|
||||
<span class="out_bar"><?=$value?></span>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||
<?php else:?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||
<?php endif;?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
<?php
|
||||
}
|
||||
$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 = getColor($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>{$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=30 align=center id=bg0>최고기록: {$game['maxrefresh']}</td>
|
||||
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
|
||||
</tr>
|
||||
";
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<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>
|
||||
<?php
|
||||
for($i=0; $i < 11; $i++) {
|
||||
$w = round($online[$i] / $game['maxonline'] * 100, 1);
|
||||
if($w >= 100) { $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 = getColor($w);
|
||||
$dt = substr($date[$i], 11, 5);
|
||||
echo "
|
||||
$online[] = $curonline;
|
||||
foreach($online as $i=>$value){
|
||||
$w = round($value / $admin['maxonline'] * 100, 1);
|
||||
$color = getTrafficColor($w);
|
||||
$dt = substr($date[$i], 11, 5); ?>
|
||||
<tr height=30>
|
||||
<td width=100 align=center>{$year[$i]}년 {$month[$i]}월</td>
|
||||
<td width=60 align=center id=bg2>{$dt}</td>
|
||||
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
|
||||
<td width=60 align=center id=bg2><?=$dt?></td>
|
||||
<td width=2 align=center id=bg1></td>
|
||||
<td width=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>{$online[$i]} </td>
|
||||
<td width={$w2}% id=bg0><font size=1> </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<td width=320>
|
||||
<?php if($w == 0): ?>
|
||||
<span class="out_bar"><?=$value?></span>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
|
||||
<?php else:?>
|
||||
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
|
||||
<?php endif;?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
<?php
|
||||
}
|
||||
$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 = getColor($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=30 align=center id=bg0>최고기록: {$game['maxonline']}</td>
|
||||
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
|
||||
</tr>
|
||||
";
|
||||
?>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<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>
|
||||
<?php
|
||||
$query = "select sum(refresh) as refresh,sum(connect) as connect from general";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$user = MYDB_fetch_array($result);
|
||||
$user['connect'] = round($user['connect'], 1);
|
||||
$maxrefresh = $user['refresh'];
|
||||
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
|
||||
$max_refresh['name'] = '접속자 총합';
|
||||
|
||||
$w = round($maxrefresh / $maxrefresh * 100, 1);
|
||||
$w2 = round(100 - $w, 1);
|
||||
$color = getColor($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>
|
||||
";
|
||||
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
|
||||
|
||||
$query = "select name,refresh,connect from general order by refresh desc limit 0,5";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$count = MYDB_num_rows($result);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$user = MYDB_fetch_array($result);
|
||||
|
||||
$w = round($user['refresh'] / $maxrefresh * 100, 1);
|
||||
foreach ($refresh_result as $i=>$user) {
|
||||
$w = round($user['refresh'] / $max_refresh['refresh'] * 100, 1);
|
||||
$w2 = round(100 - $w, 1);
|
||||
$color = getColor($w);
|
||||
echo "
|
||||
$color = getTrafficColor($w);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center>{$user['name']}</td>
|
||||
<td width=98 align=center>{$user['connect']}({$user['refresh']})</td>
|
||||
<td width=798 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 width=98 align=center><?=$user['name']?></td>
|
||||
<td width=98 align=center><?=$user['connect']?>(<?=$user['refresh']?>)</td>
|
||||
<td width=798>
|
||||
<?php if($w == 0): ?>
|
||||
<?php elseif($w < 10): ?>
|
||||
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||
<?php else:?>
|
||||
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
function getColor($per) {
|
||||
function getTrafficColor($per)
|
||||
{
|
||||
$r = getHex($per);
|
||||
$b = getHex(100 - $per);
|
||||
$color = $r . "00" . $b;
|
||||
return $color;
|
||||
return '#'.$color;
|
||||
}
|
||||
|
||||
function getHex($dec) {
|
||||
$hex = floor($dec * 255 / 100);
|
||||
$code = getHexCode(floor($hex / 16));
|
||||
function getHex($dec)
|
||||
{
|
||||
$hex = intdiv($dec * 255, 100);
|
||||
$code = getHexCode(intdiv($hex, 16));
|
||||
$code .= getHexCode($hex % 16);
|
||||
return $code;
|
||||
}
|
||||
|
||||
function getHexCode($hex) {
|
||||
switch($hex) {
|
||||
function getHexCode($hex)
|
||||
{
|
||||
switch ($hex) {
|
||||
case 0: return "0"; case 1: return "1"; case 2: return "2"; case 3: return "3";
|
||||
case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7";
|
||||
case 8: return "8"; case 9: return "9"; case 10: return "A"; case 11: return "B";
|
||||
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,29 +3,45 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
$connect = dbConn();
|
||||
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("설문조사", 1);
|
||||
|
||||
$query = "select no,vote from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin |= $session->userGrade >= 5;
|
||||
|
||||
$query = "select no,vote from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select develcost,voteopen,vote,votecomment from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
|
||||
$vote = explode("|", $admin['vote']);
|
||||
if($vote[0] == "") {
|
||||
$vote[0] = "-";
|
||||
}
|
||||
$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']);
|
||||
$vote_title = $admin['vote_title']??'-';
|
||||
$vote = $admin['vote']?:['-'];
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>설문조사</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 설문조사</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<style>
|
||||
.little_bar{
|
||||
float:left;
|
||||
position:relative;
|
||||
height:17px;
|
||||
line-height:17px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function captureKey(e) {
|
||||
if(e.keyCode == 13 && e.srcElement.type == 'text') {
|
||||
@@ -38,56 +54,56 @@ function captureKey(e) {
|
||||
|
||||
</head>
|
||||
<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>
|
||||
</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>
|
||||
<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
|
||||
|
||||
if(Session::getUserGrade() >= 5) {
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=48 align=center><input type=submit name=btn value='알림'></td>
|
||||
<td width=98 align=center><input type=submit name=btn value='수정'></td>
|
||||
<td width=848 align=left><input type=text name=title style=width:848;></td>
|
||||
<td width=848 align=left><input type=text name=title style=width:848px;></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
$vote[0] = Tag2Code($vote[0]);
|
||||
$vote_title = Tag2Code($vote_title);
|
||||
echo "
|
||||
<tr>
|
||||
<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>
|
||||
";
|
||||
|
||||
$query = "select no from general where vote>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), "");
|
||||
$voteCount = MYDB_num_rows($result);
|
||||
|
||||
$query = "select no 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), "");
|
||||
$allCount = MYDB_num_rows($result);
|
||||
|
||||
$percentage = round($voteCount / $allCount * 100, 1);
|
||||
|
||||
$voteTypeCount = count($vote);
|
||||
for($i=1; $i < $voteTypeCount; $i++) {
|
||||
for ($i=1; $i < $voteTypeCount; $i++) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=48 align=center style=color:".getNewColor($i)."; bgcolor=".getColor($i).">{$i}.</td>
|
||||
<td width=48 align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$i}.</td>
|
||||
<td width=98 align=center>
|
||||
";
|
||||
if($me['vote'] == 0 && $me['no'] > 0) {
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
<input type=radio name=sel value={$i}>
|
||||
";
|
||||
} elseif($admin['voteopen'] >= 1 || Session::getUserGrade() >= 5) {
|
||||
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
$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);
|
||||
|
||||
$per = @round($vCount / $voteCount * 100, 1);
|
||||
@@ -106,7 +122,7 @@ for($i=1; $i < $voteTypeCount; $i++) {
|
||||
echo "
|
||||
<tr>
|
||||
";
|
||||
if($me['vote'] == 0 && $me['no'] > 0) {
|
||||
if ($me['vote'] == 0 && $me['no'] > 0) {
|
||||
echo "
|
||||
<td align=center>투표</td>
|
||||
<td align=center><input type=submit name=btn value='투표'></td>
|
||||
@@ -121,59 +137,59 @@ echo "
|
||||
</tr>
|
||||
";
|
||||
|
||||
if(Session::getUserGrade() >= 5) {
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center><input type=submit name=btn value='리셋'></td>
|
||||
<td align=center><input type=submit name=btn value='추가'></td>
|
||||
<td align=left><input type=text name=str style=width:848;></td>
|
||||
<td align=left><input type=text name=str style=width:848px;></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
if($admin['votecomment'] != "") {
|
||||
$comment = explode("|", $admin['votecomment']);
|
||||
if ($admin['votecomment']) {
|
||||
$comment = $admin['votecomment'];
|
||||
$commentCount = count($comment);
|
||||
} else {
|
||||
$commentCount = 0;
|
||||
}
|
||||
echo "
|
||||
</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 align=center id=bg1>댓 글</td>
|
||||
</tr>
|
||||
";
|
||||
for($i=0; $i < $commentCount; $i++) {
|
||||
$cmt = explode(":", $comment[$i]);
|
||||
for ($i=0; $i < $commentCount; $i++) {
|
||||
$cmt = $comment[$i];
|
||||
$cmt[2] = Tag2Code($cmt[2]);
|
||||
$j = $i+1;
|
||||
echo "
|
||||
<tr>
|
||||
<td width=28 align=center>{$j}.</td>
|
||||
<td width=83 align=center>{$cmt[0]}</td>
|
||||
<td width=83 align=center>{$cmt[1]}</td>
|
||||
<td width=788 align=left> {$cmt[2]}</td>
|
||||
<td width=130 align=center>{$cmt[0]}</td>
|
||||
<td width=130 align=center>{$cmt[1]}</td>
|
||||
<td width=712 align=left> {$cmt[2]}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
if($me['no'] > 0) {
|
||||
if ($me['no'] > 0) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=108 colspan=2 align=center>-</td>
|
||||
<td width=83 align=center><input type=submit name=btn value='댓글'></td>
|
||||
<td align=left><input type=text name=comment maxlength=60 style=width:798; onkeydown='return captureKey(event)'></td>
|
||||
<td width=158 colspan=2 align=center>-</td>
|
||||
<td width=130 align=center><input type=submit name=btn value='댓글'></td>
|
||||
<td align=left><input type=text name=comment maxlength=60 style=width:700px; onkeydown='return captureKey(event)'></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table align=center width=1000 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>
|
||||
전 체 통 계
|
||||
<?php
|
||||
if(Session::getUserGrade() >= 5) {
|
||||
if ($isVoteAdmin) {
|
||||
echo "
|
||||
<input type=submit name=btn value='숨김'>
|
||||
<input type=submit name=btn value='전체통계만'>
|
||||
@@ -182,112 +198,172 @@ if(Session::getUserGrade() >= 5) {
|
||||
echo "
|
||||
</font></td></tr>";
|
||||
|
||||
if($admin['voteopen'] >= 1 || Session::getUserGrade() >= 5) {
|
||||
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=98 align=center>전 체</td>
|
||||
<td width=130 align=center>전 체</td>
|
||||
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
|
||||
<td width=768 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=742>
|
||||
";
|
||||
|
||||
$query = "select no from general where npc<2";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$memCount = MYDB_num_rows($result);
|
||||
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
|
||||
|
||||
$query = "select nation,vote from general where npc<2";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$count = MYDB_num_rows($result);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$vote = MYDB_fetch_array($result);
|
||||
$totalVote = [];
|
||||
$nationVoteCount = [];
|
||||
$nationVote = [];
|
||||
|
||||
$totalVote[$vote['vote']]++;
|
||||
if($vote['vote'] > 0) { $nationVoteCount[$vote['nation']]++; }
|
||||
$nationVote[$vote['nation']][$vote['vote']]++;
|
||||
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
|
||||
$nation = $row['nation'];
|
||||
$ownVote = $row['vote'];
|
||||
$cnt = $row['cnt'];
|
||||
|
||||
if (!isset($totalVote[$ownVote])) {
|
||||
$totalVote[$ownVote] = 0;
|
||||
}
|
||||
|
||||
if (!isset($nationVoteCount[$nation])) {
|
||||
$nationVoteCount[$nation] = 0;
|
||||
$nationVote[$nation] = [];
|
||||
}
|
||||
|
||||
if (!isset($nationVote[$nation][$ownVote])) {
|
||||
$nationVote[$nation][$ownVote] = 0;
|
||||
}
|
||||
|
||||
$totalVote[$ownVote] += $cnt;
|
||||
$nationVoteCount[$nation] += $cnt;
|
||||
$nationVote[$nation][$ownVote] += $cnt;
|
||||
}
|
||||
|
||||
for($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = @round($totalVote[$i] / $memCount * 100, 1);
|
||||
$totalPer = 0;
|
||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(($totalVote[$i]??0) * 100 / $memCount, 1);
|
||||
if($i == $voteTypeCount-1){
|
||||
$per = 100-$totalPer;
|
||||
}
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
|
||||
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
echo "
|
||||
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getColor($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 "
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
if($admin['voteopen'] >= 2 || Session::getUserGrade() >= 5) {
|
||||
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
$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);
|
||||
if ($memCount == 0) {
|
||||
$memCount = 1;
|
||||
}
|
||||
|
||||
if(!$nationVoteCount[0]) { $nationVoteCount[0] = 0; }
|
||||
$percentage = @round($nationVoteCount[0] / $memCount * 100, 1);
|
||||
if (!isset($nationVoteCount[0])) {
|
||||
$nationVoteCount[0] = 0;
|
||||
}
|
||||
$percentage = round($nationVoteCount[0] / $memCount * 100, 1);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center bgcolor=black>재 야</td>
|
||||
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</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>
|
||||
";
|
||||
|
||||
for($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = @round($nationVote[0][$i] / $memCount * 100, 1);
|
||||
$totalPer = 0;
|
||||
for ($i=0; $i < $voteTypeCount; $i++) {
|
||||
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
|
||||
if($i == $voteTypeCount-1){
|
||||
$per = 100-$totalPer;
|
||||
}
|
||||
else{
|
||||
$totalPer += $per;
|
||||
}
|
||||
// if($per < 5) { $vote['cnt'] = " "; }
|
||||
echo "
|
||||
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getColor($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 "
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$query = "select nation,color,name,gennum from nation order by gennum desc";
|
||||
$nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$nationcount = MYDB_num_rows($nationResult);
|
||||
for($i=0; $i < $nationcount; $i++) {
|
||||
for ($i=0; $i < $nationcount; $i++) {
|
||||
$nation = MYDB_fetch_array($nationResult);
|
||||
|
||||
$query = "select no from general where nation='{$nation['nation']}' 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);
|
||||
|
||||
if(!$nationVoteCount[$nation['nation']]) { $nationVoteCount[$nation['nation']] = 0; }
|
||||
$percentage = @round($nationVoteCount[$nation['nation']] / $memCount * 100, 1);
|
||||
|
||||
|
||||
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
|
||||
if($memCount == 0){
|
||||
$percentage = 100;
|
||||
}
|
||||
else{
|
||||
$percentage = round($voteCount / $memCount * 100, 1);
|
||||
}
|
||||
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
|
||||
<td align=center>{$nationVoteCount[$nation['nation']]} / {$memCount} ({$percentage} %)</td>
|
||||
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</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>
|
||||
";
|
||||
|
||||
for($k=0; $k < $voteTypeCount; $k++) {
|
||||
$per = @round($nationVote[$nation['nation']][$k] / $memCount * 100, 1);
|
||||
$totalPer = 0;
|
||||
for ($k=0; $k < $voteTypeCount; $k++) {
|
||||
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'] = " "; }
|
||||
echo "
|
||||
<td width={$per}% align=center style=color:".getNewColor($k)."; bgcolor=".getColor($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 "
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
@@ -296,21 +372,22 @@ if($admin['voteopen'] >= 2 || Session::getUserGrade() >= 5) {
|
||||
?>
|
||||
</form>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
function getColor($type) {
|
||||
if($type > 0) {
|
||||
function getVoteColor($type)
|
||||
{
|
||||
if ($type > 0) {
|
||||
$type = (($type - 1) % 7) + 1;
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
switch ($type) {
|
||||
default:
|
||||
case 0: $color = "black"; break;
|
||||
case 1: $color = "red"; break;
|
||||
case 2: $color = "orange"; break;
|
||||
@@ -324,12 +401,13 @@ function getColor($type) {
|
||||
return $color;
|
||||
}
|
||||
|
||||
function getNewColor($type) {
|
||||
if($type > 0) {
|
||||
function getNewColor($type)
|
||||
{
|
||||
if ($type > 0) {
|
||||
$type = (($type - 1) % 7) + 1;
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
switch ($type) {
|
||||
case 2: $color = "black"; break;
|
||||
case 3: $color = "black"; break;
|
||||
default:$color = "white"; break;
|
||||
@@ -337,5 +415,3 @@ function getNewColor($type) {
|
||||
|
||||
return $color;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,55 +3,71 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$msg = Util::getReq('msg');
|
||||
$msg2 = Util::getReq('msg2');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("거래장", 2);
|
||||
|
||||
$query = "select no,special,con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,special,con,turntime from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select conlimit from game limit 1";
|
||||
$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) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$query = "select no from auction where no1='{$me['no']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$tradeCount = MYDB_num_rows($result);
|
||||
|
||||
$query = "select no from auction where no2='{$me['no']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$bidCount = MYDB_num_rows($result);
|
||||
|
||||
$btCount = $tradeCount + $bidCount;
|
||||
|
||||
if(Session::getUserGrade() >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
|
||||
if ($session->userGrade >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
|
||||
$btn = "submit";
|
||||
} else {
|
||||
$btn = "hidden";
|
||||
}
|
||||
|
||||
if($msg == "") $msg = "-";
|
||||
if($msg2 == "") $msg2 = "-";
|
||||
if ($msg == "") {
|
||||
$msg = "-";
|
||||
}
|
||||
if ($msg2 == "") {
|
||||
$msg2 = "-";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>거래장</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
|
||||
<title><?=UniqueConst::$serverName?>: 거래장</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
<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 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 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>
|
||||
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr>
|
||||
<tr align=center id=bg1>
|
||||
@@ -69,21 +85,35 @@ if($msg2 == "") $msg2 = "-";
|
||||
</tr>
|
||||
<?php
|
||||
$query = "select * from auction where type=0 order by expire";
|
||||
$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);
|
||||
|
||||
$chk = 0;
|
||||
for($i=0; $i < $count; $i++) {
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$auction = MYDB_fetch_array($result);
|
||||
$itemname = GetStuffName($auction['stuff']);
|
||||
$radio = ""; $alert = ""; $alert2 = "";
|
||||
if($auction['no1'] == $me['no']) { $radio = " disabled"; }
|
||||
elseif($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
|
||||
elseif($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
|
||||
elseif($chk == 0) { $radio = " checked"; $chk = 1; }
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr($pv, 0, 4);
|
||||
if($auction['stuff'] != 0) { $pv = '-'; }
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
if ($auction['stuff'] != 0) {
|
||||
$pv = '-';
|
||||
}
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
@@ -103,13 +133,13 @@ for($i=0; $i < $count; $i++) {
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center id=bg1>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg);?></td>
|
||||
<td colspan=10><?=ConvertLog($msg)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>입찰등록</td>
|
||||
<td colspan=10>
|
||||
지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?=$btn;?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
<input type=<?=$btn?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -122,7 +152,7 @@ for($i=0; $i < $count; $i++) {
|
||||
판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
|
||||
<input type=<?=$btn;?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
|
||||
<input type=<?=$btn?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -135,7 +165,7 @@ for($i=0; $i < $count; $i++) {
|
||||
</form>
|
||||
</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>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<form method=post action=c_auction.php>
|
||||
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr>
|
||||
<tr align=center id=bg1>
|
||||
@@ -153,21 +183,35 @@ for($i=0; $i < $count; $i++) {
|
||||
</tr>
|
||||
<?php
|
||||
$query = "select * from auction where type=1 order by expire";
|
||||
$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);
|
||||
|
||||
$chk = 0;
|
||||
for($i=0; $i < $count; $i++) {
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$auction = MYDB_fetch_array($result);
|
||||
$itemname = GetStuffName($auction['stuff']);
|
||||
$radio = ""; $alert = ""; $alert2 = "";
|
||||
if($auction['no1'] == $me['no']) { $radio = " disabled"; }
|
||||
elseif($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
|
||||
elseif($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
|
||||
elseif($chk == 0) { $radio = " checked"; $chk = 1; }
|
||||
$radio = "";
|
||||
$alert = "";
|
||||
$alert2 = "";
|
||||
if ($auction['no1'] == $me['no']) {
|
||||
$radio = " disabled";
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
} elseif ($chk == 0) {
|
||||
$radio = " checked";
|
||||
$chk = 1;
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr($pv, 0, 4);
|
||||
if($auction['stuff'] != 0) { $pv = '-'; }
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
if ($auction['stuff'] != 0) {
|
||||
$pv = '-';
|
||||
}
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
@@ -187,13 +231,13 @@ for($i=0; $i < $count; $i++) {
|
||||
?>
|
||||
<tr height=25>
|
||||
<td align=center id=bg1>등록결과</td>
|
||||
<td colspan=10><?=ConvertLog($msg2);?></td>
|
||||
<td colspan=10><?=ConvertLog($msg2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>입찰등록</td>
|
||||
<td colspan=10>
|
||||
수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
|
||||
<input type=<?=$btn;?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
<input type=<?=$btn?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -206,7 +250,7 @@ for($i=0; $i < $count; $i++) {
|
||||
구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
|
||||
시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
|
||||
즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
|
||||
<input type=<?=$btn;?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
|
||||
<input type=<?=$btn?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -219,10 +263,10 @@ for($i=0; $i < $count; $i++) {
|
||||
</form>
|
||||
</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>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td align=center id=bg2><font size=5>최 근 기 록</font></td></tr>
|
||||
<tr><td>
|
||||
<?=AuctionLog(20);?>
|
||||
<?=getAuctionLogRecent(20)?>
|
||||
</td></tr>
|
||||
<tr><td align=center id=bg2><font size=5>도 움 말</font></td></tr>
|
||||
<tr><td>
|
||||
@@ -238,7 +282,7 @@ for($i=0; $i < $count; $i++) {
|
||||
ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
|
||||
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
|
||||
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다. 거상 특기 소유자는 1인당 도합 3건입니다.<br>
|
||||
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
|
||||
ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.<br>
|
||||
ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.<br>
|
||||
ㆍ<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
|
||||
@@ -253,6 +297,5 @@ for($i=0; $i < $count; $i++) {
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,51 +3,69 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$v = new Validator($_POST + $_GET);
|
||||
$v->rule('required', 'gen')
|
||||
->rule('integer', 'gen');
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
|
||||
if ($type < 0 || $type > 3) {
|
||||
$type = 0;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("감찰부", 2);
|
||||
//전투 추진을 위해 갱신
|
||||
checkTurn($connect);
|
||||
|
||||
$query = "select conlimit from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
checkTurn();
|
||||
$gameStor->resetCache();
|
||||
|
||||
$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), "");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$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);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
//재야인 경우
|
||||
$meLevel = $me['level'];
|
||||
if($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
if ($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
//잘못된 접근
|
||||
if($general['nation'] != $me['nation']) {
|
||||
if ($general['nation'] != $me['nation']) {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
if($btn == '정렬하기') {
|
||||
if ($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
$sel = [];
|
||||
$sel[$type] = "selected";
|
||||
|
||||
?>
|
||||
@@ -55,44 +73,51 @@ $sel[$type] = "selected";
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>감찰부</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 감찰부</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>최근턴</option>
|
||||
<option <?=$sel[1];?> value=1>최근전투</option>
|
||||
<option <?=$sel[2];?> value=2>장수명</option>
|
||||
<option <?=$sel[3];?> value=3>전투수</option>
|
||||
<option <?=$sel[0]??''?> value=0>최근턴</option>
|
||||
<option <?=$sel[1]??''?> value=1>최근전투</option>
|
||||
<option <?=$sel[2]??''?> value=2>장수명</option>
|
||||
<option <?=$sel[3]??''?> value=3>전투수</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
<select name=gen size=1>
|
||||
<?php
|
||||
switch($type) {
|
||||
case 0: $query = "select no,name 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 2: $query = "select no,name 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;
|
||||
switch ($type) {
|
||||
default:
|
||||
case 0: $query = "select no,name,npc from general where nation='{$me['nation']}' order by turntime 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,npc from general where nation='{$me['nation']}' order by npc,binary(name)"; 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);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$npc = 0;
|
||||
for ($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
// 선택 없으면 맨 처음 장수
|
||||
if($gen == 0) {
|
||||
if ($gen == 0) {
|
||||
$gen = $general['no'];
|
||||
}
|
||||
if($gen == $general['no']) {
|
||||
if($gen == $general['no']){
|
||||
$npc = $general['npc'];
|
||||
}
|
||||
if ($gen == $general['no']) {
|
||||
echo "
|
||||
<option selected value={$general['no']}>{$general['name']}</option>";
|
||||
} else {
|
||||
@@ -106,17 +131,17 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</form>
|
||||
</td></tr>
|
||||
</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 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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($connect, $gen); generalInfo2($connect, $gen); ?>
|
||||
<?php generalInfo($gen); generalInfo2($gen); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyHistory($connect, $gen); ?>
|
||||
<?=getGeneralHistoryAll($gen)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -125,17 +150,29 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php MyBatLog($gen, 24); ?>
|
||||
<?=getBatLogRecent($gen, 24)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyBatRes($gen, 24); ?>
|
||||
<?=getBatResRecent($gen, 24)?>
|
||||
</td>
|
||||
</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 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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,23 +4,34 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
increaseRefresh("베팅장", 1);
|
||||
checkTurn($connect);
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("베팅장", 1);
|
||||
checkTurn();
|
||||
|
||||
$query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$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";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
|
||||
$admin['bet'] =
|
||||
$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']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
switch($admin['tnmt_type']) {
|
||||
switch ($admin['tnmt_type']) {
|
||||
default: throw new \RuntimeException('Invalid tnmt_type');break;
|
||||
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break;
|
||||
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break;
|
||||
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break;
|
||||
@@ -28,49 +39,59 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
||||
}
|
||||
|
||||
$str1 = getTournament($admin['tournament']);
|
||||
$str2 = getTournamentTime($connect);
|
||||
$str3 = getTournamentTerm($connect);
|
||||
$str2 = getTournamentTime();
|
||||
if($str2){
|
||||
$str2 = ', '.$str2;
|
||||
}
|
||||
$str3 = getTournamentTerm();
|
||||
if($str3){
|
||||
$str3 = ', '.$str3;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); } ?>
|
||||
<?php if ($con == 1) {
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>베팅장</title>
|
||||
<style>
|
||||
body { color:white; background-color:black; border-width:1; border-color:gray; }
|
||||
table { font-family:'맑은 고딕'; line-height:110%; }
|
||||
font { font-family:'맑은 고딕'; line-height:110%; }
|
||||
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
|
||||
select { font-family:'굴림'; line-height:100%; }
|
||||
#bg0 { background-image:url(<?=$images;?>/back_walnut.jpg); }
|
||||
#bg1 { background-image:url(<?=$images;?>/back_green.jpg); }
|
||||
#bg2 { background-image:url(<?=$images;?>/back_blue.jpg); }
|
||||
</style>
|
||||
|
||||
<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=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>
|
||||
</table>
|
||||
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10;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 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 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>
|
||||
</table>
|
||||
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10;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>
|
||||
<?php
|
||||
$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),"");
|
||||
for($i=0; $i < 1; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$general = MYDB_fetch_array($result)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
echo "<td colspan=16>{$general['name']}</td>";
|
||||
}
|
||||
|
||||
@@ -79,18 +100,36 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 1; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 2; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$cent = [];
|
||||
$line = [];
|
||||
$gen = [];
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$general = MYDB_fetch_array($result)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 1; $i++) {
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>";
|
||||
@@ -100,7 +139,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 2; $i++) {
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
echo "<td colspan=8>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -109,18 +148,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 2; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 4; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$general = MYDB_fetch_array($result)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 2; $i++) {
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━┓"."</font>";
|
||||
@@ -130,7 +184,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
echo "<td colspan=4>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -139,18 +193,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 4; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 8; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$general = MYDB_fetch_array($result)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━┓"."</font>";
|
||||
@@ -160,7 +229,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
echo "<td colspan=2>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -169,18 +238,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 8; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
$general = MYDB_fetch_array($result)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━┓"."</font>";
|
||||
@@ -190,35 +274,49 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td width=70>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$myBet = [];
|
||||
$bet = [];
|
||||
$gold = [];
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
$myBet[$i] = $me["bet{$i}"];
|
||||
}
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$bet[$i] = @round($admin['bet'] / $admin["bet{$i}"], 2);
|
||||
if($bet[$i] == 0) { $bet[$i] = "∞"; }
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if($admin["bet{$i}"] == 0){
|
||||
$bet[$i] = "∞";
|
||||
}
|
||||
else{
|
||||
$bet[$i] = round($admin['bet'] / $admin["bet{$i}"], 2);
|
||||
}
|
||||
}
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$gold[$i] = round($myBet[$i] * $bet[$i]);
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if(!is_numeric($bet[$i])){
|
||||
$gold[$i] = 0;
|
||||
}
|
||||
else{
|
||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1120 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>
|
||||
<?php
|
||||
echo "
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
@@ -229,7 +327,7 @@ for($i=0; $i < 16; $i++) {
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
|
||||
}
|
||||
?>
|
||||
@@ -240,7 +338,7 @@ for($i=0; $i < 16; $i++) {
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
|
||||
}
|
||||
|
||||
@@ -248,12 +346,12 @@ echo "
|
||||
</tr>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>";
|
||||
|
||||
if($admin['tournament'] == 6) {
|
||||
if ($admin['tournament'] == 6) {
|
||||
echo "
|
||||
<form method=post action=c_betting.php>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td>
|
||||
<select size=1 name=gold{$i} style=color:white;background-color:black;>
|
||||
@@ -272,7 +370,7 @@ if($admin['tournament'] == 6) {
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td><input type=submit name=btn{$i} value=베팅! style=width:100%;color:white;background-color:black;></td>";
|
||||
}
|
||||
@@ -291,28 +389,28 @@ if($admin['tournament'] == 6) {
|
||||
</tr>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>
|
||||
</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 colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
|
||||
<tr align=center>
|
||||
<?php
|
||||
|
||||
$type1 = Array("전 력 전", "통 솔 전", "일 기 토", "설 전");
|
||||
$type2 = Array("종합", "통솔", "무력", "지력");
|
||||
$type3 = Array("tt", "tl", "tp", "ti");
|
||||
$type4 = Array("total", "leader", "power", "intel");
|
||||
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
|
||||
$type2 = array("종합", "통솔", "무력", "지력");
|
||||
$type3 = array("tt", "tl", "tp", "ti");
|
||||
$type4 = array("total", "leader", "power", "intel");
|
||||
|
||||
for($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$grp = $i;
|
||||
echo "
|
||||
<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 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>";
|
||||
|
||||
$query = "select npc,name,leader,power,intel,leader+power+intel as total,{$type3[$i]}p as prize,{$type3[$i]}w+{$type3[$i]}d+{$type3[$i]}l as game,{$type3[$i]}w as win,{$type3[$i]}d as draw,{$type3[$i]}l as lose,{$type3[$i]}g as gl from general order by gl desc, game desc, win desc, draw desc, lose, no limit 0,30";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($k=1; $k <= 30; $k++) {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($k=1; $k <= 30; $k++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
printRow($k, $general['npc'], $general['name'], $general[$type4[$i]], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gl'], $general['prize'], 0);
|
||||
}
|
||||
@@ -333,10 +431,9 @@ for($i=0; $i < 4; $i++) {
|
||||
</td>
|
||||
</tr>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,11 +4,15 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("기밀실", 1);
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -21,22 +25,26 @@ if($me['level'] < 5) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>기밀실</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 기밀실</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<form name=form1 method=post action=c_chiefboard.php>
|
||||
<tr><td align=center>
|
||||
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830;>
|
||||
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998;height:200;></textarea><br>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
|
||||
<input type=submit value=저장하기>
|
||||
<input type=hidden name=num value=-1>
|
||||
</td></tr>
|
||||
@@ -44,7 +52,7 @@ if($me['level'] < 5) {
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$nation = getNation($connect, $me['nation']);
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//20개 메세지
|
||||
$index = $nation['coreindex'];
|
||||
@@ -53,18 +61,18 @@ for($i=0; $i < 20; $i++) {
|
||||
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($nation["coreboard{$index}"] != '') { msgprint($connect, $nation["coreboard{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["coreboard{$index}_when"], $index, 1); }
|
||||
if($nation["coreboard{$index}"] != '') { msgprint($nation["coreboard{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["coreboard{$index}_when"], $index, 1); }
|
||||
$index--;
|
||||
if($index < 0) { $index = 19; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,15 +4,16 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
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='{$_SESSION['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),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -20,7 +21,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
|
||||
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
@@ -34,9 +35,7 @@ else { $btn = "hidden"; $btn2 = "hidden"; }
|
||||
$date = date('Y-m-d H:i:s');
|
||||
|
||||
// 명령 목록
|
||||
$query = "select year,month,turnterm from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year','month','turnterm']);
|
||||
|
||||
$query = "
|
||||
select nation,level,
|
||||
@@ -53,21 +52,37 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
$lv = getNationChiefLevel($nation['level']);
|
||||
$turn = [];
|
||||
|
||||
for($i=12; $i >= $lv; $i--) {
|
||||
$turn[$i] = getCoreTurn($connect, $nation, $i);
|
||||
$turn[$i] = getCoreTurn($nation, $i);
|
||||
|
||||
$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),"");
|
||||
$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>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>사령부</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<script type="text/javascript">
|
||||
function turn(type) {
|
||||
if(type == 0) location.replace('turn_push_core.php');
|
||||
@@ -78,96 +93,102 @@ function turn(type) {
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
<?php
|
||||
$year = $admin['year'];
|
||||
$month = $admin['month'];
|
||||
$date = substr(date('Y-m-d H:i:s'), 14);
|
||||
|
||||
$totaldate = [];
|
||||
$turntime = [];
|
||||
$turndate = [];
|
||||
|
||||
for($i=12; $i >= $lv; $i--) {
|
||||
$totaldate[$i] = $gen[$i]['turntime'];
|
||||
$turntime[$i] = substr($gen[$i]['turntime'], 14);
|
||||
}
|
||||
|
||||
//FIXME: 각 칸을 div로 놓으면 네개씩 출력하는 삽질이 필요없다.
|
||||
|
||||
for($k=0; $k < 2; $k++) {
|
||||
$l4 = 12 - $k; $l3 = 10 - $k; $l2 = 8 - $k; $l1 = 6 - $k;
|
||||
|
||||
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>"; }
|
||||
if ($gen[$l3]['npc'] >= 2) { $gen[$l3]['name'] = "<font color=cyan>".$gen[$l3]['name']."</font>"; }
|
||||
elseif($gen[$l3]['npc'] == 1) { $gen[$l3]['name'] = "<font color=skyblue>".$gen[$l3]['name']."</font>"; }
|
||||
if ($gen[$l2]['npc'] >= 2) { $gen[$l2]['name'] = "<font color=cyan>".$gen[$l2]['name']."</font>"; }
|
||||
elseif($gen[$l2]['npc'] == 1) { $gen[$l2]['name'] = "<font color=skyblue>".$gen[$l2]['name']."</font>"; }
|
||||
if ($gen[$l1]['npc'] >= 2) { $gen[$l1]['name'] = "<font color=cyan>".$gen[$l1]['name']."</font>"; }
|
||||
elseif($gen[$l1]['npc'] == 1) { $gen[$l1]['name'] = "<font color=skyblue>".$gen[$l1]['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>"; }
|
||||
if ($gen[$l3]['npc'] >= 2) { $gen[$l3]['name'] = "<font color=cyan>".($gen[$l3]['name']??'')."</font>"; }
|
||||
elseif($gen[$l3]['npc'] == 1) { $gen[$l3]['name'] = "<font color=skyblue>".($gen[$l3]['name']??'')."</font>"; }
|
||||
if ($gen[$l2]['npc'] >= 2) { $gen[$l2]['name'] = "<font color=cyan>".($gen[$l2]['name']??'')."</font>"; }
|
||||
elseif($gen[$l2]['npc'] == 1) { $gen[$l2]['name'] = "<font color=skyblue>".($gen[$l2]['name']??'')."</font>"; }
|
||||
if ($gen[$l1]['npc'] >= 2) { $gen[$l1]['name'] = "<font color=cyan>".($gen[$l1]['name']??'')."</font>"; }
|
||||
elseif($gen[$l1]['npc'] == 1) { $gen[$l1]['name'] = "<font color=skyblue>".($gen[$l1]['name']??'')."</font>"; }
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center id=bg1>.</td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l4, $nation['level'])." : {$gen[$l4]['name']}</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l3, $nation['level'])." : {$gen[$l3]['name']}</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l2, $nation['level'])." : {$gen[$l2]['name']}</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l1, $nation['level'])." : {$gen[$l1]['name']}</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l4, $nation['level'])." : ".($gen[$l4]['name']??'')."</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l3, $nation['level'])." : ".($gen[$l3]['name']??'')."</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l2, $nation['level'])." : ".($gen[$l2]['name']??'')."</b></td>
|
||||
<td colspan=2 align=center id=bg1><b>".getLevel($l1, $nation['level'])." : ".($gen[$l1]['name']??'')."</b></td>
|
||||
<td align=center id=bg1>.</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
for($i=0; $i < 12; $i++) {
|
||||
$turndate[$l4] = substr($totaldate[$l4], 11, 5);
|
||||
$turndate[$l3] = substr($totaldate[$l3], 11, 5);
|
||||
$turndate[$l2] = substr($totaldate[$l2], 11, 5);
|
||||
$turndate[$l1] = substr($totaldate[$l1], 11, 5);
|
||||
$turndate[$l4] = substr($totaldate[$l4]??'', 11, 5);
|
||||
$turndate[$l3] = substr($totaldate[$l3]??'', 11, 5);
|
||||
$turndate[$l2] = substr($totaldate[$l2]??'', 11, 5);
|
||||
$turndate[$l1] = substr($totaldate[$l1]??'', 11, 5);
|
||||
$j = $i + 1;
|
||||
$td4 = ($turndate[$l4] == "") ? "-" : $turndate[$l4];
|
||||
$td3 = ($turndate[$l3] == "") ? "-" : $turndate[$l3];
|
||||
$td2 = ($turndate[$l2] == "") ? "-" : $turndate[$l2];
|
||||
$td1 = ($turndate[$l1] == "") ? "-" : $turndate[$l1];
|
||||
$tn4 = ($turn[$l4][$i] == "") ? "-" : $turn[$l4][$i];
|
||||
$tn3 = ($turn[$l3][$i] == "") ? "-" : $turn[$l3][$i];
|
||||
$tn2 = ($turn[$l2][$i] == "") ? "-" : $turn[$l2][$i];
|
||||
$tn1 = ($turn[$l1][$i] == "") ? "-" : $turn[$l1][$i];
|
||||
$td4 = $turndate[$l4]??"-";
|
||||
$td3 = $turndate[$l3]??"-";
|
||||
$td2 = $turndate[$l2]??"-";
|
||||
$td1 = $turndate[$l1]??"-";
|
||||
$tn4 = $turn[$l4][$i]??"-";
|
||||
$tn3 = $turn[$l3][$i]??"-";
|
||||
$tn2 = $turn[$l2][$i]??"-";
|
||||
$tn1 = $turn[$l1][$i]??"-";
|
||||
echo "
|
||||
<tr>
|
||||
<td width=28 align=center id=bg0><b>$j</b></td>
|
||||
<td width=58 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=58 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=58 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=58 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=28 align=center id=bg0><b>$j</b></td>
|
||||
<td width=20 align=center id=bg0><b>$j</b></td>
|
||||
<td width=43 align=center bgcolor=black><b>$td4</b></td>
|
||||
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn4</td>
|
||||
<td width=43 align=center bgcolor=black><b>$td3</b></td>
|
||||
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn3</td>
|
||||
<td width=43 align=center bgcolor=black><b>$td2</b></td>
|
||||
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn2</td>
|
||||
<td width=43 align=center bgcolor=black><b>$td1</b></td>
|
||||
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn1</td>
|
||||
<td width=20 align=center id=bg0><b>$j</b></td>
|
||||
</tr>
|
||||
";
|
||||
if($totaldate[$l4] != "") { $totaldate[$l4] = addTurn($totaldate[$l4], $admin['turnterm']); }
|
||||
if($totaldate[$l3] != "") { $totaldate[$l3] = addTurn($totaldate[$l3], $admin['turnterm']); }
|
||||
if($totaldate[$l2] != "") { $totaldate[$l2] = addTurn($totaldate[$l2], $admin['turnterm']); }
|
||||
if($totaldate[$l1] != "") { $totaldate[$l1] = addTurn($totaldate[$l1], $admin['turnterm']); }
|
||||
if($totaldate[$l4]??'') { $totaldate[$l4] = addTurn($totaldate[$l4], $admin['turnterm']); }
|
||||
if($totaldate[$l3]??'') { $totaldate[$l3] = addTurn($totaldate[$l3], $admin['turnterm']); }
|
||||
if($totaldate[$l2]??'') { $totaldate[$l2] = addTurn($totaldate[$l2], $admin['turnterm']); }
|
||||
if($totaldate[$l1]??'') { $totaldate[$l1] = addTurn($totaldate[$l1], $admin['turnterm']); }
|
||||
}
|
||||
if($k == 0) {
|
||||
echo "<form action=processing.php method=post><tr><td colspan=5 align=right>";
|
||||
echo CoreTurnTable();
|
||||
echo "</td><td colspan=5>
|
||||
<input type={$btn2} style=background-color:$_basecolor2;color:white;width:58;font-size:13px; value='미루기▼' onclick='turn(0)'>
|
||||
<input type={$btn2} style=background-color:$_basecolor2;color:white;width:58;font-size:13px; value='▲당기기' onclick='turn(1)'>
|
||||
<input type={$btn2} style=background-color:".GameConst::$basecolor2.";color:white;width:58px;font-size:13px; value='미루기▼' onclick='turn(0)'>
|
||||
<input type={$btn2} style=background-color:".GameConst::$basecolor2.";color:white;width:58px;font-size:13px; value='▲당기기' onclick='turn(1)'>
|
||||
<br>";
|
||||
CoreCommandTable($connect);
|
||||
echo "<input type={$btn} style=background-color:$_basecolor2;color:white;width:55;font-size:13px; value='실 행'></td></tr></form>";
|
||||
CoreCommandTable();
|
||||
echo "<input type={$btn} style=background-color:".GameConst::$basecolor2.";color:white;width:55px;font-size:13px; value='실 행'></td></tr></form>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,42 +3,69 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$citylist = Util::getReq('citylist', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("현재도시", 1);
|
||||
|
||||
$query = "select no,nation,level,city from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level,city from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select nation,level,spy from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$myNation = MYDB_fetch_array($result);
|
||||
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>도시정보</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 도시정보</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/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>
|
||||
|
||||
<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>
|
||||
</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 width=998>
|
||||
<form name=cityselect method=get>도시선택 :
|
||||
<select name=citylist size=1 style=color:white;background-color:black;width:798;>
|
||||
<select name=citylist size=1 style=color:white;background-color:black;width:798px;>
|
||||
<?php
|
||||
if(!array_key_exists('citylist', $_REQUEST) || $_REQUEST['citylist'] == '') { $_REQUEST['citylist'] = $me['city']; }
|
||||
if(!$citylist){
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
|
||||
// 재야일때는 현재 도시만
|
||||
$valid = 0;
|
||||
@@ -48,8 +75,8 @@ if($me['level'] == 0) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $_REQUEST['citylist']) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::Fill($city['name'], 4, '_')."】";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
@@ -64,8 +91,8 @@ if($me['level'] == 0) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $_REQUEST['citylist']) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::Fill($city['name'], 4, '_')."】";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
@@ -81,8 +108,8 @@ if($me['level'] == 0) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $_REQUEST['citylist']) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::Fill($city['name'], 4, '_')."】";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
@@ -92,27 +119,34 @@ if($me['level'] == 0) {
|
||||
|
||||
if($myNation['level'] > 0) {
|
||||
// 첩보도시도 목록에 추가
|
||||
$where = 'city=0';
|
||||
$citys = explode("|", $myNation['spy']);
|
||||
for($i=0; $i < count($citys); $i++) {
|
||||
$city = floor($citys[$i]/10);
|
||||
$where .= " or city='{$city}'";
|
||||
|
||||
$rawSpy = $myNation['spy'];
|
||||
|
||||
if($rawSpy == ''){
|
||||
$spyCities = [];
|
||||
}
|
||||
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
|
||||
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
|
||||
$spyCities = array_map(function($val){
|
||||
$val = intval($val);
|
||||
return intdiv($val, 10);
|
||||
}, 'intval',explode('|', $myNation['spy']));
|
||||
}
|
||||
else{
|
||||
$spyCities = array_keys(Json::decode($rawSpy));
|
||||
}
|
||||
|
||||
$query = "select city,name,nation from city where {$where}";
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
for($i=0; $i < $citycount; $i++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $_REQUEST['citylist']) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::Fill($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
if($spyCities){
|
||||
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
|
||||
echo "<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -127,76 +161,68 @@ echo "
|
||||
</table>
|
||||
<br>";
|
||||
|
||||
unset($city);
|
||||
|
||||
// 첩보된 도시까지만 허용
|
||||
if($valid == 0 && Session::getUserGrade() < 5) {
|
||||
$_REQUEST['citylist'] = $me['city'];
|
||||
if($valid == 0 && $session->userGrade < 5) {
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
|
||||
$query = "select * from city where city='{$_REQUEST['citylist']}'"; // 도시 이름 목록
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
|
||||
$nation = getNationStaticInfo($city['nation']);
|
||||
|
||||
$query = "select name from general where no='{$city['gen1']}'"; // 태수 이름
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen1 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select name from general where no='{$city['gen2']}'"; // 군사 이름
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen2 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select name from general where no='{$city['gen3']}'"; // 시중 이름
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen3 = MYDB_fetch_array($genresult);
|
||||
//태수, 군사, 시중
|
||||
$gen1 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen1']);
|
||||
$gen2 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen2']);
|
||||
$gen3 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen3']);
|
||||
|
||||
if($city['trade'] == 0) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
</table>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=46 class=bg1>주민</td>
|
||||
<td align=center width=140><?=$city['pop']?>/<?=$city['pop2']?></td>
|
||||
<td align=center width=46 class=bg1>농업</td>
|
||||
<td align=center width=140><?=$city['agri']?>/<?=$city['agri2']?></td>
|
||||
<td align=center width=46 class=bg1>상업</td>
|
||||
<td align=center width=140><?=$city['comm']?>/<?=$city['comm2']?></td>
|
||||
<td align=center width=46 class=bg1>치안</td>
|
||||
<td align=center width=140><?=$city['secu']?>/<?=$city['secu2']?></td>
|
||||
<td align=center width=46 class=bg1>수비</td>
|
||||
<td align=center width=140><?=$city['def']?>/<?=$city['def2']?></td>
|
||||
<td align=center width=46 class=bg1>성벽</td>
|
||||
<td align=center width=140><?=$city['wall']?>/<?=$city['wall2']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>민심</td>
|
||||
<td align=center><?=$city['rate']?></td>
|
||||
<td align=center class=bg1>시세</td>
|
||||
<td align=center><?=$city['trade']?>%</td>
|
||||
<td align=center class=bg1>인구</td>
|
||||
<td align=center><?=round($city['pop']/$city['pop2']*100, 2)?>%</td>
|
||||
<td align=center class=bg1>태수</td>
|
||||
<td align=center><?=$gen1['name']??'-'?></td>
|
||||
<td align=center class=bg1>군사</td>
|
||||
<td align=center><?=$gen2['name']??'-'?></td>
|
||||
<td align=center class=bg1>시중</td>
|
||||
<td align=center><?=$gen3['name']??'-'?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>장수</td>
|
||||
<td colspan=11>
|
||||
<?php
|
||||
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>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=48 id=bg1>주민</td>
|
||||
<td align=center width=112>{$city['pop']}/{$city['pop2']}</td>
|
||||
<td align=center width=48 id=bg1>농업</td>
|
||||
<td align=center width=108>{$city['agri']}/{$city['agri2']}</td>
|
||||
<td align=center width=48 id=bg1>상업</td>
|
||||
<td align=center width=108>{$city['comm']}/{$city['comm2']}</td>
|
||||
<td align=center width=48 id=bg1>치안</td>
|
||||
<td align=center width=108>{$city['secu']}/{$city['secu2']}</td>
|
||||
<td align=center width=48 id=bg1>수비</td>
|
||||
<td align=center width=108>{$city['def']}/{$city['def2']}</td>
|
||||
<td align=center width=48 id=bg1>성벽</td>
|
||||
<td align=center width=108>{$city['wall']}/{$city['wall2']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>민심</td>
|
||||
<td align=center>{$city['rate']}</td>
|
||||
<td align=center id=bg1>시세</td>
|
||||
<td align=center>{$city['trade']}%</td>
|
||||
<td align=center id=bg1>인구</td>
|
||||
<td align=center>".round($city['pop']/$city['pop2']*100, 2)." %</td>
|
||||
<td align=center id=bg1>태수</td>
|
||||
<td align=center>";echo $gen1['name']==''?"-":"{$gen1['name']}";echo "</td>
|
||||
<td align=center id=bg1>군사</td>
|
||||
<td align=center>";echo $gen2['name']==''?"-":"{$gen2['name']}";echo "</td>
|
||||
<td align=center id=bg1>시중</td>
|
||||
<td align=center>";echo $gen3['name']==''?"-":"{$gen3['name']}";echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>장수</td>
|
||||
<td colspan=11>";
|
||||
$query = "select name from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록
|
||||
$query = "select name, npc from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
if($gencount == 0) echo "-";
|
||||
@@ -204,141 +230,152 @@ echo "
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
echo "{$general['name']}, ";
|
||||
}
|
||||
echo "
|
||||
?>
|
||||
</td>
|
||||
</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
|
||||
$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),"");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$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++) {
|
||||
$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) {
|
||||
$lbonus = $nationlevel[$general['nation']] * 2;
|
||||
$leadershipBonus = $nationInfo['level'] * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
$lbonus = $nationlevel[$general['nation']];
|
||||
$leadershipBonus = $nationInfo['level'];
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
$leadershipBonus = 0;
|
||||
}
|
||||
if($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
|
||||
|
||||
if($ourGeneral){
|
||||
$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) {
|
||||
$leader = floor($general['leader'] * (100 - $general['injury'])/100);
|
||||
$power = floor($general['power'] * (100 - $general['injury'])/100);
|
||||
$intel = floor($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']}";
|
||||
}
|
||||
$nation = $general['nation'];
|
||||
$nationName = $nationInfo['name'];
|
||||
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>{$general['name']}</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<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::getUserGrade() >= 5) {
|
||||
switch($general['mode']) {
|
||||
case 0: $mode = "×"; break;
|
||||
case 1: $mode = "○"; break;
|
||||
case 2: $mode = "◎"; break;
|
||||
if($ourGeneral && !$isNPC){
|
||||
$turnText = [];
|
||||
foreach(getTurn($general, 1) as $turnRawIdx=>$turn){
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turnText[] = "{$turnIdx} : $turn";
|
||||
}
|
||||
|
||||
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($connect, $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> 재 야";
|
||||
$turnText = join('<br>', $turnText);
|
||||
}
|
||||
|
||||
echo "
|
||||
</td>
|
||||
</tr>";
|
||||
else{
|
||||
$turnText = '';
|
||||
}
|
||||
|
||||
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 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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,75 +4,89 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
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='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$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);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
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'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
if($me['level'] >= 5) { $btn = "submit"; $read = ""; }
|
||||
else { $btn = "hidden"; $read = "readonly"; }
|
||||
if ($me['level'] >= 5) {
|
||||
$btn = "submit";
|
||||
$read = "";
|
||||
} else {
|
||||
$btn = "hidden";
|
||||
$read = "readonly";
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>내무부</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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 width=100 align=center id=bg1>국 가 명</td>
|
||||
<td width=50 align=center id=bg1>국력</td>
|
||||
<td width=40 align=center id=bg1>장수</td>
|
||||
<td width=40 align=center id=bg1>속령</td>
|
||||
<td width=80 align=center id=bg1>상태</td>
|
||||
<td width=60 align=center id=bg1>기간</td>
|
||||
<td width=100 align=center id=bg1>종 료 시 점</td>
|
||||
<td align=center id=bg1>비 고</td>
|
||||
<td width=130 align=center class=bg1>국 가 명</td>
|
||||
<td width=50 align=center class=bg1>국력</td>
|
||||
<td width=40 align=center class=bg1>장수</td>
|
||||
<td width=40 align=center class=bg1>속령</td>
|
||||
<td width=80 align=center class=bg1>상태</td>
|
||||
<td width=60 align=center class=bg1>기간</td>
|
||||
<td width=100 align=center class=bg1>종 료 시 점</td>
|
||||
<td align=center class=bg1>비 고</td>
|
||||
</tr>
|
||||
<?php
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year','month']);
|
||||
|
||||
$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), "");
|
||||
$nationcount = MYDB_num_rows($result);
|
||||
for($i=0; $i < $nationcount; $i++) {
|
||||
for ($i=0; $i < $nationcount; $i++) {
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
// 아국표시
|
||||
if($nation['nation'] == $me['nation']) {
|
||||
if ($nation['nation'] == $me['nation']) {
|
||||
//속령수
|
||||
$query = "select city from city where nation='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$citycount = MYDB_num_rows($result2);
|
||||
echo "
|
||||
<tr>
|
||||
@@ -90,17 +104,17 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
}
|
||||
|
||||
$query = "select state,term,fixed,reserved,showing from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$dip = MYDB_fetch_array($result2);
|
||||
|
||||
$query = "select reserved,showing from diplomacy where you='{$me['nation']}' and me='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$dip2 = MYDB_fetch_array($result2);
|
||||
//속령수
|
||||
$query = "select city from city where nation='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$citycount = MYDB_num_rows($result2);
|
||||
switch($dip['state']) {
|
||||
switch ($dip['state']) {
|
||||
case 0: $state = "<font color=red>교 전</font>"; break;
|
||||
case 1: $state = "<font color=magenta>선포중</font>"; break;
|
||||
case 2: $state = "통 상"; break;
|
||||
@@ -112,40 +126,42 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
}
|
||||
|
||||
$term = $admin['year'] * 12 + $admin['month'] + $dip['term'];
|
||||
$year = floor($term / 12);
|
||||
$year = intdiv($term, 12);
|
||||
$month = $term % 12;
|
||||
|
||||
if($month == 0) {
|
||||
if ($month == 0) {
|
||||
$month = 12;
|
||||
$year--;
|
||||
}
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$note = "";
|
||||
if($dip['fixed'] != "") {
|
||||
if($dip['state'] == 7) {
|
||||
if ($dip['fixed'] != "") {
|
||||
if ($dip['state'] == 7) {
|
||||
$note .= $dip['fixed'];
|
||||
} else {
|
||||
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
||||
}
|
||||
if($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
if($dip['showing'] >= $date) {
|
||||
if($dip['reserved'] != "") {
|
||||
if ($dip['showing'] >= $date) {
|
||||
if ($dip['reserved'] != "") {
|
||||
$note .= "<font color=skyblue>아국측 제의</font>: ".$dip['reserved'];
|
||||
if($dip2['reserved'] != "") {
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if($dip2['showing'] >= $date) {
|
||||
if($dip2['reserved'] != "") {
|
||||
if ($dip2['showing'] >= $date) {
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<font color=limegreen>상대측 제의</font>: ".$dip2['reserved'];
|
||||
}
|
||||
}
|
||||
if($note == "") { $note = " "; }
|
||||
if ($note == "") {
|
||||
$note = " ";
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -154,7 +170,7 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
<td align=center>{$nation['gennum']}</td>
|
||||
<td align=center>$citycount</td>
|
||||
<td align=center>$state</td>";
|
||||
if($dip['term'] != 0) {
|
||||
if ($dip['term'] != 0) {
|
||||
echo"
|
||||
<td align=center>{$dip['term']} 개월</td>
|
||||
<td align=center>{$year}年 {$month}月</td>";
|
||||
@@ -172,98 +188,99 @@ echo "
|
||||
";
|
||||
|
||||
$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,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);
|
||||
|
||||
$query = "select gold_rate,rice_rate from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||
// 금 수지
|
||||
$deadIncome = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
|
||||
$goldincomeList = getGoldIncome($connect, $nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome;
|
||||
$goldoutcome = getGoldOutcome($connect, $nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($connect, $nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$riceincome = $riceincomeList[0] + $riceincomeList[1];
|
||||
$riceoutcome = getRiceOutcome($connect, $nation['nation'], $nation['bill']);
|
||||
$riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']);
|
||||
|
||||
|
||||
$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome;
|
||||
$budgetrice = $nation['rice'] + $riceincome - $riceoutcome;
|
||||
$budgetgolddiff = $goldincome - $goldoutcome + $deadIncome;
|
||||
$budgetricediff = $riceincome - $riceoutcome;
|
||||
if($budgetgolddiff > 0) { $budgetgolddiff = "+{$budgetgolddiff}"; }
|
||||
else { $budgetgolddiff = "$budgetgolddiff"; }
|
||||
if($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; }
|
||||
else { $budgetricediff = "$budgetricediff"; }
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = "+{$budgetgolddiff}";
|
||||
} else {
|
||||
$budgetgolddiff = "$budgetgolddiff";
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = "+{$budgetricediff}";
|
||||
} else {
|
||||
$budgetricediff = "$budgetricediff";
|
||||
}
|
||||
|
||||
?>
|
||||
<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>
|
||||
<tr><td colspan=2 height=10></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:830; name=msg value='<?=$nation['msg'];?>'><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:830; 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 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메시지</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 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>870 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.</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>
|
||||
<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>
|
||||
<?php
|
||||
echo "
|
||||
<table width=998 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td colspan=2 align=center id=bg1>자금 예산</td>
|
||||
<td colspan=2 align=center id=bg1>병량 예산</td>
|
||||
<td colspan=2 align=center class=bg1>자금 예산</td>
|
||||
<td colspan=2 align=center class=bg1>병량 예산</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=248 align=right id=bg1>현 재 </td>
|
||||
<td width=248 align=center>{$nation['gold']}</td>
|
||||
<td width=248 align=right id=bg1>현 재 </td>
|
||||
<td width=248 align=center>{$nation['rice']}</td>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=$nation['gold']?></td>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=$nation['rice']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right id=bg1>단기수입 </td>
|
||||
<td align=center>+$deadIncome</td>
|
||||
<td align=right id=bg1>둔전수입 </td>
|
||||
<td align=center>+$riceincomeList[1]</td>
|
||||
<td align=right class=bg1>단기수입 </td>
|
||||
<td align=center>+<?=$deadIncome?></td>
|
||||
<td align=right class=bg1>둔전수입 </td>
|
||||
<td align=center>+<?=$riceincomeList[1]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right id=bg1>세 금 </td>
|
||||
<td align=center>+$goldincomeList[0]</td>
|
||||
<td align=right id=bg1>세 곡 </td>
|
||||
<td align=center>+$riceincomeList[0]</td>
|
||||
<td align=right class=bg1>세 금 </td>
|
||||
<td align=center>+<?=$goldincomeList[0]?></td>
|
||||
<td align=right class=bg1>세 곡 </td>
|
||||
<td align=center>+<?=$riceincomeList[0]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right id=bg1>수입 / 지출 </td>
|
||||
<td align=center>+$goldincome / -$goldoutcome</td>
|
||||
<td align=right id=bg1>수입 / 지출 </td>
|
||||
<td align=center>+$riceincome / -$riceoutcome</td>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=$goldincome?> / -<?=$goldoutcome?></td>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=$riceincome?> / -<?=$riceoutcome?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right id=bg1>국고 예산 </td>
|
||||
<td align=center>{$budgetgold} ({$budgetgolddiff})</td>
|
||||
<td align=right id=bg1>병량 예산 </td>
|
||||
<td align=center>{$budgetrice} ({$budgetricediff})</td>
|
||||
</tr>";
|
||||
?>
|
||||
<tr>
|
||||
<td align=right id=bg1>세율 (5 ~ 30%) </td>
|
||||
<td align=center><input type=text <?=$read;?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn;?> name=btn value=세율></td>
|
||||
<td align=right id=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=right class=bg1>국고 예산 </td>
|
||||
<td align=center><?=$budgetgold?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=right class=bg1>병량 예산 </td>
|
||||
<td align=center><?=$budgetrice?> (<?=$budgetricediff?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right id=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||
<td align=center><input type=text <?=$read;?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn;?> name=btn value=기밀권한></td>
|
||||
<td align=right id=bg1>임관&전쟁 변경 가능</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=right class=bg1>봉급 지급율 (20 ~ 200%) </td>
|
||||
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급율></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
|
||||
<td align=right class=bg1>임관&전쟁 변경 가능</td>
|
||||
<td align=center>무제한</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 align=center>
|
||||
<?php
|
||||
if($nation['scout'] == 0) {
|
||||
if ($nation['scout'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 금지'>";
|
||||
} else {
|
||||
@@ -271,7 +288,7 @@ if($nation['scout'] == 0) {
|
||||
<input type=$btn name=btn value='임관 허가'>";
|
||||
}
|
||||
|
||||
if($nation['war'] == 0) {
|
||||
if ($nation['war'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 금지'>";
|
||||
} else {
|
||||
@@ -286,10 +303,9 @@ if($nation['war'] == 0) {
|
||||
<tr><td colspan=2 height=10></td></tr>
|
||||
</form>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,22 +4,26 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("중원정보", 1);
|
||||
|
||||
$query = "select turnterm from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$mapTheme = $gameStor->map_theme??'che';
|
||||
|
||||
$query = "select no,nation,map from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select nation,color,name,power,gennum from nation where level>0 order by power desc";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nationcount = MYDB_num_rows($result);
|
||||
$nationnum = array();
|
||||
$nationnum = [];
|
||||
$nationname = [];
|
||||
|
||||
$nationStr = "";
|
||||
$powerStr = "";
|
||||
@@ -33,27 +37,53 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
|
||||
$nationnum[count($nationnum)] = $nation['nation'];
|
||||
$nationnum[] = $nation['nation'];
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationcolor[$nation['nation']] = $nation['color'];
|
||||
|
||||
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
|
||||
$powerStr .= "국력 {$nation['power']}<br>";
|
||||
$genStr .= "장수 {$nation['gennum']}<br>";
|
||||
$cityStr .= "속령 $citycount<br>";
|
||||
$powerStr .= "{$nation['power']}<br>";
|
||||
$genStr .= "{$nation['gennum']}<br>";
|
||||
$cityStr .= "$citycount<br>";
|
||||
}
|
||||
|
||||
$realConflict = [];
|
||||
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
|
||||
$cityID,
|
||||
$cityName,
|
||||
$rawConflict
|
||||
])
|
||||
{
|
||||
$conflict = Json::decode($rawConflict);
|
||||
if (count($conflict)<2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sum = array_sum($conflict);
|
||||
|
||||
foreach ($conflict as $nationID=>$killnum) {
|
||||
$conflict[$nationID] = ['killnum'=>$killnum];
|
||||
$conflict[$nationID]['percent'] = round(100*$killnum / $sum, 1);
|
||||
$conflict[$nationID]['name'] = $nationname[$nationID];
|
||||
$conflict[$nationID]['color'] = getNationStaticInfo($nationID)['color'];
|
||||
}
|
||||
|
||||
$realConflict[] = [$cityID, $cityName, $conflict];
|
||||
};
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>중원정보</title>
|
||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/base_map.js"></script>
|
||||
<script src="js/map.js"></script>
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
@@ -64,35 +94,38 @@ $(function(){
|
||||
|
||||
});
|
||||
</script>
|
||||
<link href="css/normalize.css" rel="stylesheet">
|
||||
<link href="css/common.css" rel="stylesheet">
|
||||
<link href="css/map.css" rel="stylesheet">
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
<tr><td colspan=<?=$nationcount+1;?> align=center bgcolor=blue>외 교 현 황</td></tr>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
|
||||
<?php
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center width=108 style=background-color:$_basecolor2;> </td>";
|
||||
<td align=center width=130 style=background-color:".GameConst::$basecolor2.";> </td>";
|
||||
|
||||
if($nationcount != 0) {
|
||||
$width = floor(888 / $nationcount);
|
||||
$width = intdiv(888, $nationcount);
|
||||
}
|
||||
|
||||
for($i=0; $i < $nationcount; $i++) {
|
||||
echo "
|
||||
<td align=center width={$width} style=background-color:{$nationcolor[$nationnum[$i]]};color:".newColor($nationcolor[$nationnum[$i]]).";>{$nationname[$nationnum[$i]]}</td>";
|
||||
<td align=center width={$width} style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
|
||||
}
|
||||
echo "
|
||||
</tr>";
|
||||
|
||||
$state = [];
|
||||
|
||||
for($i=0; $i < $nationcount; $i++) {
|
||||
$query = "select you,state from diplomacy where me='$nationnum[$i]'";
|
||||
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -103,7 +136,7 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style=background-color:{$nationcolor[$nationnum[$i]]};color:".newColor($nationcolor[$nationnum[$i]]).";>{$nationname[$nationnum[$i]]}</td>";
|
||||
<td align=center style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
|
||||
|
||||
for($k=0; $k < $nationcount; $k++) {
|
||||
if($i == $k) {
|
||||
@@ -113,7 +146,7 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
case 0: $str = "<font color=red>★</font>"; break;
|
||||
case 1: $str = "<font color=magenta>▲</font>"; break;
|
||||
case 2:
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || Session::getUserGrade() >= 5) { $str = "ㆍ"; }
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = "ㆍ"; }
|
||||
else { $str = "?"; }
|
||||
// $str = "ㆍ";
|
||||
break;
|
||||
@@ -122,14 +155,14 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
case 5: $str = "<font color=cyan>◎</font>"; break;
|
||||
case 6: $str = "<font color=cyan>◎</font>"; break;
|
||||
case 7:
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || Session::getUserGrade() >= 5) { $str = "<font color=green>@</font>"; }
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = "<font color=green>@</font>"; }
|
||||
else { $str = "?"; }
|
||||
// $str = "<font color=limegreen>@</font>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation']) { $backcolor = "style=background-color:$_basecolor3;"; }
|
||||
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation']) { $backcolor = "style=background-color:".GameConst::$basecolor3.";"; }
|
||||
else { $backcolor = ""; }
|
||||
|
||||
echo "
|
||||
@@ -140,100 +173,62 @@ for($i=0; $i < $nationcount; $i++) {
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr><td colspan=<?=$nationcount+1;?> align=center>불가침 : <font color=limegreen>@</font>, 통합 : <font color=cyan>○</font>, 합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
|
||||
<tr><td colspan=<?=$nationcount+1?> align=center>불가침 : <font color=limegreen>@</font>, 통합 : <font color=cyan>○</font>, 합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$query = "select city,name,conflict,conflict2 from city where conflict like '%|%'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($result);
|
||||
|
||||
if($citycount != 0) {
|
||||
echo "
|
||||
<?php if ($realConflict) : ?>
|
||||
|
||||
<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>
|
||||
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr>";
|
||||
}
|
||||
|
||||
for($i=0; $i < $citycount; $i++) {
|
||||
$city = MYDB_fetch_array($result);
|
||||
|
||||
if($city['conflict'] != "") {
|
||||
$nation = explode("|", $city['conflict']);
|
||||
$killnum = explode("|", $city['conflict2']);
|
||||
|
||||
$seq = mySort($killnum); // 큰 순서대로 순서를 구한다.
|
||||
|
||||
$sum = 0;
|
||||
for($k=0; $k < count($killnum); $k++) {
|
||||
$sum += $killnum[$k];
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center width=48>{$city['name']}</td>
|
||||
<td width=948>";
|
||||
for($k=0; $k < count($nation); $k++) {
|
||||
$per = 100*$killnum[$seq[$k]] / $sum;
|
||||
$graph1 = $per / 100 * 798;
|
||||
$per = round($per, 1);
|
||||
echo "
|
||||
<table border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
||||
<tr>
|
||||
<td width=98 align=right style=color:".newColor($nationcolor[$nation[$seq[$k]]]).";background-color:{$nationcolor[$nation[$seq[$k]]]};>{$nationname[$nation[$seq[$k]]]} </td>
|
||||
<td width=48 align=right>{$per}% </td>
|
||||
<td width=$graph1 style=background-color:{$nationcolor[$nation[$seq[$k]]]};></td>
|
||||
<td width=*></td>
|
||||
</tr>
|
||||
</table>";
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 height=5 id=bg1></td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
function mySort($killnum) {
|
||||
for($i=0; $i < count($killnum); $i++) {
|
||||
$seq[$i] = $i;
|
||||
}
|
||||
for($i=0; $i < count($killnum); $i++) {
|
||||
$max = 0;
|
||||
for($k=0; $k < count($killnum); $k++) {
|
||||
if($max < $killnum[$k]) {
|
||||
$max = $killnum[$k];
|
||||
$index = $k;
|
||||
}
|
||||
}
|
||||
$seq[$i] = $index;
|
||||
$killnum[$index] = 0;
|
||||
}
|
||||
return $seq;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table align='center' width=1000 class='tb_layout bg0'>
|
||||
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr>
|
||||
<?php foreach($realConflict as list($cityID, $cityName, $conflict)): ?>
|
||||
<tr>
|
||||
<td align=center width=48><?=$cityName?></td>
|
||||
<td style='width:948px;position:relative;'>
|
||||
<table class='tb_layout bg0' style='width:100%;'>
|
||||
<?php foreach($conflict as $item): ?>
|
||||
<tr>
|
||||
<td
|
||||
width=130
|
||||
align=right
|
||||
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
|
||||
><?=$item['name']?> </td>
|
||||
<td width=48 align=right><?=(float)$item['percent']?> % </td>
|
||||
<td width=*><div
|
||||
style='display:inline-block;width:<?=$item['percent']?>%;background-color:<?=$item['color']?>;'
|
||||
> </div></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr><td colspan=2 height=5 id=bg1></td></tr>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<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 colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=698 height=420>
|
||||
<?=getMapHtml()?>
|
||||
<?=getMapHtml($mapTheme)?>
|
||||
</td>
|
||||
<td width=98 valign=top><?=$nationStr?></td>
|
||||
<td width=78 valign=top><?=$powerStr?></td>
|
||||
<td width=58 valign=top><?=$genStr?></td>
|
||||
<td width=58 valign=top><?=$cityStr?></td>
|
||||
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$nationStr?></td>
|
||||
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$powerStr?></td>
|
||||
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$genStr?></td>
|
||||
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$cityStr?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,75 +3,93 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 7);
|
||||
if ($type <= 0 || $type > 8) {
|
||||
$type = 7;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
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='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$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);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
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'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 7;
|
||||
}
|
||||
$sel = [];
|
||||
$sel[$type] = "selected";
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); } ?>
|
||||
<?php if ($con == 1) {
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다!");
|
||||
} ?>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>암행부</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
</head>
|
||||
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1];?> value=1>자금</option>
|
||||
<option <?=$sel[2];?> value=2>군량</option>
|
||||
<option <?=$sel[3];?> value=3>도시</option>
|
||||
<option <?=$sel[4];?> value=4>병종</option>
|
||||
<option <?=$sel[5];?> value=5>병사</option>
|
||||
<option <?=$sel[6];?> value=6>삭제턴</option>
|
||||
<option <?=$sel[7];?> value=7>턴</option>
|
||||
<option <?=$sel[8];?> value=8>부대</option>
|
||||
<option <?=$sel[1]??''?> value=1>자금</option>
|
||||
<option <?=$sel[2]??''?> value=2>군량</option>
|
||||
<option <?=$sel[3]??''?> value=3>도시</option>
|
||||
<option <?=$sel[4]??''?> value=4>병종</option>
|
||||
<option <?=$sel[5]??''?> value=5>병사</option>
|
||||
<option <?=$sel[6]??''?> value=6>삭제턴</option>
|
||||
<option <?=$sel[7]??''?> value=7>턴</option>
|
||||
<option <?=$sel[8]??''?> value=8>부대</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$query = "select troop,name from troop 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), "");
|
||||
$troopCount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $troopCount; $i++) {
|
||||
$troopName = [];
|
||||
for ($i=0; $i < $troopCount; $i++) {
|
||||
$troop = MYDB_fetch_array($result);
|
||||
$troopName[$troop['troop']] = $troop['name'];
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
switch ($type) {
|
||||
case 1: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by gold desc"; break;
|
||||
case 2: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by rice desc"; break;
|
||||
case 3: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by city"; break;
|
||||
@@ -81,49 +99,53 @@ switch($type) {
|
||||
case 7: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by turntime"; break;
|
||||
case 8: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by troop desc"; break;
|
||||
}
|
||||
$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);
|
||||
|
||||
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>
|
||||
<td width=98 align=center id=bg1>이 름</td>
|
||||
<td width=98 align=center id=bg1>통무지</td>
|
||||
<td width=98 align=center id=bg1>부 대</td>
|
||||
<td width=58 align=center id=bg1>자 금</td>
|
||||
<td width=58 align=center id=bg1>군 량</td>
|
||||
<td width=48 align=center id=bg1>도시</td>
|
||||
<td width=28 align=center id=bg1>守</td>
|
||||
<td width=58 align=center id=bg1>병 종</td>
|
||||
<td width=68 align=center id=bg1>병 사</td>
|
||||
<td width=48 align=center id=bg1>훈련</td>
|
||||
<td width=48 align=center id=bg1>사기</td>
|
||||
<td width=148 align=center id=bg1>명 령</td>
|
||||
<td width=58 align=center id=bg1>삭턴</td>
|
||||
<td width=58 align=center id=bg1>턴</td>
|
||||
</tr>";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
<td width=98 align=center class=bg1>이 름</td>
|
||||
<td width=98 align=center class=bg1>통무지</td>
|
||||
<td width=98 align=center class=bg1>부 대</td>
|
||||
<td width=58 align=center class=bg1>자 금</td>
|
||||
<td width=58 align=center class=bg1>군 량</td>
|
||||
<td width=48 align=center class=bg1>도시</td>
|
||||
<td width=28 align=center class=bg1>守</td>
|
||||
<td width=58 align=center class=bg1>병 종</td>
|
||||
<td width=68 align=center class=bg1>병 사</td>
|
||||
<td width=48 align=center class=bg1>훈련</td>
|
||||
<td width=48 align=center class=bg1>사기</td>
|
||||
<td width=148 align=center class=bg1>명 령</td>
|
||||
<td width=58 align=center class=bg1>삭턴</td>
|
||||
<td width=58 align=center class=bg1>턴</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
$city = CityConst::byID($general['city'])->name;
|
||||
$troop = $troopName[$general['troop']] == "" ? "-" : $troopName[$general['troop']];
|
||||
$troop = $troopName[$general['troop']]??'-';
|
||||
|
||||
if($general['level'] == 12) {
|
||||
if ($general['level'] == 12) {
|
||||
$lbonus = $nation['level'] * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
} elseif ($general['level'] >= 5) {
|
||||
$lbonus = $nation['level'];
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
}
|
||||
if($lbonus > 0) {
|
||||
if ($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
}
|
||||
|
||||
if($general['injury'] > 0) {
|
||||
$leader = floor($general['leader'] * (100 - $general['injury'])/100);
|
||||
$power = floor($general['power'] * (100 - $general['injury'])/100);
|
||||
$intel = floor($general['intel'] * (100 - $general['injury'])/100);
|
||||
if ($general['injury'] > 0) {
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$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>";
|
||||
@@ -133,11 +155,15 @@ for($j=0; $j < $gencount; $j++) {
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; }
|
||||
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
else { $name = "{$general['name']}"; }
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
switch($general['mode']) {
|
||||
switch ($general['mode']) {
|
||||
case 0: $mode = "×"; break;
|
||||
case 1: $mode = "○"; break;
|
||||
case 2: $mode = "◎"; break;
|
||||
@@ -145,29 +171,29 @@ for($j=0; $j < $gencount; $j++) {
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center>$name<br>Lv ".getExpLevel($general['experience'])."</td>
|
||||
<td align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||
<td align=center>$troop</td>
|
||||
<td align=center>{$general['gold']}</td>
|
||||
<td align=center>{$general['rice']}</td>
|
||||
<td align=center>$city</td>
|
||||
<td class='i_name' align=center><span class='t_name'>$name</span><br>Lv <span class='t_explevel'>".getExpLevel($general['experience'])."</span></td>
|
||||
<td class='i_stat' align=center>{$leader}∥{$power}∥{$intel}</td>
|
||||
<td class='i_troop' align=center>$troop</td>
|
||||
<td class='i_gold' align=center>{$general['gold']}</td>
|
||||
<td class='i_rice' align=center>{$general['rice']}</td>
|
||||
<td class='i_city' align=center>$city</td>
|
||||
<td align=center>$mode</td>
|
||||
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||
<td align=center>{$general['crew']}</td>
|
||||
<td align=center>{$general['train']}</td>
|
||||
<td align=center>{$general['atmos']}</td>";
|
||||
if($general['npc'] >= 2) {
|
||||
<td class='i_crewtype' align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
|
||||
<td class='i_crew' align=center>{$general['crew']}</td>
|
||||
<td class='i_train' align=center>{$general['train']}</td>
|
||||
<td class='i_atmos' align=center>{$general['atmos']}</td>";
|
||||
if ($general['npc'] >= 2) {
|
||||
echo "
|
||||
<td>
|
||||
<td class='i_action'>
|
||||
<font size=3>NPC 장수";
|
||||
} else {
|
||||
echo "
|
||||
<td>
|
||||
<td class='i_action'>
|
||||
<font size=1>";
|
||||
$turn = getTurn($connect, $general, 1, 0);
|
||||
$turn = getTurn($general, 1, 0);
|
||||
|
||||
for($i=0; $i < 5; $i++) {
|
||||
$turn[$i] = StringUtil::SubStrForWidth($turn[$i], 0, 20);
|
||||
for ($i=0; $i < 5; $i++) {
|
||||
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 20);
|
||||
$k = $i+1;
|
||||
echo "
|
||||
$k : $turn[$i] <br>";
|
||||
@@ -177,20 +203,19 @@ for($j=0; $j < $gencount; $j++) {
|
||||
</font>
|
||||
</td>
|
||||
<td align=center>{$general['killturn']}</td>
|
||||
<td align=center>".substr($general['turntime'],14,5)."</td>
|
||||
<td class='i_turntime' align=center>".substr($general['turntime'], 14, 5)."</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
|
||||
MYDB_close($connect);
|
||||
?>
|
||||
|
||||
<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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,13 +4,17 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("인사부", 1);
|
||||
//훼섭 추방을 위해 갱신
|
||||
checkTurn($connect);
|
||||
checkTurn();
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -25,9 +29,12 @@ if($meLevel == 0) {
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>인사부</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<script type="text/javascript">
|
||||
function out() {
|
||||
return confirm('정말 추방하시겠습니까?');
|
||||
@@ -37,7 +44,7 @@ function out() {
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</table>
|
||||
<br>
|
||||
@@ -54,6 +61,7 @@ else { $btn = "hidden"; }
|
||||
|
||||
$query = "select name,level,picture,imgsvr,belong from general where nation='{$nation['nation']}' and level>={$lv} order by level desc";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level = [];
|
||||
for($i=12; $i >= $lv; $i--) {
|
||||
$levels = MYDB_fetch_array($genresult);
|
||||
$level[$levels['level']] = $levels;
|
||||
@@ -66,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),"");
|
||||
|
||||
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 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']} colspan=6>
|
||||
<font size=5>【 {$nation['name']} 】</font>
|
||||
@@ -75,18 +83,18 @@ echo "
|
||||
";
|
||||
for($i=12; $i >= $lv; $i-=2) {
|
||||
$i1 = $i; $i2 = $i - 1;
|
||||
$imageTemp1 = GetImageURL($level[$i1]['imgsvr']);
|
||||
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']);
|
||||
echo "
|
||||
$imageTemp1 = GetImageURL($level[$i1]['imgsvr']??0);
|
||||
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']??0);
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1><font size=4>".getLevel($i1, $nation['level'])."</font></td>
|
||||
<td width=64 height=64 background={$imageTemp1}/{$level[$i1]['picture']}> </td>
|
||||
<td width=332><font size=4>";echo $level[$i1]['name']==''?"-":$level[$i1]['name']; echo " ({$level[$i1]['belong']}년)</font></td>
|
||||
<td width=98 align=center id=bg1><font size=4>".getLevel($i2, $nation['level'])."</font></td>
|
||||
<td width=64 height=64 background={$imageTemp2}/{$level[$i2]['picture']}> </td>
|
||||
<td width=332><font size=4>";echo $level[$i2]['name']==''?"-":$level[$i2]['name']; echo " ({$level[$i2]['belong']}년)</font></td>
|
||||
<td width=98 align=center id=bg1><font size=4><?=getLevel($i1, $nation['level'])?></font></td>
|
||||
<td width=64 height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
|
||||
<td width=98 align=center id=bg1><font size=4><?=getLevel($i2, $nation['level'])?></font></td>
|
||||
<td width=64 height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
|
||||
</tr>
|
||||
";
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
@@ -125,7 +133,7 @@ echo "
|
||||
</td>
|
||||
</tr>
|
||||
</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>
|
||||
<tr><td colspan=6 height=5></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
|
||||
@@ -138,14 +146,14 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) {
|
||||
echo "
|
||||
<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),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
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 "
|
||||
@@ -161,7 +169,7 @@ echo "
|
||||
</tr>
|
||||
</form>
|
||||
</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 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
|
||||
<tr>
|
||||
@@ -199,7 +207,10 @@ if($meLevel >= 5 && $nation['l11set'] == 0) {
|
||||
$query = "select name,city from general where nation='{$me['nation']}' and level='11'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$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>
|
||||
@@ -207,12 +218,13 @@ echo "
|
||||
</tr>
|
||||
";
|
||||
|
||||
$querys[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
||||
$querys[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
||||
$querys[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
||||
$querys[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
|
||||
$querys[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
|
||||
$querys[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 = [];
|
||||
$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::$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::$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::$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::$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::$chiefStatMin."' order by npc,binary(name)";
|
||||
|
||||
for($i=10; $i >= $lv; $i--) {
|
||||
if($i % 2 == 0) { echo "<tr>"; }
|
||||
@@ -227,7 +239,7 @@ for($i=10; $i >= $lv; $i--) {
|
||||
<select name=genlist size=1 style=color:white;background-color:black;>
|
||||
<option value=0>____공석____</option>";
|
||||
|
||||
$query = $querys[$i];
|
||||
$query = $queries[$i];
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
@@ -250,7 +262,9 @@ for($i=10; $i >= $lv; $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),"");
|
||||
$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>";
|
||||
if($i % 2 == 1) { echo "</tr>"; }
|
||||
@@ -258,7 +272,7 @@ for($i=10; $i >= $lv; $i--) {
|
||||
echo "
|
||||
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
|
||||
</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>
|
||||
";
|
||||
if($meLevel >= 5) {
|
||||
@@ -297,7 +311,7 @@ if($meLevel >= 5) {
|
||||
<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),"");
|
||||
$count = MYDB_num_rows($result);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
@@ -351,7 +365,7 @@ if($meLevel >= 5) {
|
||||
<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),"");
|
||||
$count = MYDB_num_rows($result);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
@@ -438,6 +452,7 @@ echo "
|
||||
</tr>
|
||||
";
|
||||
|
||||
$citylevel = [];
|
||||
$citylevel[1] = "수";
|
||||
$citylevel[2] = "진";
|
||||
$citylevel[3] = "관";
|
||||
@@ -492,10 +507,9 @@ for($j=0; $j < $citycount; $j++) {
|
||||
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
|
||||
</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>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,126 +3,149 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 10);
|
||||
if ($type <= 0 || $type > 12) {
|
||||
$type = 10;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력도시", 1);
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['level'] == 0) {
|
||||
if ($me['level'] == 0) {
|
||||
echo "재야입니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
$type = 10;
|
||||
}
|
||||
$sel[$type] = "selected";
|
||||
$sel = [$type => "selected"];
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>세력도시</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력도시</title>
|
||||
<?=WebUtil::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>
|
||||
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1];?> value=1>기본</option>
|
||||
<option <?=$sel[2];?> value=2>인구</option>
|
||||
<option <?=$sel[3];?> value=3>인구율</option>
|
||||
<option <?=$sel[4];?> value=4>민심</option>
|
||||
<option <?=$sel[5];?> value=5>농업</option>
|
||||
<option <?=$sel[6];?> value=6>상업</option>
|
||||
<option <?=$sel[7];?> value=7>치안</option>
|
||||
<option <?=$sel[8];?> value=8>수비</option>
|
||||
<option <?=$sel[9];?> value=9>성벽</option>
|
||||
<option <?=$sel[10];?> value=10>시세</option>
|
||||
<option <?=$sel[11];?> value=11>지역</option>
|
||||
<option <?=$sel[12];?> value=12>규모</option>
|
||||
<option <?=$sel[1]??''?> value=1>기본</option>
|
||||
<option <?=$sel[2]??''?> value=2>인구</option>
|
||||
<option <?=$sel[3]??''?> value=3>인구율</option>
|
||||
<option <?=$sel[4]??''?> value=4>민심</option>
|
||||
<option <?=$sel[5]??''?> value=5>농업</option>
|
||||
<option <?=$sel[6]??''?> value=6>상업</option>
|
||||
<option <?=$sel[7]??''?> value=7>치안</option>
|
||||
<option <?=$sel[8]??''?> value=8>수비</option>
|
||||
<option <?=$sel[9]??''?> value=9>성벽</option>
|
||||
<option <?=$sel[10]??''?> value=10>시세</option>
|
||||
<option <?=$sel[11]??''?> value=11>지역</option>
|
||||
<option <?=$sel[12]??''?> value=12>규모</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select nation from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$nation = getNationStaticInfo($me['nation']); //국가정보
|
||||
|
||||
switch($type) {
|
||||
case 1: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}'"; break;
|
||||
case 2: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by pop desc"; break;
|
||||
case 3: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by poprate desc"; break;
|
||||
case 4: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by rate desc"; break;
|
||||
case 5: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by agri desc"; break;
|
||||
case 6: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by comm desc"; break;
|
||||
case 7: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by secu desc"; break;
|
||||
case 8: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by def desc"; break;
|
||||
case 9: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by wall desc"; break;
|
||||
case 10: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by trade desc"; break;
|
||||
case 11: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by region,level desc"; break;
|
||||
case 12: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by level desc, region"; break;
|
||||
$query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}'";
|
||||
|
||||
switch ($type) {
|
||||
case 1: break;
|
||||
case 2: $query .= " order by pop desc"; break;
|
||||
case 3: $query .= " order by poprate desc"; break;
|
||||
case 4: $query .= " order by rate desc"; break;
|
||||
case 5: $query .= " order by agri desc"; break;
|
||||
case 6: $query .= " order by comm desc"; break;
|
||||
case 7: $query .= " order by secu desc"; break;
|
||||
case 8: $query .= " order by def desc"; break;
|
||||
case 9: $query .= " order by wall desc"; break;
|
||||
case 10: $query .= " order by trade desc"; break;
|
||||
case 11: $query .= " order by region,level desc"; break;
|
||||
case 12: $query .= " order by level desc, region"; break;
|
||||
}
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
$region = 0;
|
||||
$level = 0;
|
||||
|
||||
for ($j=0; $j < $citycount; $j++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
if($city['city'] == $nation['capital']) { $city['name'] = "<font color=cyan>[{$city['name']}]</font>"; }
|
||||
if ($city['city'] == $nation['capital']) {
|
||||
$city['name'] = "<font color=cyan>[{$city['name']}]</font>";
|
||||
}
|
||||
$query = "select name from general where no='{$city['gen1']}'"; // 태수
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$gen1 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select name from general where no='{$city['gen2']}'"; // 군사
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$gen2 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select name from general where no='{$city['gen3']}'"; // 시중
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$gen3 = MYDB_fetch_array($genresult);
|
||||
|
||||
if($type == 10 && $city['region'] != $region) {
|
||||
if ($type == 10 && $city['region'] != $region) {
|
||||
echo "<br>";
|
||||
$region = $city['region'];
|
||||
} elseif($type == 11 && $city['level'] != $level) {
|
||||
} elseif ($type == 11 && $city['level'] != $level) {
|
||||
echo "<br>";
|
||||
$level = $city['level'];
|
||||
}
|
||||
|
||||
if($city['trade'] == 0) {
|
||||
if ($city['trade'] == 0) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
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>
|
||||
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=48 id=bg1>주민</td>
|
||||
<td align=center width=112>{$city['pop']}/{$city['pop2']}</td>
|
||||
<td align=center width=48 id=bg1>농업</td>
|
||||
<td align=center width=108>{$city['agri']}/{$city['agri2']}</td>
|
||||
<td align=center width=48 id=bg1>상업</td>
|
||||
<td align=center width=108>{$city['comm']}/{$city['comm2']}</td>
|
||||
<td align=center width=48 id=bg1>치안</td>
|
||||
<td align=center width=108>{$city['secu']}/{$city['secu2']}</td>
|
||||
<td align=center width=48 id=bg1>수비</td>
|
||||
<td align=center width=108>{$city['def']}/{$city['def2']}</td>
|
||||
<td align=center width=48 id=bg1>성벽</td>
|
||||
<td align=center width=108>{$city['wall']}/{$city['wall2']}</td>
|
||||
<td align=center width=46 id=bg1>주민</td>
|
||||
<td align=center width=140>{$city['pop']}/{$city['pop2']}</td>
|
||||
<td align=center width=46 id=bg1>농업</td>
|
||||
<td align=center width=140>{$city['agri']}/{$city['agri2']}</td>
|
||||
<td align=center width=46 id=bg1>상업</td>
|
||||
<td align=center width=140>{$city['comm']}/{$city['comm2']}</td>
|
||||
<td align=center width=46 id=bg1>치안</td>
|
||||
<td align=center width=140>{$city['secu']}/{$city['secu2']}</td>
|
||||
<td align=center width=46 id=bg1>수비</td>
|
||||
<td align=center width=140>{$city['def']}/{$city['def2']}</td>
|
||||
<td align=center width=46 id=bg1>성벽</td>
|
||||
<td align=center width=140>{$city['wall']}/{$city['wall2']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>민심</td>
|
||||
@@ -132,24 +155,36 @@ for($j=0; $j < $citycount; $j++) {
|
||||
<td align=center id=bg1>인구</td>
|
||||
<td align=center>".round($city['pop']/$city['pop2']*100, 2)." %</td>
|
||||
<td align=center id=bg1>태수</td>
|
||||
<td align=center>";echo $gen1['name']==''?"-":"{$gen1['name']}";echo "</td>
|
||||
<td align=center>";
|
||||
echo $gen1['name']==''?"-":"{$gen1['name']}";
|
||||
echo "</td>
|
||||
<td align=center id=bg1>군사</td>
|
||||
<td align=center>";echo $gen2['name']==''?"-":"{$gen2['name']}";echo "</td>
|
||||
<td align=center>";
|
||||
echo $gen2['name']==''?"-":"{$gen2['name']}";
|
||||
echo "</td>
|
||||
<td align=center id=bg1>시중</td>
|
||||
<td align=center>";echo $gen3['name']==''?"-":"{$gen3['name']}";echo "</td>
|
||||
<td align=center>";
|
||||
echo $gen3['name']==''?"-":"{$gen3['name']}";
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>장수</td>
|
||||
<td colspan=11>";
|
||||
$query = "select npc,name from general where city='{$city['city']}' and nation='{$me['nation']}'"; // 장수 목록
|
||||
$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);
|
||||
if($gencount == 0) echo "-";
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
if ($gencount == 0) {
|
||||
echo "-";
|
||||
}
|
||||
for ($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}, </font>"; }
|
||||
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}, </font>"; }
|
||||
else { echo "{$general['name']}, "; }
|
||||
if ($general['npc'] >= 2) {
|
||||
echo "<font color=cyan>{$general['name']}, </font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
echo "<font color=skyblue>{$general['name']}, </font>";
|
||||
} else {
|
||||
echo "{$general['name']}, ";
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
@@ -159,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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
<div id="helper_genlist" style="display:none;"></div>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,12 +3,24 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 1);
|
||||
if($type <= 0 || $type > 15) {
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력장수", 1);
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -17,43 +29,46 @@ if($me['level'] == 0) {
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if($type == 0) {
|
||||
$type = 1;
|
||||
}
|
||||
$sel[$type] = "selected";
|
||||
$sel = [$type => "selected"];
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>세력장수</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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><form name=form1 method=post>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1];?> value=1>관직</option>
|
||||
<option <?=$sel[2];?> value=2>계급</option>
|
||||
<option <?=$sel[3];?> value=3>명성</option>
|
||||
<option <?=$sel[4];?> value=4>통솔</option>
|
||||
<option <?=$sel[5];?> value=5>무력</option>
|
||||
<option <?=$sel[6];?> value=6>지력</option>
|
||||
<option <?=$sel[7];?> value=7>자금</option>
|
||||
<option <?=$sel[8];?> value=8>군량</option>
|
||||
<option <?=$sel[9];?> value=9>병사</option>
|
||||
<option <?=$sel[10];?> value=10>벌점</option>
|
||||
<option <?=$sel[11];?> value=11>성격</option>
|
||||
<option <?=$sel[12];?> value=12>내특</option>
|
||||
<option <?=$sel[13];?> value=13>전특</option>
|
||||
<option <?=$sel[14];?> value=14>사관</option>
|
||||
<option <?=$sel[15];?> value=15>NPC</option>
|
||||
<option <?=$sel[1]??''?> value=1>관직</option>
|
||||
<option <?=$sel[2]??''?> value=2>계급</option>
|
||||
<option <?=$sel[3]??''?> value=3>명성</option>
|
||||
<option <?=$sel[4]??''?> value=4>통솔</option>
|
||||
<option <?=$sel[5]??''?> value=5>무력</option>
|
||||
<option <?=$sel[6]??''?> value=6>지력</option>
|
||||
<option <?=$sel[7]??''?> value=7>자금</option>
|
||||
<option <?=$sel[8]??''?> value=8>군량</option>
|
||||
<option <?=$sel[9]??''?> value=9>병사</option>
|
||||
<option <?=$sel[10]??''?> value=10>벌점</option>
|
||||
<option <?=$sel[11]??''?> value=11>성격</option>
|
||||
<option <?=$sel[12]??''?> value=12>내특</option>
|
||||
<option <?=$sel[13]??''?> value=13>전특</option>
|
||||
<option <?=$sel[14]??''?> value=14>사관</option>
|
||||
<option <?=$sel[15]??''?> value=15>NPC</option>
|
||||
</select>
|
||||
<input type=submit value='정렬하기'></form>
|
||||
</td></tr>
|
||||
@@ -61,28 +76,51 @@ $sel[$type] = "selected";
|
||||
<?php
|
||||
|
||||
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
|
||||
$orderByText = '';//FIXME: 쿼리 재작성
|
||||
switch($type) {
|
||||
case 1: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by level desc"; break;
|
||||
case 2: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by dedication desc"; break;
|
||||
case 3: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by experience desc"; break;
|
||||
case 4: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by leader desc"; break;
|
||||
case 5: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by power desc"; break;
|
||||
case 6: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by intel desc"; break;
|
||||
case 7: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by gold desc"; break;
|
||||
case 8: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by rice desc"; break;
|
||||
case 9: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by crew desc"; break;
|
||||
case 10: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by connect desc"; break;
|
||||
case 11: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by personal"; break;
|
||||
case 12: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by special desc"; break;
|
||||
case 13: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by special2 desc"; break;
|
||||
case 14: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by belong desc"; break;
|
||||
case 15: $query = "select npc,special,special2,personal,picture,imgsvr,name,level,dedication,experience,injury,leader,power,intel,gold,rice,belong,connect,killturn from general where nation='{$me['nation']}' order by npc desc"; break;
|
||||
case 1: $orderByText = " order by level desc"; break;
|
||||
case 2: $orderByText = " order by dedication desc"; break;
|
||||
case 3: $orderByText = " order by experience desc"; break;
|
||||
case 4: $orderByText = " order by leader desc"; break;
|
||||
case 5: $orderByText = " order by power desc"; break;
|
||||
case 6: $orderByText = " order by intel desc"; break;
|
||||
case 7: $orderByText = " order by gold desc"; break;
|
||||
case 8: $orderByText = " order by rice desc"; break;
|
||||
case 9: $orderByText = " order by crew desc"; break;
|
||||
case 10: $orderByText = " order by connect desc"; break;
|
||||
case 11: $orderByText = " order by personal"; break;
|
||||
case 12: $orderByText = " order by special desc"; break;
|
||||
case 13: $orderByText = " order by special2 desc"; break;
|
||||
case 14: $orderByText = " order by belong desc"; break;
|
||||
case 15: $orderByText = " order by npc desc"; break;
|
||||
}
|
||||
$query =
|
||||
"select
|
||||
npc,
|
||||
special,
|
||||
special2,
|
||||
personal,
|
||||
picture,
|
||||
imgsvr,
|
||||
name,
|
||||
level,
|
||||
dedication,
|
||||
experience,
|
||||
injury,
|
||||
leader,
|
||||
power,
|
||||
intel,
|
||||
gold,
|
||||
rice,
|
||||
belong,
|
||||
connect,
|
||||
killturn
|
||||
from general where nation='{$me['nation']}' ".$orderByText;
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$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 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=64 align=center id=bg1>얼 굴</td>
|
||||
<td width=98 align=center id=bg1>이 름</td>
|
||||
@@ -117,9 +155,9 @@ for($j=0; $j < $gencount; $j++) {
|
||||
}
|
||||
|
||||
if($general['injury'] > 0) {
|
||||
$leader = floor($general['leader'] * (100 - $general['injury'])/100);
|
||||
$power = floor($general['power'] * (100 - $general['injury'])/100);
|
||||
$intel = floor($general['intel'] * (100 - $general['injury'])/100);
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$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>";
|
||||
@@ -136,9 +174,9 @@ for($j=0; $j < $gencount; $j++) {
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center background={$imageTemp}/{$general['picture']} height=64></td>
|
||||
<td align=center style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>"; echo getLevel($general['level'], $nation['level']); echo "</td>
|
||||
<td align=center>"; echo getLevel($general['level'], $nationLevel); echo "</td>
|
||||
<td align=center>".getDed($general['dedication'])."</td>
|
||||
<td align=center>".getHonor($general['experience'])."</td>
|
||||
<td align=center>".getBill($general['dedication'])."</td>
|
||||
@@ -147,8 +185,8 @@ for($j=0; $j < $gencount; $j++) {
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['gold']}</td>
|
||||
<td align=center>{$general['rice']}</td>
|
||||
<td align=center>".getGenChar($general['personal'])."</td>
|
||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>{$general['belong']}</td>
|
||||
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
|
||||
</tr>";
|
||||
@@ -159,11 +197,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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,11 +4,16 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력정보", 1);
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -21,19 +26,22 @@ if($me['level'] == 0) {
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>세력정보</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select nation from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -45,6 +53,9 @@ $query = "select city,name,pop,pop2 from city where nation='{$nation['nation']}'
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
$totalpop = 0;
|
||||
$maxpop = 0;
|
||||
$cityname = [];
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
if($city['city'] == $nation['capital']) { $cityname[$j] = "<font color=cyan>[{$city['name']}]</font>"; }
|
||||
@@ -57,18 +68,16 @@ $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),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select gold_rate,rice_rate from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||
// 금 수지
|
||||
$deadIncome = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
|
||||
$goldincomeList = getGoldIncome($connect, $nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome;
|
||||
$goldoutcome = getGoldOutcome($connect, $nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($connect, $nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$riceincome = $riceincomeList[0] + $riceincomeList[1];
|
||||
$riceoutcome = getRiceOutcome($connect, $nation['nation'], $nation['bill']);
|
||||
$riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']);
|
||||
|
||||
|
||||
$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome;
|
||||
@@ -81,7 +90,7 @@ if($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; }
|
||||
else { $budgetricediff = "$budgetricediff"; }
|
||||
|
||||
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>
|
||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 ";echo $me['nation']==0?"공 백 지":"{$nation['name']}";echo " 】</td>
|
||||
</tr>
|
||||
@@ -148,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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,86 +3,118 @@ namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$mode = Util::getReq('mode', 'int', 2);
|
||||
$tnmt = Util::getReq('tnmt', 'int', 1);
|
||||
//$detachNPC = Util::getReq('detachNPC', 'bool');
|
||||
$detachNPC = false;
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
if($mode < 0 || $mode > 2){
|
||||
$mode = 2;
|
||||
}
|
||||
|
||||
if($tnmt < 0 || $tnmt > 1){
|
||||
$tnmt = 1;
|
||||
}
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("내정보", 1);
|
||||
|
||||
$query = "select myset from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['myset'] > 0) {
|
||||
|
||||
if ($me['myset'] > 0) {
|
||||
$submit = 'submit';
|
||||
} else {
|
||||
$submit = 'hidden';
|
||||
}
|
||||
|
||||
if($btn == "설정저장" && $me['myset'] > 0) {
|
||||
if($me['myset'] > 1) {
|
||||
if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
if ($me['myset'] > 1) {
|
||||
$submit = 'submit';
|
||||
} else {
|
||||
$submit = 'hidden';
|
||||
}
|
||||
|
||||
$query = "update general set myset=myset-1,map='$map',mode='$mode',tnmt='$tnmt' where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
$me['myset'] -= 1;
|
||||
|
||||
$query = "select no,map,mode,tnmt,myset from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
$db->update('general', [
|
||||
'myset'=>$db->sqleval('myset-1'),
|
||||
'mode'=>$mode,
|
||||
'tnmt'=>$tnmt
|
||||
], 'owner=%i', $userID);
|
||||
|
||||
if($me['npc'] == 1 && $detachNPC){
|
||||
$turnterm = $gameStor->turnterm;
|
||||
|
||||
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>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>내정보</title>
|
||||
<link rel=stylesheet href="css/common.css" type=text/css>
|
||||
<script type="text/javascript">
|
||||
function go(type) {
|
||||
if(type == 0){
|
||||
//location.replace('c_vacation.php');
|
||||
console.log('c_vacation.php');//TODO:debug all and replace
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 내정보</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
</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 width=50%>
|
||||
<?php myInfo($connect); ?>
|
||||
<?php myInfo2($connect); ?>
|
||||
<?php myInfo(); ?>
|
||||
<?php myInfo2(); ?>
|
||||
</td>
|
||||
<td width=50% valign=top>
|
||||
<td width=50% valign=top style="padding-left:4ch;">
|
||||
<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=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
|
||||
】<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=1 <?=$me['mode']==1?"checked":""; ?>>○(훈사60)
|
||||
<input type=radio name=mode value=0 <?=$me['mode']==0?"checked":""; ?>>×
|
||||
】<br><br>
|
||||
<input type=<?=$submit;?> name=btn style=background-color:<?=$_basecolor2;?>;color:white;width:160;height:30;font-size:13px; value=설정저장><br>
|
||||
∞<font color=orange>설정저장은 이달중 <?=$me['myset'];?>회 남았습니다.</font><br><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>
|
||||
</form>
|
||||
휴 가 신 청<br>
|
||||
<input type=button style=background-color:<?=$_basecolor2;?>;color:white;width:160;height:30;font-size:13px; value=휴가신청 onclick='go(0)'>
|
||||
휴 가 신 청<br>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -91,10 +123,10 @@ function go(type) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php MyLog($me['no'], 24); ?>
|
||||
<?=getGenLogRecent($me['no'], 24)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyBatLog($me['no'], 24); ?>
|
||||
<?=getBatLogRecent($me['no'], 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -103,18 +135,17 @@ function go(type) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php MyHistory($connect, $me['no']); ?>
|
||||
<?=getGeneralHistoryAll($me['no'])?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php MyBatRes($me['no'], 24); ?>
|
||||
<?=getBatResRecent($me['no'], 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
</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><?=banner()?></td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,11 +4,15 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("회의실", 1);
|
||||
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -16,22 +20,26 @@ $me = MYDB_fetch_array($result);
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>회의실</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 회의실</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
<form name=form1 method=post action=c_nationboard.php>
|
||||
<tr><td align=center>
|
||||
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830;>
|
||||
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998;height:200;></textarea><br>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
|
||||
<input type=submit value=저장하기>
|
||||
<input type=hidden name=num value=-1>
|
||||
</td></tr>
|
||||
@@ -39,7 +47,7 @@ $me = MYDB_fetch_array($result);
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$nation = getNation($connect, $me['nation']);
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//20개 메세지
|
||||
$index = $nation['boardindex'];
|
||||
@@ -48,18 +56,18 @@ for($i=0; $i < 20; $i++) {
|
||||
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($nation["board{$index}"] != '') { msgprint($connect, $nation["board{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["board{$index}_when"], $index, 0); }
|
||||
if($nation["board{$index}"] != '') { msgprint($nation["board{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["board{$index}_when"], $index, 0); }
|
||||
$index--;
|
||||
if($index < 0) { $index = 19; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,26 +4,33 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("국법", 1);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>국법</title>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
<title><?=UniqueConst::$serverName?>: 국법</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<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>
|
||||
|
||||
<?php
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -34,12 +41,12 @@ $nation = MYDB_fetch_array($result);
|
||||
if($me['level'] >= 5) {
|
||||
echo "
|
||||
<form name=form1 method=post action=c_nationrule.php>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998;height:500;>{$nation['rule']}</textarea><br>
|
||||
<textarea name=msg style=color:white;background-color:black;width:998px;height:500px;>{$nation['rule']}</textarea><br>
|
||||
<input type=submit value=저장하기>
|
||||
</form>";
|
||||
} else {
|
||||
echo "
|
||||
<textarea name=msg style=color:white;background-color:black;width:998;height:500; readonly>{$nation['rule']}</textarea><br>";
|
||||
<textarea name=msg style=color:white;background-color:black;width:998px;height:500px; readonly>{$nation['rule']}</textarea><br>";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -47,7 +54,6 @@ if($me['level'] >= 5) {
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,23 +4,30 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
increaseRefresh("토너먼트", 1);
|
||||
checkTurn($connect);
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$query = "select no,tournament,con,turntime from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("토너먼트", 1);
|
||||
checkTurn();
|
||||
|
||||
$query = "select no,tournament,con,turntime from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select conlimit,tournament,phase,tnmt_msg,tnmt_type,develcost,tnmt_trig from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
printLimitMsg($me['turntime']);
|
||||
exit();
|
||||
}
|
||||
|
||||
switch($admin['tnmt_type']) {
|
||||
switch ($admin['tnmt_type']) {
|
||||
default: throw new \RuntimeException('invalid tnmt_type');
|
||||
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break;
|
||||
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break;
|
||||
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break;
|
||||
@@ -30,37 +37,33 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); } ?>
|
||||
<?php if ($con == 1) {
|
||||
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
|
||||
} ?>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>토너먼트</title>
|
||||
<style>
|
||||
body { color:white; background-color:black; border-width:1; border-color:gray; }
|
||||
table { font-family:'맑은 고딕'; line-height:110%; }
|
||||
font { font-family:'맑은 고딕'; line-height:110%; }
|
||||
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
|
||||
select { font-family:'굴림'; line-height:100%; }
|
||||
#bg0 { background-image:url(<?=$images;?>/back_walnut.jpg); }
|
||||
#bg1 { background-image:url(<?=$images;?>/back_green.jpg); }
|
||||
#bg2 { background-image:url(<?=$images;?>/back_blue.jpg); }
|
||||
</style>
|
||||
|
||||
<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=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>
|
||||
</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
|
||||
if(Session::getUserGrade() >= 5) {
|
||||
if ($session->userGrade >= 5) {
|
||||
$sel = [];
|
||||
echo "
|
||||
<form method=post action=c_tournament.php>
|
||||
<tr><td colspan=8><input type=textarea size=150 style=color:white;background-color:black; name=msg><input type=submit name=btn value='메시지'></td></tr>
|
||||
<tr><td colspan=8>
|
||||
<input type=button value='갱신' onclick='location.reload()'>";
|
||||
|
||||
switch($admin['tnmt_trig']) {
|
||||
switch ($admin['tnmt_trig']) {
|
||||
case 0: $sel[0] = "selected"; break;
|
||||
case 1: $sel[1] = "selected"; break;
|
||||
case 2: $sel[2] = "selected"; break;
|
||||
@@ -71,8 +74,8 @@ if(Session::getUserGrade() >= 5) {
|
||||
case 7: $sel[7] = "selected"; break;
|
||||
}
|
||||
|
||||
if($admin['tournament'] == 0) {
|
||||
echo "
|
||||
if ($admin['tournament'] == 0) {
|
||||
?>
|
||||
<select name=auto size=1 style=color:white;background-color:black;>
|
||||
<option style=color:white; value=0>수동진행</option>
|
||||
<option style=color:white; value=1>12분 05일</option>
|
||||
@@ -91,36 +94,42 @@ if(Session::getUserGrade() >= 5) {
|
||||
</select>
|
||||
<input type=submit name=btn value='개최'>
|
||||
<select name=trig size=1 style=color:white;background-color:black;>
|
||||
<option style=color:white; value=0 {$sel[0]}>수동진행</option>
|
||||
<option style=color:white; value=1 {$sel[1]}>12분 05일</option>
|
||||
<option style=color:white; value=2 {$sel[2]}>07분 10시</option>
|
||||
<option style=color:white; value=3 {$sel[3]}>03분 04시</option>
|
||||
<option style=color:white; value=4 {$sel[4]}>01분 82분</option>
|
||||
<option style=color:white; value=5 {$sel[5]}>30초 41분</option>
|
||||
<option style=color:white; value=6 {$sel[6]}>15초 21분</option>
|
||||
<option style=color:white; value=7 {$sel[7]}>05초 07분</option>
|
||||
<option style=color:white; value=0 <?=$sel[0]??''?>>수동진행</option>
|
||||
<option style=color:white; value=1 <?=$sel[1]??''?>>12분 05일</option>
|
||||
<option style=color:white; value=2 <?=$sel[2]??''?>>07분 10시</option>
|
||||
<option style=color:white; value=3 <?=$sel[3]??''?>>03분 04시</option>
|
||||
<option style=color:white; value=4 <?=$sel[4]??''?>>01분 82분</option>
|
||||
<option style=color:white; value=5 <?=$sel[5]??''?>>30초 41분</option>
|
||||
<option style=color:white; value=6 <?=$sel[6]??''?>>15초 21분</option>
|
||||
<option style=color:white; value=7 <?=$sel[7]??''?>>05초 07분</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='자동개최설정'>
|
||||
<input type=submit name=btn value='포상'>
|
||||
<input type=submit name=btn value='회수'>"; }
|
||||
else {
|
||||
<input type=submit name=btn value='회수'>
|
||||
<?php
|
||||
} else {
|
||||
echo "<input type=submit name=btn value='중단' onclick='return confirm(\"진짜 중단하시겠습니까?\")'>";
|
||||
}
|
||||
|
||||
switch($admin['tournament']) {
|
||||
switch ($admin['tournament']) {
|
||||
case 1:
|
||||
echo "<select name=gen size=1 style=color:white;background-color:black;>";
|
||||
|
||||
$query = "select no,name,npc,tnmt,leader,power,intel,leader+power+intel as total from general where tournament=0 and gold>='{$admin['develcost']}' order by {$tp3} desc";
|
||||
$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);
|
||||
|
||||
for($i=0; $i < $genCount; $i++) {
|
||||
for ($i=0; $i < $genCount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['npc'] >= 2) { $npc = "cyan"; }
|
||||
elseif($general['npc'] == 1) { $npc = "skyblue"; }
|
||||
elseif($general['tnmt'] > 0) { $npc = "blue"; }
|
||||
else { $npc = "white"; }
|
||||
if ($general['npc'] >= 2) {
|
||||
$npc = "cyan";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$npc = "skyblue";
|
||||
} elseif ($general['tnmt'] > 0) {
|
||||
$npc = "blue";
|
||||
} else {
|
||||
$npc = "white";
|
||||
}
|
||||
echo "<option style=color:{$npc}; value={$general['no']}>[{$general[$tp3]}]{$general['name']}</option>";
|
||||
}
|
||||
echo "
|
||||
@@ -151,18 +160,24 @@ if(Session::getUserGrade() >= 5) {
|
||||
echo "
|
||||
</td></tr>
|
||||
</form>";
|
||||
} elseif($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) {
|
||||
} elseif ($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) {
|
||||
echo "<form method=post action=c_tournament.php><tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'><input type=submit name=btn value='참가' onclick='return confirm(\"참가비 금{$admin['develcost']}이 필요합니다. 참가하시겠습니까?\")'></td></tr></form>";
|
||||
} else {
|
||||
echo "<tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'></td></tr>";
|
||||
}
|
||||
|
||||
$str1 = getTournament($admin['tournament']);
|
||||
$str2 = getTournamentTime($connect);
|
||||
$str3 = getTournamentTerm($connect);
|
||||
$str2 = getTournamentTime();
|
||||
if($str2){
|
||||
$str2 = ', '.$str2;
|
||||
}
|
||||
$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 align=center><font color=white size=6><?=$tnmt_type;?> (<?=$str1.", ".$str2.", ".$str3;?>)</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 id=bg2><font color=magenta size=5>16강 승자전</font></td></tr>
|
||||
<tr><td height=10 colspan=8 align=center></td></tr>
|
||||
<?php
|
||||
@@ -170,16 +185,25 @@ $str3 = getTournamentTerm($connect);
|
||||
echo "
|
||||
<tr>
|
||||
<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>";
|
||||
|
||||
$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),"");
|
||||
for($i=0; $i < 1; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$general = MYDB_fetch_array($result) ?? [
|
||||
'name'=>'',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
echo "<td colspan=16>{$general['name']}</td>";
|
||||
}
|
||||
|
||||
@@ -188,18 +212,38 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 1; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 2; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$cent = [];
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
$line = [];
|
||||
$gen = [];
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
//FIXME: 다시 작성. null인 경우엔 어쩌려고?
|
||||
$general = MYDB_fetch_array($result) ?? [
|
||||
'name'=>'',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 1; $i++) {
|
||||
for ($i=0; $i < 1; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>";
|
||||
@@ -209,7 +253,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 2; $i++) {
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
echo "<td colspan=8>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -218,18 +262,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 2; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 4; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$general = MYDB_fetch_array($result) ?? [
|
||||
'name'=>'',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 2; $i++) {
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━┓"."</font>";
|
||||
@@ -239,7 +298,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
echo "<td colspan=4>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -248,18 +307,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 4; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 8; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$general = MYDB_fetch_array($result) ?? [
|
||||
'name'=>'',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━┓"."</font>";
|
||||
@@ -269,7 +343,7 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
echo "<td colspan=2>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
@@ -278,18 +352,33 @@ echo "
|
||||
<tr align=center>";
|
||||
|
||||
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($i=0; $i < 8; $i++) { $cent[$i] = "<font color=white>"; }
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['name'] == "") { $general['name'] = "-"; }
|
||||
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
|
||||
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
|
||||
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
|
||||
else { $line[$i] = "<font color=white>"; }
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = "<font color=white>";
|
||||
}
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
$general = MYDB_fetch_array($result) ?? [
|
||||
'name'=>'',
|
||||
'npc'=>0,
|
||||
'win'=>0
|
||||
];
|
||||
if ($general['name'] == "") {
|
||||
$general['name'] = "-";
|
||||
}
|
||||
if ($general['npc'] >= 2) {
|
||||
$general['name'] = "<font color=cyan>".$general['name']."</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
|
||||
}
|
||||
if ($general['win'] > 0) {
|
||||
$line[$i] = "<font color=red>";
|
||||
$cent[intdiv($i, 2)] = "<font color=red>";
|
||||
} else {
|
||||
$line[$i] = "<font color=white>";
|
||||
}
|
||||
$gen[$i] = $general['name'];
|
||||
}
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$cent[$i] = $cent[$i]."┻"."</font>";
|
||||
$line[$i*2] = $line[$i*2]."┏━━━━"."</font>";
|
||||
$line[$i*2+1] = $line[$i*2+1]."━━━━┓"."</font>";
|
||||
@@ -299,25 +388,31 @@ echo "
|
||||
</tr>
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td width=125>{$gen[$i]}</td>";
|
||||
}
|
||||
|
||||
echo"
|
||||
</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";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$betting = MYDB_fetch_array($result);
|
||||
for($i=0; $i < 16; $i++) {
|
||||
$bet[$i] = @round($betting['bet'] / $betting["bet{$i}"], 2);
|
||||
if($bet[$i] == 0) { $bet[$i] = "∞"; }
|
||||
$betting = $gameStor->getValues(['tournament','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
|
||||
$betting['bet'] = 0;
|
||||
for($i=0;$i<16;$i+=1){
|
||||
$betting['bet'] += $betting['bet'.$i];
|
||||
}
|
||||
$bet = [];
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if($betting["bet{$i}"] == 0){
|
||||
$bet[$i] = '∞';
|
||||
continue;
|
||||
}
|
||||
$bet[$i] = round($betting['bet'] / $betting["bet{$i}"], 2);
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr align=center>";
|
||||
|
||||
for($i=0; $i < 16; $i++) {
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "<td><font color=skyblue>{$bet[$i]}</font></td>";
|
||||
}
|
||||
|
||||
@@ -329,25 +424,27 @@ echo "
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
if($admin['tournament'] >= 7 || $admin['tournament'] == 0) { printFighting($admin['tournament'], $admin['phase']); }
|
||||
if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) {
|
||||
printFighting($admin['tournament'], $admin['phase']);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=10 colspan=8 align=center></td></tr>
|
||||
<tr><td colspan=8 align=center id=bg2><font color=orange size=5>조별 본선 순위</font></td></tr>
|
||||
<tr>";
|
||||
|
||||
$num = Array("一", "二", "三", "四", "五", "六", "七", "八");
|
||||
$num = array("一", "二", "三", "四", "五", "六", "七", "八");
|
||||
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$grp = $i + 10;
|
||||
echo "
|
||||
<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 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>";
|
||||
|
||||
$query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($k=1; $k <= 4; $k++) {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($k=1; $k <= 4; $k++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
|
||||
}
|
||||
@@ -356,22 +453,24 @@ for($i=0; $i < 8; $i++) {
|
||||
</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
if($admin['tournament'] == 4 || $admin['tournament'] == 5) { printFighting($admin['tournament'], $admin['phase']); }
|
||||
if ($admin['tournament'] == 4 || $admin['tournament'] == 5) {
|
||||
printFighting($admin['tournament'], $admin['phase']);
|
||||
}
|
||||
echo "
|
||||
<tr><td colspan=8 align=center id=bg2><font color=yellow size=5>조별 예선 순위</font></td></tr>
|
||||
<tr>";
|
||||
|
||||
for($i=0; $i < 8; $i++) {
|
||||
for ($i=0; $i < 8; $i++) {
|
||||
$grp = $i;
|
||||
echo "
|
||||
<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 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>";
|
||||
|
||||
$query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
for($k=1; $k <= 8; $k++) {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
for ($k=1; $k <= 8; $k++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
|
||||
}
|
||||
@@ -380,13 +479,15 @@ for($i=0; $i < 8; $i++) {
|
||||
</td>";
|
||||
}
|
||||
|
||||
if($admin['tournament'] == 2 || $admin['tournament'] == 3) { printFighting($admin['tournament'], $admin['phase']); }
|
||||
if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
|
||||
printFighting($admin['tournament'], $admin['phase']);
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr><td colspan=8>
|
||||
<font color=white size=2>
|
||||
ㆍ예선은 홈&어웨이 풀리그로 진행됩니다. (총 14경기)<br>
|
||||
ㆍ예선은 홈&어웨이 풀리그로 진행됩니다. (총 14경기)<br>
|
||||
ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.<br>
|
||||
ㆍ각 조1위가 시드1로 랜덤하게 조에 배정되며, 역시 각 조2위가 시드2로 랜덤하게 조에 배정됩니다.<br>
|
||||
ㆍ그후 남은 3, 4위는 완전 랜덤하게 모든 조에 랜덤하게 배정됩니다.<br>
|
||||
@@ -399,10 +500,9 @@ if($admin['tournament'] == 2 || $admin['tournament'] == 3) { printFighting($admi
|
||||
</font>
|
||||
</td></tr>
|
||||
</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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,11 +4,15 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("부대편성", 1);
|
||||
|
||||
$query = "select no,nation,troop from general where owner='{$_SESSION['userID']}'";
|
||||
$query = "select no,nation,troop from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -20,25 +24,33 @@ $troopcount = MYDB_num_rows($result);
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>부대편성</title>
|
||||
<link rel=stylesheet href=css/common.css type=text/css>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
<td align=center width=64 id=bg1>선 택</td>
|
||||
<td align=center width=98 id=bg1>부 대 정 보</td>
|
||||
<td align=center width=64 id=bg1>부 대 장</td>
|
||||
<td align=center width=662 id=bg1 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=64 class='bg1 center'>선 택</td>
|
||||
<td width=130 class='bg1 center'>부 대 정 보</td>
|
||||
<td width=100 class='bg1 center'>부 대 장</td>
|
||||
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;>장 수</td>
|
||||
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $i < $troopcount; $i++) {
|
||||
$troop = MYDB_fetch_array($result);
|
||||
@@ -77,8 +89,8 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
<tr>
|
||||
<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 height=64 background={$imageTemp}/{$picture}> </td>
|
||||
<td rowspan=2 width=662>$genlist</td>
|
||||
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62>$genlist</td>
|
||||
<td rowspan=2>$turn</td>
|
||||
</tr>
|
||||
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
|
||||
@@ -88,8 +100,8 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
<tr>
|
||||
<td align=center rowspan=2> </td>
|
||||
<td align=center >{$troop['name']}<br>【 $cityname 】</td>
|
||||
<td height=64 background={$imageTemp}/{$picture}> </td>
|
||||
<td rowspan=2 width=662>$genlist</td>
|
||||
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=576>$genlist</td>
|
||||
<td rowspan=2>";
|
||||
|
||||
if($troop['no'] == $me['no']) {
|
||||
@@ -97,7 +109,7 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$genCount = MYDB_num_rows($genresult);
|
||||
echo "
|
||||
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:98;>";
|
||||
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>";
|
||||
for($k=0; $k < $genCount; $k++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
echo "
|
||||
@@ -105,7 +117,7 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
}
|
||||
echo "
|
||||
</select><br>
|
||||
<input type=submit name=btn value='부 대 추 방' style=width:100;height:25;>";
|
||||
<input type=submit name=btn value='부 대 추 방' style=width:130px;height:25px;>";
|
||||
} else {
|
||||
echo $turn;
|
||||
}
|
||||
@@ -114,11 +126,14 @@ for($i=0; $i < $troopcount; $i++) {
|
||||
</td>
|
||||
</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 colspan=5>";
|
||||
<tr><td colspan=5></td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
if($me['troop'] == 0) {
|
||||
echo "</tbody>
|
||||
<tfoot><tr><td>";
|
||||
if ($troopcount == 0) {
|
||||
}
|
||||
else if($me['troop'] == 0) {
|
||||
echo"
|
||||
<input type=submit name=btn value='부 대 가 입'>";
|
||||
} else {
|
||||
@@ -128,14 +143,15 @@ if($me['troop'] == 0) {
|
||||
|
||||
echo "
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<br>";
|
||||
|
||||
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>
|
||||
<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) {
|
||||
echo "
|
||||
<td><input type=submit name=btn value='부 대 창 설'></td>";
|
||||
@@ -147,14 +163,13 @@ echo "
|
||||
</tr>
|
||||
</table>";
|
||||
|
||||
MYDB_close($connect);
|
||||
?>
|
||||
<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><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php PrintElapsedTime(); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||