Compare commits
1020
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0561cc3320 | ||
|
|
6f47e92050 | ||
|
|
9a67ac7509 | ||
|
|
d922993eaf | ||
|
|
9fa2225283 | ||
|
|
35eadad96b | ||
|
|
081416475e | ||
|
|
12492c842c | ||
|
|
68e01c1e73 | ||
|
|
bdcc79ce34 | ||
|
|
869ad39ddc | ||
|
|
30e1e35090 | ||
|
|
6c185ffd09 | ||
|
|
a9435f8f32 | ||
|
|
9ea8d3ec97 | ||
|
|
d918234bb8 | ||
|
|
afbbbaa855 | ||
|
|
a844ef31a2 | ||
|
|
b469ce0504 | ||
|
|
ed2bc8c390 | ||
|
|
cb246e859e | ||
|
|
3d6b99c004 | ||
|
|
842942c0fe | ||
|
|
71c4a84833 | ||
|
|
d1bc434ced | ||
|
|
59f7448aa7 | ||
|
|
4408692565 | ||
|
|
2e8607b811 | ||
|
|
2f2890e582 | ||
|
|
e2b39be3ff | ||
|
|
7ada07a99a | ||
|
|
6b16573f6b | ||
|
|
1de49fe998 | ||
|
|
7109e66ad8 | ||
|
|
d21c2f67ba | ||
|
|
0d39add09c | ||
|
|
5e1f7ea571 | ||
|
|
35c71bd21b | ||
|
|
e6a39f246d | ||
|
|
65cd8af9e1 | ||
|
|
e916f2fc40 | ||
|
|
13da80ee85 | ||
|
|
4f4045363b | ||
|
|
9600e18c92 | ||
|
|
d5aefccadc | ||
|
|
9e64b268cf | ||
|
|
0893bf6473 | ||
|
|
21f8b814e0 | ||
|
|
10fd22ba81 | ||
|
|
a3fef6c62f | ||
|
|
d750167a00 | ||
|
|
241bf62fdc | ||
|
|
bc5574615d | ||
|
|
48cac053fd | ||
|
|
25837f6393 | ||
|
|
b281362c98 | ||
|
|
e5050bb6c8 | ||
|
|
2d0c3ef881 | ||
|
|
ee029aac10 | ||
|
|
da205c09f9 | ||
|
|
07317b86a2 | ||
|
|
79e2543266 | ||
|
|
303cbcd188 | ||
|
|
a47905541c | ||
|
|
4e988db50f | ||
|
|
9dc3d83a77 | ||
|
|
934c1b0cfe | ||
|
|
70181d95c7 | ||
|
|
8a210103c0 | ||
|
|
df96381759 | ||
|
|
2006845ff7 | ||
|
|
44f0e78086 | ||
|
|
824956a34d | ||
|
|
1e7e01b6b0 | ||
|
|
cd25aaaca6 | ||
|
|
d481047eb4 | ||
|
|
1699ac6e08 | ||
|
|
79b7188578 | ||
|
|
843f469914 | ||
|
|
71254e86f4 | ||
|
|
07328847f4 | ||
|
|
9181cbfee5 | ||
|
|
4aef22aac8 | ||
|
|
512266abf4 | ||
|
|
ef64f180a2 | ||
|
|
9e45800367 | ||
|
|
f027f7f225 | ||
|
|
6f7ac86e7f | ||
|
|
93d298ef75 | ||
|
|
121a892c9a | ||
|
|
9222e2bbdd | ||
|
|
fe78d82ace | ||
|
|
77e98d9942 | ||
|
|
2b1efae238 | ||
|
|
d70740b38c | ||
|
|
3ebb30795c | ||
|
|
5d42730e9a | ||
|
|
923777899e | ||
|
|
05b9187a3b | ||
|
|
1198baba67 | ||
|
|
d4b7cdc97c | ||
|
|
bb7e93ac2d | ||
|
|
59c0c6cfb8 | ||
|
|
8699a43a22 | ||
|
|
5529651f91 | ||
|
|
a6f225ae9d | ||
|
|
fceda31c11 | ||
|
|
e5a5281e10 | ||
|
|
ede1d89569 | ||
|
|
44b9ba96c3 | ||
|
|
7fd8bfbe4e | ||
|
|
17654633dc | ||
|
|
8fd0a54018 | ||
|
|
efe8a476da | ||
|
|
ac0f6c6b6c | ||
|
|
8c163515db | ||
|
|
7ce1e64ee8 | ||
|
|
b6e667a291 | ||
|
|
5c7522fd1f | ||
|
|
85e9223603 | ||
|
|
943e2be676 | ||
|
|
2f09df7521 | ||
|
|
445e445e49 | ||
|
|
a3925de127 | ||
|
|
f20e4bd572 | ||
|
|
816c2ac1c4 | ||
|
|
e731371ab1 | ||
|
|
5559693cb3 | ||
|
|
ca33c3b259 | ||
|
|
a78fa98b3d | ||
|
|
956dc82555 | ||
|
|
d30a824481 | ||
|
|
a643182eee | ||
|
|
e1dbc46d8d | ||
|
|
e33d8776bc | ||
|
|
f6d16883de | ||
|
|
51bdd3bbfd | ||
|
|
8f9ae78b8c | ||
|
|
584b7b8e45 | ||
|
|
f74e903f1f | ||
|
|
4cedf112f5 | ||
|
|
d607a8da0f | ||
|
|
84a12e28df | ||
|
|
54aa47d1a8 | ||
|
|
faaee4b945 | ||
|
|
0b46303f9f | ||
|
|
b98668bc60 | ||
|
|
947e8e9512 | ||
|
|
681918cb63 | ||
|
|
d0fae44430 | ||
|
|
3e752461e8 | ||
|
|
1a9e6f3b1a | ||
|
|
580275a8cf | ||
|
|
ee74771f16 | ||
|
|
81fa97d3ee | ||
|
|
00a6e9798f | ||
|
|
17a59cbdd5 | ||
|
|
d4c9a0a47a | ||
|
|
6423c22cf8 | ||
|
|
e21fbaff83 | ||
|
|
99e6a2676b | ||
|
|
ab47f40ee1 | ||
|
|
a7f000e51e | ||
|
|
0d9eabcaa0 | ||
|
|
b1c63d7f5e | ||
|
|
820c72820d | ||
|
|
300065504b | ||
|
|
8aa846b349 | ||
|
|
ae8b94b2d7 | ||
|
|
7670d55f3c | ||
|
|
528ab4e203 | ||
|
|
cf1dc90137 | ||
|
|
dd81dcc9c6 | ||
|
|
a31c949734 | ||
|
|
3536d5c413 | ||
|
|
0e50216cee | ||
|
|
16fed754a9 | ||
|
|
c7748934b8 | ||
|
|
d46b3154cc | ||
|
|
f8bcfba90e | ||
|
|
45a4ca5298 | ||
|
|
88e3a9852b | ||
|
|
cf1f023379 | ||
|
|
b4b6f5a1f7 | ||
|
|
a21eef6e84 | ||
|
|
3beca8bba5 | ||
|
|
b5d66dba8a | ||
|
|
24d01a2156 | ||
|
|
45d848cbb9 | ||
|
|
e2f649dd35 | ||
|
|
183bffbc0e | ||
|
|
a874415859 | ||
|
|
93b33ba383 | ||
|
|
26420719f3 | ||
|
|
dc6a35d656 | ||
|
|
51da0bd7b7 | ||
|
|
1afb2c6883 | ||
|
|
f78fcc2b71 | ||
|
|
fb2d30f2c9 | ||
|
|
8781e7c6ad | ||
|
|
c34317b1e5 | ||
|
|
b09730b422 | ||
|
|
0f1725a7ab | ||
|
|
b12e0358d6 | ||
|
|
7ef841746a | ||
|
|
2b52b2379e | ||
|
|
8dd5965c44 | ||
|
|
bc59521cc8 | ||
|
|
815822ef40 | ||
|
|
9e6d33cc1a | ||
|
|
44df85f2bd | ||
|
|
2c15c7087e | ||
|
|
6b281628ed | ||
|
|
9f74db0aff | ||
|
|
83ea5c7fa3 | ||
|
|
bf6fe3482b | ||
|
|
f4d6803720 | ||
|
|
23c2a16286 | ||
|
|
afc301fad2 | ||
|
|
1c0a50e48f | ||
|
|
02e119d0da | ||
|
|
06fcc383ce | ||
|
|
408b1f76e4 | ||
|
|
3a879a37e2 | ||
|
|
9e1bb50d78 | ||
|
|
25dcf426b1 | ||
|
|
7b7baaea62 | ||
|
|
36d83804d0 | ||
|
|
7c46d2e27f | ||
|
|
d4acad33ea | ||
|
|
91cc1159bc | ||
|
|
21b7068c90 | ||
|
|
682d2bf922 | ||
|
|
3ff6788405 | ||
|
|
e59a8606ab | ||
|
|
157285ddb6 | ||
|
|
f49c3e0ff7 | ||
|
|
345877b9fd | ||
|
|
37e4105585 | ||
|
|
4a05b59b4b | ||
|
|
57322d75d7 | ||
|
|
4ccc2c1f71 | ||
|
|
652b32619d | ||
|
|
57b3611965 | ||
|
|
afbf9e619a | ||
|
|
060b1da388 | ||
|
|
38024b6be4 | ||
|
|
6aede6e48b | ||
|
|
b27adfbe27 | ||
|
|
b28e3b2a00 | ||
|
|
ffe4374519 | ||
|
|
793df087ae | ||
|
|
85eadd5856 | ||
|
|
359efe0036 | ||
|
|
3186691b7b | ||
|
|
044c795f38 | ||
|
|
f7128449ca | ||
|
|
3d0c5165b7 | ||
|
|
fc6cda86df | ||
|
|
59877e181e | ||
|
|
506b1a17d1 | ||
|
|
214c2ba0ad | ||
|
|
387312bc87 | ||
|
|
3d3da04e58 | ||
|
|
7ec0cbb43c | ||
|
|
1cd834579c | ||
|
|
a11005c14b | ||
|
|
ea1480e286 | ||
|
|
f1dd328c38 | ||
|
|
44295de206 | ||
|
|
b273082492 | ||
|
|
da088d88ba | ||
|
|
fd13570074 | ||
|
|
b5630a9dae | ||
|
|
0e2cab6409 | ||
|
|
38dc587318 | ||
|
|
6fbddcb7c2 | ||
|
|
df1df2964d | ||
|
|
9b9c2546c8 | ||
|
|
6ce0e72b33 | ||
|
|
a7784d7870 | ||
|
|
306ca3e04f | ||
|
|
82988b0e08 | ||
|
|
8b27d0e249 | ||
|
|
bfae547240 | ||
|
|
0abd026f78 | ||
|
|
3362a76de7 | ||
|
|
355b6c2e7d | ||
|
|
4e3c643e43 | ||
|
|
760cb97db4 | ||
|
|
0be6f7f57e | ||
|
|
d31223fa0c | ||
|
|
86ee9befc1 | ||
|
|
d5689b061f | ||
|
|
a3c4da4455 | ||
|
|
ee9f97f917 | ||
|
|
270c7377de | ||
|
|
9044b57306 | ||
|
|
9ad815a44a | ||
|
|
b7e432228b | ||
|
|
78da30f2ad | ||
|
|
aeea53017f | ||
|
|
f21ebfc366 | ||
|
|
2549aa5809 | ||
|
|
b733b70ad8 | ||
|
|
f9f59bd7c2 | ||
|
|
58933a6bcd | ||
|
|
45d7a29a95 | ||
|
|
e9d1fdb4ee | ||
|
|
2785ca9f31 | ||
|
|
12912a62aa | ||
|
|
2c2b078514 | ||
|
|
110294103f | ||
|
|
a9f3b839ec | ||
|
|
6bd677ad6f | ||
|
|
7d1c5f3510 | ||
|
|
a49508fd20 | ||
|
|
5870213ff0 | ||
|
|
65c3d7f925 | ||
|
|
33f4fd8fee | ||
|
|
9bdc34dc42 | ||
|
|
ff654df997 | ||
|
|
b7758da2f3 | ||
|
|
747089f1a8 | ||
|
|
9ee3021b76 | ||
|
|
0c60ea66e3 | ||
|
|
c3bb312b5f | ||
|
|
7447a42d40 | ||
|
|
3e9cc367af | ||
|
|
4c1790014f | ||
|
|
03fc7a579a | ||
|
|
a53db257cf | ||
|
|
b093cab493 | ||
|
|
9b484dc819 | ||
|
|
5ab26a9f8c | ||
|
|
b800a63bd2 | ||
|
|
43a5e47fb3 | ||
|
|
319545106e | ||
|
|
39b261b8a0 | ||
|
|
c9e61d1098 | ||
|
|
0bffdaa5fc | ||
|
|
9228510834 | ||
|
|
0b002a8946 | ||
|
|
ad43ddabe6 | ||
|
|
24c022a329 | ||
|
|
0e48cee0d6 | ||
|
|
4ad1794d95 | ||
|
|
46cf25b585 | ||
|
|
b3d78fc30f | ||
|
|
556bc06da4 | ||
|
|
7e8f9c463b | ||
|
|
568c7779b6 | ||
|
|
0a0d237f4d | ||
|
|
c243ccbdce | ||
|
|
64b79d6af5 | ||
|
|
016c0f3743 | ||
|
|
fd1599e0a7 | ||
|
|
7408aa6b72 | ||
|
|
e6b2107fa9 | ||
|
|
9aff52eaad | ||
|
|
bf5bda0f85 | ||
|
|
ffbf2d0a93 | ||
|
|
82f59ef5a2 | ||
|
|
c2c40abbb4 | ||
|
|
bb54d732d0 | ||
|
|
eee4e0c676 | ||
|
|
d9457ae017 | ||
|
|
bbc0b18b19 | ||
|
|
da7651311e | ||
|
|
72846f0817 | ||
|
|
05ef3387ab | ||
|
|
eed44e5737 | ||
|
|
27c7a85a21 | ||
|
|
4f6dd046ec | ||
|
|
89fad9ada7 | ||
|
|
bc31b49b99 | ||
|
|
09444e3624 | ||
|
|
7586243a95 | ||
|
|
1e1c7801e1 | ||
|
|
a363f6ef5f | ||
|
|
334e1fd2da | ||
|
|
2e8e29e93c | ||
|
|
5e5a1a3668 | ||
|
|
b93b464ebf | ||
|
|
842ba46a95 | ||
|
|
03b27d8e8f | ||
|
|
c11b41c6ba | ||
|
|
018cc526ee | ||
|
|
edf4508e6b | ||
|
|
d26a1f0312 | ||
|
|
2984f6a453 | ||
|
|
a00058d959 | ||
|
|
8e56a457f1 | ||
|
|
74d5f021cd | ||
|
|
a37715315d | ||
|
|
d9c9977610 | ||
|
|
c2f0cbb10a | ||
|
|
a34d00d822 | ||
|
|
9924ec6963 | ||
|
|
9036201887 | ||
|
|
b2435d2430 | ||
|
|
afd6148770 | ||
|
|
b70b58a35a | ||
|
|
df963c2780 | ||
|
|
1b732c76e6 | ||
|
|
f9489b0173 | ||
|
|
18942c55ae | ||
|
|
bf34b2f1ca | ||
|
|
a717a021c2 | ||
|
|
dcf718d592 | ||
|
|
f5eeb2b839 | ||
|
|
bc435adc11 | ||
|
|
aeb8e82cbd | ||
|
|
5cb2ed3ccd | ||
|
|
93b1864d1b | ||
|
|
a6efffda45 | ||
|
|
c89d6f1a58 | ||
|
|
d4f16abfac | ||
|
|
8529f3f355 | ||
|
|
2eb136827d | ||
|
|
9594e6eb32 | ||
|
|
9e8111994a | ||
|
|
af0c2b7129 | ||
|
|
96b73a0cef | ||
|
|
6c290ee2d3 | ||
|
|
ca53e3de3a | ||
|
|
6ea3ec700a | ||
|
|
fe3355e08e | ||
|
|
42f08f5027 | ||
|
|
7a1c8882e6 | ||
|
|
2c193e7e48 | ||
|
|
9714c1c9f6 | ||
|
|
c8f72b5f14 | ||
|
|
be0439f771 | ||
|
|
43da95b4a5 | ||
|
|
3d93a63caa | ||
|
|
9550607da3 | ||
|
|
d5d9798913 | ||
|
|
6cfe08235f | ||
|
|
49eb850ff1 | ||
|
|
5a558583d2 | ||
|
|
1e5f0d0555 | ||
|
|
e2b0b03c96 | ||
|
|
b9fb9f1b34 | ||
|
|
52fd932fd8 | ||
|
|
b0cc200df7 | ||
|
|
05b32db37d | ||
|
|
41f7192532 | ||
|
|
fa420303dc | ||
|
|
b7fd539755 | ||
|
|
cfb8b03446 | ||
|
|
712601041d | ||
|
|
36093eccaf | ||
|
|
58eb6d4210 | ||
|
|
2166429cbf | ||
|
|
236ab10b11 | ||
|
|
99142fdde3 | ||
|
|
ca6755d8b5 | ||
|
|
92ad333863 | ||
|
|
4c48272b4c | ||
|
|
ab5bd1db69 | ||
|
|
5d1cd10f5d | ||
|
|
ef784be082 | ||
|
|
855c41a0e9 | ||
|
|
6ef9667f72 | ||
|
|
068d384e7a | ||
|
|
c3699a8595 | ||
|
|
2cb7513355 | ||
|
|
c58caeda4c | ||
|
|
26fc56f2b8 | ||
|
|
c44ae2f00c | ||
|
|
a00b62ffcc | ||
|
|
6a9e7aa89d | ||
|
|
6206b38a78 | ||
|
|
1767bfa70d | ||
|
|
b1d6611923 | ||
|
|
a6a713f40e | ||
|
|
e76ad04207 | ||
|
|
a231adbfdd | ||
|
|
88f97ecb4e | ||
|
|
68a471b859 | ||
|
|
9393324e1f | ||
|
|
944931f7d1 | ||
|
|
5a56be8a75 | ||
|
|
fe7aebae05 | ||
|
|
b6c3b0cdc3 | ||
|
|
fd734fadbc | ||
|
|
a3dc250698 | ||
|
|
3f2d36284f | ||
|
|
60d5184a7b | ||
|
|
da612bdc7b | ||
|
|
628a085ba8 | ||
|
|
5ae91ac620 | ||
|
|
70265c55ef | ||
|
|
7c3b5fc31e | ||
|
|
a9a830caa2 | ||
|
|
b49ff3d4ed | ||
|
|
42310fa170 | ||
|
|
bfff1d9e2f | ||
|
|
2c98777b9f | ||
|
|
4a91260a31 | ||
|
|
076971bcae | ||
|
|
01fcc9bcab | ||
|
|
f56f201bad | ||
|
|
45e579f0ef | ||
|
|
39db811361 | ||
|
|
ff87555eba | ||
|
|
6c5c2d40bc | ||
|
|
c08459e370 | ||
|
|
42418394ed | ||
|
|
64fd0e2f28 | ||
|
|
2de061203b | ||
|
|
cee0d3f03e | ||
|
|
aa19ae129b | ||
|
|
aecbf8ccb3 | ||
|
|
7e5c19f507 | ||
|
|
b178ecd494 | ||
|
|
05d5039fab | ||
|
|
1004e5a8bd | ||
|
|
dbcfe6fc6e | ||
|
|
56698aefe6 | ||
|
|
cbd2e136ed | ||
|
|
9846d7f8e4 | ||
|
|
d16c86a4d7 | ||
|
|
292e642d16 | ||
|
|
90736b52be | ||
|
|
928e8a200b | ||
|
|
2ee06eab2d | ||
|
|
01913983ea | ||
|
|
0aa2f2c44d | ||
|
|
f66d655782 | ||
|
|
4094a08198 | ||
|
|
05389da412 | ||
|
|
e38258b04b | ||
|
|
0cd0e2f730 | ||
|
|
d2c7483db1 | ||
|
|
d388c52ccd | ||
|
|
4a2954d3a4 | ||
|
|
804b9a1d71 | ||
|
|
1067efbbee | ||
|
|
d41ecbeed6 | ||
|
|
f93148b7d7 | ||
|
|
348877c7cd | ||
|
|
fb7c2573bf | ||
|
|
e4fcc77b0a | ||
|
|
5c9b79729f | ||
|
|
00d4541537 | ||
|
|
1660e563ab | ||
|
|
b94081c45b | ||
|
|
f7b59f0140 | ||
|
|
22aecbe4ba | ||
|
|
be98db9023 | ||
|
|
828e095e64 | ||
|
|
8e1e21b960 | ||
|
|
303d8815e3 | ||
|
|
ba574dda62 | ||
|
|
bf630b5f7d | ||
|
|
9b4bf148cc | ||
|
|
f5212b4aa1 | ||
|
|
eea4cdf379 | ||
|
|
e909b48fea | ||
|
|
258aabbdde | ||
|
|
478f26e75a | ||
|
|
57cc558b9b | ||
|
|
29984d4b09 | ||
|
|
e1a266e5d8 | ||
|
|
a33a7317cc | ||
|
|
1d0bcd857e | ||
|
|
040da2429f | ||
|
|
978a395421 | ||
|
|
63e5625d62 | ||
|
|
38bbae13b9 | ||
|
|
e975a8106f | ||
|
|
6a49887ad7 | ||
|
|
5565ec2ddb | ||
|
|
20b1f8eff8 | ||
|
|
34fd000df9 | ||
|
|
1132177e2d | ||
|
|
5be39c04ef | ||
|
|
0ee4593608 | ||
|
|
f301344587 | ||
|
|
d2c5c856ab | ||
|
|
5f8e4ae10c | ||
|
|
4ff30b1a9d | ||
|
|
a0b215dab6 | ||
|
|
144e82d7e2 | ||
|
|
79252ba3b0 | ||
|
|
c5286093f9 | ||
|
|
5ad194bd45 | ||
|
|
501113da44 | ||
|
|
f0a7990404 | ||
|
|
27f53ff4a6 | ||
|
|
9ec5dfc8b1 | ||
|
|
e4c1e414c8 | ||
|
|
a391650472 | ||
|
|
3cfde2b40d | ||
|
|
8bf1ed33dc | ||
|
|
422b3be0c5 | ||
|
|
c34e44c4ec | ||
|
|
a2b20eca67 | ||
|
|
d41c316bfb | ||
|
|
ca1d8aab84 | ||
|
|
32e3dcff7c | ||
|
|
9a23470622 | ||
|
|
c37a186802 | ||
|
|
84c17e3b22 | ||
|
|
64e0fca124 | ||
|
|
5c6537fd7a | ||
|
|
764a82df00 | ||
|
|
e904911fd9 | ||
|
|
a7494f72f6 | ||
|
|
b6b53b028d | ||
|
|
1743ce714a | ||
|
|
656f0c5d11 | ||
|
|
d80aebe1f4 | ||
|
|
ad48bc1962 | ||
|
|
d72fbb7098 | ||
|
|
95d5eaa09b | ||
|
|
b997a6159e | ||
|
|
1cd8b7a450 | ||
|
|
c5a8eb4261 | ||
|
|
8891c29cbd | ||
|
|
2facdfa1dd | ||
|
|
65c9fa0c21 | ||
|
|
e53c85dbaf | ||
|
|
3a231e8e61 | ||
|
|
4dc7776387 | ||
|
|
5ca043e0f1 | ||
|
|
9ef052c814 | ||
|
|
6d1690beaa | ||
|
|
171656e5be | ||
|
|
385e7f4871 | ||
|
|
89c5485784 | ||
|
|
02d191ec28 | ||
|
|
47c3090f3a | ||
|
|
476dac1ac1 | ||
|
|
8ca0d0ced4 | ||
|
|
ab197489d7 | ||
|
|
99736d187b | ||
|
|
197c09bd0d | ||
|
|
6cc634ba1f | ||
|
|
4c89ad91d2 | ||
|
|
d66233bce0 | ||
|
|
b485e6927e | ||
|
|
74b9e8bd7b | ||
|
|
545742ecc0 | ||
|
|
d9f1f65352 | ||
|
|
0904d17a5f | ||
|
|
87171b4246 | ||
|
|
78f8b56203 | ||
|
|
b79045eddb | ||
|
|
6eb67b1a3c | ||
|
|
777ec39bd9 | ||
|
|
9dcafaaa38 | ||
|
|
097e2fb653 | ||
|
|
e7aa97634b | ||
|
|
447b9f265f | ||
|
|
029a6f03b7 | ||
|
|
ae4a349d79 | ||
|
|
35728c7911 | ||
|
|
469330f270 | ||
|
|
03f9c56928 | ||
|
|
ed2a2a8975 | ||
|
|
b5380f183c | ||
|
|
f5bcaba352 | ||
|
|
5a70b23db9 | ||
|
|
fc3487e545 | ||
|
|
a4863dc8d7 | ||
|
|
af12a08e25 | ||
|
|
312dc294b3 | ||
|
|
d958dd5ee4 | ||
|
|
1ddc49b17b | ||
|
|
322541b16f | ||
|
|
00cb10f029 | ||
|
|
ed24a721ed | ||
|
|
9fc10e0f65 | ||
|
|
ab212e0565 | ||
|
|
eac0049577 | ||
|
|
9d1d51d0d7 | ||
|
|
4fd3c4ada6 | ||
|
|
dd73d8fc69 | ||
|
|
b89d37c8c5 | ||
|
|
bc4983c771 | ||
|
|
e6c186b31b | ||
|
|
b106fa55d3 | ||
|
|
981e42c5a9 | ||
|
|
c160c5a555 | ||
|
|
31c7bf5348 | ||
|
|
89bf457878 | ||
|
|
6eadf718fc | ||
|
|
effced24d1 | ||
|
|
09f399db9a | ||
|
|
2b73f6faea | ||
|
|
943662605e | ||
|
|
9a04962bd6 | ||
|
|
91a36eb9a0 | ||
|
|
c371f6bbb5 | ||
|
|
8324e2e454 | ||
|
|
30307c1b56 | ||
|
|
f139d0d2a8 | ||
|
|
33843764a7 | ||
|
|
aca7d7c571 | ||
|
|
bff72f609c | ||
|
|
adb03b7420 | ||
|
|
2094e18b60 | ||
|
|
541d8ddd40 | ||
|
|
f996172218 | ||
|
|
f9ffc1c1f3 | ||
|
|
05085ad504 | ||
|
|
64aecaf28b | ||
|
|
7b3ef45300 | ||
|
|
bd25de930b | ||
|
|
15d43c9653 | ||
|
|
5b7eba61cc | ||
|
|
2445c79805 | ||
|
|
63be2dee47 | ||
|
|
5bfef1be32 | ||
|
|
8253526f23 | ||
|
|
db19548e2c | ||
|
|
10af31f042 | ||
|
|
e7c6e17590 | ||
|
|
a3d0ceb6a5 | ||
|
|
a277ac182b | ||
|
|
0eee613a95 | ||
|
|
b76fa38e09 | ||
|
|
7679c11b5b | ||
|
|
e7ae2ab441 | ||
|
|
c0f5c8a358 | ||
|
|
dd5feb0e2c | ||
|
|
b95d05c134 | ||
|
|
87bdd0016e | ||
|
|
b9befa4e63 | ||
|
|
d9ed00ddee | ||
|
|
4c2b484c2b | ||
|
|
ff31e41fec | ||
|
|
34204f6183 | ||
|
|
6fc8763895 | ||
|
|
71dd82afe8 | ||
|
|
ea5425a528 | ||
|
|
1a0914196f | ||
|
|
9dd1adacd2 | ||
|
|
93c5268fbc | ||
|
|
98edc89fa0 | ||
|
|
3aad412102 | ||
|
|
a2ee9524fb | ||
|
|
78955a1540 | ||
|
|
f412b7e734 | ||
|
|
b13f3004e2 | ||
|
|
a093b0f8e8 | ||
|
|
d4ba13eee3 | ||
|
|
34a84c6548 | ||
|
|
6c52c1177b | ||
|
|
f9bc312f91 | ||
|
|
7283153f44 | ||
|
|
df6b2bd0e8 | ||
|
|
16831880dd | ||
|
|
f79fc98ba6 | ||
|
|
0483c75dd7 | ||
|
|
3a4dcacd56 | ||
|
|
5f6f09674e | ||
|
|
c785027c5c | ||
|
|
d2659cea5f | ||
|
|
a9b966b159 | ||
|
|
f2c23e21c5 | ||
|
|
53b973e2d3 | ||
|
|
b7a570cba2 | ||
|
|
c77b79f0d2 | ||
|
|
ef6678d8b0 | ||
|
|
21609fa9c4 | ||
|
|
accc083702 | ||
|
|
9e677f3871 | ||
|
|
55290eac30 | ||
|
|
d480502d33 | ||
|
|
c1cda16be0 | ||
|
|
8ca9df9f34 | ||
|
|
406b67b081 | ||
|
|
2c9fecf3ef | ||
|
|
6bc78b67bd | ||
|
|
5bbc46e070 | ||
|
|
6a9ceda361 | ||
|
|
ab2d5fd58f | ||
|
|
7018413777 | ||
|
|
77385616a4 | ||
|
|
c809f27bf5 | ||
|
|
493e778124 | ||
|
|
7373af50b9 | ||
|
|
309f053510 | ||
|
|
d976cf8a27 | ||
|
|
5d60a62a38 | ||
|
|
a3f7dbccea | ||
|
|
0c4cce3339 | ||
|
|
58ccbc4d3d | ||
|
|
c6cabc2087 | ||
|
|
ef1f2722fc | ||
|
|
6b4a7ee03b | ||
|
|
7745a2051d | ||
|
|
eabd5e9acc | ||
|
|
d7dcbf98ff | ||
|
|
ff4c73f3d3 | ||
|
|
dbf044b418 | ||
|
|
7a514e2492 | ||
|
|
a73e533287 | ||
|
|
0f175ac4c6 | ||
|
|
be15f1c698 | ||
|
|
a315da6041 | ||
|
|
3f43f218ac | ||
|
|
5c8ad646af | ||
|
|
77f5fddd90 | ||
|
|
eab8b1ede5 | ||
|
|
2ab0896523 | ||
|
|
639fe920df | ||
|
|
7577c84eca | ||
|
|
22c4ec2d4a | ||
|
|
8ac85881a9 | ||
|
|
724804efc6 | ||
|
|
ca57ef17fc | ||
|
|
480f015fb0 | ||
|
|
d90e087f20 | ||
|
|
3916cc0562 | ||
|
|
cb54e56417 | ||
|
|
6aa606f2fa | ||
|
|
53d13a11ce | ||
|
|
9ba2b4142d | ||
|
|
f5161a5b99 | ||
|
|
f9d5d190d5 | ||
|
|
eead9639a2 | ||
|
|
5044d5d3b4 | ||
|
|
44eed2c1df | ||
|
|
e83b182e4d | ||
|
|
888a76eda0 | ||
|
|
668364e583 | ||
|
|
35c7a2d1b6 | ||
|
|
79803178cd | ||
|
|
419ee8d8ff | ||
|
|
328b3c9409 | ||
|
|
f097508e87 | ||
|
|
e6791ee8ec | ||
|
|
cfbeba3de1 | ||
|
|
bbc7f5a734 | ||
|
|
e8726f03f3 | ||
|
|
de95c6d698 | ||
|
|
86b57447d8 | ||
|
|
c9d1efc6e7 | ||
|
|
dd1eeaddfa | ||
|
|
7f098db3de | ||
|
|
6468cbbfbd | ||
|
|
a30d61e842 | ||
|
|
e0029fdc87 | ||
|
|
712e2c32a0 | ||
|
|
f28e15b567 | ||
|
|
128e33661f | ||
|
|
3916561c62 | ||
|
|
00638d074a | ||
|
|
ca51b2d83a | ||
|
|
1a879f97a2 | ||
|
|
89d18cb7c5 | ||
|
|
4e14249707 | ||
|
|
41f2c08da8 | ||
|
|
4fca7bcfcf | ||
|
|
232725329a | ||
|
|
88247851f4 | ||
|
|
6efaec6642 | ||
|
|
b9e31e39e2 | ||
|
|
e2cd8ed391 | ||
|
|
8a1641fbfa | ||
|
|
936f069ac3 | ||
|
|
89faad730e | ||
|
|
798ab3e183 | ||
|
|
5508aa4533 | ||
|
|
81b7ebbab6 | ||
|
|
2d06e33e10 | ||
|
|
d8cc820572 | ||
|
|
d0ca46cfde | ||
|
|
513124161e | ||
|
|
7cfd8c7f79 | ||
|
|
c32ce5e795 | ||
|
|
d9c1530651 | ||
|
|
305eb071a9 | ||
|
|
10dab69c63 | ||
|
|
60ed594996 | ||
|
|
e60ddb3ee1 | ||
|
|
26b0992285 | ||
|
|
63f3ac807c | ||
|
|
ed1c33eac0 | ||
|
|
e7b7fd0bcc | ||
|
|
79d2b04721 | ||
|
|
5a8ab2d29c | ||
|
|
ed527ac394 | ||
|
|
bf09f48196 | ||
|
|
2a5af15aef | ||
|
|
1f8fe35e25 | ||
|
|
5979273a64 | ||
|
|
ef8c9e3968 | ||
|
|
baa9fdb660 | ||
|
|
35a860bb38 | ||
|
|
286939dc2c | ||
|
|
dd5b1dbdd8 | ||
|
|
fb8d3a038d | ||
|
|
ea5a25a671 | ||
|
|
d21fc4ab1d | ||
|
|
3ae3974866 | ||
|
|
71ffc3087e | ||
|
|
8f406489d4 | ||
|
|
a08d270968 | ||
|
|
48f13e4b82 | ||
|
|
51060f0e4b | ||
|
|
c583109046 | ||
|
|
cf05b693f1 | ||
|
|
d248c1ab0d | ||
|
|
34623fca94 | ||
|
|
975bdd5897 | ||
|
|
1b3380c2ca | ||
|
|
bb707b4a03 | ||
|
|
acb3b6ac85 | ||
|
|
80f6985f5f | ||
|
|
5e3a9c0579 | ||
|
|
b30d62d483 | ||
|
|
0ea1fdbd19 | ||
|
|
f068586f74 | ||
|
|
463f462e24 | ||
|
|
e0c4e3c58e | ||
|
|
5aa3ef38ba | ||
|
|
827277f6a3 | ||
|
|
46389341db | ||
|
|
a58f05a295 | ||
|
|
c0b0a0fe92 | ||
|
|
e9f471dd6f | ||
|
|
7917c5dddb | ||
|
|
de4541a3d9 | ||
|
|
77a496baa7 | ||
|
|
86e863de09 | ||
|
|
c2cfd217c2 | ||
|
|
f2366a61b0 | ||
|
|
9959393dee | ||
|
|
16facf98f1 | ||
|
|
bc8ce8832a | ||
|
|
20bcf960ef | ||
|
|
5cecd3e995 | ||
|
|
d7ead25ea4 | ||
|
|
75c0c375d1 | ||
|
|
5db4913292 | ||
|
|
a6a53b1d0d | ||
|
|
81a0c0e120 | ||
|
|
0dae71a644 | ||
|
|
f8eedaa3ea | ||
|
|
ce2d97a7e7 | ||
|
|
2cb570eaca | ||
|
|
c8c4352957 | ||
|
|
a311db4555 | ||
|
|
05c515b2da | ||
|
|
c1acf2b0fe | ||
|
|
803a2407eb | ||
|
|
a87945d1fb | ||
|
|
30793e68df | ||
|
|
9c666bf7a9 | ||
|
|
eff1dd7c34 | ||
|
|
e79a33ebb0 | ||
|
|
cb0adfdeaf | ||
|
|
6b135c343c | ||
|
|
6c92db524b | ||
|
|
b8dfd1c041 | ||
|
|
54d6347c1d | ||
|
|
4ea6e90600 | ||
|
|
4c7628a247 | ||
|
|
6c7334155a | ||
|
|
480e3ea974 | ||
|
|
1f639a5bc6 | ||
|
|
ccf3b07c3a | ||
|
|
d8508f2b72 | ||
|
|
5e13961ec8 | ||
|
|
80b1139371 | ||
|
|
635b41765c | ||
|
|
4b03686aa2 | ||
|
|
bfb0d8d639 | ||
|
|
93d4a0211d | ||
|
|
cd31bc69ef | ||
|
|
4a7b84d6de | ||
|
|
3142714c11 | ||
|
|
7ea10416a9 | ||
|
|
3e427db0f1 | ||
|
|
9f7b18d294 | ||
|
|
9af0e351b8 | ||
|
|
5c6aa2340d | ||
|
|
4424ec48cf | ||
|
|
61be34581e | ||
|
|
731978356d | ||
|
|
d5223ad1ab | ||
|
|
7cfdfab198 | ||
|
|
eb70e51ac1 | ||
|
|
1d48e7c7ae | ||
|
|
d6fc9fc8c3 | ||
|
|
8ada0976fe | ||
|
|
389ff5e9a4 | ||
|
|
5179e0228c | ||
|
|
2268526314 | ||
|
|
db4bc0eafe | ||
|
|
6edaf79df1 | ||
|
|
79cead3b59 | ||
|
|
db1b12b85c | ||
|
|
9360b7675a | ||
|
|
9c82fd17fe | ||
|
|
3a4665e473 | ||
|
|
b34f4648ee | ||
|
|
0de786d2ea | ||
|
|
ec7aafa1ff | ||
|
|
30c219716d | ||
|
|
5dd47cb89b | ||
|
|
abe856bd3f | ||
|
|
6ecb009466 | ||
|
|
3b4b2383a8 | ||
|
|
4ddd46c4a2 | ||
|
|
69ec2469b4 | ||
|
|
5789af801a | ||
|
|
7171b6302b | ||
|
|
51d4818b1e | ||
|
|
1c2875e7fc | ||
|
|
5048a88310 | ||
|
|
aef37f4362 | ||
|
|
d04641041b | ||
|
|
67b2ccea86 |
@@ -16,6 +16,7 @@ d_log/*.zip
|
||||
sess_*
|
||||
*/logs/*.txt
|
||||
*/logs/*/*.txt
|
||||
*/logs/preserved
|
||||
err.txt
|
||||
che/.htaccess
|
||||
kwe/.htaccess
|
||||
@@ -28,6 +29,7 @@ d_shared
|
||||
d_pic/*.jpg
|
||||
d_pic/*.gif
|
||||
d_pic/*.png
|
||||
d_pic/uploaded_image
|
||||
|
||||
d_setting/*.php
|
||||
*/d_setting/*.php
|
||||
@@ -45,3 +47,4 @@ test.php
|
||||
|
||||
phpinfo.php
|
||||
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||
*.sqlite3
|
||||
|
||||
+1
-4
@@ -11,7 +11,7 @@ return [
|
||||
// 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',
|
||||
"target_php_version" => '7.2',
|
||||
'backward_compatibility_checks ' => false,
|
||||
'ignore_undeclared_variables_in_global_scope' => false,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_LOW,
|
||||
@@ -29,10 +29,7 @@ return [
|
||||
'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',
|
||||
|
||||
Vendored
+5
-1
@@ -24,5 +24,9 @@
|
||||
"/nya":true,
|
||||
"/pya":true,
|
||||
"/twe":true,
|
||||
},
|
||||
},
|
||||
"cSpell.words": [
|
||||
"josa",
|
||||
"sammo"
|
||||
],
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Hide_D, 62che
|
||||
Copyright (c) 2020 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
|
||||
|
||||
@@ -7,18 +7,26 @@
|
||||
|
||||
* Apache2
|
||||
* <code>mpm_event</code> 권장
|
||||
* PHP 7.2 이상
|
||||
* PHP 7.3 이상
|
||||
* <code>php-fpm</code> 권장
|
||||
* php에서 curl을 실행가능해야 합니다.
|
||||
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
|
||||
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
|
||||
* mysqlnd가 지원되어야합니다. (기본값: 지원)
|
||||
* mysqli
|
||||
* gd
|
||||
* MariaDB 10.2.1 이상
|
||||
* 현재 MySQL은 지원하지 않습니다.
|
||||
* <code>git</code>
|
||||
* <code>curl</code>
|
||||
|
||||
Linux는 Ubuntu 16.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
|
||||
Linux는 Ubuntu 16.04, 18.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
|
||||
|
||||
Docker를 이용한 설치는 계획중입니다.
|
||||
|
||||
## 설치
|
||||
## Docker를 이용한 설치
|
||||
|
||||
https://storage.hided.net/gogs/devsam/docker 를 참고해 주세요.
|
||||
|
||||
## 수동 설치
|
||||
|
||||
본 게임은 <code>git</code>을 이용한 업그레이드 시스템을 구현하였으므로, <code>git</code>이 필요합니다.
|
||||
또한 웹 서비스 데몬을 운영중인 사용자(일반적으로 <code>www-data</code>, <code>apache</code>)에게 디렉토리 권한이 주어져야합니다.
|
||||
@@ -28,11 +36,11 @@ Docker를 이용한 설치는 계획중입니다.
|
||||
웹 데몬 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
|
||||
sudo -u www-data git clone https://storage.hided.net/gogs/devsam/core.git
|
||||
sudo -u www-data git clone https://storage.hided.net/gogs/devsam/image.git
|
||||
```
|
||||
|
||||
> 이미지는 git hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
|
||||
> 이미지는 hook/git_hook.php을 통해 동기화되며, 서버 설치 과정에 이미지 갱신 키를 지정하는 것으로 '훼' 서버 업데이트 시 동기화됩니다. 이미지 서버가 게임 서버와 별개여도 동작하나, php와 git을 지원해야합니다.
|
||||
|
||||
### 설치
|
||||
|
||||
@@ -45,9 +53,9 @@ Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의
|
||||
|
||||
## 카카오로그인 연동
|
||||
|
||||
현재 카카오로그인 API KEY를 입력하는 작업이 설치과정에 추가되어있지 않습니다.
|
||||
서버 설치 시 카카오 로그인 연동을 위한 API KEY를 입력받습니다.
|
||||
|
||||
<code>f_install/templates/KakaoKey.orig.php</code> 를 <code>d_setting/KakaoKey.php</code>로 복사한 후 API 키를 입력하여야 합니다.
|
||||
만약 설치 이후 API KEY를 변경하고자 하는 경우 <code>d_setting/KakaoKey.php</code>에서 API키를 변경해야 합니다.
|
||||
|
||||
|
||||
## 라이선스
|
||||
|
||||
+8
-2
@@ -6,12 +6,17 @@
|
||||
"GPL-2.0-or-later",
|
||||
"proprietary"
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"brandonwamboldt/utilphp": "^1.1",
|
||||
"sergeytsalkov/meekrodb": "^2.3",
|
||||
"league/plates": "^3.3",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"leafo/scssphp": "^0.7.5",
|
||||
"scssphp/scssphp": "^1.0",
|
||||
"monolog/monolog": "^1.23",
|
||||
"firephp/firephp-core": "^0.4.0",
|
||||
"vlucas/valitron": "^1.4",
|
||||
@@ -19,7 +24,8 @@
|
||||
"pguardiario/phpuri": "^1.0",
|
||||
"symfony/lock": "^4.1",
|
||||
"ezyang/htmlpurifier": "^4.10",
|
||||
"xemlock/htmlpurifier-html5": "^0.1.7"
|
||||
"xemlock/htmlpurifier-html5": "^0.1.7",
|
||||
"catfan/medoo": "^1.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
Generated
+254
-118
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "43da7d5e9d8441faa4311f32b16ee1c0",
|
||||
"content-hash": "b5b5695ed0b1b04fa672f99972d8caad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brandonwamboldt/utilphp",
|
||||
@@ -53,24 +53,84 @@
|
||||
"time": "2015-02-02T17:56:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.10.0",
|
||||
"name": "catfan/medoo",
|
||||
"version": "v1.7.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021"
|
||||
"url": "https://github.com/catfan/Medoo.git",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pdo": "*",
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
|
||||
"ext-pdo_mysql": "For MySQL or MariaDB database",
|
||||
"ext-pdo_oci": "For Oracle database",
|
||||
"ext-pdo_oci8": "For Oracle version 8 database",
|
||||
"ext-pdo_pqsql": "For PostgreSQL database",
|
||||
"ext-pdo_sqlite": "For SQLite database",
|
||||
"ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform"
|
||||
},
|
||||
"type": "framework",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Medoo\\": "/src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Angel Lai",
|
||||
"email": "angel@catfan.me"
|
||||
}
|
||||
],
|
||||
"description": "The lightweight PHP database framework to accelerate development",
|
||||
"homepage": "https://medoo.in",
|
||||
"keywords": [
|
||||
"database",
|
||||
"database library",
|
||||
"lightweight",
|
||||
"mariadb",
|
||||
"mssql",
|
||||
"mysql",
|
||||
"oracle",
|
||||
"php framework",
|
||||
"postgresql",
|
||||
"sql",
|
||||
"sqlite"
|
||||
],
|
||||
"time": "2019-12-19T05:04:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"simpletest/simpletest": "^1.1"
|
||||
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -83,7 +143,7 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL"
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
@@ -97,7 +157,7 @@
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"time": "2018-02-23T01:58:20+00:00"
|
||||
"time": "2019-10-28T03:44:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "firephp/firephp-core",
|
||||
@@ -137,44 +197,46 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.3",
|
||||
"version": "6.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"guzzlehttp/psr7": "^1.6.1",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.3-dev"
|
||||
"dev-master": "6.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -198,7 +260,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-04-22T15:46:56+00:00"
|
||||
"time": "2019-12-23T11:57:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -253,32 +315,37 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -308,65 +375,14 @@
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2017-03-20T17:10:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "leafo/scssphp",
|
||||
"version": "v0.7.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/leafo/scssphp.git",
|
||||
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||
"reference": "585f6ae84de62ffecf69c23805f25d78d7e4b794",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6",
|
||||
"squizlabs/php_codesniffer": "~2.5"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Leafo\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Leaf Corcoran",
|
||||
"email": "leafot@gmail.com",
|
||||
"homepage": "http://leafo.net"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://leafo.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2018-05-24T02:18:53+00:00"
|
||||
"time": "2019-07-01T23:21:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
@@ -425,16 +441,16 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.23.0",
|
||||
"version": "1.25.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -499,7 +515,7 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2017-06-19T01:22:40+00:00"
|
||||
"time": "2019-12-20T14:15:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pguardiario/phpuri",
|
||||
@@ -661,16 +677,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -679,7 +695,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -704,7 +720,108 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-10-10T12:19:37+00:00"
|
||||
"time": "2019-11-01T11:05:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/getallheaders.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ralph Khattar",
|
||||
"email": "ralph.khattar@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"time": "2019-03-08T08:55:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "scssphp/scssphp",
|
||||
"version": "1.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
|
||||
"squizlabs/php_codesniffer": "~2.5",
|
||||
"twbs/bootstrap": "~4.3",
|
||||
"zurb/foundation": "~6.5"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ScssPhp\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anthon Pang",
|
||||
"email": "apang@softwaredevelopment.ca",
|
||||
"homepage": "https://github.com/robocoder"
|
||||
},
|
||||
{
|
||||
"name": "Cédric Morin",
|
||||
"email": "cedric@yterium.com",
|
||||
"homepage": "https://github.com/Cerdic"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://scssphp.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2019-12-12T05:00:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sergeytsalkov/meekrodb",
|
||||
@@ -751,29 +868,34 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.1.0",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "a1df50492e927ad00ca271f29adb2949a14f2a5a"
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/a1df50492e927ad00ca271f29adb2949a14f2a5a",
|
||||
"reference": "a1df50492e927ad00ca271f29adb2949a14f2a5a",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/dbal": "<2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.5",
|
||||
"mongodb/mongodb": "~1.1",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.1-dev"
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -789,13 +911,13 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Jérémy Derussé",
|
||||
"email": "jeremy@derusse.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Lock Component",
|
||||
@@ -808,20 +930,20 @@
|
||||
"redlock",
|
||||
"semaphore"
|
||||
],
|
||||
"time": "2018-05-30T07:26:09+00:00"
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.3",
|
||||
"version": "v1.4.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43"
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -857,28 +979,29 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-05-06T10:45:26+00:00"
|
||||
"time": "2019-08-29T19:49:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "xemlock/htmlpurifier-html5",
|
||||
"version": "v0.1.7",
|
||||
"version": "v0.1.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xemlock/htmlpurifier-html5.git",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359"
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ezyang/htmlpurifier": "^4.7",
|
||||
"ezyang/htmlpurifier": "^4.8",
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.7.*|5.7.*"
|
||||
"php-coveralls/php-coveralls": "^1.1|^2.1",
|
||||
"phpunit/phpunit": ">=4.7 <8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -896,8 +1019,18 @@
|
||||
"email": "xemlock@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "HTML Purifier definitions for HTML5 elements",
|
||||
"time": "2018-06-07T14:30:17+00:00"
|
||||
"description": "HTML5 element definitions for HTML Purifier",
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"Purifier",
|
||||
"html",
|
||||
"htmlpurifier",
|
||||
"security",
|
||||
"tidy",
|
||||
"validator",
|
||||
"xss"
|
||||
],
|
||||
"time": "2019-08-07T17:19:21+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
@@ -907,5 +1040,8 @@
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -61,6 +61,7 @@ a.just_link {
|
||||
}
|
||||
|
||||
button.with_skin {
|
||||
padding:0 4px;
|
||||
background-color: black; color: white;
|
||||
font-family: '맑은 고딕';
|
||||
font-size: 13px;
|
||||
@@ -163,4 +164,19 @@ a.samButton.disabled {
|
||||
|
||||
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
|
||||
content:'】'
|
||||
}
|
||||
|
||||
.tooltip_copyable_info .tooltiptext{
|
||||
display: inline;
|
||||
color: rgba(0,0,0,0);
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.tooltiptext {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hidden_but_copyable{
|
||||
color: rgba(0,0,0,0);
|
||||
font-size: 0;
|
||||
}
|
||||
+17
-2
@@ -52,8 +52,8 @@ input::-webkit-input-placeholder {
|
||||
|
||||
}
|
||||
|
||||
.login-button{
|
||||
margin-top: 5px;
|
||||
.login_btn_group{
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.login-register{
|
||||
@@ -87,6 +87,21 @@ input::-webkit-input-placeholder {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.full-content {
|
||||
position:fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
margin:0;
|
||||
padding:0;
|
||||
z-index:800;
|
||||
}
|
||||
|
||||
#login_card{
|
||||
z-index:801;
|
||||
}
|
||||
|
||||
#btn_kakao_login{
|
||||
cursor: pointer;
|
||||
height:46px;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
@charset "utf-8";
|
||||
|
||||
#user_info_container{
|
||||
width:500px;
|
||||
width:550px;
|
||||
position:absolute;
|
||||
left:50%;
|
||||
margin-left:-250px;
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
@@ -0,0 +1,132 @@
|
||||
//download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
|
||||
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
|
||||
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
|
||||
// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support
|
||||
|
||||
// data can be a string, Blob, File, or dataURL
|
||||
|
||||
|
||||
|
||||
|
||||
function download(data, strFileName, strMimeType) {
|
||||
|
||||
var self = window, // this script is only for browsers anyway...
|
||||
u = "application/octet-stream", // this default mime also triggers iframe downloads
|
||||
m = strMimeType || u,
|
||||
x = data,
|
||||
D = document,
|
||||
a = D.createElement("a"),
|
||||
z = function(a){return String(a);},
|
||||
|
||||
|
||||
B = self.Blob || self.MozBlob || self.WebKitBlob || z,
|
||||
BB = self.MSBlobBuilder || self.WebKitBlobBuilder || self.BlobBuilder,
|
||||
fn = strFileName || "download",
|
||||
blob,
|
||||
b,
|
||||
ua,
|
||||
fr;
|
||||
|
||||
//if(typeof B.bind === 'function' ){ B=B.bind(self); }
|
||||
|
||||
if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
|
||||
x=[x, m];
|
||||
m=x[0];
|
||||
x=x[1];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//go ahead and download dataURLs right away
|
||||
if(String(x).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/)){
|
||||
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
|
||||
navigator.msSaveBlob(d2b(x), fn) :
|
||||
saver(x) ; // everyone else can save dataURLs un-processed
|
||||
}//end if dataURL passed?
|
||||
|
||||
try{
|
||||
|
||||
blob = x instanceof B ?
|
||||
x :
|
||||
new B([x], {type: m}) ;
|
||||
}catch(y){
|
||||
if(BB){
|
||||
b = new BB();
|
||||
b.append([x]);
|
||||
blob = b.getBlob(m); // the blob
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function d2b(u) {
|
||||
var p= u.split(/[:;,]/),
|
||||
t= p[1],
|
||||
dec= p[2] == "base64" ? atob : decodeURIComponent,
|
||||
bin= dec(p.pop()),
|
||||
mx= bin.length,
|
||||
i= 0,
|
||||
uia= new Uint8Array(mx);
|
||||
|
||||
for(i;i<mx;++i) uia[i]= bin.charCodeAt(i);
|
||||
|
||||
return new B([uia], {type: t});
|
||||
}
|
||||
|
||||
function saver(url, winMode){
|
||||
|
||||
|
||||
if ('download' in a) { //html5 A[download]
|
||||
a.href = url;
|
||||
a.setAttribute("download", fn);
|
||||
a.innerHTML = "downloading...";
|
||||
D.body.appendChild(a);
|
||||
setTimeout(function() {
|
||||
a.click();
|
||||
D.body.removeChild(a);
|
||||
if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(a.href);}, 250 );}
|
||||
}, 66);
|
||||
return true;
|
||||
}
|
||||
|
||||
//do iframe dataURL download (old ch+FF):
|
||||
var f = D.createElement("iframe");
|
||||
D.body.appendChild(f);
|
||||
if(!winMode){ // force a mime that will download:
|
||||
url="data:"+url.replace(/^data:([\w\/\-\+]+)/, u);
|
||||
}
|
||||
|
||||
|
||||
f.src = url;
|
||||
setTimeout(function(){ D.body.removeChild(f); }, 333);
|
||||
|
||||
}//end saver
|
||||
|
||||
|
||||
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
|
||||
return navigator.msSaveBlob(blob, fn);
|
||||
}
|
||||
|
||||
if(self.URL){ // simple fast and modern way using Blob and URL:
|
||||
saver(self.URL.createObjectURL(blob), true);
|
||||
}else{
|
||||
// handle non-Blob()+non-URL browsers:
|
||||
if(typeof blob === "string" || blob.constructor===z ){
|
||||
try{
|
||||
return saver( "data:" + m + ";base64," + self.btoa(blob) );
|
||||
}catch(y){
|
||||
return saver( "data:" + m + "," + encodeURIComponent(blob) );
|
||||
}
|
||||
}
|
||||
|
||||
// Blob but not URL:
|
||||
fr=new FileReader();
|
||||
fr.onload=function(e){
|
||||
saver(this.result);
|
||||
};
|
||||
fr.readAsDataURL(blob);
|
||||
}
|
||||
return true;
|
||||
} /* end download() */
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
"use strict";!function(t,r){var n=function(t){function r(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function n(t){return t.replace(/"/g,""")}function e(t){if(!t)return"";var r=[];for(var e in t){var i=t[e]+"";r.push(e+'="'+n(i)+'"')}return r.join(" ")}function i(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i=new a(i);for(var f=o(t),u=[],c=0;c<f.length;c++){var p=f[c];if("nl"===p.type&&i.nl2br)u.push("<br>\n");else if(p.isLink&&i.check(p)){var l=i.resolve(p),s=l.formatted,g=l.formattedHref,y=l.tagName,h=l.className,v=l.target,k=l.attributes,S="<"+y+' href="'+n(g)+'"';h&&(S+=' class="'+n(h)+'"'),v&&(S+=' target="'+n(v)+'"'),k&&(S+=" "+e(k)),S+=">"+r(s)+"</"+y+">",u.push(S)}else u.push(r(p.toString()))}return u.join("")}var o=t.tokenize,f=t.options,a=f.Options;if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{a:function(){},get:function(){return function(t){return i(this,t)}}})}catch(u){String.prototype.linkify||(String.prototype.linkify=function(t){return i(this,t)})}return i}(r);t.linkifyStr=n}(window,linkify);
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
||||
Vendored
+188
@@ -0,0 +1,188 @@
|
||||
/* select2-bootstrap4 with Darkly */
|
||||
.select2-container--bootstrap4 { color: black; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; outline: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection.form-control { border-radius: 0.25rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search__field { outline: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder { color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder { color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder { color: #6c757d; opacity: 1; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder { color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option { padding: 0.75rem 0.375rem; font-size: 1rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option[role=group] { padding: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] { color: #6c757d; cursor: not-allowed; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] { background-color: #f8f9fa; color: #16181b; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] { background-color: #007bff; color: #fff; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option { padding: 0.75rem 0.375rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group { padding-left: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.375rem; padding-left: 0.75rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.75rem; padding-left: 1.125rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.125rem; padding-left: 1.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.5rem; padding-left: 1.875rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.875rem; padding-left: 2.25rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__group { color: #6c757d; display: block; padding: 0.75rem 0.375rem; font-size: 75%; line-height: 1; white-space: nowrap; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; border-color: #80bdff; }
|
||||
|
||||
@media screen and (prefers-reduced-motion: reduce) { .select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: none; } }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.25rem 0.25rem 0.25rem; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection { border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-color: transparent; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection__clear { color: #6c757d; cursor: pointer; float: right; font-weight: bold; margin-right: 10px; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection__clear:hover { color: #343a40; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection { border-color: #ced4da; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-search__field { cursor: not-allowed; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice { background-color: #e9ecef; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove { display: none; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-dropdown { border-color: #80bdff; border-width: 1px; overflow-x: hidden; margin-top: -1px; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-dropdown--above { margin-top: 1px; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single { height: calc(2.25rem + 2px); line-height: 1; padding: 0.75rem 1.125rem 0.75rem 0.375rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { position: absolute; bottom: 0; right: 0.375rem; top: 0; width: 0.25rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-color: #6c757d transparent transparent transparent; border-style: solid; border-width: 0.25rem 0.25rem 0 0.25rem; height: 0; left: 0; margin-left: -0.25rem; margin-top: -0.125rem; position: absolute; top: 50%; width: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { color: #495057; padding: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder { color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.25rem + 2px); padding: 0; height: auto; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { box-sizing: border-box; display: block; line-height: 1; list-style: none; margin: 0; overflow: hidden; padding: 0.75rem 0.375rem 0 0.75rem; width: 100%; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder { color: #6c757d; float: left; margin-top: 5px; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { color: #495057; background: transparent; border: 1px solid #343a40; border-radius: 0.25rem; cursor: default; float: left; margin: -0.25rem 0 0 0.1875rem; padding: 0 0.75rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { background: transparent; padding: 0 0.375rem; height: calc(2.25rem + 2px)-2; line-height: 1; margin-top: 0; min-width: 5em; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove { color: #6c757d; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 0.375rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover { color: #343a40; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.75rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--single, .form-group-sm .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.2rem; font-size: 75%; height: calc(1.8125rem + 2px); line-height: 1; padding: 0.5rem 1rem 0.5rem 0.25rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b, .input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { margin-left: -0.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(1.8125rem + 2px); border-radius: 0.2rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { padding: 0.5rem 0.25rem 0 0.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 75%; line-height: 1; margin: 0 0 0 0.125rem; padding: 0 0.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.25rem; font-size: 75%; height: calc(1.8125rem + 2px)-2; line-height: 1; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--single, .form-group-lg .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.3rem; font-size: 1.25rem; height: calc(2.875rem + 2px); line-height: 1; padding: 1rem 1.4375rem 1rem 0.5rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { width: 0.3125rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-width: 0.3125rem 0.3125rem 0 0.3125rem; margin-left: -0.3125rem; margin-left: -1rem; margin-top: -0.15625rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.875rem + 2px); border-radius: 0.3rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 1.25rem; line-height: 1; border-radius: 0.25rem; margin: 0rem 0 0 0.25rem; padding: 0 1rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.5rem; font-size: 1.25rem; height: calc(2.875rem + 2px)-2; line-height: 1; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 1rem; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
|
||||
|
||||
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single { padding-left: 1.125rem; padding-right: 0.375rem; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 0; padding-left: 0; text-align: right; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 0.375rem; right: auto; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b { margin-left: 0; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline { float: right; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 0; margin-right: 0.1875rem; }
|
||||
|
||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
|
||||
|
||||
.has-warning .select2-dropdown, .has-warning .select2-selection { border-color: #ffc107; }
|
||||
|
||||
.has-warning .select2-container--focus .select2-selection, .has-warning .select2-container--open .select2-selection { border-color: #d39e00; }
|
||||
|
||||
.has-warning.select2-drop-active { border-color: #d39e00; }
|
||||
|
||||
.has-warning.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #d39e00; }
|
||||
|
||||
.has-error .select2-dropdown, .has-error .select2-selection { border-color: #dc3545; }
|
||||
|
||||
.has-error .select2-container--focus .select2-selection, .has-error .select2-container--open .select2-selection { border-color: #bd2130; }
|
||||
|
||||
.has-error.select2-drop-active { border-color: #bd2130; }
|
||||
|
||||
.has-error.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #bd2130; }
|
||||
|
||||
.has-success .select2-dropdown, .has-success .select2-selection { border-color: #28a745; }
|
||||
|
||||
.has-success .select2-container--focus .select2-selection, .has-success .select2-container--open .select2-selection { border-color: #1e7e34; }
|
||||
|
||||
.has-success.select2-drop-active { border-color: #1e7e34; }
|
||||
|
||||
.has-success.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #1e7e34; }
|
||||
|
||||
.input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection, .input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection.form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
||||
|
||||
.input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection.form-control { border-radius: 0; }
|
||||
|
||||
.input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection.form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
|
||||
|
||||
.input-group > .select2-container--bootstrap4 { display: table; table-layout: fixed; position: relative; z-index: 2; width: 100%; margin-bottom: 0; }
|
||||
|
||||
.input-group > .select2-container--bootstrap4 > .selection > .select2-selection.form-control { float: none; }
|
||||
|
||||
.input-group > .select2-container--bootstrap4.select2-container--open, .input-group > .select2-container--bootstrap4.select2-container--focus { z-index: 3; }
|
||||
|
||||
.input-group > .select2-container--bootstrap4, .input-group > .select2-container--bootstrap4 .input-group-btn, .input-group > .select2-container--bootstrap4 .input-group-btn .btn { vertical-align: top; }
|
||||
|
||||
.form-control.select2-hidden-accessible { position: absolute !important; width: 1px !important; }
|
||||
|
||||
@media (min-width: 576px) { .form-inline .select2-container--bootstrap4 { display: inline-block; } }
|
||||
Vendored
+484
@@ -0,0 +1,484 @@
|
||||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
height: 1px !important;
|
||||
margin: -1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
||||
Vendored
+6457
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+5746
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,155 @@
|
||||
(function($) {
|
||||
$.extend($.summernote.lang, {
|
||||
'ko-KR': {
|
||||
font: {
|
||||
bold: '굵게',
|
||||
italic: '기울임꼴',
|
||||
underline: '밑줄',
|
||||
clear: '글자 효과 없애기',
|
||||
height: '줄간격',
|
||||
name: '글꼴',
|
||||
superscript: '위 첨자',
|
||||
subscript: '아래 첨자',
|
||||
strikethrough: '취소선',
|
||||
size: '글자 크기'
|
||||
},
|
||||
image: {
|
||||
image: '사진',
|
||||
insert: '사진 추가',
|
||||
resizeFull: '100% 크기로 변경',
|
||||
resizeHalf: '50% 크기로 변경',
|
||||
resizeQuarter: '25% 크기로 변경',
|
||||
floatLeft: '왼쪽 정렬',
|
||||
floatRight: '오른쪽 정렬',
|
||||
floatNone: '정렬하지 않음',
|
||||
shapeRounded: '스타일: 둥근 모서리',
|
||||
shapeCircle: '스타일: 원형',
|
||||
shapeThumbnail: '스타일: 액자',
|
||||
shapeNone: '스타일: 없음',
|
||||
dragImageHere: '텍스트 혹은 사진을 이곳으로 끌어오세요',
|
||||
dropImage: '텍스트 혹은 사진을 내려놓으세요',
|
||||
selectFromFiles: '파일 선택',
|
||||
maximumFileSize: 'Maximum file size',
|
||||
maximumFileSizeError: 'Maximum file size exceeded.',
|
||||
url: '사진 URL',
|
||||
remove: '사진 삭제',
|
||||
original: 'Original'
|
||||
},
|
||||
video: {
|
||||
video: '동영상',
|
||||
videoLink: '동영상 링크',
|
||||
insert: '동영상 추가',
|
||||
url: '동영상 URL',
|
||||
providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion, Youku 사용 가능)'
|
||||
},
|
||||
link: {
|
||||
link: '링크',
|
||||
insert: '링크 추가',
|
||||
unlink: '링크 삭제',
|
||||
edit: '수정',
|
||||
textToDisplay: '링크에 표시할 내용',
|
||||
url: '이동할 URL',
|
||||
openInNewWindow: '새창으로 열기'
|
||||
},
|
||||
table: {
|
||||
table: '테이블',
|
||||
addRowAbove: 'Add row above',
|
||||
addRowBelow: 'Add row below',
|
||||
addColLeft: 'Add column left',
|
||||
addColRight: 'Add column right',
|
||||
delRow: 'Delete row',
|
||||
delCol: 'Delete column',
|
||||
delTable: 'Delete table'
|
||||
},
|
||||
hr: {
|
||||
insert: '구분선 추가'
|
||||
},
|
||||
style: {
|
||||
style: '스타일',
|
||||
p: '본문',
|
||||
blockquote: '인용구',
|
||||
pre: '코드',
|
||||
h1: '제목 1',
|
||||
h2: '제목 2',
|
||||
h3: '제목 3',
|
||||
h4: '제목 4',
|
||||
h5: '제목 5',
|
||||
h6: '제목 6'
|
||||
},
|
||||
lists: {
|
||||
unordered: '글머리 기호',
|
||||
ordered: '번호 매기기'
|
||||
},
|
||||
options: {
|
||||
help: '도움말',
|
||||
fullscreen: '전체 화면',
|
||||
codeview: '코드 보기'
|
||||
},
|
||||
paragraph: {
|
||||
paragraph: '문단 정렬',
|
||||
outdent: '내어쓰기',
|
||||
indent: '들여쓰기',
|
||||
left: '왼쪽 정렬',
|
||||
center: '가운데 정렬',
|
||||
right: '오른쪽 정렬',
|
||||
justify: '양쪽 정렬'
|
||||
},
|
||||
color: {
|
||||
recent: '마지막으로 사용한 색',
|
||||
more: '다른 색 선택',
|
||||
background: '배경색',
|
||||
foreground: '글자색',
|
||||
transparent: '투명',
|
||||
setTransparent: '투명',
|
||||
reset: '취소',
|
||||
resetToDefault: '기본 값으로 변경'
|
||||
},
|
||||
shortcut: {
|
||||
shortcuts: '키보드 단축키',
|
||||
close: '닫기',
|
||||
textFormatting: '글자 스타일 적용',
|
||||
action: '기능',
|
||||
paragraphFormatting: '문단 스타일 적용',
|
||||
documentStyle: '문서 스타일 적용',
|
||||
extraKeys: 'Extra keys'
|
||||
},
|
||||
help: {
|
||||
'insertParagraph': 'Insert Paragraph',
|
||||
'undo': 'Undoes the last command',
|
||||
'redo': 'Redoes the last command',
|
||||
'tab': 'Tab',
|
||||
'untab': 'Untab',
|
||||
'bold': 'Set a bold style',
|
||||
'italic': 'Set a italic style',
|
||||
'underline': 'Set a underline style',
|
||||
'strikethrough': 'Set a strikethrough style',
|
||||
'removeFormat': 'Clean a style',
|
||||
'justifyLeft': 'Set left align',
|
||||
'justifyCenter': 'Set center align',
|
||||
'justifyRight': 'Set right align',
|
||||
'justifyFull': 'Set full align',
|
||||
'insertUnorderedList': 'Toggle unordered list',
|
||||
'insertOrderedList': 'Toggle ordered list',
|
||||
'outdent': 'Outdent on current paragraph',
|
||||
'indent': 'Indent on current paragraph',
|
||||
'formatPara': 'Change current block\'s format as a paragraph(P tag)',
|
||||
'formatH1': 'Change current block\'s format as H1',
|
||||
'formatH2': 'Change current block\'s format as H2',
|
||||
'formatH3': 'Change current block\'s format as H3',
|
||||
'formatH4': 'Change current block\'s format as H4',
|
||||
'formatH5': 'Change current block\'s format as H5',
|
||||
'formatH6': 'Change current block\'s format as H6',
|
||||
'insertHorizontalRule': 'Insert horizontal rule',
|
||||
'linkDialog.show': 'Show Link Dialog'
|
||||
},
|
||||
history: {
|
||||
undo: '실행 취소',
|
||||
redo: '다시 실행'
|
||||
},
|
||||
specialChar: {
|
||||
specialChar: '특수문자',
|
||||
select: '특수문자를 선택하세요'
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,16 @@
|
||||
.ext-databasic {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: 50px;
|
||||
background-color: cyan;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
border: 1px solid white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.ext-databasic p {
|
||||
color: white;
|
||||
font-size: 1.2em;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
(function(factory) {
|
||||
/* global define */
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function($) {
|
||||
// pull in some summernote core functions
|
||||
var ui = $.summernote.ui;
|
||||
var dom = $.summernote.dom;
|
||||
|
||||
// define the popover plugin
|
||||
var DataBasicPlugin = function(context) {
|
||||
var self = this;
|
||||
var options = context.options;
|
||||
var lang = options.langInfo;
|
||||
|
||||
self.icon = '<i class="fa fa-object-group"/>';
|
||||
|
||||
// add context menu button for dialog
|
||||
context.memo('button.databasic', function() {
|
||||
return ui.button({
|
||||
contents: self.icon,
|
||||
tooltip: lang.databasic.insert,
|
||||
click: context.createInvokeHandler('databasic.showDialog')
|
||||
}).render();
|
||||
});
|
||||
|
||||
// add popover edit button
|
||||
context.memo('button.databasicDialog', function() {
|
||||
return ui.button({
|
||||
contents: self.icon,
|
||||
tooltip: lang.databasic.edit,
|
||||
click: context.createInvokeHandler('databasic.showDialog')
|
||||
}).render();
|
||||
});
|
||||
|
||||
// add popover size buttons
|
||||
context.memo('button.databasicSize100', function() {
|
||||
return ui.button({
|
||||
contents: '<span class="note-fontsize-10">100%</span>',
|
||||
tooltip: lang.image.resizeFull,
|
||||
click: context.createInvokeHandler('editor.resize', '1')
|
||||
}).render();
|
||||
});
|
||||
context.memo('button.databasicSize50', function() {
|
||||
return ui.button({
|
||||
contents: '<span class="note-fontsize-10">50%</span>',
|
||||
tooltip: lang.image.resizeHalf,
|
||||
click: context.createInvokeHandler('editor.resize', '0.5')
|
||||
}).render();
|
||||
});
|
||||
context.memo('button.databasicSize25', function() {
|
||||
return ui.button({
|
||||
contents: '<span class="note-fontsize-10">25%</span>',
|
||||
tooltip: lang.image.resizeQuarter,
|
||||
click: context.createInvokeHandler('editor.resize', '0.25')
|
||||
}).render();
|
||||
});
|
||||
|
||||
self.events = {
|
||||
'summernote.init': function(we, e) {
|
||||
// update existing containers
|
||||
$('data.ext-databasic', e.editable).each(function() { self.setContent($(this)); });
|
||||
// TODO: make this an undo snapshot...
|
||||
},
|
||||
'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function() {
|
||||
self.update();
|
||||
},
|
||||
'summernote.dialog.shown': function() {
|
||||
self.hidePopover();
|
||||
}
|
||||
};
|
||||
|
||||
self.initialize = function() {
|
||||
// create dialog markup
|
||||
var $container = options.dialogsInBody ? $(document.body) : context.layoutInfo.editor;
|
||||
|
||||
var body = '<div class="form-group row-fluid">' +
|
||||
'<label>' + lang.databasic.testLabel + '</label>' +
|
||||
'<input class="ext-databasic-test form-control" type="text" />' +
|
||||
'</div>';
|
||||
var footer = '<button href="#" class="btn btn-primary ext-databasic-save">' + lang.databasic.insert + '</button>';
|
||||
|
||||
self.$dialog = ui.dialog({
|
||||
title: lang.databasic.name,
|
||||
fade: options.dialogsFade,
|
||||
body: body,
|
||||
footer: footer
|
||||
}).render().appendTo($container);
|
||||
|
||||
// create popover
|
||||
self.$popover = ui.popover({
|
||||
className: 'ext-databasic-popover'
|
||||
}).render().appendTo('body');
|
||||
var $content = self.$popover.find('.popover-content');
|
||||
|
||||
context.invoke('buttons.build', $content, options.popover.databasic);
|
||||
};
|
||||
|
||||
self.destroy = function() {
|
||||
self.$popover.remove();
|
||||
self.$popover = null;
|
||||
self.$dialog.remove();
|
||||
self.$dialog = null;
|
||||
};
|
||||
|
||||
self.update = function() {
|
||||
// Prevent focusing on editable when invoke('code') is executed
|
||||
if (!context.invoke('editor.hasFocus')) {
|
||||
self.hidePopover();
|
||||
return;
|
||||
}
|
||||
|
||||
var rng = context.invoke('editor.createRange');
|
||||
var visible = false;
|
||||
|
||||
if (rng.isOnData()) {
|
||||
var $data = $(rng.sc).closest('data.ext-databasic');
|
||||
|
||||
if ($data.length) {
|
||||
var pos = dom.posFromPlaceholder($data[0]);
|
||||
|
||||
self.$popover.css({
|
||||
display: 'block',
|
||||
left: pos.left,
|
||||
top: pos.top
|
||||
});
|
||||
|
||||
// save editor target to let size buttons resize the container
|
||||
context.invoke('editor.saveTarget', $data[0]);
|
||||
|
||||
visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
// hide if not visible
|
||||
if (!visible) {
|
||||
self.hidePopover();
|
||||
}
|
||||
};
|
||||
|
||||
self.hidePopover = function() {
|
||||
self.$popover.hide();
|
||||
};
|
||||
|
||||
// define plugin dialog
|
||||
self.getInfo = function() {
|
||||
var rng = context.invoke('editor.createRange');
|
||||
|
||||
if (rng.isOnData()) {
|
||||
var $data = $(rng.sc).closest('data.ext-databasic');
|
||||
|
||||
if ($data.length) {
|
||||
// Get the first node on range(for edit).
|
||||
return {
|
||||
node: $data,
|
||||
test: $data.attr('data-test')
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
self.setContent = function($node) {
|
||||
$node.html('<p contenteditable="false">' + self.icon + ' ' + lang.databasic.name + ': ' +
|
||||
$node.attr('data-test') + '</p>');
|
||||
};
|
||||
|
||||
self.updateNode = function(info) {
|
||||
self.setContent(info.node
|
||||
.attr('data-test', info.test));
|
||||
};
|
||||
|
||||
self.createNode = function(info) {
|
||||
var $node = $('<data class="ext-databasic"></data>');
|
||||
|
||||
if ($node) {
|
||||
// save node to info structure
|
||||
info.node = $node;
|
||||
// insert node into editor dom
|
||||
context.invoke('editor.insertNode', $node[0]);
|
||||
}
|
||||
|
||||
return $node;
|
||||
};
|
||||
|
||||
self.showDialog = function() {
|
||||
var info = self.getInfo();
|
||||
var newNode = !info.node;
|
||||
context.invoke('editor.saveRange');
|
||||
|
||||
self
|
||||
.openDialog(info)
|
||||
.then(function(dialogInfo) {
|
||||
// [workaround] hide dialog before restore range for IE range focus
|
||||
ui.hideDialog(self.$dialog);
|
||||
context.invoke('editor.restoreRange');
|
||||
|
||||
// insert a new node
|
||||
if (newNode) {
|
||||
self.createNode(info);
|
||||
}
|
||||
|
||||
// update info with dialog info
|
||||
$.extend(info, dialogInfo);
|
||||
|
||||
self.updateNode(info);
|
||||
})
|
||||
.fail(function() {
|
||||
context.invoke('editor.restoreRange');
|
||||
});
|
||||
};
|
||||
|
||||
self.openDialog = function(info) {
|
||||
return $.Deferred(function(deferred) {
|
||||
var $inpTest = self.$dialog.find('.ext-databasic-test');
|
||||
var $saveBtn = self.$dialog.find('.ext-databasic-save');
|
||||
var onKeyup = function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$saveBtn.trigger('click');
|
||||
}
|
||||
};
|
||||
|
||||
ui.onDialogShown(self.$dialog, function() {
|
||||
context.triggerEvent('dialog.shown');
|
||||
|
||||
$inpTest.val(info.test).on('input', function() {
|
||||
ui.toggleBtn($saveBtn, $inpTest.val());
|
||||
}).trigger('focus').on('keyup', onKeyup);
|
||||
|
||||
$saveBtn
|
||||
.text(info.node ? lang.databasic.edit : lang.databasic.insert)
|
||||
.click(function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
deferred.resolve({ test: $inpTest.val() });
|
||||
});
|
||||
|
||||
// init save button
|
||||
ui.toggleBtn($saveBtn, $inpTest.val());
|
||||
});
|
||||
|
||||
ui.onDialogHidden(self.$dialog, function() {
|
||||
$inpTest.off('input keyup');
|
||||
$saveBtn.off('click');
|
||||
|
||||
if (deferred.state() === 'pending') {
|
||||
deferred.reject();
|
||||
}
|
||||
});
|
||||
|
||||
ui.showDialog(self.$dialog);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// Extends summernote
|
||||
$.extend(true, $.summernote, {
|
||||
plugins: {
|
||||
databasic: DataBasicPlugin
|
||||
},
|
||||
|
||||
options: {
|
||||
popover: {
|
||||
databasic: [
|
||||
['databasic', ['databasicDialog', 'databasicSize100', 'databasicSize50', 'databasicSize25']]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// add localization texts
|
||||
lang: {
|
||||
'en-US': {
|
||||
databasic: {
|
||||
name: 'Basic Data Container',
|
||||
insert: 'insert basic data container',
|
||||
edit: 'edit basic data container',
|
||||
testLabel: 'test input'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}));
|
||||
@@ -0,0 +1,81 @@
|
||||
(function(factory) {
|
||||
/* global define */
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function($) {
|
||||
// Extends plugins for adding hello.
|
||||
// - plugin is external module for customizing.
|
||||
$.extend($.summernote.plugins, {
|
||||
/**
|
||||
* @param {Object} context - context object has status of editor.
|
||||
*/
|
||||
'hello': function(context) {
|
||||
var self = this;
|
||||
|
||||
// ui has renders to build ui elements.
|
||||
// - you can create a button with `ui.button`
|
||||
var ui = $.summernote.ui;
|
||||
|
||||
// add hello button
|
||||
context.memo('button.hello', function() {
|
||||
// create button
|
||||
var button = ui.button({
|
||||
contents: '<i class="fa fa-child"/> Hello',
|
||||
tooltip: 'hello',
|
||||
click: function() {
|
||||
self.$panel.show();
|
||||
self.$panel.hide(500);
|
||||
// invoke insertText method with 'hello' on editor module.
|
||||
context.invoke('editor.insertText', 'hello');
|
||||
}
|
||||
});
|
||||
|
||||
// create jQuery object from button instance.
|
||||
var $hello = button.render();
|
||||
return $hello;
|
||||
});
|
||||
|
||||
// This events will be attached when editor is initialized.
|
||||
this.events = {
|
||||
// This will be called after modules are initialized.
|
||||
'summernote.init': function(we, e) {
|
||||
console.log('summernote initialized', we, e);
|
||||
},
|
||||
// This will be called when user releases a key on editable.
|
||||
'summernote.keyup': function(we, e) {
|
||||
console.log('summernote keyup', we, e);
|
||||
}
|
||||
};
|
||||
|
||||
// This method will be called when editor is initialized by $('..').summernote();
|
||||
// You can create elements for plugin
|
||||
this.initialize = function() {
|
||||
this.$panel = $('<div class="hello-panel"/>').css({
|
||||
position: 'absolute',
|
||||
width: 100,
|
||||
height: 100,
|
||||
left: '50%',
|
||||
top: '50%',
|
||||
background: 'red'
|
||||
}).hide();
|
||||
|
||||
this.$panel.appendTo('body');
|
||||
};
|
||||
|
||||
// This methods will be called when editor is destroyed by $('..').summernote('destroy');
|
||||
// You should remove elements on `initialize`.
|
||||
this.destroy = function() {
|
||||
this.$panel.remove();
|
||||
this.$panel = null;
|
||||
};
|
||||
}
|
||||
});
|
||||
}));
|
||||
@@ -0,0 +1,153 @@
|
||||
/* Forked from https://github.com/asiffermann/summernote-image-title */
|
||||
|
||||
(function (factory) {
|
||||
/* Global define */
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
$.extend(true, $.summernote.lang, {
|
||||
'en-US': {
|
||||
imageFlip: {
|
||||
edit: 'Flip image',
|
||||
flipLabel: 'Alternative Image'
|
||||
}
|
||||
},
|
||||
'ko-KR': {
|
||||
imageFlip: {
|
||||
edit: '이미지 전환',
|
||||
flipLabel: '대체 이미지( , 로 구분)'
|
||||
}
|
||||
},
|
||||
});
|
||||
$.extend($.summernote.options, {
|
||||
imageFlip: {
|
||||
icon: '<i class="note-icon-pencil"/>',
|
||||
tooltip: 'Image Flip'
|
||||
}
|
||||
});
|
||||
$.extend($.summernote.plugins, {
|
||||
'imageFlip': function (context) {
|
||||
var self = this;
|
||||
|
||||
var ui = $.summernote.ui;
|
||||
var $note = context.layoutInfo.note;
|
||||
var $editor = context.layoutInfo.editor;
|
||||
var $editable = context.layoutInfo.editable;
|
||||
var $toolbar = context.layoutInfo.toolbar;
|
||||
|
||||
if (typeof context.options.imageFlip === 'undefined') {
|
||||
context.options.imageFlip = {};
|
||||
}
|
||||
|
||||
var options = context.options;
|
||||
var lang = options.langInfo;
|
||||
|
||||
context.memo('button.imageFlip', function () {
|
||||
var button = ui.button({
|
||||
contents: ui.icon(options.icons.pencil),
|
||||
container: false,
|
||||
tooltip: lang.imageFlip.edit,
|
||||
click: function (e) {
|
||||
context.invoke('imageFlip.show');
|
||||
}
|
||||
});
|
||||
|
||||
return button.render();
|
||||
});
|
||||
|
||||
this.initialize = function () {
|
||||
var $container = options.dialogsInBody ? $(document.body) : $editor;
|
||||
|
||||
var body = '<div class="form-group">' +
|
||||
'<label>' + lang.imageFlip.flipLabel + '</label>' +
|
||||
'<input class="note-image-flip-text form-control" type="text" />' +
|
||||
'</div>';
|
||||
|
||||
var footer = '<button href="#" class="btn btn-primary note-image-flip-btn">' + lang.imageFlip.edit + '</button>';
|
||||
|
||||
this.$dialog = ui.dialog({
|
||||
title: lang.imageFlip.edit,
|
||||
body: body,
|
||||
footer: footer
|
||||
}).render().appendTo($container);
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
ui.hideDialog(this.$dialog);
|
||||
this.$dialog.remove();
|
||||
};
|
||||
|
||||
this.bindEnterKey = function ($input, $btn) {
|
||||
$input.on('keypress', function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
$btn.trigger('click');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.show = function () {
|
||||
var $img = $($editable.data('target'));
|
||||
|
||||
var imgInfo = {
|
||||
imgDom: $img,
|
||||
flip: $img.data('flip'),
|
||||
};
|
||||
this.showLinkDialog(imgInfo).then(function (imgInfo) {
|
||||
ui.hideDialog(self.$dialog);
|
||||
var $img = imgInfo.imgDom;
|
||||
|
||||
if (imgInfo.flip) {
|
||||
$img.attr('data-flip', imgInfo.flip);
|
||||
}
|
||||
else {
|
||||
$img.removeData('flip');
|
||||
}
|
||||
|
||||
$note.val(context.invoke('code'));
|
||||
$note.change();
|
||||
});
|
||||
};
|
||||
|
||||
this.showLinkDialog = function (imgInfo) {
|
||||
return $.Deferred(function (deferred) {
|
||||
var $imageFlip = self.$dialog.find('.note-image-flip-text');
|
||||
var $editBtn = self.$dialog.find('.note-image-flip-btn');
|
||||
|
||||
ui.onDialogShown(self.$dialog, function () {
|
||||
context.triggerEvent('dialog.shown');
|
||||
|
||||
$editBtn.click(function (event) {
|
||||
event.preventDefault();
|
||||
deferred.resolve({
|
||||
imgDom: imgInfo.imgDom,
|
||||
flip: $imageFlip.val(),
|
||||
});
|
||||
});
|
||||
|
||||
$imageFlip.val(imgInfo.flip).trigger('focus');
|
||||
self.bindEnterKey($imageFlip, $editBtn);
|
||||
|
||||
});
|
||||
|
||||
ui.onDialogHidden(self.$dialog, function () {
|
||||
$editBtn.off('click');
|
||||
|
||||
if (deferred.state() === 'pending') {
|
||||
deferred.reject();
|
||||
}
|
||||
});
|
||||
|
||||
ui.showDialog(self.$dialog);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
}));
|
||||
@@ -0,0 +1,312 @@
|
||||
(function(factory) {
|
||||
/* global define */
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function($) {
|
||||
$.extend($.summernote.plugins, {
|
||||
'specialchars': function(context) {
|
||||
var self = this;
|
||||
var ui = $.summernote.ui;
|
||||
|
||||
var $editor = context.layoutInfo.editor;
|
||||
var options = context.options;
|
||||
var lang = options.langInfo;
|
||||
|
||||
var KEY = {
|
||||
UP: 38,
|
||||
DOWN: 40,
|
||||
LEFT: 37,
|
||||
RIGHT: 39,
|
||||
ENTER: 13
|
||||
};
|
||||
var COLUMN_LENGTH = 15;
|
||||
var COLUMN_WIDTH = 35;
|
||||
|
||||
var currentColumn = 0;
|
||||
var currentRow = 0;
|
||||
var totalColumn = 0;
|
||||
var totalRow = 0;
|
||||
|
||||
// special characters data set
|
||||
var specialCharDataSet = [
|
||||
'"', '&', '<', '>', '¡', '¢',
|
||||
'£', '¤', '¥', '¦', '§',
|
||||
'¨', '©', 'ª', '«', '¬',
|
||||
'®', '¯', '°', '±', '²',
|
||||
'³', '´', 'µ', '¶', '·',
|
||||
'¸', '¹', 'º', '»', '¼',
|
||||
'½', '¾', '¿', '×', '÷',
|
||||
'ƒ', 'ˆ', '˜', '–', '—',
|
||||
'‘', '’', '‚', '“', '”',
|
||||
'„', '†', '‡', '•', '…',
|
||||
'‰', '′', '″', '‹', '›',
|
||||
'‾', '⁄', '€', 'ℑ', '℘',
|
||||
'ℜ', '™', 'ℵ', '←', '↑',
|
||||
'→', '↓', '↔', '↵', '⇐',
|
||||
'⇑', '⇒', '⇓', '⇔', '∀',
|
||||
'∂', '∃', '∅', '∇', '∈',
|
||||
'∉', '∋', '∏', '∑', '−',
|
||||
'∗', '√', '∝', '∞', '∠',
|
||||
'∧', '∨', '∩', '∪', '∫',
|
||||
'∴', '∼', '≅', '≈', '≠',
|
||||
'≡', '≤', '≥', '⊂', '⊃',
|
||||
'⊄', '⊆', '⊇', '⊕', '⊗',
|
||||
'⊥', '⋅', '⌈', '⌉', '⌊',
|
||||
'⌋', '◊', '♠', '♣', '♥',
|
||||
'♦'
|
||||
];
|
||||
|
||||
context.memo('button.specialchars', function() {
|
||||
return ui.button({
|
||||
contents: '<i class="fa fa-font fa-flip-vertical">',
|
||||
tooltip: lang.specialChar.specialChar,
|
||||
click: function() {
|
||||
self.show();
|
||||
}
|
||||
}).render();
|
||||
});
|
||||
|
||||
/**
|
||||
* Make Special Characters Table
|
||||
*
|
||||
* @member plugin.specialChar
|
||||
* @private
|
||||
* @return {jQuery}
|
||||
*/
|
||||
this.makeSpecialCharSetTable = function() {
|
||||
var $table = $('<table/>');
|
||||
$.each(specialCharDataSet, function(idx, text) {
|
||||
var $td = $('<td/>').addClass('note-specialchar-node');
|
||||
var $tr = (idx % COLUMN_LENGTH === 0) ? $('<tr/>') : $table.find('tr').last();
|
||||
|
||||
var $button = ui.button({
|
||||
callback: function($node) {
|
||||
$node.html(text);
|
||||
$node.attr('title', text);
|
||||
$node.attr('data-value', encodeURIComponent(text));
|
||||
$node.css({
|
||||
width: COLUMN_WIDTH,
|
||||
'margin-right': '2px',
|
||||
'margin-bottom': '2px'
|
||||
});
|
||||
}
|
||||
}).render();
|
||||
|
||||
$td.append($button);
|
||||
|
||||
$tr.append($td);
|
||||
if (idx % COLUMN_LENGTH === 0) {
|
||||
$table.append($tr);
|
||||
}
|
||||
});
|
||||
|
||||
totalRow = $table.find('tr').length;
|
||||
totalColumn = COLUMN_LENGTH;
|
||||
|
||||
return $table;
|
||||
};
|
||||
|
||||
this.initialize = function() {
|
||||
var $container = options.dialogsInBody ? $(document.body) : $editor;
|
||||
|
||||
var body = '<div class="form-group row-fluid">' + this.makeSpecialCharSetTable()[0].outerHTML + '</div>';
|
||||
|
||||
this.$dialog = ui.dialog({
|
||||
title: lang.specialChar.select,
|
||||
body: body
|
||||
}).render().appendTo($container);
|
||||
};
|
||||
|
||||
this.show = function() {
|
||||
var text = context.invoke('editor.getSelectedText');
|
||||
context.invoke('editor.saveRange');
|
||||
this.showSpecialCharDialog(text).then(function(selectChar) {
|
||||
context.invoke('editor.restoreRange');
|
||||
|
||||
// build node
|
||||
var $node = $('<span></span>').html(selectChar)[0];
|
||||
|
||||
if ($node) {
|
||||
// insert video node
|
||||
context.invoke('editor.insertNode', $node);
|
||||
}
|
||||
}).fail(function() {
|
||||
context.invoke('editor.restoreRange');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* show image dialog
|
||||
*
|
||||
* @param {jQuery} $dialog
|
||||
* @return {Promise}
|
||||
*/
|
||||
this.showSpecialCharDialog = function(text) {
|
||||
return $.Deferred(function(deferred) {
|
||||
var $specialCharDialog = self.$dialog;
|
||||
var $specialCharNode = $specialCharDialog.find('.note-specialchar-node');
|
||||
var $selectedNode = null;
|
||||
var ARROW_KEYS = [KEY.UP, KEY.DOWN, KEY.LEFT, KEY.RIGHT];
|
||||
var ENTER_KEY = KEY.ENTER;
|
||||
|
||||
function addActiveClass($target) {
|
||||
if (!$target) {
|
||||
return;
|
||||
}
|
||||
$target.find('button').addClass('active');
|
||||
$selectedNode = $target;
|
||||
}
|
||||
|
||||
function removeActiveClass($target) {
|
||||
$target.find('button').removeClass('active');
|
||||
$selectedNode = null;
|
||||
}
|
||||
|
||||
// find next node
|
||||
function findNextNode(row, column) {
|
||||
var findNode = null;
|
||||
$.each($specialCharNode, function(idx, $node) {
|
||||
var findRow = Math.ceil((idx + 1) / COLUMN_LENGTH);
|
||||
var findColumn = ((idx + 1) % COLUMN_LENGTH === 0) ? COLUMN_LENGTH : (idx + 1) % COLUMN_LENGTH;
|
||||
if (findRow === row && findColumn === column) {
|
||||
findNode = $node;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(findNode);
|
||||
}
|
||||
|
||||
function arrowKeyHandler(keyCode) {
|
||||
// left, right, up, down key
|
||||
var $nextNode;
|
||||
var lastRowColumnLength = $specialCharNode.length % totalColumn;
|
||||
|
||||
if (KEY.LEFT === keyCode) {
|
||||
if (currentColumn > 1) {
|
||||
currentColumn = currentColumn - 1;
|
||||
} else if (currentRow === 1 && currentColumn === 1) {
|
||||
currentColumn = lastRowColumnLength;
|
||||
currentRow = totalRow;
|
||||
} else {
|
||||
currentColumn = totalColumn;
|
||||
currentRow = currentRow - 1;
|
||||
}
|
||||
} else if (KEY.RIGHT === keyCode) {
|
||||
if (currentRow === totalRow && lastRowColumnLength === currentColumn) {
|
||||
currentColumn = 1;
|
||||
currentRow = 1;
|
||||
} else if (currentColumn < totalColumn) {
|
||||
currentColumn = currentColumn + 1;
|
||||
} else {
|
||||
currentColumn = 1;
|
||||
currentRow = currentRow + 1;
|
||||
}
|
||||
} else if (KEY.UP === keyCode) {
|
||||
if (currentRow === 1 && lastRowColumnLength < currentColumn) {
|
||||
currentRow = totalRow - 1;
|
||||
} else {
|
||||
currentRow = currentRow - 1;
|
||||
}
|
||||
} else if (KEY.DOWN === keyCode) {
|
||||
currentRow = currentRow + 1;
|
||||
}
|
||||
|
||||
if (currentRow === totalRow && currentColumn > lastRowColumnLength) {
|
||||
currentRow = 1;
|
||||
} else if (currentRow > totalRow) {
|
||||
currentRow = 1;
|
||||
} else if (currentRow < 1) {
|
||||
currentRow = totalRow;
|
||||
}
|
||||
|
||||
$nextNode = findNextNode(currentRow, currentColumn);
|
||||
|
||||
if ($nextNode) {
|
||||
removeActiveClass($selectedNode);
|
||||
addActiveClass($nextNode);
|
||||
}
|
||||
}
|
||||
|
||||
function enterKeyHandler() {
|
||||
if (!$selectedNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
deferred.resolve(decodeURIComponent($selectedNode.find('button').attr('data-value')));
|
||||
$specialCharDialog.modal('hide');
|
||||
}
|
||||
|
||||
function keyDownEventHandler(event) {
|
||||
event.preventDefault();
|
||||
var keyCode = event.keyCode;
|
||||
if (keyCode === undefined || keyCode === null) {
|
||||
return;
|
||||
}
|
||||
// check arrowKeys match
|
||||
if (ARROW_KEYS.indexOf(keyCode) > -1) {
|
||||
if ($selectedNode === null) {
|
||||
addActiveClass($specialCharNode.eq(0));
|
||||
currentColumn = 1;
|
||||
currentRow = 1;
|
||||
return;
|
||||
}
|
||||
arrowKeyHandler(keyCode);
|
||||
} else if (keyCode === ENTER_KEY) {
|
||||
enterKeyHandler();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove class
|
||||
removeActiveClass($specialCharNode);
|
||||
|
||||
// find selected node
|
||||
if (text) {
|
||||
for (var i = 0; i < $specialCharNode.length; i++) {
|
||||
var $checkNode = $($specialCharNode[i]);
|
||||
if ($checkNode.text() === text) {
|
||||
addActiveClass($checkNode);
|
||||
currentRow = Math.ceil((i + 1) / COLUMN_LENGTH);
|
||||
currentColumn = (i + 1) % COLUMN_LENGTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui.onDialogShown(self.$dialog, function() {
|
||||
$(document).on('keydown', keyDownEventHandler);
|
||||
|
||||
self.$dialog.find('button').tooltip();
|
||||
|
||||
$specialCharNode.on('click', function(event) {
|
||||
event.preventDefault();
|
||||
deferred.resolve(decodeURIComponent($(event.currentTarget).find('button').attr('data-value')));
|
||||
ui.hideDialog(self.$dialog);
|
||||
});
|
||||
});
|
||||
|
||||
ui.onDialogHidden(self.$dialog, function() {
|
||||
$specialCharNode.off('click');
|
||||
|
||||
self.$dialog.find('button').tooltip('destroy');
|
||||
|
||||
$(document).off('keydown', keyDownEventHandler);
|
||||
|
||||
if (deferred.state() === 'pending') {
|
||||
deferred.reject();
|
||||
}
|
||||
});
|
||||
|
||||
ui.showDialog(self.$dialog);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
}));
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+3
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
+13
File diff suppressed because one or more lines are too long
+13
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
+80
-22
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
define('ROOT', realpath(__dir__.'/..'));
|
||||
define('ROOT', realpath(__DIR__.'/..'));
|
||||
setlocale(LC_ALL, 'ko_KR.UTF-8');
|
||||
date_default_timezone_set('Asia/Seoul');
|
||||
mb_internal_encoding("UTF-8");
|
||||
@@ -49,40 +49,98 @@ function getFriendlyErrorType($type)
|
||||
return "{$type}";
|
||||
}
|
||||
|
||||
function getExceptionTraceAsString($exception) {
|
||||
//https://gist.github.com/abtris/1437966
|
||||
$rtn = "";
|
||||
$count = 0;
|
||||
$rtn = [];
|
||||
foreach ($exception->getTrace() as $frame) {
|
||||
$args = "";
|
||||
if (isset($frame['args'])) {
|
||||
$args = array();
|
||||
foreach ($frame['args'] as $arg) {
|
||||
if (is_string($arg)) {
|
||||
$args[] = "'" . $arg . "'";
|
||||
} elseif (is_array($arg)) {
|
||||
$args[] = "Array";
|
||||
} elseif (is_null($arg)) {
|
||||
$args[] = 'NULL';
|
||||
} elseif (is_bool($arg)) {
|
||||
$args[] = ($arg) ? "true" : "false";
|
||||
} elseif (is_object($arg)) {
|
||||
$args[] = get_class($arg);
|
||||
} elseif (is_resource($arg)) {
|
||||
$args[] = get_resource_type($arg);
|
||||
} else {
|
||||
$args[] = $arg;
|
||||
}
|
||||
}
|
||||
$args = join(", ", $args);
|
||||
}
|
||||
$rtn[] = sprintf( "#%s %s:%s %s(%s)",
|
||||
$count,
|
||||
isset($frame['file']) ? $frame['file'] : 'unknown file',
|
||||
isset($frame['line']) ? $frame['line'] : 'unknown line',
|
||||
(isset($frame['class'])) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'],
|
||||
$args );
|
||||
$count++;
|
||||
}
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
function logError(string $err, string $errstr, string $errpath, array $trace){
|
||||
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
|
||||
$date = date("Ymd_His");
|
||||
|
||||
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
|
||||
$trace = array_map(function(string $text){
|
||||
return str_replace(ROOT, '{ROOT}', $text);
|
||||
}, $trace);
|
||||
|
||||
$owner = Util::get_client_ip();
|
||||
$session = Session::getInstance();
|
||||
if($session->isLoggedIn(true)){
|
||||
$owner .= '('.$session->getUserID().','.$session->userName.')';
|
||||
}
|
||||
|
||||
$fdb->insert('err_log', [
|
||||
'date'=>$date,
|
||||
'err'=>$err,
|
||||
'errstr'=>$errstr,
|
||||
'errpath'=>$errpath,
|
||||
'trace'=>Json::encode($trace),
|
||||
'webuser'=>$owner
|
||||
]);
|
||||
}
|
||||
|
||||
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);
|
||||
logError(
|
||||
getFriendlyErrorType($errno),
|
||||
$errstr,
|
||||
$errfile.':'.$errline,
|
||||
getExceptionTraceAsString($e)
|
||||
);
|
||||
}
|
||||
set_error_handler("\sammo\logErrorByCustomHandler");
|
||||
|
||||
|
||||
function logExceptionByCustomHandler(\Throwable $e){
|
||||
|
||||
$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);
|
||||
|
||||
logError(
|
||||
get_class($e),
|
||||
$e->getMessage(),
|
||||
$e->getFile().':'.$e->getLine(),
|
||||
getExceptionTraceAsString($e)
|
||||
);
|
||||
|
||||
echo $e->getTraceAsString();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
+33
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -98,6 +98,38 @@ require(__dir__.'/../vendor/autoload.php');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
|
||||
<div class="input-group col-sm-8">
|
||||
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
|
||||
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
|
||||
value="" />
|
||||
<div class="input-group-append">
|
||||
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr style="width:100%; border-top: 1px solid lightgray;">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
|
||||
placeholder="카카오톡 API의 Rest Key"
|
||||
value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
|
||||
placeholder="카카오톡 API의 Admin Key"
|
||||
value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
|
||||
session_start();
|
||||
session_destroy();
|
||||
@@ -46,12 +46,13 @@ if($memberCnt > 0){
|
||||
|
||||
$userSalt = bin2hex(random_bytes(8));
|
||||
$finalPassword = Util::hashPassword($userSalt, $password);
|
||||
$nowDate = TimeUtil::DatetimeNow();
|
||||
$nowDate = TimeUtil::now();
|
||||
|
||||
$rootDB->insert('member',[
|
||||
'oauth_type' => 'NONE',
|
||||
'id' => $username,
|
||||
'email' => null,
|
||||
'token_valid_until'=>'2999-01-01 00:00:00',
|
||||
'pw' => $finalPassword,
|
||||
'salt' => $userSalt,
|
||||
'grade'=> 6,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
|
||||
if(!class_exists('\\sammo\\RootDB')){
|
||||
Json::die([
|
||||
|
||||
+39
-12
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require(__dir__.'/../vendor/autoload.php');
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
|
||||
$host = Util::getReq('db_host');
|
||||
$port = Util::getReq('db_port', 'int');
|
||||
@@ -11,6 +11,11 @@ $dbName = Util::getReq('db_name');
|
||||
$servHost = Util::getReq('serv_host');
|
||||
$sharedIconPath = Util::getReq('shared_icon_path');
|
||||
$gameImagePath = Util::getReq('game_image_path');
|
||||
$imageRequestKey = Util::getReq('image_request_key');
|
||||
|
||||
$kakaoRESTKey = Util::getReq('kakao_rest_key', 'string', '');
|
||||
$kakaoAdminKey = Util::getReq('kakao_admin_key', 'string', '');
|
||||
|
||||
|
||||
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
|
||||
Json::die([
|
||||
@@ -160,7 +165,7 @@ $rootDB->error_handler = function ($params) {
|
||||
|
||||
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
|
||||
|
||||
if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) {
|
||||
if ($mysqli_obj->multi_query(file_get_contents(__DIR__.'/sql/common_schema.sql'))) {
|
||||
while (true) {
|
||||
if (!$mysqli_obj->more_results()) {
|
||||
break;
|
||||
@@ -174,8 +179,8 @@ if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql')
|
||||
$rootDB->insert('system', array(
|
||||
'REG' => 'N',
|
||||
'LOGIN' => 'N',
|
||||
'CRT_DATE' => TimeUtil::DatetimeNow(),
|
||||
'MDF_DATE' => TimeUtil::DatetimeNow()
|
||||
'CRT_DATE' => TimeUtil::now(),
|
||||
'MDF_DATE' => TimeUtil::now()
|
||||
));
|
||||
|
||||
$globalSalt = bin2hex(random_bytes(16));
|
||||
@@ -186,18 +191,26 @@ $globalSalt = bin2hex(random_bytes(16));
|
||||
|
||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||
$imageRequestPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/git_pull.php', $servHost);
|
||||
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/InstallKey.php', $servHost);
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/ServConfig.orig.php',
|
||||
__DIR__.'/templates/ServConfig.orig.php',
|
||||
ROOT.'/d_setting/ServConfig.php',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
'sharedIconPath'=>$sharedIconPath,
|
||||
'gameImagePath'=>$gameImagePath
|
||||
'gameImagePath'=>$gameImagePath,
|
||||
'imageRequestPath'=>$imageRequestPath,
|
||||
'imageRequestKey'=>$imageRequestKey
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if($imageRequestKey){
|
||||
@file_get_contents($imageKeyInstallPath.'?key='.$imageRequestKey);
|
||||
}
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
@@ -206,7 +219,7 @@ if ($result !== true) {
|
||||
}
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/common_path.orig.js',
|
||||
__DIR__.'/templates/common_path.orig.js',
|
||||
ROOT.'/d_shared/common_path.js',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
@@ -217,8 +230,8 @@ $result = Util::generateFileUsingSimpleTemplate(
|
||||
);
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/menu.orig.js',
|
||||
ROOT.'/d_shared/menu.js',
|
||||
__DIR__.'/templates/menu.orig.json',
|
||||
ROOT.'/d_shared/menu.json',
|
||||
[],
|
||||
true
|
||||
);
|
||||
@@ -232,7 +245,7 @@ if ($result !== true) {
|
||||
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/common.orig.css',
|
||||
__DIR__.'/templates/common.orig.css',
|
||||
ROOT.'/d_shared/common.css',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
@@ -251,7 +264,7 @@ if ($result !== true) {
|
||||
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/RootDB.orig.php',
|
||||
__DIR__.'/templates/RootDB.orig.php',
|
||||
ROOT.'/d_setting/RootDB.php',
|
||||
[
|
||||
'host'=>$host,
|
||||
@@ -263,6 +276,19 @@ $result = Util::generateFileUsingSimpleTemplate(
|
||||
]
|
||||
);
|
||||
|
||||
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost.'/');
|
||||
|
||||
Util::generateFileUsingSimpleTemplate(
|
||||
__DIR__.'/templates/KakaoKey.orig.php',
|
||||
ROOT.'/d_setting/KakaoKey.php',
|
||||
[
|
||||
'REST_API_KEY'=>$kakaoRESTKey,
|
||||
'ADMIN_KEY'=>$kakaoAdminKey,
|
||||
'REDIRECT_URI'=>$kakaoRedirectURI
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
@@ -272,5 +298,6 @@ if ($result !== true) {
|
||||
|
||||
Json::die([
|
||||
'result'=>true,
|
||||
'reason'=>'success'
|
||||
'reason'=>'success',
|
||||
'globalSalt'=>$globalSalt
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
require(__DIR__.'/../vendor/autoload.php');
|
||||
|
||||
$session = Session::requireLogin([])->setReadOnly();
|
||||
if($session->userGrade < 6){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'관리자 아님'
|
||||
]);
|
||||
}
|
||||
|
||||
$servHost = Util::getReq('serv_host');
|
||||
$sharedIconPath = Util::getReq('shared_icon_path');
|
||||
$gameImagePath = Util::getReq('game_image_path');
|
||||
|
||||
if($servHost){
|
||||
if(!$sharedIconPath || $gameImagePath){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__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
|
||||
]);
|
||||
}
|
||||
}
|
||||
else if($sharedIconPath || $gameImagePath){
|
||||
$servHost = ServConfig::$serverWebPath;
|
||||
if($sharedIconPath){
|
||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||
}
|
||||
else{
|
||||
$sharedIconPath = ServConfig::$sharedIconPath;
|
||||
}
|
||||
|
||||
if($gameImagePath){
|
||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||
}
|
||||
else{
|
||||
$gameImagePath = ServConfig::$gameImagePath;
|
||||
}
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__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
|
||||
]);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$servHost = ServConfig::$serverWebPath;
|
||||
$sharedIconPath = ServConfig::$sharedIconPath;
|
||||
$gameImagePath = ServConfig::$gameImagePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$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/common.orig.css',
|
||||
ROOT.'/d_shared/common.css',
|
||||
[
|
||||
'serverBasePath'=>$servHost,
|
||||
'sharedIconPath'=>$sharedIconPath,
|
||||
'gameImagePath'=>$gameImagePath
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>$result
|
||||
]);
|
||||
}
|
||||
@@ -14,22 +14,25 @@ CREATE TABLE `system` (
|
||||
`MDF_DATE` DATETIME NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`NO`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 회원 테이블
|
||||
CREATE TABLE `member` (
|
||||
`NO` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`oauth_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`oauth_type` ENUM('NONE','KAKAO') NOT NULL,
|
||||
`ID` VARCHAR(64) NOT NULL,
|
||||
`EMAIL` VARCHAR(64) NULL DEFAULT NULL,
|
||||
`oauth_type` ENUM('NONE','KAKAO') NOT NULL,
|
||||
`oauth_info` TEXT NOT NULL DEFAULT '{}',
|
||||
`token_valid_until` DATETIME 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',
|
||||
`acl` TEXT NOT NULL DEFAULT '{}' COMMENT 'json',
|
||||
`penalty` TEXT NOT NULL DEFAULT '{}' COMMENT 'json',
|
||||
`GRADE` INT(1) NULL DEFAULT '1',
|
||||
`REG_NUM` INT(3) NULL DEFAULT '0',
|
||||
`REG_DATE` DATETIME NOT NULL,
|
||||
@@ -42,7 +45,7 @@ CREATE TABLE `member` (
|
||||
UNIQUE INDEX `kauth_id` (`oauth_id`),
|
||||
INDEX `delete_after` (`delete_after`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 로그인 로그 테이블
|
||||
CREATE TABLE `member_log` (
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS `err_log` (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`date` TEXT NOT NULL,
|
||||
`err` TEXT NOT NULL,
|
||||
`errstr` TEXT NOT NULL,
|
||||
`errpath` TEXT NOT NULL,
|
||||
`trace` TEXT NOT NULL,
|
||||
`webuser` TEXT NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS `date` ON `err_log` (
|
||||
`date` DESC
|
||||
);
|
||||
@@ -10,6 +10,8 @@ class ServConfig
|
||||
public static $serverWebPath = '_tK_serverBasePath_';
|
||||
public static $sharedIconPath = '_tK_sharedIconPath_';
|
||||
public static $gameImagePath = "_tK_gameImagePath_";
|
||||
public static $imageRequestPath = "_tK_imageRequestPath_";
|
||||
public static $imageRequestKey = '_tK_imageRequestKey_';
|
||||
|
||||
public static function getSharedIconPath(string $filepath='') : string
|
||||
{
|
||||
@@ -32,6 +34,13 @@ class ServConfig
|
||||
return static::$gameImagePath;
|
||||
}
|
||||
|
||||
public static function getImagePullURI() : string
|
||||
{
|
||||
$now = time();
|
||||
$req_hash = Util::hashPassword(sprintf("%016x",$now), static::$imageRequestKey);
|
||||
return static::$imageRequestPath."?req={$req_hash}&time={$now}";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||
|
||||
@@ -65,20 +65,108 @@
|
||||
/*미니체 지도*/
|
||||
.map_theme_miniche.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||
}
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
|
||||
/*미니체 지도*/
|
||||
.map_theme_miniche_b.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_b.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_b.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_b.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_b .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
/*미니체 지도*/
|
||||
.map_theme_miniche_clean.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
/*루드라사움 지도*/
|
||||
.map_theme_ludo_rathowm .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/ludo_rathowm/back.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_ludo_rathowm .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/ludo_rathowm/road.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.world_map.map_theme_ludo_rathowm .map_title .map_title_text::before {
|
||||
color:white;
|
||||
content:'LP';
|
||||
margin-right:1ch;
|
||||
}
|
||||
|
||||
/*체스판 지도*/
|
||||
.map_theme_chess .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/chess/chessboard.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
|
||||
/*포켓몬 v1 지도*/
|
||||
.map_theme_pokemon_v1 .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/pokemon_v1/back_pal8.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
window.sammo_menu = [
|
||||
['/bbs/board', '삼모게시판', '_blank'],
|
||||
['/bbs/tip', '팁/강좌', '_blank'],
|
||||
['/bbs/news', '삼국 일보', '_blank'],
|
||||
['/bbs/history2', '개인 열전', '_blank'],
|
||||
['/bbs/history3', '국가 열전', '_blank'],
|
||||
['/bbs/patch', '패치 내역', '_blank']
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
["/bbs/board", "삼모게시판", "_blank"],
|
||||
["/bbs/tip", "팁/강좌", "_blank"],
|
||||
["/bbs/news", "삼국 일보", "_blank"],
|
||||
["/bbs/history2", "개인 열전", "_blank"],
|
||||
["/bbs/history3", "국가 열전", "_blank"],
|
||||
["/bbs/patch", "패치 내역", "_blank"]
|
||||
]
|
||||
+2
-5
@@ -28,13 +28,10 @@ if($session->userGrade < 4) {
|
||||
|
||||
$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),"");
|
||||
$plock = MYDB_fetch_array($result);
|
||||
$plock = $db->queryFirstField('SELECT plock FROM plock');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -51,7 +48,7 @@ $plock = MYDB_fetch_array($result);
|
||||
시간조정 : <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>0?"동결중":"가동중"?><br>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+35
-9
@@ -24,35 +24,53 @@ $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 "분당김":
|
||||
$locked = false;
|
||||
for($i = 0; $i < 10; $i++){
|
||||
if(tryLock()){
|
||||
$locked = true;
|
||||
break;
|
||||
}
|
||||
usleep(500000);
|
||||
}
|
||||
|
||||
$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->turntime = $turntime->format('Y-m-d H:i:s.u');
|
||||
$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)
|
||||
'turntime'=>$db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
|
||||
], true);
|
||||
$db->update('auction', [
|
||||
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||
'expire'=>$db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
|
||||
], true);
|
||||
if($locked){
|
||||
unlock();
|
||||
}
|
||||
break;
|
||||
case "분지연":
|
||||
$locked = false;
|
||||
for($i = 0; $i < 5; $i++){
|
||||
if(tryLock()){
|
||||
$locked = true;
|
||||
break;
|
||||
}
|
||||
sleep(0.5);
|
||||
}
|
||||
$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->turntime = $turntime->format('Y-m-d H:i:s.u');
|
||||
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||
|
||||
@@ -62,6 +80,9 @@ case "분지연":
|
||||
$db->update('auction', [
|
||||
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||
], true);
|
||||
if($locked){
|
||||
unlock();
|
||||
}
|
||||
break;
|
||||
case "토너분당김":
|
||||
$tnmt_time = new \DateTime($gameStor->tnmt_time);
|
||||
@@ -80,11 +101,16 @@ case "쌀지급":
|
||||
processRiceIncome();
|
||||
break;
|
||||
case "락걸기":
|
||||
$db->update('plock', ['plock'=>1], true);
|
||||
$db->update('plock', [
|
||||
'plock'=>1,
|
||||
'locktime'=>TimeUtil::now(true)
|
||||
], true);
|
||||
break;
|
||||
case "락풀기":
|
||||
$db->update('plock', ['plock'=>0], true);
|
||||
$db->update('plock', [
|
||||
'plock'=>0
|
||||
], true);
|
||||
break;
|
||||
}
|
||||
|
||||
header('Location:_119.php');
|
||||
header('Location:_119.php', true, 303);
|
||||
@@ -28,7 +28,6 @@ if($session->userGrade < 5) {
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$admin = getAdmin();
|
||||
?>
|
||||
@@ -66,12 +65,6 @@ $admin = getAdmin();
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right></td>
|
||||
<td width=285></td>
|
||||
<td width=110 align=right>현재 수입률</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>
|
||||
|
||||
+18
-36
@@ -30,11 +30,8 @@ $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();
|
||||
|
||||
@@ -43,10 +40,6 @@ switch ($btn) {
|
||||
$gameStor->msg = $msg;
|
||||
break;
|
||||
case "로그쓰기":
|
||||
$lognum = $admin['historyindex'] + 1;
|
||||
if ($lognum >= 29) {
|
||||
$lognum = 0;
|
||||
}
|
||||
pushWorldHistory(["<R>★</><S>{$log}</>"]);
|
||||
break;
|
||||
case "변경1":
|
||||
@@ -69,6 +62,7 @@ switch ($btn) {
|
||||
case "30분턴":
|
||||
case "60분턴":
|
||||
case "120분턴":
|
||||
$admin = $gameStor->getValues(['turntime', 'turnterm', 'year', 'startyear', 'month']);
|
||||
switch ($btn) {
|
||||
case "1분턴": $turnterm = 1; break;
|
||||
case "2분턴": $turnterm = 2; break;
|
||||
@@ -79,39 +73,27 @@ switch ($btn) {
|
||||
case "60분턴": $turnterm = 60; break;
|
||||
case "120분턴": $turnterm = 120; break;
|
||||
}
|
||||
$oldunit = $admin['turnterm'] * 60;
|
||||
$unit = $turnterm * 60;
|
||||
|
||||
$unitDiff = $unit / $oldunit;
|
||||
|
||||
$servTurnTime = new \DateTimeImmutable($admin['turntime']);
|
||||
foreach ($db->query('SELECT no,turntime FROM general') as $gen) {
|
||||
$genTurnTime = new \DateTimeImmutable($gen['turntime']);
|
||||
$timeDiff = TimeUtil::DateIntervalToSeconds($genTurnTime->diff($servTurnTime));
|
||||
$timeDiff *= $unitDiff;
|
||||
$newGenTurnTime = $servTurnTime->add(TimeUtil::secondsToDateInterval($timeDiff));
|
||||
|
||||
$db->update('general', [
|
||||
'turntime'=>$newGenTurnTime->format('Y-m-d H:i:s.u')
|
||||
], 'no=%i', $gen['no']);
|
||||
}
|
||||
$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);
|
||||
$starttime = $servTurnTime->sub(TimeUtil::secondsToDateInterval($turn * $unit))->format('Y-m-d H:i:s');
|
||||
$starttime = cutTurn($starttime, $turnterm, false);
|
||||
$gameStor->turnterm = $turnterm;
|
||||
$gameStor->starttime = $starttime;
|
||||
// 턴시간이 길어지는 경우 랜덤턴 배정
|
||||
if ($turnterm < $admin['turnterm']) {
|
||||
$query = "select no from general";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$count = MYDB_num_rows($result);
|
||||
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), "");
|
||||
}
|
||||
// 턴시간이 너무 멀리 떨어진 선수 제대로 보정
|
||||
} else {
|
||||
$query = "select no,turntime from general";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$count = MYDB_num_rows($result);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$gen = MYDB_fetch_array($result);
|
||||
$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), "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pushWorldHistory(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
|
||||
break;
|
||||
}
|
||||
|
||||
+16
-4
@@ -76,7 +76,19 @@ echo "
|
||||
</td>
|
||||
<td width=100 align=center>아이템 지급</td>
|
||||
<td width=504>
|
||||
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
|
||||
<select name=weapon size=1 style='color:white;background-color:black;font-size:13px'>";
|
||||
foreach(GameConst::$allItems as $itemCategories){
|
||||
foreach($itemCategories as $item=>$cnt){
|
||||
if($cnt == 0){
|
||||
continue;
|
||||
}
|
||||
$itemObj = buildItemClass($item);
|
||||
if($itemObj->isBuyable()){
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
for($i=0; $i < 27; $i++) {
|
||||
echo "
|
||||
<option value={$i}>{$i}</option>";
|
||||
@@ -113,12 +125,12 @@ for($i=0; $i < 27; $i++) {
|
||||
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>턴설정</td>
|
||||
<td align=center>턴 시각 설정</td>
|
||||
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>NPC해제</td>
|
||||
<td><input type=submit name=btn value='NPC해제'><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'><input type=submit name=btn value='NPC설정'></td>
|
||||
<td align=center>명령 설정</td>
|
||||
<td><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>메세지 전달</td>
|
||||
|
||||
+59
-52
@@ -5,9 +5,9 @@ include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$weap = Util::getReq('weap', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
$item = Util::getReq('item', 'string');
|
||||
$genlist = Util::getReq('genlist', 'array_int');
|
||||
$msg = Util::getReq('msg', 'string');
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
||||
@@ -24,10 +24,15 @@ if(!$generalID){
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
|
||||
$genObjList = [];
|
||||
$env = [];
|
||||
if($genlist){
|
||||
$genObjList = General::createGeneralObjListFromDB($genlist);
|
||||
$env = $gameStor->cacheAll();
|
||||
}
|
||||
switch($btn) {
|
||||
case "전체 접속허용":
|
||||
$db->update('general', [
|
||||
@@ -46,7 +51,7 @@ switch($btn) {
|
||||
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
||||
break;
|
||||
case "1단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$db->update('general', [
|
||||
'block'=>1,
|
||||
'killturn'=>24
|
||||
@@ -58,7 +63,7 @@ switch($btn) {
|
||||
], 'id IN %li', $uid);
|
||||
break;
|
||||
case "2단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$db->update('general', [
|
||||
'gold'=>0,
|
||||
'rice'=>0,
|
||||
@@ -72,7 +77,7 @@ switch($btn) {
|
||||
], 'id IN %li', $uid);
|
||||
break;
|
||||
case "3단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$db->update('general', [
|
||||
'gold'=>0,
|
||||
'rice'=>0,
|
||||
@@ -91,18 +96,22 @@ switch($btn) {
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "강제 사망":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now(true);
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 0),
|
||||
'killturn'=>0,
|
||||
'turntime'=>$date,
|
||||
], '`no` IN %li', $genlist);
|
||||
$db->update('general_turn', [
|
||||
'action'=>'휴식',
|
||||
'arg'=>'{}',
|
||||
'brief'=>'휴식',
|
||||
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||
break;
|
||||
case "특기 부여":
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
$text = "특기 부여!";
|
||||
|
||||
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
||||
foreach($db->query("SELECT `no`,leadership,strength,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);
|
||||
|
||||
@@ -204,7 +213,7 @@ switch($btn) {
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "메세지 전달":
|
||||
$text = $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);
|
||||
@@ -212,11 +221,11 @@ switch($btn) {
|
||||
break;
|
||||
case "무기지급":
|
||||
|
||||
if($weap == 0) {
|
||||
if($item == 'None') {
|
||||
$text = "무기 회수!";
|
||||
}
|
||||
else {
|
||||
$text = getWeapName($weap)." 지급!";
|
||||
$text = getItemName($item)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
@@ -224,23 +233,23 @@ switch($btn) {
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
if($item === 'None'){
|
||||
$db->update('general', [
|
||||
'weap'=>0
|
||||
'weapon'=>'None'
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'weap'=>$weap
|
||||
], '`no` IN %li AND weap < %i', $genlist, $weap);
|
||||
'weapon'=>$item
|
||||
], '`no` IN %li', $genlist, $item);
|
||||
}
|
||||
break;
|
||||
case "책지급":
|
||||
if($weap == 0) {
|
||||
if($item == 'None') {
|
||||
$text = "책 회수!";
|
||||
}
|
||||
else {
|
||||
$text = getBookName($weap)." 지급!";
|
||||
$text = getItemName($item)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
@@ -248,23 +257,23 @@ switch($btn) {
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
if($item == 'None'){
|
||||
$db->update('general', [
|
||||
'book'=>0
|
||||
'book'=>'None'
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'book'=>$weap
|
||||
], '`no` IN %li AND book < %i', $genlist, $weap);
|
||||
'book'=>$item
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
break;
|
||||
case "말지급":
|
||||
if($weap == 0) {
|
||||
if($item == 'None') {
|
||||
$text = "말 회수!";
|
||||
}
|
||||
else {
|
||||
$text = getHorseName($weap)." 지급!";
|
||||
$text = getItemName($item)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
@@ -272,23 +281,23 @@ switch($btn) {
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
if($item == 'None'){
|
||||
$db->update('general', [
|
||||
'horse'=>0
|
||||
'horse'=>'None'
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'horse'=>$weap
|
||||
], '`no` IN %li AND horse < %i', $genlist, $weap);
|
||||
'horse'=>$item
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
break;
|
||||
case "도구지급":
|
||||
if($weap == 0) {
|
||||
if($item == 'None') {
|
||||
$text = "특수도구 회수!";
|
||||
}
|
||||
else {
|
||||
$text = getItemName($weap)." 지급!";
|
||||
$text = getItemName($item)." 지급!";
|
||||
}
|
||||
|
||||
foreach($genlist as $generalID){
|
||||
@@ -296,37 +305,35 @@ switch($btn) {
|
||||
$msg->send(true);
|
||||
}
|
||||
|
||||
if($weap == 0){
|
||||
if($item == 'None'){
|
||||
$db->update('general', [
|
||||
'item'=>0
|
||||
'item'=>'None'
|
||||
], '`no` IN %li', $genlist);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'item'=>$weap
|
||||
], '`no` IN %li AND item < %i', $genlist, $weap);
|
||||
'item'=>$item
|
||||
], '`no` IN %li AND item < %i', $genlist, $item);
|
||||
}
|
||||
break;
|
||||
case "NPC해제":
|
||||
$db->update('general', [
|
||||
'npc'=>1
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "하야입력":
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 45)
|
||||
], '`no` IN %li', $genlist);
|
||||
$db->update('general_turn', [
|
||||
'action'=>'che_하야',
|
||||
'arg'=>'{}',
|
||||
'brief'=>'하야',
|
||||
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||
break;
|
||||
case "방랑해산":
|
||||
$db->update('general', [
|
||||
'turn0'=>EncodeCommand(0, 0, 0, 47),
|
||||
'turn1'=>EncodeCommand(0, 0, 0, 56)
|
||||
], '`no` IN %li', $genlist);
|
||||
break;
|
||||
case "NPC설정":
|
||||
$db->update('general', [
|
||||
'npc'=>2
|
||||
], '`no` IN %li', $genlist);
|
||||
$db->update('general_turn', [
|
||||
'action'=>'che_방랑',
|
||||
'arg'=>'{}',
|
||||
'brief'=>'방랑',
|
||||
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||
$db->update('general_turn', [
|
||||
'action'=>'che_해산',
|
||||
'arg'=>'{}',
|
||||
'brief'=>'해산',
|
||||
], 'general_id IN %li AND turn_idx = 1', $genlist);
|
||||
break;
|
||||
case "00턴":
|
||||
$turnterm = $gameStor->turnterm;
|
||||
|
||||
+15
-10
@@ -15,8 +15,6 @@ $btn = Util::getReq('btn');
|
||||
$genlist = Util::getReq('genlist', 'array_int');
|
||||
$msg = Util::getReq('msg','string', '메시지');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
||||
@@ -26,7 +24,7 @@ switch($btn) {
|
||||
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
||||
break;
|
||||
case "1단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$db = DB::db();
|
||||
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
|
||||
//FIXME: subquery로 하는게 더 빠를 듯.
|
||||
@@ -34,14 +32,14 @@ switch($btn) {
|
||||
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');
|
||||
$date = TimeUtil::now();
|
||||
$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);
|
||||
break;
|
||||
case "3단계 블럭":
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$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);
|
||||
@@ -51,12 +49,19 @@ switch($btn) {
|
||||
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=%s,killturn=0,turntime=%s where no IN %li',EncodeCommand(0, 0, 0, 0),$date, $genlist);
|
||||
$date = TimeUtil::now(true);
|
||||
$db->update('general', [
|
||||
'killturn'=>0,
|
||||
'turntime'=>$date,
|
||||
], '`no` IN %li', $genlist);
|
||||
$db->update('general_turn', [
|
||||
'action'=>'휴식',
|
||||
'arg'=>'{}',
|
||||
'brief'=>'휴식'
|
||||
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||
break;
|
||||
case "메세지 전달":
|
||||
//TODO:새 갠메 시스템으로 변경
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$date = TimeUtil::now();
|
||||
$src = MessageTarget::buildQuick($session->generalID);
|
||||
for($i=0; $i < count($genlist); $i++) {
|
||||
$msgObj = new Message(
|
||||
@@ -64,7 +69,7 @@ switch($btn) {
|
||||
$src,
|
||||
MessageTarget::buildQuick($genlist[$i]),
|
||||
$msg,
|
||||
new DateTime(),
|
||||
new \DateTime(),
|
||||
new \DateTime('9999-12-31'),
|
||||
[]
|
||||
);
|
||||
|
||||
+29
-33
@@ -14,8 +14,6 @@ if($type2 < 0 || $type2 > 6){
|
||||
$type2 = 0;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
@@ -121,7 +119,6 @@ for($i=1; $i <= $count; $i++) {
|
||||
<td align=center>접률</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>
|
||||
@@ -155,10 +152,9 @@ SELECT
|
||||
A.nation,
|
||||
A.name,
|
||||
A.power,
|
||||
A.chemi,
|
||||
A.color,
|
||||
A.tech,
|
||||
A.sabotagelimit,
|
||||
A.strategic_cmd_limit,
|
||||
A.gold,
|
||||
A.rice,
|
||||
COUNT(B.nation) AS gennum,
|
||||
@@ -182,8 +178,8 @@ switch($type) {
|
||||
case 4: $query .= " order by A.rice desc"; break;
|
||||
case 5: $query .= " order by avg(B.gold) desc"; break;
|
||||
case 6: $query .= " order by avg(B.rice) desc"; break;
|
||||
case 7: $query .= " order by avg(B.leader) desc"; break;
|
||||
case 8: $query .= " order by avg(B.power) desc"; break;
|
||||
case 7: $query .= " order by avg(B.leadership) desc"; break;
|
||||
case 8: $query .= " order by avg(B.strength) desc"; break;
|
||||
case 9: $query .= " order by avg(B.intel) desc"; break;
|
||||
case 10: $query .= " order by avg(B.explevel) desc"; break;
|
||||
case 11: $query .= " order by avg(B.connect) desc"; break;
|
||||
@@ -202,8 +198,8 @@ for($i=0; $i < $nationCount; $i++) {
|
||||
$query = "select COUNT(*) as cnt,
|
||||
ROUND(AVG(gold)) as avgg,
|
||||
ROUND(AVG(rice)) as avgr,
|
||||
SUM(leader) as leader, ROUND(AVG(leader), 1) as avgl,
|
||||
ROUND(AVG(power), 1) as avgp,
|
||||
SUM(leadership) as leadership, ROUND(AVG(leadership), 1) as avgl,
|
||||
ROUND(AVG(strength), 1) as avgs,
|
||||
ROUND(AVG(intel), 1) as avgi,
|
||||
ROUND(AVG(explevel), 1) as avge,
|
||||
SUM(crew) as crew
|
||||
@@ -212,13 +208,14 @@ for($i=0; $i < $nationCount; $i++) {
|
||||
$gen = MYDB_fetch_array($genResult);
|
||||
|
||||
$query = "select COUNT(*) as cnt,
|
||||
SUM(pop) as pop, SUM(pop2) as pop2,
|
||||
ROUND(SUM(pop)/SUM(pop2)*100, 2) as rate,
|
||||
ROUND(SUM(agri)/SUM(agri2)*100, 2) as agri,
|
||||
ROUND(SUM(comm)/SUM(comm2)*100, 2) as comm,
|
||||
ROUND(SUM(secu)/SUM(secu2)*100, 2) as secu,
|
||||
ROUND(SUM(wall)/SUM(wall2)*100, 2) as wall,
|
||||
ROUND(SUM(def)/SUM(def2)*100, 2) as def
|
||||
SUM(pop) as pop, SUM(pop_max) as pop_max,
|
||||
ROUND(SUM(pop)/SUM(pop_max)*100, 2) as rate,
|
||||
trust,
|
||||
ROUND(SUM(agri)/SUM(agri_max)*100, 2) as agri,
|
||||
ROUND(SUM(comm)/SUM(comm_max)*100, 2) as comm,
|
||||
ROUND(SUM(secu)/SUM(secu_max)*100, 2) as secu,
|
||||
ROUND(SUM(wall)/SUM(wall_max)*100, 2) as wall,
|
||||
ROUND(SUM(def)/SUM(def_max)*100, 2) as def
|
||||
from city where nation='{$nation['nation']}'";
|
||||
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($cityResult);
|
||||
@@ -229,27 +226,26 @@ for($i=0; $i < $nationCount; $i++) {
|
||||
<td align=center> {$nation['connect']} </td>
|
||||
<td align=center> {$nation['con']} </td>
|
||||
<td align=center> {$nation['power']} </td>
|
||||
<td align=center> {$nation['chemi']} </td>
|
||||
<td align=center> {$gen['cnt']} </td>
|
||||
<td align=center> {$city['cnt']} </td>
|
||||
<td align=center> {$nation['tech']} </td>
|
||||
<td align=center> {$nation['sabotagelimit']} </td>
|
||||
<td align=right> ".sprintf('%.1f',$nation['tech'])." </td>
|
||||
<td align=center> {$nation['strategic_cmd_limit']} </td>
|
||||
<td align=center> {$nation['gold']} </td>
|
||||
<td align=center> {$nation['rice']} </td>
|
||||
<td align=center> {$gen['avgg']} </td>
|
||||
<td align=center> {$gen['avgr']} </td>
|
||||
<td align=center> {$gen['avgl']} </td>
|
||||
<td align=center> {$gen['avgp']} </td>
|
||||
<td align=center> {$gen['avgi']} </td>
|
||||
<td align=center> {$gen['avge']} </td>
|
||||
<td align=center> {$nation['dex0']} </td>
|
||||
<td align=center> {$nation['dex10']} </td>
|
||||
<td align=center> {$nation['dex20']} </td>
|
||||
<td align=center> {$nation['dex30']} </td>
|
||||
<td align=center> {$nation['dex40']} </td>
|
||||
<td align=center> {$gen['crew']}/{$gen['leader']}00 </td>
|
||||
<td align=center> {$city['pop']}/{$city['pop2']} </td>
|
||||
<td align=center> {$city['rate']}% </td>
|
||||
<td align=right> {$gen['avgg']} </td>
|
||||
<td align=right> {$gen['avgr']} </td>
|
||||
<td align=right> {$gen['avgl']} </td>
|
||||
<td align=right> {$gen['avgs']} </td>
|
||||
<td align=right> {$gen['avgi']} </td>
|
||||
<td align=right> {$gen['avge']} </td>
|
||||
<td align=right> {$nation['dex0']} </td>
|
||||
<td align=right> {$nation['dex10']} </td>
|
||||
<td align=right> {$nation['dex20']} </td>
|
||||
<td align=right> {$nation['dex30']} </td>
|
||||
<td align=right> {$nation['dex40']} </td>
|
||||
<td align=right> {$gen['crew']}/{$gen['leadership']}00 </td>
|
||||
<td align=center> {$city['pop']}/{$city['pop_max']} </td>
|
||||
<td align=center> ".sprintf('%.1f',$city['pop']/$city['pop_max']*100)."% </td>
|
||||
<td align=center> {$city['agri']}% </td>
|
||||
<td align=center> {$city['comm']}% </td>
|
||||
<td align=center> {$city['secu']}% </td>
|
||||
|
||||
@@ -7,8 +7,6 @@ include "func.php";
|
||||
$btn = Util::getReq('btn');
|
||||
$nation = Util::getReq('nation', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -19,10 +17,10 @@ if($session->userGrade < 5) {
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
switch($btn) {
|
||||
case "국가변경":
|
||||
$oldNation = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
|
||||
if($nation == 0) {
|
||||
$db->update('general', [
|
||||
'nation'=>0,
|
||||
@@ -33,6 +31,14 @@ switch($btn) {
|
||||
'nation'=>$nation,
|
||||
'level'=>1,
|
||||
], 'owner=%i', $userID);
|
||||
$db->update('nation', [
|
||||
'gennum'=>$db->sqleval('gennum + 1')
|
||||
], 'nation=%i', $oldNation);
|
||||
}
|
||||
if($oldNation != 0){
|
||||
$db->update('nation', [
|
||||
'gennum'=>$db->sqleval('gennum - 1')
|
||||
], 'nation=%i', $oldNation);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ $type = Util::getReq('type', 'int', 0);
|
||||
if($type < 0 || $type > 4){
|
||||
$type = 0;
|
||||
}
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
+62
-36
@@ -6,14 +6,31 @@ include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
$reqQueryType = Util::getReq('query_type', 'string', null);
|
||||
|
||||
if($type < 0 || $type > 3){
|
||||
$type = 0;
|
||||
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
|
||||
$queryMap = [
|
||||
'turntime' => ['최근턴', 0, function($lhs, $rhs){
|
||||
return -($lhs['turntime']<=>$rhs['turntime']);
|
||||
}],
|
||||
'recwar' => ['최근전투', 1, function($lhs, $rhs){
|
||||
return -($lhs['recwar']<=>$rhs['recwar']);
|
||||
}],
|
||||
'name' => ['장수명', 0, function($lhs, $rhs){
|
||||
if($lhs['npc'] !== $rhs['npc']){
|
||||
return $lhs['npc']<=>$rhs['npc'];
|
||||
}
|
||||
return $lhs['name']<=>$rhs['name'];
|
||||
}],
|
||||
'warnum' => ['전투수', 1, function($lhs, $rhs){
|
||||
return -($lhs['warnum']<=>$rhs['warnum']);
|
||||
}]
|
||||
];
|
||||
|
||||
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
|
||||
$reqQueryType = Util::array_first_key($queryMap);
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
@@ -45,7 +62,39 @@ if($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
$sel[$type] = "selected";
|
||||
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
|
||||
if($reqArgType===0){
|
||||
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime FROM general');
|
||||
}
|
||||
else if($reqArgType===1){
|
||||
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
|
||||
}
|
||||
else if($reqArgType===2){
|
||||
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, value as %b
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
WHERE rank_data.type = %b',
|
||||
$reqQueryType, $reqQueryType
|
||||
);
|
||||
}
|
||||
else if($reqArgType===3){
|
||||
$generalBasicList = array_map(function($arr){
|
||||
$arr['aux'] = Json::decode($arr['aux']);
|
||||
return $arr;
|
||||
}, $db->query('SELECT no, name, nation, npc, turntime, aux FROM general'));
|
||||
}
|
||||
else{
|
||||
throw new \sammo\MustNotBeReachedException();
|
||||
}
|
||||
|
||||
usort($generalBasicList, $comp);
|
||||
|
||||
if(!$gen){
|
||||
$gen = $generalBasicList[0]['no'];
|
||||
}
|
||||
|
||||
$generalObj = General::createGeneralObjFromDB($gen);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -64,39 +113,16 @@ $sel[$type] = "selected";
|
||||
<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>
|
||||
<?php foreach($queryMap as $queryType => [$queryTypeText,]): ?>
|
||||
<option <?=$queryKey==$reqQueryType?'selected':''?> value='<?=$queryKey?>'><?=$queryTypeText?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
<select name=gen size=1>
|
||||
<?php
|
||||
switch($type) {
|
||||
case 0: $query = "select no,name from general order by turntime desc"; break;
|
||||
case 1: $query = "select no,name from general order by recwar desc"; break;
|
||||
case 2: $query = "select no,name from general order by npc,binary(name)"; break;
|
||||
case 3: $query = "select no,name from general order by warnum desc"; break;
|
||||
}
|
||||
$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);
|
||||
// 선택 없으면 맨 처음 장수
|
||||
if($gen == 0) {
|
||||
$gen = $general['no'];
|
||||
}
|
||||
if($gen == $general['no']) {
|
||||
echo "
|
||||
<option selected value={$general['no']}>{$general['name']}</option>";
|
||||
} else {
|
||||
echo "
|
||||
<option value={$general['no']}>{$general['name']}</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php foreach($generalBasicList as $general): ?>
|
||||
<option <?=$gen==$general['no']?'selected':''?>><?=getNationStaticInfo($general['nation'])['name']?> - <?=$general['name']?> (<?=$general['turntime']?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
</form>
|
||||
@@ -109,7 +135,7 @@ for($i=0; $i < $gencount; $i++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($gen); generalInfo2($gen); ?>
|
||||
<?php generalInfo($generalObj); generalInfo2($generalObj); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
</td>
|
||||
|
||||
+2
-41
@@ -8,8 +8,6 @@ $btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = 0;
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
@@ -73,7 +71,6 @@ $sel[$type] = "selected";
|
||||
<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
|
||||
|
||||
@@ -95,11 +92,7 @@ for ($i=0; $i < $dipcount; $i++) {
|
||||
$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), "");
|
||||
$dip2 = MYDB_fetch_array($result2);
|
||||
|
||||
if ($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
|
||||
if ($dip['state'] == 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -114,38 +107,7 @@ for ($i=0; $i < $dipcount; $i++) {
|
||||
case 7: $state = "<font color=green>불가침</font>"; break;
|
||||
}
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$note = "";
|
||||
if ($dip['fixed'] != "") {
|
||||
if ($dip['state'] == 7) {
|
||||
$note .= $dip['fixed'];
|
||||
} else {
|
||||
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
||||
}
|
||||
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
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'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
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 = " ";
|
||||
}
|
||||
$date = TimeUtil::now();
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -153,7 +115,6 @@ for ($i=0; $i < $dipcount; $i++) {
|
||||
<td align=center style=color:".newColor($nationColor[$you]).";background-color:{$nationColor[$you]};>$nationName[$you]</td>
|
||||
<td align=center>$state</td>
|
||||
<td align=center>{$dip['term']} 개월</td>
|
||||
<td align=left style=font-size:7px;>{$note}</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
die('권한 부족');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
if(!$gameStor->isunited){
|
||||
die('아직 천통하지 않았습니다');
|
||||
}
|
||||
|
||||
foreach($db->queryFirstColumn(
|
||||
'SELECT no FROM general WHERE npc != 0 and age >= %i',
|
||||
GameConst::$retirementYear
|
||||
) as $generalNo){
|
||||
CheckHall($generalNo);
|
||||
}
|
||||
-1660
@@ -1,1660 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
//로그인 검사
|
||||
|
||||
$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, '');
|
||||
$dx120 = array_fill(0, 20, '');
|
||||
$dx130 = array_fill(0, 20, '');
|
||||
$dx140 = array_fill(0, 20, '');
|
||||
|
||||
$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, '');
|
||||
$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, '');
|
||||
|
||||
$sellevel2 = array_fill(0, 13, '');
|
||||
$sel2 = array_fill(0,44, '');
|
||||
$tch2 = array_fill(0,11, '');
|
||||
|
||||
$dec = 0;
|
||||
$rice = 0;
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
increaseRefresh("시뮬", 2);
|
||||
|
||||
$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);
|
||||
|
||||
$admin = $gameStor->getAll();
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
|
||||
if($session->userGrade < 3) {
|
||||
echo "특별회원이 아닙니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$mydeathnumSum = 0;
|
||||
$mykillnumSum = 0;
|
||||
$expSum = 0;
|
||||
$ricingSum = 0;
|
||||
$expSum2 = 0;
|
||||
$ricingSum2 = 0;
|
||||
|
||||
if($isgen == "장수평균" || $isgen == "성벽평균") {
|
||||
$simulCount = 1000;
|
||||
} else {
|
||||
$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++) {
|
||||
$general['leader'] = $leader1;
|
||||
$general['power'] = $power1;
|
||||
$general['intel'] = $intel1;
|
||||
$general['crewtype'] = $type1;
|
||||
$general['crew'] = $crew1;
|
||||
$general['train'] = $train1;
|
||||
$general['atmos'] = $atmos1;
|
||||
$general['level'] = $level1;
|
||||
$general['explevel'] = $explevel1;
|
||||
$general['dex0'] = $dex10;
|
||||
$general['dex10'] = $dex110;
|
||||
$general['dex20'] = $dex120;
|
||||
$general['dex30'] = $dex130;
|
||||
$general['dex40'] = $dex140;
|
||||
|
||||
$general['injury'] = 0;
|
||||
$general['horse'] = 0;
|
||||
$general['weap'] = 0;
|
||||
$general['book'] = 0;
|
||||
|
||||
$oppose['leader'] = $leader2;
|
||||
$oppose['power'] = $power2;
|
||||
$oppose['intel'] = $intel2;
|
||||
$oppose['crewtype'] = $type2;
|
||||
$oppose['crew'] = $crew2;
|
||||
$oppose['train'] = $train2;
|
||||
$oppose['atmos'] = $atmos2;
|
||||
$oppose['level'] = $level2;
|
||||
$oppose['explevel'] = $explevel2;
|
||||
$oppose['dex0'] = $dex20;
|
||||
$oppose['dex10'] = $dex210;
|
||||
$oppose['dex20'] = $dex220;
|
||||
$oppose['dex30'] = $dex230;
|
||||
$oppose['dex40'] = $dex240;
|
||||
|
||||
$oppose['injury'] = 0;
|
||||
$oppose['horse'] = 0;
|
||||
$oppose['weap'] = 0;
|
||||
$oppose['book'] = 0;
|
||||
|
||||
$city['def'] = $def;
|
||||
$city['wall'] = $wall;
|
||||
$city['agri'] = 0;
|
||||
$city['comm'] = 0;
|
||||
$city['secu'] = 0;
|
||||
|
||||
if($isgen == "장수공격" || $isgen == "장수평균") {
|
||||
$opposecount = 1;
|
||||
} else {
|
||||
$opposecount = 0;
|
||||
}
|
||||
|
||||
$warphase = getRate($admin, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
||||
|
||||
// 우선 스케일링
|
||||
$city['def'] *= 10;
|
||||
$city['wall'] *= 10;
|
||||
|
||||
$msg = "";
|
||||
$msg .= "<C>●</>1월:공격장수가 <R>공격</>합니다.<br>";
|
||||
|
||||
$exp = 0; //병사 소진 시킨 만큼
|
||||
$opexp = 0;
|
||||
$exp2 = 1; //능력경험치
|
||||
$phase = 0;
|
||||
while($phase < $warphase) {
|
||||
// 장수가 없어서 도시 공격
|
||||
if($opposecount == 0) {
|
||||
$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($general, $tech1, 0);
|
||||
$myDef = getDef($general, $tech1);
|
||||
$cityAtt = getCityAtt($city);
|
||||
$cityDef = getCityDef($city);
|
||||
|
||||
// 감소할 병사 수
|
||||
$cityCrew = GameConst::$armperphase + $myAtt - $cityDef;
|
||||
$myCrew = GameConst::$armperphase + $cityAtt - $myDef;
|
||||
$cityweight = $myAtt - $cityDef;
|
||||
$myweight = $cityAtt - $myDef;
|
||||
|
||||
//훈련 사기따라
|
||||
$myCrew = getCrew($myCrew, $atmos3, $general['train']);
|
||||
$cityCrew = getCrew($cityCrew, $general['atmos'], $train3);
|
||||
//숙련도 따라
|
||||
$genDexAtt = getGenDex($general, $general['crewtype']);
|
||||
$genDexDef = getGenDex($general, 40);
|
||||
$cityCrew *= getDexLog($genDexAtt, ($train3-60)*7200);
|
||||
$myCrew *= getDexLog(($atmos3-60)*7200, $genDexDef);
|
||||
|
||||
$avoid = 1;
|
||||
// 병종간 특성
|
||||
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $general['intel'] + getBookEff($general['book']);
|
||||
if($general['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
} elseif($general['crewtype'] == 31) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 32) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 33) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 34) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 35) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($general['crewtype'] == 36) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($general['crewtype'] == 37) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 38) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
}
|
||||
$ratio = rand() % 1000; // 0~999
|
||||
if($ratio <= $ratio2) {
|
||||
$ratio = rand() % 100; // 0~99
|
||||
if($ratio >= 30) {
|
||||
$type = rand() % 3;
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>급습</>을 <C>성공</>했다!<br>";
|
||||
$cityCrew *= 1.2;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>위보</>를 <C>성공</>했다!<br>";
|
||||
$cityCrew *= 1.4;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>혼란</>을 <C>성공</>했다!<br>";
|
||||
$cityCrew *= 1.6;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$type = rand() % 3;
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>급습</>을 <R>실패</>했다!<br>";
|
||||
$cityCrew /= 1.2;
|
||||
$myCrew *= 1.2;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>위보</>를 <R>실패</>했다!<br>";
|
||||
$cityCrew /= 1.4;
|
||||
$myCrew *= 1.4;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>혼란</>을 <R>실패</>했다!<br>";
|
||||
$cityCrew /= 1.6;
|
||||
$myCrew *= 1.6;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif($general['crewtype'] == 40) { // 정란
|
||||
$cityCrew = $cityCrew * 1.5;
|
||||
} elseif($general['crewtype'] == 41) { // 충차
|
||||
$cityCrew = $cityCrew * 2.0;
|
||||
} elseif($general['crewtype'] == 42) { // 벽력거
|
||||
$cityCrew = $cityCrew * 1.5;
|
||||
}
|
||||
//군주, 참모, 장군 공격 보정 5%
|
||||
if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) {
|
||||
$cityCrew = $cityCrew * 1.05;
|
||||
}
|
||||
//레벨 보정
|
||||
$cityCrew = $cityCrew * (100 + $general['explevel']/6)/100;
|
||||
|
||||
//크리
|
||||
$rd = rand() % 100; // 0 ~ 99
|
||||
$ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']);
|
||||
if($ratio >= $rd && $avoid == 1) {
|
||||
$msg .= "<C>●</><C>필살</>공격!</><br>";
|
||||
$cityCrew = CriticalScore2($cityCrew);
|
||||
$avoid = 0;
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $avoid == 1) {
|
||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||
$myCrew /= 10; // 10%만 소모
|
||||
$avoid = 0;
|
||||
}
|
||||
|
||||
//랜타추가
|
||||
$cityCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
|
||||
$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'];
|
||||
|
||||
if($city['wall'] <= 0) { $city['wall'] = 0; }
|
||||
|
||||
if($city['def'] < 0) {
|
||||
$offset = Util::round($tempCityDef*$tempMyCrew/$tempCityCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$cityCrew += $tempCityDef;
|
||||
$city['def'] = 0;
|
||||
}
|
||||
if($general['crew'] < 0) {
|
||||
$offset = Util::round($tempGeneralCrew*$tempCityCrew/$tempMyCrew);
|
||||
$cityCrew += $offset;
|
||||
$city['def'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
$general['crew'] = 0;
|
||||
}
|
||||
|
||||
$exp += $cityCrew;
|
||||
$opexp += $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);
|
||||
$cityDef = round($cityDef, 2);
|
||||
$msg .= "<C>●</> $phase : <Y1>【공격장수】</> <C>{$general['crew']} (-$myCrew)</> VS <C>{$city['def']} (-$cityCrew)</> <Y1>【성벽】</><br>";
|
||||
|
||||
$mykillnum += $cityCrew; $mydeathnum += $myCrew;
|
||||
|
||||
if($city['def'] <= 0) { break; }
|
||||
if($general['crew'] <= 0) { break; }
|
||||
}
|
||||
|
||||
// 도시쌀 소모 계산
|
||||
$opexp = Util::round($opexp / 50);
|
||||
$rice = Util::round($opexp * 4 * getCrewtypeRice(0, 0) * ($train3/100 - 0.2));
|
||||
|
||||
//원래대로 스케일링
|
||||
$city['def'] = Util::round($city['def'] / 10);
|
||||
$city['wall'] = Util::round($city['wall'] / 10);
|
||||
//내정 감소
|
||||
$dec = Util::round($cityCrew / 10);
|
||||
$city['agri'] -= $dec;
|
||||
$city['comm'] -= $dec;
|
||||
$city['secu'] -= $dec;
|
||||
if($city['agri'] < 0) { $city['agri'] = 0; }
|
||||
if($city['comm'] < 0) { $city['comm'] = 0; }
|
||||
if($city['secu'] < 0) { $city['secu'] = 0; }
|
||||
$msg .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</><br>";
|
||||
$msg .= "<R>★</>【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice<br>";
|
||||
|
||||
// $msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</> ";
|
||||
// $msg2 .= "<R>★</>【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice<br>";
|
||||
|
||||
if($city['def'] == 0 || $general['crew'] == 0) {
|
||||
break;
|
||||
}
|
||||
// 장수 대결
|
||||
} else {
|
||||
$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($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;
|
||||
//훈련 사기따라
|
||||
$myCrew = getCrew($myCrew, $oppose['atmos'], $general['train']);
|
||||
$opCrew = getCrew($opCrew, $general['atmos'], $oppose['train']);
|
||||
//숙련도 따라
|
||||
$genDexAtt = getGenDex($general, $general['crewtype']);
|
||||
$genDexDef = getGenDex($general, $oppose['crewtype']);
|
||||
$oppDexAtt = getGenDex($oppose, $oppose['crewtype']);
|
||||
$oppDexDef = getGenDex($oppose, $general['crewtype']);
|
||||
$opCrew *= getDexLog($genDexAtt, $oppDexDef);
|
||||
$myCrew *= getDexLog($oppDexAtt, $genDexDef);
|
||||
|
||||
$myAvoid = 1;
|
||||
$opAvoid = 1;
|
||||
// 병종간 특성
|
||||
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $general['intel'] + getBookEff($general['book']);
|
||||
if($general['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
} elseif($general['crewtype'] == 31) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 32) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 33) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 34) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 35) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($general['crewtype'] == 36) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($general['crewtype'] == 37) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($general['crewtype'] == 38) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
}
|
||||
$ratio = rand() % 1000; // 0~999
|
||||
if($ratio <= $ratio2) {
|
||||
$ratio = rand() % 100;
|
||||
if($ratio >= 30) {
|
||||
$type = rand() % 5; // 0~4
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>위보</>를 <C>성공</>했다!<br>";
|
||||
$opCrew *= 1.2;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>매복</>을 <C>성공</>했다!<br>";
|
||||
$opCrew *= 1.4;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>반목</>을 <C>성공</>했다!<br>";
|
||||
$opCrew *= 1.6;
|
||||
break;
|
||||
case 3:
|
||||
$msg .= "<C>●</><D>화계</>를 <C>성공</>했다!<br>";
|
||||
$opCrew *= 1.8;
|
||||
break;
|
||||
case 4:
|
||||
$msg .= "<C>●</><D>혼란</>을 <C>성공</>했다!<br>";
|
||||
$opCrew *= 2.0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$type = rand() % 5; // 0~4
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>위보</>를 <R>실패</>했다!<br>";
|
||||
$opCrew /= 1.1;
|
||||
$myCrew *= 1.1;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>매복</>을 <R>실패</>했다!<br>";
|
||||
$opCrew /= 1.2;
|
||||
$myCrew *= 1.2;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>반목</>을 <R>실패</>했다!<br>";
|
||||
$opCrew /= 1.3;
|
||||
$myCrew *= 1.3;
|
||||
break;
|
||||
case 3:
|
||||
$msg .= "<C>●</><D>화계</>를 <R>실패</>했다!<br>";
|
||||
$opCrew /= 1.4;
|
||||
$myCrew *= 1.4;
|
||||
break;
|
||||
case 4:
|
||||
$msg .= "<C>●</><D>혼란</>을 <R>실패</>했다!<br>";
|
||||
$opCrew /= 1.5;
|
||||
$myCrew *= 1.5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 상대 장수 병종간 특성
|
||||
if(intdiv($oppose['crewtype'], 10) == 3) { // 귀병
|
||||
$int = $oppose['intel'] + getBookEff($oppose['book']);
|
||||
if($oppose['crewtype'] == 30) {
|
||||
$ratio2 = $int * 5; // 0~500 즉 50%
|
||||
} elseif($oppose['crewtype'] == 31) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($oppose['crewtype'] == 32) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($oppose['crewtype'] == 33) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($oppose['crewtype'] == 34) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($oppose['crewtype'] == 35) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($oppose['crewtype'] == 36) {
|
||||
$ratio2 = $int * 8; // 0~800 즉 80%
|
||||
} elseif($oppose['crewtype'] == 37) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
} elseif($oppose['crewtype'] == 38) {
|
||||
$ratio2 = $int * 6; // 0~600 즉 60%
|
||||
}
|
||||
$ratio = rand() % 1000; // 0~999
|
||||
if($ratio <= $ratio2) {
|
||||
$ratio = rand() % 100;
|
||||
if($ratio >= 30) {
|
||||
$type = rand() % 5; // 0~4
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>위보</>에 당했다!<br>";
|
||||
$myCrew *= 1.2;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>매복</>에 당했다!<br>";
|
||||
$myCrew *= 1.4;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>반목</>에 당했다!<br>";
|
||||
$myCrew *= 1.6;
|
||||
break;
|
||||
case 3:
|
||||
$msg .= "<C>●</><D>화계</>에 당했다!<br>";
|
||||
$myCrew *= 1.8;
|
||||
break;
|
||||
case 4:
|
||||
$msg .= "<C>●</><D>혼란</>에 당했다!<br>";
|
||||
$myCrew *= 2.0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$type = rand() % 5; // 0~4
|
||||
switch($type) {
|
||||
case 0:
|
||||
$msg .= "<C>●</><D>위보</>를 간파했다!<br>";
|
||||
$myCrew /= 1.1;
|
||||
$opCrew *= 1.1;
|
||||
break;
|
||||
case 1:
|
||||
$msg .= "<C>●</><D>매복</>을 간파했다!<br>";
|
||||
$myCrew /= 1.2;
|
||||
$opCrew *= 1.2;
|
||||
break;
|
||||
case 2:
|
||||
$msg .= "<C>●</><D>반목</>을 간파했다!<br>";
|
||||
$myCrew /= 1.3;
|
||||
$opCrew *= 1.3;
|
||||
break;
|
||||
case 3:
|
||||
$msg .= "<C>●</><D>화계</>를 간파했다!<br>";
|
||||
$myCrew /= 1.4;
|
||||
$opCrew *= 1.4;
|
||||
break;
|
||||
case 4:
|
||||
$msg .= "<C>●</><D>혼란</>을 간파했다!<br>";
|
||||
$myCrew /= 1.5;
|
||||
$opCrew *= 1.5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($oppose['crewtype'] == 43) { // 목우
|
||||
$r = 0;
|
||||
$r += $oppose['atmos'];
|
||||
$r += $oppose['train'];
|
||||
$ratio = rand() % 400; // 최대 50% 저지
|
||||
if($ratio < $r && $opAvoid == 1) {
|
||||
$msg .= "<C>●</><R>저지</>당했다!</><br>";
|
||||
$opAvoid = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// my 입장 상성
|
||||
// 보병계열 > 궁병계열
|
||||
if(intdiv($general['crewtype'], 10) == 0 && intdiv($oppose['crewtype'], 10) == 1) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 궁병계열 > 기병계열
|
||||
if(intdiv($general['crewtype'], 10) == 1 && intdiv($oppose['crewtype'], 10) == 2) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 기병계열 > 보병계열
|
||||
if(intdiv($general['crewtype'], 10) == 2 && intdiv($oppose['crewtype'], 10) == 0) {
|
||||
$myCrew *= 0.8;
|
||||
$opCrew *= 1.2;
|
||||
}
|
||||
// 차병계열
|
||||
if(intdiv($general['crewtype'], 10) == 4) {
|
||||
$myCrew *= 1.2;
|
||||
$opCrew *= 0.8;
|
||||
}
|
||||
|
||||
// op 입장 상성
|
||||
// 보병계열 > 궁병계열
|
||||
if(intdiv($oppose['crewtype'], 10) == 0 && intdiv($general['crewtype'], 10) == 1) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 궁병계열 > 기병계열
|
||||
if(intdiv($oppose['crewtype'], 10) == 1 && intdiv($general['crewtype'], 10) == 2) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 기병계열 > 보병계열
|
||||
if(intdiv($oppose['crewtype'], 10) == 2 && intdiv($general['crewtype'], 10) == 0) {
|
||||
$opCrew *= 0.8;
|
||||
$myCrew *= 1.2;
|
||||
}
|
||||
// 차병계열
|
||||
if(intdiv($oppose['crewtype'], 10) == 4) {
|
||||
$opCrew *= 1.2;
|
||||
$myCrew *= 0.8;
|
||||
}
|
||||
|
||||
//군주, 참모, 장군 공격 보정 5%
|
||||
if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) {
|
||||
$opCrew = $opCrew * 1.05;
|
||||
}
|
||||
//상대장수 관직 보정
|
||||
//군주, 참모, 모사 방어 보정 5%
|
||||
if($oppose['level'] == 12 || $oppose['level'] == 11 || $oppose['level'] == 9 || $oppose['level'] == 7 || $oppose['level'] == 5) {
|
||||
$opCrew = $opCrew * 0.95;
|
||||
} elseif($oppose['level'] == 4 && $oppose['no'] == $city['gen1']) { // 태수 보정
|
||||
$opCrew = $opCrew * 0.95;
|
||||
} elseif($oppose['level'] == 3 && $oppose['no'] == $city['gen2']) { // 군사 보정
|
||||
$opCrew = $opCrew * 0.95;
|
||||
} elseif($oppose['level'] == 2 && $oppose['no'] == $city['gen3']) { // 시중 보정
|
||||
$opCrew = $opCrew * 0.95;
|
||||
}
|
||||
|
||||
//레벨 보정
|
||||
$myCrew = $myCrew * ((100 - $general['explevel']/3)/100);
|
||||
$opCrew = $opCrew / ((100 - $general['explevel']/3)/100);
|
||||
$myCrew = $myCrew / ((100 - $oppose['explevel']/3)/100);
|
||||
$opCrew = $opCrew * ((100 - $oppose['explevel']/3)/100);
|
||||
|
||||
//크리
|
||||
$rd = rand() % 100; // 0 ~ 99
|
||||
$ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']);
|
||||
if($ratio >= $rd && $myAvoid == 1) {
|
||||
$msg .= "<C>●</><C>필살</>공격!</><br>";
|
||||
$opCrew = CriticalScore2($opCrew);
|
||||
$myAvoid = 0;
|
||||
}
|
||||
//크리
|
||||
$rd = rand() % 100; // 0 ~ 99
|
||||
$ratio = CriticalRatio3($oppose['leader'], $oppose['power'], $oppose['intel']);
|
||||
if($ratio >= $rd && $opAvoid == 1) {
|
||||
$msg .= "<C>●</>상대의 <R>필살</>공격!</><br>";
|
||||
$myCrew = CriticalScore2($myCrew);
|
||||
$opAvoid = 0;
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $myAvoid == 1) {
|
||||
$msg .= "<C>●</><C>회피</>했다!</><br>";
|
||||
$myCrew /= 10; // 10%만 소모
|
||||
$myAvoid = 0;
|
||||
}
|
||||
//회피
|
||||
$ratio = rand() % 100; // 0 ~ 99
|
||||
$ratio2 = getRate($admin, $oppose['crewtype'], "avd"); //회피율
|
||||
if($ratio < $ratio2 && $opAvoid == 1) {
|
||||
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
|
||||
$opCrew /= 10; // 10%만 소모
|
||||
$opAvoid = 0;
|
||||
}
|
||||
|
||||
//랜타추가
|
||||
$opCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
|
||||
|
||||
$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) {
|
||||
$r1 = $tempGeneralCrew / $tempMyCrew;
|
||||
$r2 = $tempOpposeCrew / $tempOpCrew;
|
||||
|
||||
if($r1 > $r2) {
|
||||
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$opCrew += $tempOpposeCrew;
|
||||
$oppose['crew'] = 0;
|
||||
} else {
|
||||
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$opCrew += $offset;
|
||||
$oppose['crew'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
$general['crew'] = 0;
|
||||
}
|
||||
} elseif($general['crew'] * $oppose['crew'] <= 0) {
|
||||
if($oppose['crew'] < 0) {
|
||||
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
|
||||
$myCrew += $offset;
|
||||
$general['crew'] -= $offset;
|
||||
$opCrew += $tempOpposeCrew;
|
||||
$oppose['crew'] = 0;
|
||||
}
|
||||
if($general['crew'] < 0) {
|
||||
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
|
||||
$opCrew += $offset;
|
||||
$oppose['crew'] -= $offset;
|
||||
$myCrew += $tempGeneralCrew;
|
||||
$general['crew'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$exp += $opCrew;
|
||||
$opexp += $myCrew;
|
||||
$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);
|
||||
$opDef = round($opDef, 2);
|
||||
$msg .= "<C>●</> $phase : <Y1>【공격장수】</> <C>{$general['crew']} (-$myCrew)</> VS <C>{$oppose['crew']} (-$opCrew)</> <Y1>【수비장수】</><br>";
|
||||
|
||||
$mykillnum += $opCrew; $mydeathnum += $myCrew;
|
||||
|
||||
if($oppose['crew'] <= 0) { break; }
|
||||
if($general['crew'] <= 0) { break; }
|
||||
}
|
||||
|
||||
$msg .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</><br>";
|
||||
// $msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</> ";
|
||||
}
|
||||
}
|
||||
|
||||
// 공헌, 명성 상승
|
||||
$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);
|
||||
|
||||
$mydeathnumSum += $mydeathnum;
|
||||
$mykillnumSum += $mykillnum;
|
||||
$expSum += $exp;
|
||||
$ricingSum += $ricing;
|
||||
$expSum2 += $dec;
|
||||
$ricingSum2 += $rice;
|
||||
}
|
||||
|
||||
$mydeathnumSum /= $simulCount;
|
||||
$mykillnumSum /= $simulCount;
|
||||
$expSum /= $simulCount;
|
||||
$ricingSum /= $simulCount;
|
||||
$expSum2 /= $simulCount;
|
||||
$ricingSum2 /= $simulCount;
|
||||
if($isgen == "성벽평균") {
|
||||
$msg2 .= "{$simulCount}회 평균<br>";
|
||||
$msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnumSum</> vs <C>-$mykillnumSum</> ";
|
||||
$msg2 .= "<R>★</>【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2<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($general['crewtype'], $tech1)." = $ricingSum<br>";
|
||||
}
|
||||
|
||||
$msg2 = ConvertLog($msg2, 1);
|
||||
} else {
|
||||
$leader1 = 70;
|
||||
$power1 = 70;
|
||||
$intel1 = 10;
|
||||
$type1 = 0;
|
||||
$crew1 = 7000;
|
||||
$train1 = 100;
|
||||
$atmos1 = 100;
|
||||
$level1 = 1;
|
||||
$explevel1 = 20;
|
||||
|
||||
$leader2 = 70;
|
||||
$power2 = 70;
|
||||
$intel2 = 10;
|
||||
$type2 = 0;
|
||||
$crew2 = 7000;
|
||||
$train2 = 100;
|
||||
$atmos2 = 100;
|
||||
$level2 = 1;
|
||||
$explevel2 = 20;
|
||||
|
||||
$def = 7000;
|
||||
$wall = 7000;
|
||||
$train3 = $admin['city_rate'];
|
||||
$atmos3 = $admin['city_rate'];
|
||||
}
|
||||
|
||||
switch($level1) {
|
||||
case 12: $sellevel1[12] = "selected"; break;
|
||||
case 11: $sellevel1[11] = "selected"; break;
|
||||
case 10: $sellevel1[10] = "selected"; break;
|
||||
case 9: $sellevel1[9] = "selected"; break;
|
||||
case 8: $sellevel1[8] = "selected"; break;
|
||||
case 7: $sellevel1[7] = "selected"; break;
|
||||
case 6: $sellevel1[6] = "selected"; break;
|
||||
case 5: $sellevel1[5] = "selected"; break;
|
||||
case 1: $sellevel1[1] = "selected"; break;
|
||||
}
|
||||
switch($level2) {
|
||||
case 12: $sellevel2[12] = "selected"; break;
|
||||
case 11: $sellevel2[11] = "selected"; break;
|
||||
case 10: $sellevel2[10] = "selected"; break;
|
||||
case 9: $sellevel2[9] = "selected"; break;
|
||||
case 8: $sellevel2[8] = "selected"; break;
|
||||
case 7: $sellevel2[7] = "selected"; break;
|
||||
case 6: $sellevel2[6] = "selected"; break;
|
||||
case 5: $sellevel2[5] = "selected"; break;
|
||||
case 1: $sellevel2[1] = "selected"; break;
|
||||
}
|
||||
|
||||
switch($type1) {
|
||||
case 0: $sel1[0] = "selected"; break;
|
||||
case 1: $sel1[1] = "selected"; break;
|
||||
case 2: $sel1[2] = "selected"; break;
|
||||
case 3: $sel1[3] = "selected"; break;
|
||||
case 4: $sel1[4] = "selected"; break;
|
||||
case 5: $sel1[5] = "selected"; break;
|
||||
case 10: $sel1[10] = "selected"; break;
|
||||
case 11: $sel1[11] = "selected"; break;
|
||||
case 12: $sel1[12] = "selected"; break;
|
||||
case 13: $sel1[13] = "selected"; break;
|
||||
case 14: $sel1[14] = "selected"; break;
|
||||
case 20: $sel1[20] = "selected"; break;
|
||||
case 21: $sel1[21] = "selected"; break;
|
||||
case 22: $sel1[22] = "selected"; break;
|
||||
case 23: $sel1[23] = "selected"; break;
|
||||
case 24: $sel1[24] = "selected"; break;
|
||||
case 25: $sel1[25] = "selected"; break;
|
||||
case 26: $sel1[26] = "selected"; break;
|
||||
case 27: $sel1[27] = "selected"; break;
|
||||
case 30: $sel1[30] = "selected"; break;
|
||||
case 31: $sel1[31] = "selected"; break;
|
||||
case 32: $sel1[32] = "selected"; break;
|
||||
case 33: $sel1[33] = "selected"; break;
|
||||
case 34: $sel1[34] = "selected"; break;
|
||||
case 35: $sel1[35] = "selected"; break;
|
||||
case 36: $sel1[36] = "selected"; break;
|
||||
case 37: $sel1[37] = "selected"; break;
|
||||
case 38: $sel1[38] = "selected"; break;
|
||||
case 40: $sel1[40] = "selected"; break;
|
||||
case 41: $sel1[41] = "selected"; break;
|
||||
case 42: $sel1[42] = "selected"; break;
|
||||
case 43: $sel1[43] = "selected"; break;
|
||||
}
|
||||
switch($type2) {
|
||||
case 0: $sel2[0] = "selected"; break;
|
||||
case 1: $sel2[1] = "selected"; break;
|
||||
case 2: $sel2[2] = "selected"; break;
|
||||
case 3: $sel2[3] = "selected"; break;
|
||||
case 4: $sel2[4] = "selected"; break;
|
||||
case 5: $sel2[5] = "selected"; break;
|
||||
case 10: $sel2[10] = "selected"; break;
|
||||
case 11: $sel2[11] = "selected"; break;
|
||||
case 12: $sel2[12] = "selected"; break;
|
||||
case 13: $sel2[13] = "selected"; break;
|
||||
case 14: $sel2[14] = "selected"; break;
|
||||
case 20: $sel2[20] = "selected"; break;
|
||||
case 21: $sel2[21] = "selected"; break;
|
||||
case 22: $sel2[22] = "selected"; break;
|
||||
case 23: $sel2[23] = "selected"; break;
|
||||
case 24: $sel2[24] = "selected"; break;
|
||||
case 25: $sel2[25] = "selected"; break;
|
||||
case 26: $sel2[26] = "selected"; break;
|
||||
case 27: $sel2[27] = "selected"; break;
|
||||
case 30: $sel2[30] = "selected"; break;
|
||||
case 31: $sel2[31] = "selected"; break;
|
||||
case 32: $sel2[32] = "selected"; break;
|
||||
case 33: $sel2[33] = "selected"; break;
|
||||
case 34: $sel2[34] = "selected"; break;
|
||||
case 35: $sel2[35] = "selected"; break;
|
||||
case 36: $sel2[36] = "selected"; break;
|
||||
case 37: $sel2[37] = "selected"; break;
|
||||
case 38: $sel2[38] = "selected"; break;
|
||||
case 40: $sel2[40] = "selected"; break;
|
||||
case 41: $sel2[41] = "selected"; break;
|
||||
case 42: $sel2[42] = "selected"; break;
|
||||
case 43: $sel2[43] = "selected"; break;
|
||||
}
|
||||
switch($tech1) {
|
||||
case 0: $tch1[0] = "selected"; break;
|
||||
case 1000: $tch1[1] = "selected"; break;
|
||||
case 2000: $tch1[2] = "selected"; break;
|
||||
case 3000: $tch1[3] = "selected"; break;
|
||||
case 4000: $tch1[4] = "selected"; break;
|
||||
case 5000: $tch1[5] = "selected"; break;
|
||||
case 6000: $tch1[6] = "selected"; break;
|
||||
case 7000: $tch1[7] = "selected"; break;
|
||||
case 8000: $tch1[8] = "selected"; break;
|
||||
case 9000: $tch1[9] = "selected"; break;
|
||||
case 10000: $tch1[10] = "selected"; break;
|
||||
}
|
||||
switch($tech2) {
|
||||
case 0: $tch2[0] = "selected"; break;
|
||||
case 1000: $tch2[1] = "selected"; break;
|
||||
case 2000: $tch2[2] = "selected"; break;
|
||||
case 3000: $tch2[3] = "selected"; break;
|
||||
case 4000: $tch2[4] = "selected"; break;
|
||||
case 5000: $tch2[5] = "selected"; break;
|
||||
case 6000: $tch2[6] = "selected"; break;
|
||||
case 7000: $tch2[7] = "selected"; break;
|
||||
case 8000: $tch2[8] = "selected"; break;
|
||||
case 9000: $tch2[9] = "selected"; break;
|
||||
case 10000: $tch2[10] = "selected"; break;
|
||||
}
|
||||
switch($dex10) {
|
||||
case 0: $dx10[0] = "selected"; break;
|
||||
case 2500: $dx10[1] = "selected"; break;
|
||||
case 7500: $dx10[2] = "selected"; break;
|
||||
case 15000: $dx10[3] = "selected"; break;
|
||||
case 25000: $dx10[4] = "selected"; break;
|
||||
case 37500: $dx10[5] = "selected"; break;
|
||||
case 52500: $dx10[6] = "selected"; break;
|
||||
case 70000: $dx10[7] = "selected"; break;
|
||||
case 90000: $dx10[8] = "selected"; break;
|
||||
case 112500: $dx10[9] = "selected"; break;
|
||||
case 137500: $dx10[10] = "selected"; break;
|
||||
case 165000: $dx10[11] = "selected"; break;
|
||||
case 195000: $dx10[12] = "selected"; break;
|
||||
case 227500: $dx10[13] = "selected"; break;
|
||||
case 262500: $dx10[14] = "selected"; break;
|
||||
case 300000: $dx10[15] = "selected"; break;
|
||||
case 340000: $dx10[16] = "selected"; break;
|
||||
case 382500: $dx10[17] = "selected"; break;
|
||||
case 427500: $dx10[18] = "selected"; break;
|
||||
}
|
||||
switch($dex110) {
|
||||
case 0: $dx110[0] = "selected"; break;
|
||||
case 2500: $dx110[1] = "selected"; break;
|
||||
case 7500: $dx110[2] = "selected"; break;
|
||||
case 15000: $dx110[3] = "selected"; break;
|
||||
case 25000: $dx110[4] = "selected"; break;
|
||||
case 37500: $dx110[5] = "selected"; break;
|
||||
case 52500: $dx110[6] = "selected"; break;
|
||||
case 70000: $dx110[7] = "selected"; break;
|
||||
case 90000: $dx110[8] = "selected"; break;
|
||||
case 112500: $dx110[9] = "selected"; break;
|
||||
case 137500: $dx110[10] = "selected"; break;
|
||||
case 165000: $dx110[11] = "selected"; break;
|
||||
case 195000: $dx110[12] = "selected"; break;
|
||||
case 227500: $dx110[13] = "selected"; break;
|
||||
case 262500: $dx110[14] = "selected"; break;
|
||||
case 300000: $dx110[15] = "selected"; break;
|
||||
case 340000: $dx110[16] = "selected"; break;
|
||||
case 382500: $dx110[17] = "selected"; break;
|
||||
case 427500: $dx110[18] = "selected"; break;
|
||||
}
|
||||
switch($dex120) {
|
||||
case 0: $dx120[0] = "selected"; break;
|
||||
case 2500: $dx120[1] = "selected"; break;
|
||||
case 7500: $dx120[2] = "selected"; break;
|
||||
case 15000: $dx120[3] = "selected"; break;
|
||||
case 25000: $dx120[4] = "selected"; break;
|
||||
case 37500: $dx120[5] = "selected"; break;
|
||||
case 52500: $dx120[6] = "selected"; break;
|
||||
case 70000: $dx120[7] = "selected"; break;
|
||||
case 90000: $dx120[8] = "selected"; break;
|
||||
case 112500: $dx120[9] = "selected"; break;
|
||||
case 137500: $dx120[10] = "selected"; break;
|
||||
case 165000: $dx120[11] = "selected"; break;
|
||||
case 195000: $dx120[12] = "selected"; break;
|
||||
case 227500: $dx120[13] = "selected"; break;
|
||||
case 262500: $dx120[14] = "selected"; break;
|
||||
case 300000: $dx120[15] = "selected"; break;
|
||||
case 340000: $dx120[16] = "selected"; break;
|
||||
case 382500: $dx120[17] = "selected"; break;
|
||||
case 427500: $dx120[18] = "selected"; break;
|
||||
}
|
||||
switch($dex130) {
|
||||
case 0: $dx130[0] = "selected"; break;
|
||||
case 2500: $dx130[1] = "selected"; break;
|
||||
case 7500: $dx130[2] = "selected"; break;
|
||||
case 15000: $dx130[3] = "selected"; break;
|
||||
case 25000: $dx130[4] = "selected"; break;
|
||||
case 37500: $dx130[5] = "selected"; break;
|
||||
case 52500: $dx130[6] = "selected"; break;
|
||||
case 70000: $dx130[7] = "selected"; break;
|
||||
case 90000: $dx130[8] = "selected"; break;
|
||||
case 112500: $dx130[9] = "selected"; break;
|
||||
case 137500: $dx130[10] = "selected"; break;
|
||||
case 165000: $dx130[11] = "selected"; break;
|
||||
case 195000: $dx130[12] = "selected"; break;
|
||||
case 227500: $dx130[13] = "selected"; break;
|
||||
case 262500: $dx130[14] = "selected"; break;
|
||||
case 300000: $dx130[15] = "selected"; break;
|
||||
case 340000: $dx130[16] = "selected"; break;
|
||||
case 382500: $dx130[17] = "selected"; break;
|
||||
case 427500: $dx130[18] = "selected"; break;
|
||||
}
|
||||
switch($dex140) {
|
||||
case 0: $dx140[0] = "selected"; break;
|
||||
case 2500: $dx140[1] = "selected"; break;
|
||||
case 7500: $dx140[2] = "selected"; break;
|
||||
case 15000: $dx140[3] = "selected"; break;
|
||||
case 25000: $dx140[4] = "selected"; break;
|
||||
case 37500: $dx140[5] = "selected"; break;
|
||||
case 52500: $dx140[6] = "selected"; break;
|
||||
case 70000: $dx140[7] = "selected"; break;
|
||||
case 90000: $dx140[8] = "selected"; break;
|
||||
case 112500: $dx140[9] = "selected"; break;
|
||||
case 137500: $dx140[10] = "selected"; break;
|
||||
case 165000: $dx140[11] = "selected"; break;
|
||||
case 195000: $dx140[12] = "selected"; break;
|
||||
case 227500: $dx140[13] = "selected"; break;
|
||||
case 262500: $dx140[14] = "selected"; break;
|
||||
case 300000: $dx140[15] = "selected"; break;
|
||||
case 340000: $dx140[16] = "selected"; break;
|
||||
case 382500: $dx140[17] = "selected"; break;
|
||||
case 427500: $dx140[18] = "selected"; break;
|
||||
}
|
||||
switch($dex20) {
|
||||
case 0: $dx20[0] = "selected"; break;
|
||||
case 2500: $dx20[1] = "selected"; break;
|
||||
case 7500: $dx20[2] = "selected"; break;
|
||||
case 15000: $dx20[3] = "selected"; break;
|
||||
case 25000: $dx20[4] = "selected"; break;
|
||||
case 37500: $dx20[5] = "selected"; break;
|
||||
case 52500: $dx20[6] = "selected"; break;
|
||||
case 70000: $dx20[7] = "selected"; break;
|
||||
case 90000: $dx20[8] = "selected"; break;
|
||||
case 112500: $dx20[9] = "selected"; break;
|
||||
case 137500: $dx20[10] = "selected"; break;
|
||||
case 165000: $dx20[11] = "selected"; break;
|
||||
case 195000: $dx20[12] = "selected"; break;
|
||||
case 227500: $dx20[13] = "selected"; break;
|
||||
case 262500: $dx20[14] = "selected"; break;
|
||||
case 300000: $dx20[15] = "selected"; break;
|
||||
case 340000: $dx20[16] = "selected"; break;
|
||||
case 382500: $dx20[17] = "selected"; break;
|
||||
case 427500: $dx20[18] = "selected"; break;
|
||||
}
|
||||
switch($dex210) {
|
||||
case 0: $dx210[0] = "selected"; break;
|
||||
case 2500: $dx210[1] = "selected"; break;
|
||||
case 7500: $dx210[2] = "selected"; break;
|
||||
case 15000: $dx210[3] = "selected"; break;
|
||||
case 25000: $dx210[4] = "selected"; break;
|
||||
case 37500: $dx210[5] = "selected"; break;
|
||||
case 52500: $dx210[6] = "selected"; break;
|
||||
case 70000: $dx210[7] = "selected"; break;
|
||||
case 90000: $dx210[8] = "selected"; break;
|
||||
case 112500: $dx210[9] = "selected"; break;
|
||||
case 137500: $dx210[10] = "selected"; break;
|
||||
case 165000: $dx210[11] = "selected"; break;
|
||||
case 195000: $dx210[12] = "selected"; break;
|
||||
case 227500: $dx210[13] = "selected"; break;
|
||||
case 262500: $dx210[14] = "selected"; break;
|
||||
case 300000: $dx210[15] = "selected"; break;
|
||||
case 340000: $dx210[16] = "selected"; break;
|
||||
case 382500: $dx210[17] = "selected"; break;
|
||||
case 427500: $dx210[18] = "selected"; break;
|
||||
}
|
||||
switch($dex220) {
|
||||
case 0: $dx220[0] = "selected"; break;
|
||||
case 2500: $dx220[1] = "selected"; break;
|
||||
case 7500: $dx220[2] = "selected"; break;
|
||||
case 15000: $dx220[3] = "selected"; break;
|
||||
case 25000: $dx220[4] = "selected"; break;
|
||||
case 37500: $dx220[5] = "selected"; break;
|
||||
case 52500: $dx220[6] = "selected"; break;
|
||||
case 70000: $dx220[7] = "selected"; break;
|
||||
case 90000: $dx220[8] = "selected"; break;
|
||||
case 112500: $dx220[9] = "selected"; break;
|
||||
case 137500: $dx220[10] = "selected"; break;
|
||||
case 165000: $dx220[11] = "selected"; break;
|
||||
case 195000: $dx220[12] = "selected"; break;
|
||||
case 227500: $dx220[13] = "selected"; break;
|
||||
case 262500: $dx220[14] = "selected"; break;
|
||||
case 300000: $dx220[15] = "selected"; break;
|
||||
case 340000: $dx220[16] = "selected"; break;
|
||||
case 382500: $dx220[17] = "selected"; break;
|
||||
case 427500: $dx220[18] = "selected"; break;
|
||||
}
|
||||
switch($dex230) {
|
||||
case 0: $dx230[0] = "selected"; break;
|
||||
case 2500: $dx230[1] = "selected"; break;
|
||||
case 7500: $dx230[2] = "selected"; break;
|
||||
case 15000: $dx230[3] = "selected"; break;
|
||||
case 25000: $dx230[4] = "selected"; break;
|
||||
case 37500: $dx230[5] = "selected"; break;
|
||||
case 52500: $dx230[6] = "selected"; break;
|
||||
case 70000: $dx230[7] = "selected"; break;
|
||||
case 90000: $dx230[8] = "selected"; break;
|
||||
case 112500: $dx230[9] = "selected"; break;
|
||||
case 137500: $dx230[10] = "selected"; break;
|
||||
case 165000: $dx230[11] = "selected"; break;
|
||||
case 195000: $dx230[12] = "selected"; break;
|
||||
case 227500: $dx230[13] = "selected"; break;
|
||||
case 262500: $dx230[14] = "selected"; break;
|
||||
case 300000: $dx230[15] = "selected"; break;
|
||||
case 340000: $dx230[16] = "selected"; break;
|
||||
case 382500: $dx230[17] = "selected"; break;
|
||||
case 427500: $dx230[18] = "selected"; break;
|
||||
}
|
||||
switch($dex240) {
|
||||
case 0: $dx240[0] = "selected"; break;
|
||||
case 2500: $dx240[1] = "selected"; break;
|
||||
case 7500: $dx240[2] = "selected"; break;
|
||||
case 15000: $dx240[3] = "selected"; break;
|
||||
case 25000: $dx240[4] = "selected"; break;
|
||||
case 37500: $dx240[5] = "selected"; break;
|
||||
case 52500: $dx240[6] = "selected"; break;
|
||||
case 70000: $dx240[7] = "selected"; break;
|
||||
case 90000: $dx240[8] = "selected"; break;
|
||||
case 112500: $dx240[9] = "selected"; break;
|
||||
case 137500: $dx240[10] = "selected"; break;
|
||||
case 165000: $dx240[11] = "selected"; break;
|
||||
case 195000: $dx240[12] = "selected"; break;
|
||||
case 227500: $dx240[13] = "selected"; break;
|
||||
case 262500: $dx240[14] = "selected"; break;
|
||||
case 300000: $dx240[15] = "selected"; break;
|
||||
case 340000: $dx240[16] = "selected"; break;
|
||||
case 382500: $dx240[17] = "selected"; break;
|
||||
case 427500: $dx240[18] = "selected"; break;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title>전투시뮬레이션</title>
|
||||
<?=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 class='tb_layout bg0'>
|
||||
<tr id=bg1>
|
||||
<td>공격장수</td>
|
||||
<td>상대장수</td>
|
||||
<td>상대성벽</td>
|
||||
</tr>
|
||||
<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>
|
||||
</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>
|
||||
</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>-</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>-</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>-</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>-</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 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 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 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 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>
|
||||
</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 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 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 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 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>
|
||||
</select>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</select>
|
||||
</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</select>
|
||||
</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<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=성벽평균>'?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=3>
|
||||
<?php
|
||||
if($isgen == "장수공격" || $isgen == "성벽공격") {
|
||||
echo $msg;
|
||||
} elseif($isgen == "장수평균" || $isgen == "성벽평균") {
|
||||
echo $msg2;
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr id=bg1>
|
||||
<td align=right></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>
|
||||
<td width=500 align=center>-</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
for($i=0; $i <= 5; $i++) {
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=10; $i <= 14; $i++) {
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=20; $i <= 27; $i++) {
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=30; $i <= 38; $i++) {
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
|
||||
for($i=40; $i <= 43; $i++) {
|
||||
printSimul($admin, $i);
|
||||
}
|
||||
echo "
|
||||
<tr><td height=5 colspan=8 id=bg1></td></tr>";
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
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>".GameUnitConst::byId($i)->name."</td>
|
||||
<td align=center>$att</td>
|
||||
<td align=center>$def</td>
|
||||
<td align=center>$spd</td>
|
||||
<td align=center>$avd</td>
|
||||
<td align=center>$cst</td>
|
||||
<td align=center>$ric</td>
|
||||
<td align=center>-</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
|
||||
+51
-27
@@ -6,8 +6,6 @@ include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -16,6 +14,7 @@ $db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("명장일람", 1);
|
||||
$templates = new \League\Plates\Engine(__DIR__.'/templates');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -48,9 +47,15 @@ increaseRefresh("명장일람", 1);
|
||||
</td></tr>
|
||||
</form>
|
||||
</table>
|
||||
<div style="margin:auto;width=1000px;">
|
||||
<div style="margin:auto;width:1000px;">
|
||||
<?php
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
|
||||
$nationName = [0=>'재야'];
|
||||
$nationColor = [0=>'#000000'];
|
||||
@@ -62,8 +67,11 @@ foreach (getAllNationStaticInfo() as $nation) {
|
||||
$types = [
|
||||
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
|
||||
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
|
||||
["계 략 성 공", "int", function($v){
|
||||
["계 략 성 공", "int", function($v) use ($gameStor){
|
||||
$v['value'] = $v['firenum'];
|
||||
if($gameStor->isunited){
|
||||
return $v;
|
||||
}
|
||||
$v['nationName'] = '???';
|
||||
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
$v['name'] = '???';
|
||||
@@ -119,12 +127,12 @@ $types = [
|
||||
return $v;
|
||||
}],
|
||||
["일 기 토 승 률", "percent", function($v){
|
||||
$totalCnt = $v['tpw']+$v['tpd']+$v['tpl'];
|
||||
$totalCnt = $v['tsw']+$v['tsd']+$v['tsl'];
|
||||
if($totalCnt < 50){
|
||||
$v['value'] = 0;
|
||||
}
|
||||
else{
|
||||
$v['value'] = $v['tpw']/max(1, $totalCnt);
|
||||
$v['value'] = $v['tsw']/max(1, $totalCnt);
|
||||
}
|
||||
return $v;
|
||||
}],
|
||||
@@ -143,7 +151,7 @@ $types = [
|
||||
["베 팅 당 첨", "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){
|
||||
if($v['betgold'] < GameConst::$defaultGold){
|
||||
$v['value'] = 0;
|
||||
}
|
||||
else{
|
||||
@@ -153,7 +161,15 @@ $types = [
|
||||
}],
|
||||
];
|
||||
|
||||
$generals = array_map(function($general) use($nationColor, $nationName) {
|
||||
$generals = [];
|
||||
foreach($db->query(
|
||||
"SELECT nation,no,name,name2 as owner_name, owner, picture, imgsvr,
|
||||
experience, dedication,
|
||||
dex0, dex10, dex20, dex30, dex40,
|
||||
horse, weapon, book, item
|
||||
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general
|
||||
){
|
||||
$generalID = $general['no'];
|
||||
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
|
||||
$general['fgColor'] = newColor($general['bgColor']);
|
||||
$general['nationName'] = $nationName[$general['nation']];
|
||||
@@ -166,22 +182,19 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
|
||||
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
|
||||
}
|
||||
|
||||
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"));
|
||||
$generals[$generalID] = $general;
|
||||
}
|
||||
|
||||
foreach($db->queryAllLists('SELECT general_id, `type`, `value` FROM rank_data') as [$generalID, $typeKey, $value]){
|
||||
$generals[$generalID][$typeKey] = $value;
|
||||
}
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||
$validCnt = 0;
|
||||
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt){
|
||||
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt, $ownerNameList){
|
||||
$general['owner_name'] = $ownerNameList[$general['owner']]??null;
|
||||
$general = ($typeFunc)($general);
|
||||
$value = $general['value'];
|
||||
|
||||
@@ -211,27 +224,38 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div style="margin:auto;width=1000px;margin-top:5px;">
|
||||
<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, []],
|
||||
'horse'=>'명 마',
|
||||
'weapon'=>'명 검',
|
||||
'book'=>'명 서',
|
||||
'item'=>'도 구'
|
||||
];
|
||||
|
||||
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
||||
$simpleItemTypes = array_keys($itemTypes); array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
||||
|
||||
foreach($generals as $general){
|
||||
foreach($itemTypes as $itemIdx=>[,$itemType, $itemFunc,,,]){
|
||||
$itemCode = $general[$itemType];
|
||||
if($itemCode <= 6){
|
||||
$itemClass = buildItemClass($itemCode);
|
||||
if(!$itemClass->isBuyable()){
|
||||
continue;
|
||||
}
|
||||
|
||||
$itemName = ($itemFunc)($itemCode);
|
||||
$general['rankName'] = $itemName;
|
||||
$info = $itemClass->getInfo();
|
||||
$name = $itemClass->getName();
|
||||
|
||||
if($info){
|
||||
$name = $templates->render('tooltip', [
|
||||
'text'=>$text,
|
||||
'info'=>$info,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
$general['rankName'] = $name;
|
||||
$general['value'] = $itemCode;
|
||||
$itemTypes[$itemIdx][5][$itemCode] = $general;
|
||||
}
|
||||
|
||||
+18
-7
@@ -16,6 +16,10 @@ increaseRefresh("왕조일람", 1);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -50,10 +54,7 @@ if ($showCurrentNation) {
|
||||
<tr>
|
||||
<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>
|
||||
<a href="a_history.php"><button type='button'>역사 보기</button></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -70,10 +71,10 @@ foreach($emperiors as $emperior){
|
||||
<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>
|
||||
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button type='button'>자세히</button></a>
|
||||
|
||||
<?php if($emperior['server_id']): ?>
|
||||
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button>역사 보기</button></a>
|
||||
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button type='button'>역사 보기</button></a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -97,11 +98,21 @@ foreach($emperiors as $emperior){
|
||||
<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 id=bg1 align=center>표 기 장 군</td>
|
||||
<td align=center><?=$emperior['l10name']?></td>
|
||||
<td id=bg1 align=center>사 공</td>
|
||||
<td align=center><?=$emperior['l9name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id=bg1 align=center>거 기 장 군</td>
|
||||
<td align=center><?=$emperior['l8name']?></td>
|
||||
<td id=bg1 align=center>태 위</td>
|
||||
<td align=center><?=$emperior['l7name']?></td>
|
||||
<td id=bg1 align=center>위 장 군</td>
|
||||
<td align=center><?=$emperior['l6name']?></td>
|
||||
<td id=bg1 align=center>사 도</td>
|
||||
<td align=center><?=$emperior['l5name']?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -6,8 +6,6 @@ include "func.php";
|
||||
|
||||
$select = Util::getReq('select', 'int', 0);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
@@ -21,6 +19,10 @@ increaseRefresh("왕조일람", 2);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -33,9 +37,9 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
|
||||
|
||||
<body>
|
||||
<table align=center width=1000 class="tb_layout bg0">
|
||||
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
|
||||
<tr><td>역 대 왕 조<br>
|
||||
<button onclick=window.close()>창 닫기</button>
|
||||
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
|
||||
<div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a><div>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
@@ -156,7 +160,7 @@ if($emperior):
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$showServers = $serverID || (!$emperior);
|
||||
$showServers = $emperior;
|
||||
|
||||
if(!$serverID){
|
||||
$serverID = UniqueConst::$serverID;
|
||||
@@ -175,7 +179,7 @@ if($showServers){
|
||||
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){
|
||||
if(count($generals) != count($nation['generals']) && $serverID == UniqueConst::$serverID){
|
||||
$liveGenerals = $nation['generals'];
|
||||
foreach($generals as $general){
|
||||
if(in_array($general['general_no'], $nation['generals'])){
|
||||
|
||||
+58
-50
@@ -6,21 +6,16 @@ include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 9);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("장수일람", 2);
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT con,turntime FROM general WHERE owner = %i', $userID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -32,6 +27,13 @@ if ($type <= 0 || $type > 15) {
|
||||
$type = 9;
|
||||
}
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -84,26 +86,26 @@ foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
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;
|
||||
case 4: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by intel desc"; break;
|
||||
case 5: $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 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;
|
||||
case 12: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special desc"; break;
|
||||
case 13: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special2 desc"; break;
|
||||
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), "");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
[$orderKey, $orderDesc] = [
|
||||
1=>['nation', false],
|
||||
2=>['leadership', true],
|
||||
3=>['strength', true],
|
||||
4=>['intel', true],
|
||||
5=>['experience', true],
|
||||
6=>['dedication', true],
|
||||
7=>['level', true],
|
||||
8=>['killturn', false],
|
||||
9=>['connect', true],
|
||||
10=>['experience', true],
|
||||
11=>['personal', true],
|
||||
12=>['special', true],
|
||||
13=>['special2', true],
|
||||
14=>['age', true],
|
||||
15=>['npc', true],
|
||||
][$type];
|
||||
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
|
||||
|
||||
echo"
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
@@ -124,36 +126,31 @@ echo"
|
||||
<td width=45 align=center id=bg1>삭턴</td>
|
||||
<td width=70 align=center id=bg1>벌점</td>
|
||||
</tr>";
|
||||
for ($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
foreach($generalList as $general){
|
||||
$nation = $nationname[$general['nation']];
|
||||
|
||||
if ($general['level'] == 12) {
|
||||
$lbonus = $nationlevel[$general['nation']] * 2;
|
||||
} elseif ($general['level'] >= 5) {
|
||||
$lbonus = $nationlevel[$general['nation']];
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
}
|
||||
$lbonus = calcLeadershipBonus($general['level'], $nationlevel[$general['nation']]??0);
|
||||
if ($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
$lbonusText = "";
|
||||
}
|
||||
|
||||
if ($general['injury'] > 0) {
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (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>";
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leader = "{$general['leader']}{$lbonus}";
|
||||
$power = "{$general['power']}";
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
@@ -162,25 +159,36 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
|
||||
}
|
||||
|
||||
$general['connect'] = Util::round($general['connect'], -1);
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
|
||||
<tr data-general-id='{$general['no']}'
|
||||
data-general-wounded='{$general['injury']}'
|
||||
data-general-leadership='{$general['leadership']}'
|
||||
data-general-leadership-bonus='{$lbonus}'
|
||||
data-general-strength='{$general['strength']}'
|
||||
data-general-intel='{$general['intel']}'
|
||||
data-is-npc='".($general['npc']>=2?'true':'false')."'
|
||||
>
|
||||
<td align=center><img class='generalIcon' width='64' height='64' src='{$imageTemp}/{$general['picture']}'></img></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>{$general['age']}세</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
|
||||
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
|
||||
<td align=center>{$nation}</td>
|
||||
<td align=center>".getHonor($general['experience'])."</td>
|
||||
<td align=center>".getDed($general['dedication'])."</td>
|
||||
<td align=center>";
|
||||
echo getLevel($general['level']);
|
||||
echo getLevelText($general['level']);
|
||||
echo "</td>
|
||||
<td align=center>$leader</td>
|
||||
<td align=center>$power</td>
|
||||
<td align=center>$leadership</td>
|
||||
<td align=center>$strength</td>
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['killturn']}</td>
|
||||
<td align=center>{$general['connect']}";
|
||||
|
||||
+41
-14
@@ -5,26 +5,36 @@ include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::getInstance()->setReadOnly();
|
||||
$seasonIdx = Util::getReq('seasonIdx', 'int', UniqueConst::$seasonIdx);
|
||||
$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;
|
||||
}
|
||||
$scenarioList = (function(){
|
||||
$db = DB::db();
|
||||
$scenarioList= [];
|
||||
foreach($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo){
|
||||
$seasonIdx = $scenarioInfo['season'];
|
||||
$scenarioIdx = $scenarioInfo['scenario'];
|
||||
if(!key_exists($seasonIdx, $scenarioList)){
|
||||
$scenarioList[$seasonIdx] = [];
|
||||
}
|
||||
$scenarioList[$seasonIdx][$scenarioIdx] = $scenarioInfo;
|
||||
}
|
||||
return $scenarioList;
|
||||
})();
|
||||
|
||||
|
||||
|
||||
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
|
||||
$searchScenarioName = $scenarioList[$scenarioIdx]['name'];
|
||||
$searchFilter = $db->sqleval('scenario = %i', $scenarioIdx);
|
||||
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
|
||||
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
|
||||
}
|
||||
else{
|
||||
$searchScenarioName = '* 모두 *';
|
||||
$searchFilter = $db->sqleval(true);
|
||||
$searchFilter = $db->sqleval('season = %i', $seasonIdx);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -53,12 +63,19 @@ else{
|
||||
<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 foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value=""
|
||||
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
|
||||
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
|
||||
<?php foreach($subScenarioList as $info): ?>
|
||||
<option
|
||||
data-season="<?=$iterSeasonIdx?>"
|
||||
value="<?=$info['scenario']?>"
|
||||
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
|
||||
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
?>
|
||||
</select>
|
||||
@@ -92,12 +109,22 @@ $types = [
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
$ownerNameList = [];
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
|
||||
foreach($types as $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){
|
||||
$hallResult = array_map(function($general)use($typeValue, $ownerNameList){
|
||||
$aux = Json::decode($general['aux']);
|
||||
$general += $aux;
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$general['owner_name'] = $ownerNameList[$general['owner']];
|
||||
}
|
||||
|
||||
if(!key_exists('bgColor', $general)){
|
||||
if(!key_exists('color', $general)){
|
||||
$general['bgColor'] = GameConst::$basecolor4;
|
||||
|
||||
+29
-26
@@ -7,15 +7,12 @@ $btn = Util::getReq('btn');
|
||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||
$serverID = Util::getReq('serverID', 'string', null);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
if(!$serverID){
|
||||
$serverID = UniqueConst::$serverID;
|
||||
@@ -27,9 +24,7 @@ if($serverID === UniqueConst::$serverID){
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -42,11 +37,16 @@ if ($con >= 2) {
|
||||
[$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;
|
||||
|
||||
if($s_year === null){
|
||||
echo '인자 에러';
|
||||
exit();
|
||||
}
|
||||
|
||||
[$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';
|
||||
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID)?:'che';
|
||||
}
|
||||
else{
|
||||
$mapTheme = $admin['map_theme']??'che';
|
||||
@@ -86,6 +86,8 @@ if ($month <= 0) {
|
||||
$month += 12;
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -96,15 +98,24 @@ if ($month <= 0) {
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 연감</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
|
||||
<?=WebUtil::printJS('js/history.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
|
||||
<script>
|
||||
var startYear = <?=$s_year?>;
|
||||
var startMonth = <?=$s_month?>;
|
||||
var lastYear = <?=$e_year?>;
|
||||
var lastMonth = <?=$e_month?>;
|
||||
var selectYear = <?=$year?>;
|
||||
var selectMonth = <?=$month?>;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -114,22 +125,9 @@ if ($month <= 0) {
|
||||
<form name=form1 method=post>
|
||||
년월 선택 :
|
||||
<input type=submit name=btn value="◀◀ 이전달">
|
||||
<select name=yearmonth size=1>
|
||||
<?php
|
||||
$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}>{$hYear}년 {$hMonth}월</option>";
|
||||
} else {
|
||||
echo "
|
||||
<option value={$value}>{$hYear}년 {$hMonth}월</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$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 id='yearmonth' name=yearmonth size=1>
|
||||
<option selected='selected'><?=$year?>년 <?=$month?>월</option>
|
||||
<option><?=$e_year?>년 12월</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
<input type=submit name=btn value="다음달 ▶▶">
|
||||
@@ -165,10 +163,15 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
reloadWorldMap({
|
||||
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
|
||||
showMe:false,
|
||||
neutralView:true
|
||||
neutralView:true,
|
||||
useCachedMap:false,
|
||||
year:<?=$year?>,
|
||||
month:<?=$month?>,
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
+77
-136
@@ -9,13 +9,10 @@ $userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력일람", 2);
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
@@ -28,10 +25,13 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력일람</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
|
||||
<?=WebUtil::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('js/ext.kingdoms.js')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -40,92 +40,51 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<tr><td>세 력 일 람<br><?=closeButton()?></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$query = "select nation,name,color,level,type,power,gennum,capital from nation order by power desc";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$count = MYDB_num_rows($result);
|
||||
|
||||
for($i=1; $i <= $count; $i++) {
|
||||
$nation = MYDB_fetch_array($result); //국가정보
|
||||
$nations = getAllNationStaticInfo();
|
||||
uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];});
|
||||
|
||||
$query = "select city,name from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
$nations[0] = getNationStaticInfo(0);
|
||||
|
||||
$query = "select npc,name,city from general where nation='{$nation['nation']}' and level='12'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level12 = MYDB_fetch_array($genresult);
|
||||
foreach($db->query('SELECT npc,name,city,nation,level,penalty,permission FROM general ORDER BY dedication DESC') as $general){
|
||||
$nationID = $general['nation'];
|
||||
|
||||
if(!key_exists('generals', $nations[$nationID])){
|
||||
$nations[$nationID]['generals'] = [];
|
||||
}
|
||||
$nations[$nationID]['generals'][] = $general;
|
||||
}
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='11'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level11 = MYDB_fetch_array($genresult);
|
||||
foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $nationID]) {
|
||||
if(!key_exists('cities', $nations[$nationID])){
|
||||
$nations[$nationID]['cities'] = [];
|
||||
}
|
||||
$nations[$nationID]['cities'][$cityID] = $cityName;
|
||||
}
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='10'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level10 = MYDB_fetch_array($genresult);
|
||||
foreach ($nations as $nation) {
|
||||
if ($nation['nation'] == 0) {
|
||||
//재야 도시, 장수
|
||||
continue;
|
||||
}
|
||||
$generals = $nation['generals'];
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='9'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level9 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='8'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level8 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='7'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level7 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='6'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level6 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' and level='5'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$level5 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select npc,name from general where nation='{$nation['nation']}' order by dedication desc"; // 장수 목록
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
if($level12['name'] == "") { $l12 = "-"; }
|
||||
elseif($level12['npc'] >= 2) { $l12 = "<font color=cyan>{$level12['name']}</font>"; }
|
||||
elseif($level12['npc'] == 1) { $l12 = "<font color=skyblue>{$level12['name']}</font>"; }
|
||||
else { $l12 = $level12['name']; }
|
||||
|
||||
if($level11['name'] == "") { $l11 = "-"; }
|
||||
elseif($level11['npc'] >= 2) { $l11 = "<font color=cyan>{$level11['name']}</font>"; }
|
||||
elseif($level11['npc'] == 1) { $l11 = "<font color=skyblue>{$level11['name']}</font>"; }
|
||||
else { $l11 = $level11['name']; }
|
||||
|
||||
if($level10['name'] == "") { $l10 = "-"; }
|
||||
elseif($level10['npc'] >= 2) { $l10 = "<font color=cyan>{$level10['name']}</font>"; }
|
||||
elseif($level10['npc'] == 1) { $l10 = "<font color=skyblue>{$level10['name']}</font>"; }
|
||||
else { $l10 = $level10['name']; }
|
||||
|
||||
if($level9['name'] == "") { $l9 = "-"; }
|
||||
elseif($level9['npc'] >= 2) { $l9 = "<font color=cyan>{$level9['name']}</font>"; }
|
||||
elseif($level9['npc'] == 1) { $l9 = "<font color=skyblue>{$level9['name']}</font>"; }
|
||||
else { $l9 = $level9['name']; }
|
||||
|
||||
if($level8['name'] == "") { $l8 = "-"; }
|
||||
elseif($level8['npc'] >= 2) { $l8 = "<font color=cyan>{$level8['name']}</font>"; }
|
||||
elseif($level8['npc'] == 1) { $l8 = "<font color=skyblue>{$level8['name']}</font>"; }
|
||||
else { $l8 = $level8['name']; }
|
||||
|
||||
if($level7['name'] == "") { $l7 = "-"; }
|
||||
elseif($level7['npc'] >= 2) { $l7 = "<font color=cyan>{$level7['name']}</font>"; }
|
||||
elseif($level7['npc'] == 1) { $l7 = "<font color=skyblue>{$level7['name']}</font>"; }
|
||||
else { $l7 = $level7['name']; }
|
||||
|
||||
if($level6['name'] == "") { $l6 = "-"; }
|
||||
elseif($level6['npc'] >= 2) { $l6 = "<font color=cyan>{$level6['name']}</font>"; }
|
||||
elseif($level6['npc'] == 1) { $l6 = "<font color=skyblue>{$level6['name']}</font>"; }
|
||||
else { $l6 = $level6['name']; }
|
||||
|
||||
if($level5['name'] == "") { $l5 = "-"; }
|
||||
elseif($level5['npc'] >= 2) { $l5 = "<font color=cyan>{$level5['name']}</font>"; }
|
||||
elseif($level5['npc'] == 1) { $l5 = "<font color=skyblue>{$level5['name']}</font>"; }
|
||||
else { $l5 = $level5['name']; }
|
||||
$chiefs = [];
|
||||
$ambassadors = [];
|
||||
$auditors = [];
|
||||
foreach($generals as $general){
|
||||
$generalLevel = $general['level'];
|
||||
if($generalLevel >= 5){
|
||||
$chiefs[$generalLevel] = $general;
|
||||
}
|
||||
$generalPermission = checkSecretPermission($general, false);
|
||||
if($generalPermission == 4){
|
||||
$ambassadors[] = $general['name'];
|
||||
}
|
||||
else if($generalPermission == 3){
|
||||
$auditors[] = $general['name'];
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
@@ -140,55 +99,48 @@ for($i=1; $i <= $count; $i++) {
|
||||
<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>
|
||||
<td width=170 align=center>".count($generals)." / ".count($nation['cities'])."</td>
|
||||
";
|
||||
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
|
||||
if($chiefLevel % 4 == 0){
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
$chief = $chiefs[$chiefLevel]??['name'=>'-','npc'=>0];
|
||||
$levelText = getLevelText($chiefLevel, $nation['level']);
|
||||
$chiefText = getColoredName($chief['name'], $chief['npc']);
|
||||
echo "<td class='center bg1'>{$levelText}</td>
|
||||
<td class='center'>{$chiefText}</td>";
|
||||
}
|
||||
echo "</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
|
||||
<td align=center>$l12</td>
|
||||
<td align=center id=bg1>".getLevel(11, $nation['level'])."</td>
|
||||
<td align=center>$l11</td>
|
||||
<td align=center id=bg1>".getLevel(10, $nation['level'])."</td>
|
||||
<td align=center>$l10</td>
|
||||
<td align=center id=bg1>".getLevel( 9, $nation['level'])."</td>
|
||||
<td align=center>$l9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>".getLevel( 8, $nation['level'])."</td>
|
||||
<td align=center>$l8</td>
|
||||
<td align=center id=bg1>".getLevel( 7, $nation['level'])."</td>
|
||||
<td align=center>$l7</td>
|
||||
<td align=center id=bg1>".getLevel( 6, $nation['level'])."</td>
|
||||
<td align=center>$l6</td>
|
||||
<td align=center id=bg1>".getLevel( 5, $nation['level'])."</td>
|
||||
<td align=center>$l5</td>
|
||||
</tr>
|
||||
<td align=center id=bg1>외교권자</td><td colspan=5>";
|
||||
echo join(', ', $ambassadors);
|
||||
echo "</td><td align=center id=bg1>조언자</td><td align=center >";
|
||||
echo count($auditors).'명';
|
||||
echo "</td></tr>
|
||||
<tr>
|
||||
<td colspan=8>";
|
||||
if($nation['level'] > 0) {
|
||||
echo "속령 일람 : ";
|
||||
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
if($city['city'] == $nation['capital']) {
|
||||
echo "<font color=cyan>[{$city['name']}]</font>, ";
|
||||
foreach($nation['cities'] as $cityID => $cityName) {
|
||||
if($cityID == $nation['capital']) {
|
||||
echo "<font color=cyan>[{$cityName}]</font>, ";
|
||||
} else {
|
||||
echo "{$city['name']}, ";
|
||||
echo "{$cityName}, ";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$query = "select name from city where city='{$level12['city']}'"; // 군주 위치 도시 이름
|
||||
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($cityResult);
|
||||
$cityName = CityConst::byID($chiefs[12]['city'])->name;
|
||||
|
||||
echo "현재 위치 : <font color=yellow>{$city['name']}</font>";
|
||||
echo "현재 위치 : <font color=yellow>{$cityName}</font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=8> 장수 일람 : ";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
foreach($generals as $general){
|
||||
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; }
|
||||
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; }
|
||||
else { echo "{$general['name']}, "; }
|
||||
@@ -201,14 +153,6 @@ for($i=1; $i <= $count; $i++) {
|
||||
}
|
||||
|
||||
//재야
|
||||
$query = "select npc,name from general where nation='0'"; // 장수 목록
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
$query = "select name from city where nation='0'"; // 도시 이름 목록
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
@@ -217,26 +161,23 @@ echo "
|
||||
<tr>
|
||||
<td width=498 align=center> </td>
|
||||
<td width=123 align=center id=bg1>장 수</td>
|
||||
<td width=123 align=center>{$gencount}</td>
|
||||
<td width=123 align=center>".count($nations[0]['generals'])."</td>
|
||||
<td width=123 align=center id=bg1>속 령</td>
|
||||
<td width=123 align=center>{$citycount}</td>
|
||||
<td width=123 align=center>".count($nations[0]['cities']??[])."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5> 속령 일람 : ";
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
echo "{$city['name']}, ";
|
||||
foreach($nations[0]['cities']??[] as $cityName) {
|
||||
echo "{$cityName}, ";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5> 장수 일람 : ";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
$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']}, "; }
|
||||
foreach($nations[0]['generals'] as $general) {
|
||||
$generalText = getColoredName($general['name'], $general['npc']);
|
||||
echo "{$generalText}, ";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
|
||||
+14
-17
@@ -6,8 +6,6 @@ include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 1);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
if($type <= 0 || $type > 8){
|
||||
$type = 1;
|
||||
}
|
||||
@@ -29,13 +27,12 @@ $sel[$type] = "selected";
|
||||
<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')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -65,14 +62,14 @@ foreach (getAllNationStaticInfo() as $nation) {
|
||||
|
||||
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;
|
||||
case 4: $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 leader"; break;
|
||||
case 5: $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 power"; break;
|
||||
case 6: $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 intel"; break;
|
||||
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;
|
||||
case 1: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+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,leadership,strength,intel,leadership+strength+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,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by sum desc"; break;
|
||||
case 4: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by leadership"; break;
|
||||
case 5: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by strength"; break;
|
||||
case 6: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by intel"; break;
|
||||
case 7: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+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,leadership,strength,intel,leadership+strength+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), "");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
@@ -112,10 +109,10 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
<td align=center>Lv {$general['explevel']}</td>
|
||||
<td align=center>{$nation}</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
|
||||
<td align=center>{$general['sum']}</td>
|
||||
<td align=center>{$general['leader']}</td>
|
||||
<td align=center>{$general['power']}</td>
|
||||
<td align=center>{$general['leadership']}</td>
|
||||
<td align=center>{$general['strength']}</td>
|
||||
<td align=center>{$general['intel']}</td>
|
||||
<td align=center>{$general['experience']}</td>
|
||||
<td align=center>{$general['dedication']}</td>
|
||||
|
||||
+7
-2
@@ -12,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력도", 2);
|
||||
checkTurn();
|
||||
TurnExecutionHelper::executeAllCommand();
|
||||
|
||||
$mapTheme = $gameStor->map_theme??'che';
|
||||
|
||||
@@ -31,20 +31,25 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력도</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
$(function(){
|
||||
|
||||
reloadWorldMap({
|
||||
neutralView:true,
|
||||
showMe:true
|
||||
showMe:true,
|
||||
useCachedMap:true
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
+7
-4
@@ -6,13 +6,12 @@ include "func.php";
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("갱신정보", 2);
|
||||
|
||||
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
|
||||
|
||||
$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
|
||||
$log = getRawFileLogRecent(__DIR__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
|
||||
|
||||
$date = [];
|
||||
$year = [];
|
||||
@@ -31,7 +30,7 @@ foreach($log as $i=>$value){
|
||||
}
|
||||
$year[] = $admin['year'];
|
||||
$month[] = $admin['month'];
|
||||
$date[] = date('Y-m-d H:i:s');
|
||||
$date[] = TimeUtil::now();
|
||||
|
||||
if ($admin['maxrefresh'] == 0) {
|
||||
$admin['maxrefresh'] = 1;
|
||||
@@ -53,6 +52,10 @@ if ($admin['maxonline'] < $curonline) {
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<style>
|
||||
@@ -166,7 +169,7 @@ $max_refresh['name'] = '접속자 총합';
|
||||
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
|
||||
|
||||
foreach ($refresh_result as $i=>$user) {
|
||||
$w = round($user['refresh'] / $max_refresh['refresh'] * 100, 1);
|
||||
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
|
||||
$w2 = round(100 - $w, 1);
|
||||
$color = getTrafficColor($w);
|
||||
?>
|
||||
|
||||
+11
-26
@@ -8,16 +8,13 @@ $session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("설문조사", 1);
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
|
||||
|
||||
$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']);
|
||||
$vote_title = $admin['vote_title']??'-';
|
||||
@@ -31,6 +28,10 @@ $vote = $admin['vote']?:['-'];
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<style>
|
||||
@@ -80,13 +81,8 @@ echo "
|
||||
</tr>
|
||||
";
|
||||
|
||||
$query = "select no from general where vote>0 and npc<2";
|
||||
$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), "");
|
||||
$allCount = MYDB_num_rows($result);
|
||||
$voteCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote>0 AND npc<2');
|
||||
$allCount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
||||
|
||||
$percentage = round($voteCount / $allCount * 100, 1);
|
||||
|
||||
@@ -102,9 +98,7 @@ for ($i=1; $i < $voteTypeCount; $i++) {
|
||||
<input type=radio name=sel value={$i}>
|
||||
";
|
||||
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
$query = "select no from general where vote='{$i}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$vCount = MYDB_num_rows($result);
|
||||
$vCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote=%i', $i);
|
||||
|
||||
$per = @round($vCount / $voteCount * 100, 1);
|
||||
echo "{$vCount} 표 ({$per}%)";
|
||||
@@ -264,9 +258,7 @@ if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
|
||||
}
|
||||
|
||||
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), "");
|
||||
$memCount = MYDB_num_rows($result);
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=0 AND npc <2');
|
||||
if ($memCount == 0) {
|
||||
$memCount = 1;
|
||||
}
|
||||
@@ -308,15 +300,8 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
|
||||
</tr>
|
||||
";
|
||||
|
||||
$query = "select nation,color,name,gennum from nation order by gennum desc";
|
||||
$nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$nationcount = MYDB_num_rows($nationResult);
|
||||
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), "");
|
||||
$memCount = MYDB_num_rows($result);
|
||||
foreach($db->query('SELECT nation,color,name,gennum from nation order by gennum desc') as $i=>$nation){
|
||||
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=%i AND npc<2', $nation['nation']);
|
||||
|
||||
|
||||
|
||||
|
||||
+14
-28
@@ -7,8 +7,6 @@ include "func.php";
|
||||
$msg = Util::getReq('msg');
|
||||
$msg2 = Util::getReq('msg2');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -29,17 +27,12 @@ if ($con >= 2) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$query = "select no from auction where no1='{$me['no']}'";
|
||||
$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), "");
|
||||
$bidCount = MYDB_num_rows($result);
|
||||
$tradeCount = $db->queryFirstField('SELECT count(no) FROM auction WHERE no1=%i', $me['no']);
|
||||
$bidCount = $db->queryFirstField('SELECT count(no) FROM auction where no2=%i', $me['no']);
|
||||
|
||||
$btCount = $tradeCount + $bidCount;
|
||||
|
||||
if ($session->userGrade >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
|
||||
if ($session->userGrade >= 5) {
|
||||
$btn = "submit";
|
||||
} else {
|
||||
$btn = "hidden";
|
||||
@@ -59,6 +52,10 @@ if ($msg2 == "") {
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
@@ -91,13 +88,12 @@ $count = MYDB_num_rows($result);
|
||||
$chk = 0;
|
||||
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) {
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value']) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
@@ -111,15 +107,13 @@ for ($i=0; $i < $count; $i++) {
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
if ($auction['stuff'] != 0) {
|
||||
$pv = '-';
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
|
||||
<td>{$auction['name1']}</td>
|
||||
<td>{$itemname}</td>
|
||||
<td>쌀</td>
|
||||
<td>{$auction['amount']}</td>
|
||||
<td>금 {$auction['cost']}</td>
|
||||
<td>{$alert}금 {$auction['value']}{$alert2}</td>
|
||||
@@ -146,9 +140,7 @@ for ($i=0; $i < $count; $i++) {
|
||||
<td align=center id=bg1>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: <select size=1 name=stuff style=color:white;background-color:black;>
|
||||
<option style=color:white; value=0>쌀</option>
|
||||
</select>
|
||||
물품: 쌀
|
||||
판매량: <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>
|
||||
@@ -189,13 +181,12 @@ $count = MYDB_num_rows($result);
|
||||
$chk = 0;
|
||||
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) {
|
||||
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2) {
|
||||
$radio = " disabled";
|
||||
$alert = "<font color=red>";
|
||||
$alert2 = "</font>";
|
||||
@@ -209,15 +200,12 @@ for ($i=0; $i < $count; $i++) {
|
||||
}
|
||||
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
|
||||
$pv = substr((string)$pv, 0, 4);
|
||||
if ($auction['stuff'] != 0) {
|
||||
$pv = '-';
|
||||
}
|
||||
echo "
|
||||
<tr align=center>
|
||||
<td>{$auction['no']}</td>
|
||||
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
|
||||
<td>{$auction['name1']}</td>
|
||||
<td>{$itemname}</td>
|
||||
<td>쌀</td>
|
||||
<td>{$auction['amount']}</td>
|
||||
<td>금 {$auction['cost']}</td>
|
||||
<td>{$alert}금 {$auction['value']}{$alert2}</td>
|
||||
@@ -244,9 +232,7 @@ for ($i=0; $i < $count; $i++) {
|
||||
<td align=center id=bg1>거래등록</td>
|
||||
<td colspan=10>
|
||||
종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
|
||||
물품: <select size=1 name=stuff style=color:white;background-color:black;>
|
||||
<option style=color:white; value=0>쌀</option>
|
||||
</select>
|
||||
물품: 쌀
|
||||
구입량: <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>
|
||||
|
||||
+81
-48
@@ -10,13 +10,36 @@ $v->rule('required', 'gen')
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$gen = Util::getReq('gen', 'int', 0);
|
||||
$type = Util::getReq('type', 'int', 0);
|
||||
$reqQueryType = Util::getReq('query_type', 'string', null);
|
||||
|
||||
if ($type < 0 || $type > 3) {
|
||||
$type = 0;
|
||||
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
|
||||
$queryMap = [
|
||||
'turntime' => ['최근턴', 0, function($lhs, $rhs){
|
||||
return -($lhs['turntime']<=>$rhs['turntime']);
|
||||
}],
|
||||
'recwar' => ['최근전투', 1, function($lhs, $rhs){
|
||||
return -($lhs['recwar']<=>$rhs['recwar']);
|
||||
}],
|
||||
'name' => ['장수명', 0, function($lhs, $rhs){
|
||||
if($lhs['npc'] !== $rhs['npc']){
|
||||
return $lhs['npc']<=>$rhs['npc'];
|
||||
}
|
||||
return $lhs['name']<=>$rhs['name'];
|
||||
}],
|
||||
'warnum' => ['전투수', 1, function($lhs, $rhs){
|
||||
return -($lhs['warnum']<=>$rhs['warnum']);
|
||||
}]
|
||||
];
|
||||
|
||||
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
|
||||
$reqQueryType = Util::array_first_key($queryMap);
|
||||
}
|
||||
|
||||
|
||||
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
|
||||
$reqQueryType = Util::array_first_key($queryMap);
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
@@ -28,14 +51,14 @@ $connect=$db->get();
|
||||
|
||||
increaseRefresh("감찰부", 2);
|
||||
//전투 추진을 위해 갱신
|
||||
checkTurn();
|
||||
TurnExecutionHelper::executeAllCommand();
|
||||
$gameStor->resetCache();
|
||||
|
||||
$query = "select nation from general where no='$gen'";
|
||||
$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='{$userID}'";
|
||||
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -49,11 +72,14 @@ if ($con >= 2) {
|
||||
exit();
|
||||
}
|
||||
|
||||
//재야인 경우
|
||||
$meLevel = $me['level'];
|
||||
if ($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
|
||||
//잘못된 접근
|
||||
@@ -65,9 +91,39 @@ if ($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
$sel = [];
|
||||
$sel[$type] = "selected";
|
||||
|
||||
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
|
||||
if($reqArgType===0){
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime FROM general');
|
||||
}
|
||||
else if($reqArgType===1){
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime, %b FROM general', $reqQueryType);
|
||||
}
|
||||
else if($reqArgType===2){
|
||||
$generalBasicList = $db->query('SELECT no, name, npc, turntime, value as %b
|
||||
FROM general LEFT JOIN rank_data
|
||||
ON general.no = rank_data.general_id
|
||||
WHERE rank_data.type = %b',
|
||||
$reqQueryType, $reqQueryType
|
||||
);
|
||||
}
|
||||
else if($reqArgType===3){
|
||||
$generalBasicList = array_map(function($arr){
|
||||
$arr['aux'] = Json::decode($arr['aux']);
|
||||
return $arr;
|
||||
}, $db->query('SELECT no, name, npc, turntime, aux FROM general'));
|
||||
}
|
||||
else{
|
||||
throw new \sammo\MustNotBeReachedException();
|
||||
}
|
||||
|
||||
|
||||
usort($generalBasicList, $comp);
|
||||
|
||||
if(!$gen){
|
||||
$gen = $generalBasicList[0]['no'];
|
||||
}
|
||||
$showGeneral = General::createGeneralObjFromDB($gen);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -77,6 +133,10 @@ $sel[$type] = "selected";
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -89,43 +149,16 @@ $sel[$type] = "selected";
|
||||
<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>
|
||||
<?php foreach($queryMap as $queryType => [$queryTypeText,]): ?>
|
||||
<option <?=$queryKey==$reqQueryType?'selected':''?> value='<?=$queryKey?>'><?=$queryTypeText?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
대상장수 :
|
||||
<select name=gen size=1>
|
||||
<?php
|
||||
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), "");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
$npc = 0;
|
||||
for ($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
// 선택 없으면 맨 처음 장수
|
||||
if ($gen == 0) {
|
||||
$gen = $general['no'];
|
||||
}
|
||||
if($gen == $general['no']){
|
||||
$npc = $general['npc'];
|
||||
}
|
||||
if ($gen == $general['no']) {
|
||||
echo "
|
||||
<option selected value={$general['no']}>{$general['name']}</option>";
|
||||
} else {
|
||||
echo "
|
||||
<option value={$general['no']}>{$general['name']}</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php foreach($generalBasicList as $general): ?>
|
||||
<option <?=$gen==$general['no']?'selected':''?>><?=$general['name']?> (<?=$general['turntime']?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type=submit name=btn value='조회하기'>
|
||||
</form>
|
||||
@@ -138,7 +171,7 @@ for ($i=0; $i < $gencount; $i++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?php generalInfo($gen); generalInfo2($gen); ?>
|
||||
<?php generalInfo($showGeneral); generalInfo2($showGeneral); ?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?=getGeneralHistoryAll($gen)?>
|
||||
@@ -156,7 +189,7 @@ for ($i=0; $i < $gencount; $i++) {
|
||||
<?=getBatResRecent($gen, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($npc > 1): ?>
|
||||
<?php if($npc > 1 || $permission >= 2): ?>
|
||||
<tr>
|
||||
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
|
||||
<td align=center id=bg1><font color=orange size=3> </font></td>
|
||||
|
||||
+30
-32
@@ -12,17 +12,20 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("베팅장", 1);
|
||||
checkTurn();
|
||||
TurnExecutionHelper::executeAllCommand();
|
||||
|
||||
$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);
|
||||
$generalID = $session->generalID;
|
||||
|
||||
$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'];
|
||||
//NOTE: general_id만 빼기 귀찮음.
|
||||
$myBet = array_splice($db->queryFirstList('SELECT * FROM betting WHERE general_id = %i', $generalID), -16);
|
||||
$globalBet = array_splice($db->queryFirstList('SELECT * FROM betting WHERE general_id = 0'), -16);
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,tournament,con,turntime from general where owner=%i', $userID);
|
||||
|
||||
$myBetTotal = array_sum($myBet);
|
||||
$globalBetTotal = array_sum($globalBet);
|
||||
|
||||
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost']);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -32,10 +35,10 @@ if ($con >= 2) {
|
||||
|
||||
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;
|
||||
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break;
|
||||
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break;
|
||||
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break;
|
||||
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break;
|
||||
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "지력"; $tp3 = "intel"; break;
|
||||
}
|
||||
|
||||
$str1 = getTournament($admin['tournament']);
|
||||
@@ -59,6 +62,11 @@ if($str3){
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 베팅장</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/betting.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
@@ -70,7 +78,7 @@ if($str3){
|
||||
<table align=center width=1120 class='tb_layout bg0'>
|
||||
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr>
|
||||
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
|
||||
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$admin['bet']?> / 내 투자 금액 : <?=$me['bet']?>)</font></td></tr>
|
||||
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr>
|
||||
</table>
|
||||
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
|
||||
<tr align=center><td height=10 colspan=16></td></tr>
|
||||
@@ -278,23 +286,16 @@ 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='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
$myBet = [];
|
||||
$bet = [];
|
||||
$gold = [];
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
$myBet[$i] = $me["bet{$i}"];
|
||||
}
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
if($admin["bet{$i}"] == 0){
|
||||
if($globalBet[$i] == 0){
|
||||
$bet[$i] = "∞";
|
||||
}
|
||||
else{
|
||||
$bet[$i] = round($admin['bet'] / $admin["bet{$i}"], 2);
|
||||
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,13 +349,12 @@ echo "
|
||||
|
||||
if ($admin['tournament'] == 6) {
|
||||
echo "
|
||||
<form method=post action=c_betting.php>
|
||||
<tr align=center>";
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td>
|
||||
<select size=1 name=gold{$i} style=color:white;background-color:black;>
|
||||
<select size=1 id='target_{$i}' style=color:white;background-color:black;>
|
||||
<option style=color:white; value=10>금10</option>
|
||||
<option style=color:white; value=20>금20</option>
|
||||
<option style=color:white; value=50>금50</option>
|
||||
@@ -372,12 +372,10 @@ if ($admin['tournament'] == 6) {
|
||||
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
echo "
|
||||
<td><input type=submit name=btn{$i} value=베팅! style=width:100%;color:white;background-color:black;></td>";
|
||||
<td><input type=button class='submitBtn' data-target='{$i}' value=베팅! style=width:100%;color:white;background-color:black;></td>";
|
||||
}
|
||||
|
||||
echo "
|
||||
</tr>
|
||||
</form>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -397,8 +395,8 @@ if ($admin['tournament'] == 6) {
|
||||
|
||||
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
|
||||
$type2 = array("종합", "통솔", "무력", "지력");
|
||||
$type3 = array("tt", "tl", "tp", "ti");
|
||||
$type4 = array("total", "leader", "power", "intel");
|
||||
$type3 = array("tt", "tl", "ts", "ti");
|
||||
$type4 = array("total", "leadership", "strength", "intel");
|
||||
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
$grp = $i;
|
||||
@@ -408,7 +406,7 @@ for ($i=0; $i < 4; $i++) {
|
||||
<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";
|
||||
$query = "select npc,name,leadership,strength,intel,leadership+strength+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++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("기밀실", 1);
|
||||
|
||||
$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'] < 5) {
|
||||
echo "수뇌부가 아닙니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 기밀실</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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:830px;>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<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>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//20개 메세지
|
||||
$index = $nation['coreindex'];
|
||||
for($i=0; $i < 20; $i++) {
|
||||
$who = "coreboard{$index}_who";
|
||||
$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($nation["coreboard{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["coreboard{$index}_when"], $index, 1); }
|
||||
$index--;
|
||||
if($index < 0) { $index = 19; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+84
-167
@@ -6,73 +6,7 @@ include "func.php";
|
||||
//로그인 검사
|
||||
$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,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),"");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
|
||||
|
||||
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
}
|
||||
|
||||
if($me['level'] >= 5) { $btn = "submit"; $btn2 = "button"; }
|
||||
else { $btn = "hidden"; $btn2 = "hidden"; }
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
|
||||
// 명령 목록
|
||||
$admin = $gameStor->getValues(['year','month','turnterm']);
|
||||
|
||||
$query = "
|
||||
select nation,level,
|
||||
l12turn0,l12turn1,l12turn2,l12turn3,l12turn4,l12turn5,l12turn6,l12turn7,l12turn8,l12turn9,l12turn10,l12turn11,
|
||||
l11turn0,l11turn1,l11turn2,l11turn3,l11turn4,l11turn5,l11turn6,l11turn7,l11turn8,l11turn9,l11turn10,l11turn11,
|
||||
l10turn0,l10turn1,l10turn2,l10turn3,l10turn4,l10turn5,l10turn6,l10turn7,l10turn8,l10turn9,l10turn10,l10turn11,
|
||||
l9turn0, l9turn1, l9turn2, l9turn3, l9turn4, l9turn5, l9turn6, l9turn7, l9turn8, l9turn9, l9turn10, l9turn11,
|
||||
l8turn0, l8turn1, l8turn2, l8turn3, l8turn4, l8turn5, l8turn6, l8turn7, l8turn8, l8turn9, l8turn10, l8turn11,
|
||||
l7turn0, l7turn1, l7turn2, l7turn3, l7turn4, l7turn5, l7turn6, l7turn7, l7turn8, l7turn9, l7turn10, l7turn11,
|
||||
l6turn0, l6turn1, l6turn2, l6turn3, l6turn4, l6turn5, l6turn6, l6turn7, l6turn8, l6turn9, l6turn10, l6turn11,
|
||||
l5turn0, l5turn1, l5turn2, l5turn3, l5turn4, l5turn5, l5turn6, l5turn7, l5turn8, l5turn9, l5turn10, l5turn11
|
||||
from nation where nation='{$me['nation']}'";
|
||||
$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($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)??[
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'turntime'=>''
|
||||
];
|
||||
}
|
||||
for($i= $lv - 1; $i>=5; $i--){
|
||||
$gen[$i] = [
|
||||
'npc'=>0,
|
||||
'name'=>'',
|
||||
'turntime'=>''
|
||||
];
|
||||
}
|
||||
|
||||
$generalObj = General::createGeneralObjFromDB($session->generalID);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -81,114 +15,97 @@ for($i= $lv - 1; $i>=5; $i--){
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/chiefCenter.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/chiefCenter.css')?>
|
||||
<script type="text/javascript">
|
||||
function turn(type) {
|
||||
if(type == 0) location.replace('turn_push_core.php');
|
||||
else if(type == 1) location.replace('turn_pop_core.php');
|
||||
}
|
||||
var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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 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>"; }
|
||||
|
||||
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 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);
|
||||
$j = $i + 1;
|
||||
$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=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($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:".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();
|
||||
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 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?></td></tr>
|
||||
</table>
|
||||
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
|
||||
<div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br>
|
||||
<?=backButton()?></div>
|
||||
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
|
||||
<div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
|
||||
><div class='chiefTurnIdxPanel'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(range(1, 12) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?>
|
||||
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
|
||||
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div
|
||||
<?php foreach(range(1, GameConst::$maxChiefTurn) as $turnIdx): ?>
|
||||
><div class='chiefTurnBox turn<?=$turnIdx?>'
|
||||
><div class='chiefTurnTime'> </div
|
||||
><div class='chiefTurnPad'><span class='chiefTurnText'> </span></div
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
><div class='chiefTurnIdxPanel tail'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(range(1, GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
></div
|
||||
><div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'
|
||||
><div style='width:400px;text-align:right;'
|
||||
><?=chiefTurnTable()
|
||||
?></div
|
||||
><div style='width:400px;display: flex;justify-content: center;flex-direction: column;'
|
||||
><div
|
||||
><input type='button' id='turnPush' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='미루기▼'
|
||||
><input type='button' id='turnPull' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='▲당기기'
|
||||
></div
|
||||
><div
|
||||
><?=chiefCommandTable($generalObj)
|
||||
?><input type='button' id='setCommand' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='실 행'
|
||||
></div
|
||||
></div
|
||||
></div
|
||||
><div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
|
||||
><div class='chiefTurnIdxPanel'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(range(1, GameConst::$maxChiefTurn) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
|
||||
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
|
||||
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'> </span></div
|
||||
<?php foreach(range(1, GameConst::$maxChiefTurn) as $turnIdx): ?>
|
||||
><div class='chiefTurnBox turn<?=$turnIdx?>'
|
||||
><div class='chiefTurnTime'> </div
|
||||
><div class='chiefTurnPad'><span class='chiefTurnText'> </span></div
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
<?php endforeach; ?>
|
||||
><div class='chiefTurnIdxPanel tail'
|
||||
><div class='bg1 chiefTurnIdx'>.</div
|
||||
<?php foreach(range(1, 12) as $idx):?>
|
||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
||||
<?php endforeach; ?>
|
||||
></div
|
||||
></div
|
||||
><div
|
||||
><?=backButton()
|
||||
?><?=banner()
|
||||
?></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+298
-182
@@ -6,11 +6,10 @@ include "func.php";
|
||||
|
||||
$citylist = Util::getReq('citylist', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
$userGrade = Session::getUserGrade();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
@@ -34,6 +33,14 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/currentCity.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<style>
|
||||
@@ -60,8 +67,9 @@ $templates = new \League\Plates\Engine('templates');
|
||||
<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:798px;>
|
||||
<form name=cityselect method=get>
|
||||
<div style='text-align:center;'>도시선택 :
|
||||
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
|
||||
<?php
|
||||
if(!$citylist){
|
||||
$citylist = $me['city'];
|
||||
@@ -76,11 +84,11 @@ if($me['level'] == 0) {
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
} else {
|
||||
// 아국 도시들 선택
|
||||
$query = "select city,name,nation from city where nation='{$me['nation']}'";
|
||||
@@ -92,11 +100,11 @@ if($me['level'] == 0) {
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
|
||||
// 아국 장수가 있는 타국 도시들 선택
|
||||
@@ -109,11 +117,11 @@ if($me['level'] == 0) {
|
||||
echo "
|
||||
<option value={$city['city']}";
|
||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,13 +133,6 @@ if($myNation['level'] > 0) {
|
||||
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));
|
||||
}
|
||||
@@ -141,19 +142,18 @@ if($myNation['level'] > 0) {
|
||||
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, '_')."】";
|
||||
echo ">【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||
if($city['nation'] == 0) echo "공백지";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||
else echo "타국==";
|
||||
echo "============================================</option>";
|
||||
elseif($me['nation'] == $city['nation']) echo "본국";
|
||||
else echo "타국";
|
||||
echo "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "
|
||||
</select>
|
||||
<input type=submit value='도 시 선 택'>
|
||||
</select></div>
|
||||
<p align=center>명령 화면에서 도시를 클릭하셔도 됩니다.</p>
|
||||
</form>
|
||||
</td>
|
||||
@@ -164,22 +164,245 @@ echo "
|
||||
unset($city);
|
||||
|
||||
// 첩보된 도시까지만 허용
|
||||
if($valid == 0 && $session->userGrade < 5) {
|
||||
if($valid == 0 && $userGrade < 5) {
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
|
||||
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
|
||||
$nation = getNationStaticInfo($city['nation']);
|
||||
$cityNation = getNationStaticInfo($city['nation']);
|
||||
|
||||
//태수, 군사, 시중
|
||||
$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']);
|
||||
//태수, 군사, 종사
|
||||
$officer = [
|
||||
4=>['name'=>'-', 'npc'=>0],
|
||||
3=>['name'=>'-', 'npc'=>0],
|
||||
2=>['name'=>'-', 'npc'=>0]
|
||||
];
|
||||
$officerQuery = [];
|
||||
if($city['officer4']){ $officerQuery[] = $city['officer4']; }
|
||||
if($city['officer3']){ $officerQuery[] = $city['officer3']; }
|
||||
if($city['officer2']){ $officerQuery[] = $city['officer2']; }
|
||||
if($officerQuery){
|
||||
foreach($db->query('SELECT `name`, npc, `level` FROM general WHERE `no` IN %li', $city['officer4']) as $officerInfo){
|
||||
$officer[$officerInfo['level']] = $officerInfo;
|
||||
}
|
||||
}
|
||||
|
||||
if($city['trade'] == 0) {
|
||||
if($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
$query = "select npc,defence_train,no,picture,imgsvr,name,injury,leadership,strength,intel,level,nation,crewtype,crew,train,atmos 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);
|
||||
|
||||
$generals = $db->query(
|
||||
'SELECT npc,defence_train,no,picture,imgsvr,name,injury,leadership,strength,intel,level,nation,crewtype,crew,train,atmos from general where city=%i order by name',
|
||||
$city['city']
|
||||
);
|
||||
|
||||
$generalTurnList = [];
|
||||
|
||||
foreach($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]
|
||||
){
|
||||
if(!key_exists($generalID, $generalTurnList)){
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
$nationname = [];
|
||||
$nationlevel = [];
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
$nationname[$nation['nation']] = $nation['name'];
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
|
||||
$generalsFormat = [];
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if($userGrade == 6){
|
||||
$ourGeneral = true;
|
||||
}
|
||||
|
||||
$isNPC = $general['npc']>1;
|
||||
$wounded = $general['injury'];
|
||||
|
||||
|
||||
$name = $general['name'];
|
||||
$nameText = formatName($name, $general['npc']);
|
||||
|
||||
$leadership = $general['leadership'];
|
||||
$strength = $general['strength'];
|
||||
$intel = $general['intel'];
|
||||
|
||||
$leadershipText = formatWounded($leadership, $general['injury']);
|
||||
$strengthText = formatWounded($strength, $general['injury']);
|
||||
$intelText = formatWounded($intel, $general['injury']);
|
||||
|
||||
$level = $general['level'];
|
||||
$levelText = getLevelText($general['level']);
|
||||
|
||||
if($general['level'] == 12) {
|
||||
$leadershipBonus = $nationInfo['level'] * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
$leadershipBonus = $nationInfo['level'];
|
||||
} else {
|
||||
$leadershipBonus = 0;
|
||||
}
|
||||
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
|
||||
|
||||
if($ourGeneral){
|
||||
$defenceTrain = $general['defence_train'];
|
||||
$defenceTrainText = formatDefenceTrain($defenceTrain);
|
||||
$crewType = $general['crewtype'];
|
||||
$crewTypeText = GameUnitConst::byId($crewType)->name;
|
||||
$crew = $general['crew'];
|
||||
$train = $general['train'];
|
||||
$atmos = $general['atmos'];
|
||||
}
|
||||
else{
|
||||
$defenceTrain = 0;
|
||||
$defenceTrainText = '';
|
||||
$crewType = 0;
|
||||
$crewTypeText = '';
|
||||
$crew = $general['crew'];
|
||||
$train = -1;
|
||||
$atmos = -1;
|
||||
}
|
||||
|
||||
$nation = $general['nation'];
|
||||
$nationName = $nationInfo['name'];
|
||||
|
||||
if($ourGeneral && !$isNPC){
|
||||
$turnText = [];
|
||||
$generalObj = new General($general, null, null, null, false);
|
||||
foreach($generalTurnList[$generalObj->getID()] as $turnRawIdx=>$turn){
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turnText[] = "{$turnIdx} : $turn";
|
||||
}
|
||||
$turnText = join('<br>', $turnText);
|
||||
}
|
||||
else{
|
||||
$turnText = '';
|
||||
}
|
||||
|
||||
$generalsFormat[] = [
|
||||
'ourGeneral'=>$ourGeneral,
|
||||
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
|
||||
'isNPC'=>$isNPC,
|
||||
'wounded'=>$wounded,
|
||||
'name'=>$name,
|
||||
'nameText'=>$nameText,
|
||||
'leadership'=>$leadership,
|
||||
'leadershipText'=>$leadershipText,
|
||||
'leadershipBonus'=>$leadershipBonus,
|
||||
'leadershipBonusText'=>$leadershipBonusText,
|
||||
'level'=>$level,
|
||||
'levelText'=>$levelText,
|
||||
'strength'=>$strength,
|
||||
'strengthText'=>$strengthText,
|
||||
'intel'=>$intel,
|
||||
'intelText'=>$intelText,
|
||||
'defenceTrain'=>$defenceTrain,
|
||||
'defenceTrainText'=>$defenceTrainText,
|
||||
'crewType'=>$crewType,
|
||||
'crewTypeText'=>$crewTypeText,
|
||||
'crew'=>$crew,
|
||||
'train'=>$train,
|
||||
'atmos'=>$atmos,
|
||||
'nation'=>$nation,
|
||||
'nationName'=>$nationName,
|
||||
'turnText'=>$turnText
|
||||
];
|
||||
}
|
||||
|
||||
$generalsName = array_map(function($gen){return $gen['name'];}, $generalsFormat);
|
||||
|
||||
$enemyCrew = 0;
|
||||
$enemyCnt = 0;
|
||||
$enemyArmedCnt = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
|
||||
$crewDef = 0;
|
||||
$genDef = 0 ;
|
||||
|
||||
$crewTotal = 0;
|
||||
$armedGenTotal = 0;
|
||||
$genTotal = 0;
|
||||
|
||||
|
||||
foreach($generalsFormat as $general){
|
||||
if($general['nation'] == 0){
|
||||
continue;
|
||||
}
|
||||
if($general['nation'] != $myNation['nation']){
|
||||
$enemyCnt += 1;
|
||||
$enemyCrew += $general['crew'];
|
||||
if($general['crew'] > 0){
|
||||
$enemyArmedCnt += 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$crewTotal += $general['crew'];
|
||||
$genTotal += 1;
|
||||
|
||||
if($general['crew'] == 0){
|
||||
continue;
|
||||
}
|
||||
$armedGenTotal += 1;
|
||||
|
||||
$minTrain = min($general['train'], $general['atmos']);
|
||||
|
||||
if($minTrain >= 90){
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
}
|
||||
|
||||
$chkDef = false;
|
||||
|
||||
if($minTrain >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
}
|
||||
|
||||
if($minTrain >= 60){
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
}
|
||||
|
||||
if($minTrain >= $general['defenceTrain']){
|
||||
$crewDef += $general['crew'];
|
||||
$genDef += 1;
|
||||
$chkDef = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
@@ -188,54 +411,57 @@ if($city['trade'] == 0) {
|
||||
|
||||
<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>
|
||||
<td colspan=11 align=center style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>'>【 <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
|
||||
<td style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>' class='center'><?=date('m-d H:i:s')?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=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>
|
||||
<td align=center width=48 class=bg1>주민</td>
|
||||
<td align=center width=112><?=$city['pop']?>/<?=$city['pop_max']?></td>
|
||||
<td align=center width=48 class=bg1>농업</td>
|
||||
<td align=center width=108><?=$city['agri']?>/<?=$city['agri_max']?></td>
|
||||
<td align=center width=48 class=bg1>상업</td>
|
||||
<td align=center width=108><?=$city['comm']?>/<?=$city['comm_max']?></td>
|
||||
<td align=center width=48 class=bg1>치안</td>
|
||||
<td align=center width=108><?=$city['secu']?>/<?=$city['secu_max']?></td>
|
||||
<td align=center width=48 class=bg1>수비</td>
|
||||
<td align=center width=108><?=$city['def']?>/<?=$city['def_max']?></td>
|
||||
<td align=center width=48 class=bg1>성벽</td>
|
||||
<td align=center width=108><?=$city['wall']?>/<?=$city['wall_max']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>민심</td>
|
||||
<td align=center><?=$city['rate']?></td>
|
||||
<td align=center><?=round($city['trust'], 1)?></td>
|
||||
<td align=center class=bg1>시세</td>
|
||||
<td align=center><?=$city['trade']?>%</td>
|
||||
<td align=center class=bg1>인구</td>
|
||||
<td align=center><?=round($city['pop']/$city['pop2']*100, 2)?>%</td>
|
||||
<td align=center><?=round($city['pop']/$city['pop_max']*100, 2)?>%</td>
|
||||
<td align=center class=bg1>태수</td>
|
||||
<td align=center><?=$gen1['name']??'-'?></td>
|
||||
<td align=center><?=$officer[4]['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>
|
||||
<td align=center><?=$officer[3]['name']?></td>
|
||||
<td align=center class=bg1>종사</td>
|
||||
<td align=center><?=$officer[2]['name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>도시명</td>
|
||||
<td align=center><?=$city['name']?></td>
|
||||
<td align=center class=bg1>적군</td>
|
||||
<td align=center><?=number_format($enemyCrew)?>/<?=number_format($enemyArmedCnt)?>(<?=number_format($enemyCnt)?>)</td>
|
||||
<td align=center class=bg1>병장(총)</td>
|
||||
<td align=center><?=number_format($crewTotal)?>/<?=number_format($armedGenTotal)?>(<?=number_format($genTotal)?>)</td>
|
||||
<td align=center class=bg1>90병장</td>
|
||||
<td align=center><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
|
||||
<td align=center class=bg1>60병장</td>
|
||||
<td align=center><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
|
||||
<td align=center class=bg1>수비○</td>
|
||||
<td align=center><?=number_format($crewDef)?>/<?=number_format($genDef)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center class=bg1>장수</td>
|
||||
<td colspan=11>
|
||||
<?php
|
||||
$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 "-";
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
echo "{$general['name']}, ";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td colspan=11><?=join(', ', $generalsName)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
<table align=center class='tb_layout bg0'>
|
||||
<thead>
|
||||
@@ -252,121 +478,11 @@ if($city['trade'] == 0) {
|
||||
<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'>
|
||||
|
||||
</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'];
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
$leadershipBonus = $nationInfo['level'] * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
$leadershipBonus = $nationInfo['level'];
|
||||
} else {
|
||||
$leadershipBonus = 0;
|
||||
}
|
||||
$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;
|
||||
}
|
||||
|
||||
$nation = $general['nation'];
|
||||
$nationName = $nationInfo['name'];
|
||||
|
||||
if($ourGeneral && !$isNPC){
|
||||
$turnText = [];
|
||||
foreach(getTurn($general, 1) as $turnRawIdx=>$turn){
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turnText[] = "{$turnIdx} : $turn";
|
||||
}
|
||||
$turnText = join('<br>', $turnText);
|
||||
}
|
||||
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
|
||||
]);
|
||||
foreach($generalsFormat as $general){
|
||||
echo $templates->render('cityGeneral', $general);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
+125
-148
@@ -13,13 +13,10 @@ $connect=$db->get();
|
||||
|
||||
increaseRefresh("내무부", 1);
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT no, nation, level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$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);
|
||||
$nationID = $me['nation'];
|
||||
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,msg,scoutmsg,capital FROM nation WHERE nation = %i', $nationID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -27,9 +24,14 @@ if ($con >= 2) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
|
||||
if ($me['level'] >= 5) {
|
||||
@@ -48,13 +50,26 @@ if ($me['level'] >= 5) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||
<script>
|
||||
var editable = <?=(($me['level']>=5||$permission==4)?'true':'false')?>;
|
||||
var nationMsg = <?=Json::encode($nation['msg']??'')?>;
|
||||
var scoutmsg = <?=Json::encode($nation['scoutmsg']??'')?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/summernote-bs4.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/lang/summernote-ko-KR.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/summernote/plugin/image-sammo/summernote-image-flip.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/dipcenter.js')?>
|
||||
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
<?=WebUtil::printCSS('css/dipcenter.css')?>
|
||||
<link href="https://fonts.googleapis.com/css?family=Nanum+Gothic|Nanum+Myeongjo|Nanum+Pen+Script" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -71,162 +86,124 @@ if ($me['level'] >= 5) {
|
||||
<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
|
||||
$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), "");
|
||||
$nationcount = MYDB_num_rows($result);
|
||||
for ($i=0; $i < $nationcount; $i++) {
|
||||
$nation = MYDB_fetch_array($result);
|
||||
$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
|
||||
$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
|
||||
|
||||
// 아국표시
|
||||
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), "");
|
||||
$citycount = MYDB_num_rows($result2);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</td>
|
||||
<td align=center>{$nation['power']}</td>
|
||||
<td align=center>{$nation['gennum']}</td>
|
||||
<td align=center>$citycount</td>
|
||||
<td align=center>-</td>
|
||||
<td align=center>-</td>
|
||||
<td align=center>-</td>
|
||||
<td align=left style=font-size:7px;>-</td>
|
||||
</tr>";
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$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), "");
|
||||
$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), "");
|
||||
$dip2 = MYDB_fetch_array($result2);
|
||||
foreach(getAllNationStaticInfo() as $staticNation):
|
||||
//속령수
|
||||
$query = "select city from city where nation='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$citycount = MYDB_num_rows($result2);
|
||||
switch ($dip['state']) {
|
||||
case 0: $state = "<font color=red>교 전</font>"; break;
|
||||
case 1: $state = "<font color=magenta>선포중</font>"; break;
|
||||
case 2: $state = "통 상"; break;
|
||||
case 3: $state = "<font color=cyan>통합수락중</font>"; break;
|
||||
case 4: $state = "<font color=cyan>통합제의중</font>"; break;
|
||||
case 5: $state = "<font color=cyan>합병수락중</font>"; break;
|
||||
case 6: $state = "<font color=cyan>합병제의중</font>"; break;
|
||||
case 7: $state = "<font color=green>불가침</font>"; break;
|
||||
}
|
||||
$staticNationID = $staticNation['nation'];
|
||||
$cityCnt = $cityCntList[$staticNation['nation']];
|
||||
|
||||
$term = $admin['year'] * 12 + $admin['month'] + $dip['term'];
|
||||
$year = intdiv($term, 12);
|
||||
$month = $term % 12;
|
||||
$dipStateText = '-';
|
||||
$dipTermText = '-';
|
||||
$dipEndDateText = '-';
|
||||
if($staticNationID !== $nationID){
|
||||
$diplomacyState = $dipStateList[$staticNationID];
|
||||
|
||||
if ($month == 0) {
|
||||
$month = 12;
|
||||
$year--;
|
||||
}
|
||||
$dipStateText = [
|
||||
0 => "<font color=red>교 전</font>",
|
||||
1 => "<font color=magenta>선포중</font>",
|
||||
2 => "통 상",
|
||||
3 => "<font color=cyan>통합수락중</font>",
|
||||
4 => "<font color=cyan>통합제의중</font>",
|
||||
5 => "<font color=cyan>합병수락중</font>",
|
||||
6 => "<font color=cyan>합병제의중</font>",
|
||||
7 => "<font color=green>불가침</font>",
|
||||
][$diplomacyState['state']];
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$note = "";
|
||||
if ($dip['fixed'] != "") {
|
||||
if ($dip['state'] == 7) {
|
||||
$note .= $dip['fixed'];
|
||||
} else {
|
||||
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
||||
}
|
||||
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
if($diplomacyState['term']){
|
||||
$dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1;
|
||||
$dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12);
|
||||
$dipEndMonth = $dipEndMonth % 12 + 1;
|
||||
|
||||
$dipTermText = $diplomacyState['term'].'개월';
|
||||
$dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月";
|
||||
}
|
||||
}
|
||||
if ($dip['showing'] >= $date) {
|
||||
if ($dip['reserved'] != "") {
|
||||
$note .= "<font color=skyblue>아국측 제의</font>: ".$dip['reserved'];
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($dip2['showing'] >= $date) {
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<font color=limegreen>상대측 제의</font>: ".$dip2['reserved'];
|
||||
}
|
||||
}
|
||||
if ($note == "") {
|
||||
$note = " ";
|
||||
}
|
||||
?>
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</td>
|
||||
<td align=center>{$nation['power']}</td>
|
||||
<td align=center>{$nation['gennum']}</td>
|
||||
<td align=center>$citycount</td>
|
||||
<td align=center>$state</td>";
|
||||
if ($dip['term'] != 0) {
|
||||
echo"
|
||||
<td align=center>{$dip['term']} 개월</td>
|
||||
<td align=center>{$year}年 {$month}月</td>";
|
||||
} else {
|
||||
echo"
|
||||
<td align=center>-</td>
|
||||
<td align=center>-</td>";
|
||||
}
|
||||
echo "
|
||||
<td align=left style=font-size:7px;>{$note}</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td class='center' style='color:<?=newColor($staticNation['color'])?>;background-color:<?=$staticNation['color']?>'><?=$staticNation['name']?></td>
|
||||
<td class='center'><?=$staticNation['power']?></td>
|
||||
<td class='center'><?=$staticNation['gennum']?></td>
|
||||
<td class='center'><?=$cityCnt?></td>
|
||||
<td class='center'><?=$dipStateText?></td>
|
||||
<td class='center'><?=$dipTermText?></td>
|
||||
<td class='center'><?=$dipEndDateText?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
";
|
||||
|
||||
$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), "");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
<?php
|
||||
// 수입 연산
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
|
||||
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||
// 금 수지
|
||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome;
|
||||
$goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$riceincome = $riceincomeList[0] + $riceincomeList[1];
|
||||
$riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']);
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome;
|
||||
$budgetrice = $nation['rice'] + $riceincome - $riceoutcome;
|
||||
$budgetgolddiff = $goldincome - $goldoutcome + $deadIncome;
|
||||
$budgetricediff = $riceincome - $riceoutcome;
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = "+{$budgetgolddiff}";
|
||||
$budgetgolddiff = '+'.number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = "$budgetgolddiff";
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = "+{$budgetricediff}";
|
||||
$budgetricediff = '+'.number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = "$budgetricediff";
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<table width=1000 class='tb_layout bg0' style='margin:auto;'>
|
||||
<form name=form1 method=post action=c_dipcenter.php>
|
||||
<tr><td colspan=2 height=10></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 & 임관 권유 메시지</td></tr>
|
||||
<tr><td colspan=2 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'><div id='noticeForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
국가 방침
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
|
||||
<div class='edit_form viewer'></div>
|
||||
</div></td></tr>
|
||||
<tr><td colspan='2'><div id='scoutMsgForm'>
|
||||
<div class='bg1' style="display: flex; justify-content: space-around">
|
||||
<div style='flex: 1 1 auto;'>
|
||||
임관 권유
|
||||
</div>
|
||||
<div>
|
||||
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
|
||||
</div>
|
||||
</div>
|
||||
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
|
||||
<input type='hidden' class='input_form' name='scoutmsg' data-global='scoutmsg'>
|
||||
<div style="width:870px;margin-left:auto;">
|
||||
<div class='edit_form viewer'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div></td></tr>
|
||||
<tr><td colspan=2 align=center bgcolor=green>예 산 & 정 책</td></tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
@@ -237,39 +214,39 @@ if ($budgetricediff > 0) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=$nation['gold']?></td>
|
||||
<td width=248 align=center><?=number_format($nation['gold'])?></td>
|
||||
<td width=248 align=right class=bg1>현 재 </td>
|
||||
<td width=248 align=center><?=$nation['rice']?></td>
|
||||
<td width=248 align=center><?=number_format($nation['rice'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>단기수입 </td>
|
||||
<td align=center>+<?=$deadIncome?></td>
|
||||
<td align=center>+<?=number_format($warIncome)?></td>
|
||||
<td align=right class=bg1>둔전수입 </td>
|
||||
<td align=center>+<?=$riceincomeList[1]?></td>
|
||||
<td align=center>+<?=number_format($wallIncome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세 금 </td>
|
||||
<td align=center>+<?=$goldincomeList[0]?></td>
|
||||
<td align=center>+<?=number_format($goldIncome)?></td>
|
||||
<td align=right class=bg1>세 곡 </td>
|
||||
<td align=center>+<?=$riceincomeList[0]?></td>
|
||||
<td align=center>+<?=number_format($riceIncome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=$goldincome?> / -<?=$goldoutcome?></td>
|
||||
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=right class=bg1>수입 / 지출 </td>
|
||||
<td align=center>+<?=$riceincome?> / -<?=$riceoutcome?></td>
|
||||
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>국고 예산 </td>
|
||||
<td align=center><?=$budgetgold?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=right class=bg1>병량 예산 </td>
|
||||
<td align=center><?=$budgetrice?> (<?=$budgetricediff?>)</td>
|
||||
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=bg1>세율 (5 ~ 30%) </td>
|
||||
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
|
||||
<td align=right class=bg1>봉급 지급율 (20 ~ 200%) </td>
|
||||
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급율></td>
|
||||
<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>
|
||||
|
||||
+8
-6
@@ -32,9 +32,7 @@ $cityStr = "";
|
||||
for($i=0; $i < $nationcount; $i++) {
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select city from city where nation='{$nation['nation']}'";
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
$citycount = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nation['nation']);
|
||||
|
||||
|
||||
$nationnum[] = $nation['nation'];
|
||||
@@ -80,21 +78,25 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('d_shared/base_map.js')?>
|
||||
<?=WebUtil::printJS('js/map.js')?>
|
||||
<script>
|
||||
window.serverNick = '<?=DB::prefix()?>';
|
||||
window.serverID = '<?=UniqueConst::$serverID?>';
|
||||
$(function(){
|
||||
|
||||
reloadWorldMap({
|
||||
neutralView:true,
|
||||
showMe:true
|
||||
showMe:true,
|
||||
useCachedMap:true
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/map.css')?>
|
||||
@@ -173,7 +175,7 @@ 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 if ($realConflict) : ?>
|
||||
|
||||
+138
-115
@@ -9,8 +9,6 @@ if ($type <= 0 || $type > 8) {
|
||||
$type = 7;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -19,15 +17,13 @@ $db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("암행부", 2);
|
||||
increaseRefresh("암행부", 1);
|
||||
|
||||
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
|
||||
$query = "select no,nation,level,con,turntime,belong,permission,penalty 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), "");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
$nationLevel = $db->queryFirstField('SELECT level FROM nation WHERE nation=%i', $me['nation']);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -35,14 +31,20 @@ if ($con >= 2) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
|
||||
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
exit();
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
|
||||
$sel = [];
|
||||
$sel[$type] = "selected";
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -65,7 +67,7 @@ $sel[$type] = "selected";
|
||||
<body>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td>암 행 부<br><?=closeButton()?></td></tr>
|
||||
<tr><td><form name=form1 method=post>정렬순서 :
|
||||
<tr><td><form name=form1 method=get>정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[1]??''?> value=1>자금</option>
|
||||
<option <?=$sel[2]??''?> value=2>군량</option>
|
||||
@@ -80,138 +82,159 @@ $sel[$type] = "selected";
|
||||
</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), "");
|
||||
$troopCount = MYDB_num_rows($result);
|
||||
$troopName = [];
|
||||
for ($i=0; $i < $troopCount; $i++) {
|
||||
$troop = MYDB_fetch_array($result);
|
||||
$troopName[$troop['troop']] = $troop['name'];
|
||||
foreach($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]){
|
||||
$troopName[$troopID] = $tName;
|
||||
}
|
||||
|
||||
$orderSQL = '';
|
||||
switch ($type) {
|
||||
case 1: $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;
|
||||
case 4: $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 crewtype desc"; break;
|
||||
case 5: $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 crew desc"; break;
|
||||
case 6: $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 killturn"; break;
|
||||
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;
|
||||
case 1: $orderSQL = "order by gold desc"; break;
|
||||
case 2: $orderSQL = "order by rice desc"; break;
|
||||
case 3: $orderSQL = "order by city"; break;
|
||||
case 4: $orderSQL = "order by crewtype desc"; break;
|
||||
case 5: $orderSQL = "order by crew desc"; break;
|
||||
case 6: $orderSQL = "order by killturn"; break;
|
||||
case 7: $orderSQL = "order by turntime"; break;
|
||||
case 8: $orderSQL = "order by troop_leader desc"; break;
|
||||
}
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
?>
|
||||
<table align=center id='general_list' class='tb_layout bg0'>
|
||||
<thead>
|
||||
<tr>
|
||||
<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']]??'-';
|
||||
$generals = $db->query(
|
||||
'SELECT npc,defence_train,no,level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
|
||||
$me['nation'],
|
||||
$orderSQL
|
||||
);
|
||||
|
||||
if ($general['level'] == 12) {
|
||||
$lbonus = $nation['level'] * 2;
|
||||
} elseif ($general['level'] >= 5) {
|
||||
$lbonus = $nation['level'];
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
$generalTurnList = [];
|
||||
|
||||
foreach($db->queryAllLists(
|
||||
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
|
||||
array_column($generals, 'no')
|
||||
) as [$generalID, $turnIdx, $brief]
|
||||
){
|
||||
if(!key_exists($generalID, $generalTurnList)){
|
||||
$generalTurnList[$generalID] = [];
|
||||
}
|
||||
$generalTurnList[$generalID][$turnIdx] = $brief;
|
||||
}
|
||||
|
||||
$genCntEff = 0;
|
||||
foreach ($generals as &$general) {
|
||||
$general['cityText'] = CityConst::byID($general['city'])->name;
|
||||
$general['troopText'] = $troopName[$general['troop']]??'-';
|
||||
|
||||
if($general['npc'] != 5){
|
||||
$genCntEff += 1;
|
||||
}
|
||||
|
||||
$lbonus = calcLeadershipBonus($general['level'], $nationLevel);
|
||||
if ($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
$lbonus = "";
|
||||
$lbonusText = "";
|
||||
}
|
||||
$general['lbonus'] = $lbonus;
|
||||
$general['lbonusText'] = $lbonusText;
|
||||
|
||||
if ($general['injury'] > 0) {
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (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>";
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leader = "{$general['leader']}{$lbonus}";
|
||||
$power = "{$general['power']}";
|
||||
$leadership = "{$general['leadership']}{$lbonusText}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
$name = "<font color=skyblue>{$general['name']}</font>";
|
||||
} else {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
$general['leadershipText'] = $leadership;
|
||||
$general['strengthText'] = $strength;
|
||||
$general['intelText'] = $intel;
|
||||
|
||||
switch ($general['mode']) {
|
||||
case 0: $mode = "×"; break;
|
||||
case 1: $mode = "○"; break;
|
||||
case 2: $mode = "◎"; break;
|
||||
}
|
||||
$general['expLevelText'] = getExpLevel($general['experience']);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<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 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 class='i_action'>
|
||||
<font size=3>NPC 장수";
|
||||
} else {
|
||||
echo "
|
||||
<td class='i_action'>
|
||||
<font size=1>";
|
||||
$turn = getTurn($general, 1, 0);
|
||||
$general['nameText'] = getColoredName($general['name'], $general['npc']);
|
||||
|
||||
for ($i=0; $i < 5; $i++) {
|
||||
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 20);
|
||||
$k = $i+1;
|
||||
echo "
|
||||
$k : $turn[$i] <br>";
|
||||
$general['modeText'] = formatDefenceTrain($general['defence_train']);
|
||||
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name??'-';
|
||||
|
||||
|
||||
if ($general['npc'] < 2) {
|
||||
foreach($generalTurnList[$general['no']] as $turnRawIdx=>$turn){
|
||||
$turn = StringUtil::subStringForWidth($turn, 0, 41);
|
||||
$turnIdx = $turnRawIdx+1;
|
||||
$turntext[] = " $turnIdx : $turn";
|
||||
}
|
||||
$general['turntext'] = join("<br>\n", $turntext);
|
||||
}
|
||||
echo "
|
||||
</font>
|
||||
</td>
|
||||
<td align=center>{$general['killturn']}</td>
|
||||
<td class='i_turntime' align=center>".substr($general['turntime'], 14, 5)."</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
unset($general);
|
||||
|
||||
$genCnt = count($generals);
|
||||
$totalGold = 0;
|
||||
$totalRice = 0;
|
||||
$crew90 = 0;
|
||||
$gen90 = 0;
|
||||
$crew80 = 0;
|
||||
$gen80 = 0;
|
||||
$crew60 = 0;
|
||||
$gen60 = 0;
|
||||
$crewTotal = 0;
|
||||
//$genTotal = 0;
|
||||
foreach($generals as $general){
|
||||
$totalGold += $general['gold'];
|
||||
$totalRice += $general['rice'];
|
||||
|
||||
$crewTotal += $general['crew'];
|
||||
|
||||
if($general['crew'] == 0){
|
||||
continue;
|
||||
}
|
||||
if($general['train'] >= 90 && $general['atmos'] >= 90){
|
||||
$crew90 += $general['crew'];
|
||||
$gen90 += 1;
|
||||
}
|
||||
|
||||
if($general['train'] >= 80 && $general['atmos'] >= 80){
|
||||
$crew80 += $general['crew'];
|
||||
$gen80 += 1;
|
||||
}
|
||||
|
||||
if($general['train'] >= 60 && $general['atmos'] >= 60){
|
||||
$crew60 += $general['crew'];
|
||||
$gen60 += 1;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
|
||||
<thead>
|
||||
<colgroup>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
<col style="width:120px;"><col>
|
||||
</colgroup>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='bg1'>전체 금</td><td><?=number_format($totalGold)?></td>
|
||||
<td class='bg1'>전체 쌀</td><td><?=number_format($totalRice)?></td>
|
||||
<td class='bg1'>평균 금</td><td><?=number_format($totalGold/$genCntEff, 2)?></td>
|
||||
<td class='bg1'>평균 쌀</td><td><?=number_format($totalRice/$genCntEff, 2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td>
|
||||
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
|
||||
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td>
|
||||
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
|
||||
?>
|
||||
<?=$templates->render('generalList', ['generals'=>$generals])?>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=closeButton()?></td></tr>
|
||||
|
||||
+145
-86
@@ -12,7 +12,7 @@ $connect=$db->get();
|
||||
|
||||
increaseRefresh("인사부", 1);
|
||||
//훼섭 추방을 위해 갱신
|
||||
checkTurn();
|
||||
TurnExecutionHelper::executeAllCommand();
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -33,6 +33,14 @@ if($meLevel == 0) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 인사부</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/bossInfo.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
|
||||
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<script type="text/javascript">
|
||||
@@ -41,6 +49,51 @@ function out() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
$query = "select nation,name,level,color,l12set,l11set,l10set,l9set,l8set,l7set,l6set,l5set from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result); //국가정보
|
||||
|
||||
$ambassadors = $db->query('SELECT no, name, level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nation['nation']);
|
||||
$auditors = $db->query('SELECT no, name, level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nation['nation']);
|
||||
$candidateAmbassadors = [];
|
||||
$candidateAuditors = [];
|
||||
foreach($ambassadors as $ambassador){
|
||||
$candidateAmbassadors[] = $ambassador;
|
||||
}
|
||||
foreach($auditors as $auditor){
|
||||
$candidateAuditors[] = $auditor;
|
||||
}
|
||||
foreach($db->query('SELECT no, name, nation, level, penalty, permission FROM general WHERE nation = %i AND permission = \'normal\' AND level != 12', $nation['nation']) as $candidate){
|
||||
$maxPermission = checkSecretMaxPermission($candidate);
|
||||
if($maxPermission == 4){
|
||||
$candidateAmbassadors[] = $candidate;
|
||||
}
|
||||
if($maxPermission >= 3){
|
||||
$candidateAuditors[] = $candidate;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script>
|
||||
var candidateAmbassadors = <?=Json::encode(array_map(function($value){
|
||||
return [
|
||||
'id'=>$value['no'],
|
||||
'text'=>$value['name'],
|
||||
"selected"=>($value['permission']!='normal')
|
||||
];
|
||||
}, $candidateAmbassadors))?>;
|
||||
|
||||
var candidateAuditors = <?=Json::encode(array_map(function($value){
|
||||
return [
|
||||
'id'=>$value['no'],
|
||||
'text'=>$value['name'],
|
||||
"selected"=>($value['permission']!='normal')
|
||||
];
|
||||
}, $candidateAuditors))?>;
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -51,10 +104,6 @@ function out() {
|
||||
|
||||
<?php
|
||||
|
||||
$query = "select nation,name,level,color,l12set,l11set,l10set,l9set,l8set,l7set,l6set,l5set from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result); //국가정보
|
||||
|
||||
$lv = getNationChiefLevel($nation['level']);
|
||||
if($meLevel >= 5) { $btn = "submit"; }
|
||||
else { $btn = "hidden"; }
|
||||
@@ -67,11 +116,26 @@ for($i=12; $i >= $lv; $i--) {
|
||||
$level[$levels['level']] = $levels;
|
||||
}
|
||||
|
||||
$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군
|
||||
$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
|
||||
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$tigers = $db->query('SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "warnum" AND value > 0 ORDER BY value DESC LIMIT 5',
|
||||
$nation['nation']
|
||||
);// 오호장군
|
||||
$tigerstr = join(', ', array_map(function($arr){
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $tigers));
|
||||
|
||||
$eagles = $db->query('SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
|
||||
$nation['nation']
|
||||
);// 건안칠자
|
||||
$eaglestr = join(', ', array_map(function($arr){
|
||||
$number = number_format($arr['value']);
|
||||
return "{$arr['name']}【{$number}】";
|
||||
}, $eagles));
|
||||
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
@@ -87,50 +151,24 @@ for($i=12; $i >= $lv; $i-=2) {
|
||||
$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 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=98 align=center id=bg1><font size=4><?=getLevelText($i1, $nation['level'])?></font></td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
|
||||
<td width=98 align=center id=bg1><font size=4><?=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=98 align=center id=bg1><font size=4><?=getLevelText($i2, $nation['level'])?></font></td>
|
||||
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
|
||||
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>오호장군【승전】</td>
|
||||
<td colspan=5>
|
||||
";
|
||||
|
||||
$tigernum = MYDB_num_rows($tigerresult);
|
||||
for($i=0; $i < $tigernum; $i++) {
|
||||
$tiger = MYDB_fetch_array($tigerresult);
|
||||
|
||||
if($tiger['killnum'] > 0) {
|
||||
echo "{$tiger['name']}【{$tiger['killnum']}】, ";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
</td>
|
||||
?>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>오호장군【승전】</td>
|
||||
<td colspan=5><?=$tigerstr?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>건안칠자【계략】</td>
|
||||
<td colspan=5>
|
||||
";
|
||||
|
||||
$eaglenum = MYDB_num_rows($eagleresult);
|
||||
for($i=0; $i < $eaglenum; $i++) {
|
||||
$eagle = MYDB_fetch_array($eagleresult);
|
||||
|
||||
if($eagle['firenum'] > 0) {
|
||||
echo "{$eagle['name']}【{$eagle['firenum']}】, ";
|
||||
}
|
||||
}
|
||||
|
||||
echo "
|
||||
</td>
|
||||
<td colspan=5><?=$eaglestr?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
@@ -140,20 +178,23 @@ echo "
|
||||
<tr>
|
||||
<td width=498 align=right id=bg1>대상 장수</td>
|
||||
<td width=498>
|
||||
";
|
||||
<?php
|
||||
|
||||
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,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
|
||||
$query = "select no,npc,name,level,leadership,strength,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);
|
||||
if($general['npc'] == 5){
|
||||
continue;
|
||||
}
|
||||
echo "
|
||||
<option value={$general['no']}>{$general['name']} <small>({$general['leader']}/{$general['power']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||
<option value={$general['no']}>{$general['name']} <small>({$general['leadership']}/{$general['strength']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||
}
|
||||
|
||||
echo "
|
||||
@@ -173,9 +214,9 @@ echo "
|
||||
<tr><td colspan=4 height=5></td></tr>
|
||||
<tr><td colspan=4 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
|
||||
<tr>
|
||||
<td width=98 align=right id=bg1>".getLevel(12, $nation['level'])."</td>
|
||||
<td width=98 align=right id=bg1>".getLevelText(12, $nation['level'])."</td>
|
||||
<td width=398>{$general['name']} 【".CityConst::byID($general['city'])->name."】</td>
|
||||
<td width=98 align=right id=bg1>".getLevel(11, $nation['level'])."</td>
|
||||
<td width=98 align=right id=bg1>".getLevelText(11, $nation['level'])."</td>
|
||||
<form method=post action=c_myBossInfo.php>
|
||||
<td width=398>
|
||||
";
|
||||
@@ -219,17 +260,17 @@ echo "
|
||||
";
|
||||
|
||||
$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[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".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[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".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[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".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>"; }
|
||||
echo "
|
||||
<td width=98 align=right id=bg1>".getLevel($i, $nation['level'])."</td>
|
||||
<td width=98 align=right id=bg1>".getLevelText($i, $nation['level'])."</td>
|
||||
<form method=post action=c_myBossInfo.php>
|
||||
<td width=398>
|
||||
";
|
||||
@@ -272,9 +313,35 @@ 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 class='tb_layout bg0'>
|
||||
<tr><td colspan=5 height=5></td></tr>
|
||||
|
||||
";
|
||||
|
||||
if($meLevel == 12):
|
||||
?>
|
||||
<table align='center' width='1000' class='tb_layout bg0'>
|
||||
<tr><td colspan='4' height='5'></td></tr>
|
||||
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr>
|
||||
<tr>
|
||||
<td width=98 align=right id=bg1>외교권자</td>
|
||||
<td width=398>
|
||||
<select id="selectAmbassador" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAmbassador' type='button'>임명</button>
|
||||
</td>
|
||||
<td width=98 align=right id=bg1>조언자</td>
|
||||
<td width=398>
|
||||
<select id="selectAuditor" multiple="multiple">
|
||||
</select>
|
||||
<button id='changeAuditor' type='button'>임명</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<table align=center width=1000 id='officer_list' class='tb_layout bg0'>
|
||||
<tr><td colspan=5 height=5></td></tr>
|
||||
<?php
|
||||
if($meLevel >= 5) {
|
||||
echo "
|
||||
<tr><td colspan=5 align=center bgcolor=orange>도 시 관 직 임 명</td></tr>
|
||||
@@ -285,7 +352,7 @@ if($meLevel >= 5) {
|
||||
<select name=citylist size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and gen1set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer4set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($result);
|
||||
|
||||
@@ -311,7 +378,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::$chiefStatMin."' order by npc,binary(name)";
|
||||
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".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++) {
|
||||
@@ -339,7 +406,7 @@ if($meLevel >= 5) {
|
||||
<select name=citylist size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer3set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($result);
|
||||
|
||||
@@ -388,12 +455,12 @@ if($meLevel >= 5) {
|
||||
</form>
|
||||
<form method=post action=c_myBossInfo.php>
|
||||
<tr>
|
||||
<td colspan=3 align=right id=bg2>시 중 임 명</td>
|
||||
<td colspan=3 align=right id=bg2>종 사 임 명</td>
|
||||
<td colspan=2>
|
||||
<select name=citylist size=1 style=color:white;background-color:black;>
|
||||
";
|
||||
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and gen3set=0 order by region, level desc,binary(name)"; // 도시 이름 목록
|
||||
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer2set=0 order by region, level desc,binary(name)"; // 도시 이름 목록
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($result);
|
||||
|
||||
@@ -448,21 +515,13 @@ echo "
|
||||
<td width=158 align=center id=bg1 colspan=2><font size=4>도 시</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>태 수 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>군 사 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>시 중 (사관) 【현재도시】</font></td>
|
||||
<td width=278 align=center id=bg1><font size=4>종 사 (사관) 【현재도시】</font></td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$citylevel = [];
|
||||
$citylevel[1] = "수";
|
||||
$citylevel[2] = "진";
|
||||
$citylevel[3] = "관";
|
||||
$citylevel[4] = "이";
|
||||
$citylevel[5] = "소";
|
||||
$citylevel[6] = "중";
|
||||
$citylevel[7] = "대";
|
||||
$citylevel[8] = "특";
|
||||
$citylevel = getCityLevelList();
|
||||
|
||||
$query = "select city,name,gen1,gen2,gen3,level,region,gen1set,gen2set,gen3set from city where nation='{$nation['nation']}' order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$query = "select city,name,officer4,officer3,officer2,level,region,officer4set,officer3set,officer2set from city where nation='{$nation['nation']}' order by region,level desc,binary(name)"; // 도시 이름 목록
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
@@ -470,15 +529,15 @@ $region = 0;
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
$city = MYDB_fetch_array($cityresult);
|
||||
|
||||
$query = "select name,belong,city from general where no='{$city['gen1']}'";
|
||||
$query = "select name,belong,city from general where no='{$city['officer4']}'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen1 = MYDB_fetch_array($genresult);
|
||||
$query = "select name,belong,city from general where no='{$city['gen2']}'";
|
||||
$officer4 = MYDB_fetch_array($genresult);
|
||||
$query = "select name,belong,city from general where no='{$city['officer3']}'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen2 = MYDB_fetch_array($genresult);
|
||||
$query = "select name,belong,city from general where no='{$city['gen3']}'";
|
||||
$officer3 = MYDB_fetch_array($genresult);
|
||||
$query = "select name,belong,city from general where no='{$city['officer2']}'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gen3 = MYDB_fetch_array($genresult);
|
||||
$officer2 = MYDB_fetch_array($genresult);
|
||||
|
||||
if($region != $city['region']) {
|
||||
echo "
|
||||
@@ -487,19 +546,19 @@ for($j=0; $j < $citycount; $j++) {
|
||||
$region = $city['region'];
|
||||
}
|
||||
|
||||
$gen1['name'] = $gen1['name']==""?"-":$gen1['name']." ({$gen1['belong']}년) 【".CityConst::byID($gen1['city'])->name."】";
|
||||
$gen2['name'] = $gen2['name']==""?"-":$gen2['name']." ({$gen2['belong']}년) 【".CityConst::byID($gen2['city'])->name."】";
|
||||
$gen3['name'] = $gen3['name']==""?"-":$gen3['name']." ({$gen3['belong']}년) 【".CityConst::byID($gen3['city'])->name."】";
|
||||
if($city['gen1set'] == 1) { $gen1['name'] = "<font color=orange>".$gen1['name']."</font>"; }
|
||||
if($city['gen2set'] == 1) { $gen2['name'] = "<font color=orange>".$gen2['name']."</font>"; }
|
||||
if($city['gen3set'] == 1) { $gen3['name'] = "<font color=orange>".$gen3['name']."</font>"; }
|
||||
$officer4['name'] = $officer4['name']==""?"-":$officer4['name']." ({$officer4['belong']}년) 【".CityConst::byID($officer4['city'])->name."】";
|
||||
$officer3['name'] = $officer3['name']==""?"-":$officer3['name']." ({$officer3['belong']}년) 【".CityConst::byID($officer3['city'])->name."】";
|
||||
$officer2['name'] = $officer2['name']==""?"-":$officer2['name']." ({$officer2['belong']}년) 【".CityConst::byID($officer2['city'])->name."】";
|
||||
if($city['officer4set'] == 1) { $officer4['name'] = "<font color=orange>".$officer4['name']."</font>"; }
|
||||
if($city['officer3set'] == 1) { $officer3['name'] = "<font color=orange>".$officer3['name']."</font>"; }
|
||||
if($city['officer2set'] == 1) { $officer2['name'] = "<font color=orange>".$officer2['name']."</font>"; }
|
||||
echo "
|
||||
<tr>
|
||||
<td width=78 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=3>【{$citylevel[$city['level']]}】</font></td>
|
||||
<td width=78 align=right style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=3>{$city['name']} </font></td>
|
||||
<td align=center>{$gen1['name']}</td>
|
||||
<td align=center>{$gen2['name']}</td>
|
||||
<td align=center>{$gen3['name']}</td>
|
||||
<td align=center>{$officer4['name']}</td>
|
||||
<td align=center>{$officer3['name']}</td>
|
||||
<td align=center>{$officer2['name']}</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
+38
-29
@@ -9,8 +9,6 @@ if ($type <= 0 || $type > 12) {
|
||||
$type = 10;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -40,11 +38,14 @@ $sel = [$type => "selected"];
|
||||
<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('../e_lib/jquery-ui.min.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/ext.expand_city.js')?>
|
||||
|
||||
</head>
|
||||
@@ -71,19 +72,16 @@ $sel = [$type => "selected"];
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$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']); //국가정보
|
||||
|
||||
$query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}'";
|
||||
$query = "select *,pop/pop_max 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 4: $query .= " order by trust 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;
|
||||
@@ -104,17 +102,28 @@ for ($j=0; $j < $citycount; $j++) {
|
||||
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), "");
|
||||
$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);
|
||||
$officerQuery = [];
|
||||
$officerName = [
|
||||
2=>'-',
|
||||
3=>'-',
|
||||
4=>'-'
|
||||
];
|
||||
if ($city['officer4'] > 0) {
|
||||
$officerQuery[] = $city['officer4'];
|
||||
}
|
||||
if ($city['officer3'] > 0) {
|
||||
$officerQuery[] = $city['officer3'];
|
||||
}
|
||||
if ($city['officer2'] > 0) {
|
||||
$officerQuery[] = $city['officer2'];
|
||||
}
|
||||
|
||||
$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);
|
||||
if($officerQuery){
|
||||
foreach($db->query('SELECT `level`, `name` FROM general WHERE `no` IN %li', $officerQuery) as $genOfficer){
|
||||
$officerName[$genOfficer['level']] = $genOfficer['name'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == 10 && $city['region'] != $region) {
|
||||
echo "<br>";
|
||||
@@ -124,7 +133,7 @@ for ($j=0; $j < $citycount; $j++) {
|
||||
$level = $city['level'];
|
||||
}
|
||||
|
||||
if ($city['trade'] == 0) {
|
||||
if ($city['trade'] === null) {
|
||||
$city['trade'] = "- ";
|
||||
}
|
||||
|
||||
@@ -135,36 +144,36 @@ for ($j=0; $j < $citycount; $j++) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center width=46 id=bg1>주민</td>
|
||||
<td align=center width=140>{$city['pop']}/{$city['pop2']}</td>
|
||||
<td align=center width=140>{$city['pop']}/{$city['pop_max']}</td>
|
||||
<td align=center width=46 id=bg1>농업</td>
|
||||
<td align=center width=140>{$city['agri']}/{$city['agri2']}</td>
|
||||
<td align=center width=140>{$city['agri']}/{$city['agri_max']}</td>
|
||||
<td align=center width=46 id=bg1>상업</td>
|
||||
<td align=center width=140>{$city['comm']}/{$city['comm2']}</td>
|
||||
<td align=center width=140>{$city['comm']}/{$city['comm_max']}</td>
|
||||
<td align=center width=46 id=bg1>치안</td>
|
||||
<td align=center width=140>{$city['secu']}/{$city['secu2']}</td>
|
||||
<td align=center width=140>{$city['secu']}/{$city['secu_max']}</td>
|
||||
<td align=center width=46 id=bg1>수비</td>
|
||||
<td align=center width=140>{$city['def']}/{$city['def2']}</td>
|
||||
<td align=center width=140>{$city['def']}/{$city['def_max']}</td>
|
||||
<td align=center width=46 id=bg1>성벽</td>
|
||||
<td align=center width=140>{$city['wall']}/{$city['wall2']}</td>
|
||||
<td align=center width=140>{$city['wall']}/{$city['wall_max']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>민심</td>
|
||||
<td align=center>{$city['rate']}</td>
|
||||
<td align=center>".round($city['trust'], 1)."</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>".round($city['pop']/$city['pop_max']*100, 2)." %</td>
|
||||
<td align=center id=bg1>태수</td>
|
||||
<td align=center>";
|
||||
echo $gen1['name']==''?"-":"{$gen1['name']}";
|
||||
echo $officerName[4];
|
||||
echo "</td>
|
||||
<td align=center id=bg1>군사</td>
|
||||
<td align=center>";
|
||||
echo $gen2['name']==''?"-":"{$gen2['name']}";
|
||||
echo $officerName[3];
|
||||
echo "</td>
|
||||
<td align=center id=bg1>시중</td>
|
||||
<td align=center id=bg1>종사</td>
|
||||
<td align=center>";
|
||||
echo $gen3['name']==''?"-":"{$gen3['name']}";
|
||||
echo $officerName[2];
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+47
-68
@@ -9,20 +9,16 @@ if($type <= 0 || $type > 15) {
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
increaseRefresh("세력장수", 1);
|
||||
|
||||
$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);
|
||||
$me = $db->queryFirstRow('SELECT no,nation,level from general where owner=%i', $userID);
|
||||
|
||||
if($me['level'] == 0) {
|
||||
echo "재야입니다.";
|
||||
@@ -31,6 +27,14 @@ if($me['level'] == 0) {
|
||||
|
||||
$sel = [$type => "selected"];
|
||||
|
||||
$ownerNameList = [];
|
||||
if($gameStor->isunited){
|
||||
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
|
||||
$ownerNameList[$ownerID] = $ownerName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -76,48 +80,26 @@ $sel = [$type => "selected"];
|
||||
<?php
|
||||
|
||||
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
|
||||
$orderByText = '';//FIXME: 쿼리 재작성
|
||||
switch($type) {
|
||||
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);
|
||||
|
||||
[$orderKey, $orderDesc] = [
|
||||
1=>['level', true],
|
||||
2=>['dedication', true],
|
||||
3=>['experience', true],
|
||||
4=>['leadership', true],
|
||||
5=>['strength', true],
|
||||
6=>['intel', true],
|
||||
7=>['gold', true],
|
||||
8=>['rice', true],
|
||||
9=>['crew', true],
|
||||
10=>['connect', true],
|
||||
11=>['personal', true],
|
||||
12=>['special', true],
|
||||
13=>['special2', true],
|
||||
14=>['belong', true],
|
||||
15=>['npc', true],
|
||||
][$type];
|
||||
|
||||
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,level,killturn,connect,gold,rice,crew,belong from general where nation = %i order by %b %l', $me['nation'], $orderKey, $orderDesc?'desc':'');
|
||||
|
||||
echo"
|
||||
<table align=center class='tb_layout bg0'>
|
||||
@@ -138,16 +120,9 @@ echo"
|
||||
<td width=48 align=center id=bg1>사 관</td>
|
||||
<td width=70 align=center id=bg1>벌점</td>
|
||||
</tr>";
|
||||
for($j=0; $j < $gencount; $j++) {
|
||||
$general = MYDB_fetch_array($genresult);
|
||||
foreach($generalList as $general){
|
||||
|
||||
if($general['level'] == 12) {
|
||||
$lbonus = $nationLevel * 2;
|
||||
} elseif($general['level'] >= 5) {
|
||||
$lbonus = $nationLevel;
|
||||
} else {
|
||||
$lbonus = 0;
|
||||
}
|
||||
$lbonus = calcLeadershipBonus($general['level'], $nationLevel);
|
||||
if($lbonus > 0) {
|
||||
$lbonus = "<font color=cyan>+{$lbonus}</font>";
|
||||
} else {
|
||||
@@ -155,15 +130,15 @@ for($j=0; $j < $gencount; $j++) {
|
||||
}
|
||||
|
||||
if($general['injury'] > 0) {
|
||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
||||
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
|
||||
$strength = intdiv($general['strength'] * (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>";
|
||||
$leadership = "<font color=red>{$leadership}</font>{$lbonus}";
|
||||
$strength = "<font color=red>{$strength}</font>";
|
||||
$intel = "<font color=red>{$intel}</font>";
|
||||
} else {
|
||||
$leader = "{$general['leader']}{$lbonus}";
|
||||
$power = "{$general['power']}";
|
||||
$leadership = "{$general['leadership']}{$lbonus}";
|
||||
$strength = "{$general['strength']}";
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
@@ -171,22 +146,26 @@ for($j=0; $j < $gencount; $j++) {
|
||||
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
|
||||
else { $name = "{$general['name']}"; }
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
|
||||
}
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "
|
||||
<tr>
|
||||
<td align=center style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
|
||||
<td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
|
||||
<td align=center>$name</td>
|
||||
<td align=center>"; echo getLevel($general['level'], $nationLevel); echo "</td>
|
||||
<td align=center>"; echo getLevelText($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>
|
||||
<td align=center>$leader</td>
|
||||
<td align=center>$power</td>
|
||||
<td align=center>$leadership</td>
|
||||
<td align=center>$strength</td>
|
||||
<td align=center>$intel</td>
|
||||
<td align=center>{$general['gold']}</td>
|
||||
<td align=center>{$general['rice']}</td>
|
||||
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
|
||||
<td align=center>{$general['belong']}</td>
|
||||
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
|
||||
</tr>";
|
||||
|
||||
+67
-73
@@ -9,15 +9,12 @@ $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='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
$nationID = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
|
||||
|
||||
if($me['level'] == 0) {
|
||||
if($nationID == 0) {
|
||||
echo "재야입니다.";
|
||||
exit();
|
||||
}
|
||||
@@ -30,6 +27,10 @@ if($me['level'] == 0) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 세력정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
@@ -41,121 +42,114 @@ if($me['level'] == 0) {
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$query = "select 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,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,history,capital from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result); //국가정보
|
||||
$nation = $db->queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,history,capital FROM nation WHERE nation=%i', $nationID); //국가정보
|
||||
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
|
||||
|
||||
$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);
|
||||
$currPop = 0;
|
||||
$maxPop = 0;
|
||||
$cityNames = [];
|
||||
|
||||
$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>"; }
|
||||
else { $cityname[$j] = $city['name']; }
|
||||
$totalpop += $city['pop'];
|
||||
$maxpop += $city['pop2'];
|
||||
foreach($cityList as $city){
|
||||
$currPop += $city['pop'];
|
||||
$maxPop += $city['pop_max'];
|
||||
if($city['city'] == $nation['capital']){
|
||||
$cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>";
|
||||
}
|
||||
else{
|
||||
$cityNames[] = $city['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general where nation='{$nation['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
[$currCrew, $maxCrew] = $db->queryFirstList('SELECT sum(crew), sum(leadership)*100 FROM general WHERE nation=%i AND npc != 5', $nation['nation']);
|
||||
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
|
||||
|
||||
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
|
||||
// 금 수지
|
||||
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
|
||||
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$warIncome = getWarGoldIncome($nation['type'], $cityList);
|
||||
$totalGoldIncome = $goldIncome + $warIncome;
|
||||
|
||||
$goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
|
||||
$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome;
|
||||
$goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']);
|
||||
$riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
|
||||
$riceincome = $riceincomeList[0] + $riceincomeList[1];
|
||||
$riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']);
|
||||
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
|
||||
$totalRiceIncome = $riceIncome + $wallIncome;
|
||||
|
||||
$outcome = getOutcome($nation['bill'], $dedicationList);
|
||||
|
||||
$budgetgold = $nation['gold'] + $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"; }
|
||||
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
|
||||
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
|
||||
$budgetgolddiff = $totalGoldIncome - $outcome;
|
||||
$budgetricediff = $totalRiceIncome - $outcome;
|
||||
|
||||
echo "
|
||||
if ($budgetgolddiff > 0) {
|
||||
$budgetgolddiff = '+'.number_format($budgetgolddiff);
|
||||
} else {
|
||||
$budgetgolddiff = number_format($budgetgolddiff);
|
||||
}
|
||||
if ($budgetricediff > 0) {
|
||||
$budgetricediff = '+'.number_format($budgetricediff);
|
||||
} else {
|
||||
$budgetricediff = number_format($budgetricediff);
|
||||
}
|
||||
|
||||
?>
|
||||
<table align=center width=1000 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 ";echo $me['nation']==0?"공 백 지":"{$nation['name']}";echo " 】</td>
|
||||
<td colspan=8 align=center style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'>【<?=$nation['name']?>】</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=98 align=center id=bg1>총주민</td>
|
||||
<td width=198 align=center>{$totalpop}/{$maxpop}</td>
|
||||
<td width=198 align=center><?=number_format($currPop)?>/<?=number_format($maxPop)?></td>
|
||||
<td width=98 align=center id=bg1>총병사</td>
|
||||
<td width=198 align=center>{$general['totcrew']}/{$general['maxcrew']}</td>
|
||||
<td width=198 align=center><?=number_format($currCrew)?>/<?=number_format($maxCrew)?></td>
|
||||
<td width=98 align=center id=bg1>국 력</td>
|
||||
<td width=298 align=center colspan=3>{$nation['power']}</td>
|
||||
<td width=298 align=center colspan=3><?=$nation['power']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>국 고</td>
|
||||
<td align=center>"; echo $nation['gold']==0?"-":"{$nation['gold']}"; echo "</td>
|
||||
<td align=center><?=number_format($nation['gold'])?></td>
|
||||
<td align=center id=bg1>병 량</td>
|
||||
<td align=center>"; echo $nation['rice']==0?"-":"{$nation['rice']}"; echo "</td>
|
||||
<td align=center><?=number_format($nation['rice'])?></td>
|
||||
<td align=center id=bg1>세 율</td>
|
||||
<td align=center colspan=3>"; echo $me['nation']==0?"해당 없음":"{$nation['rate']} %"; echo "</td>
|
||||
<td align=center colspan=3><?=$nation['rate']?> %</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>세금/단기</td>
|
||||
<td align=center>+$goldincomeList[0] / +$deadIncome</td>
|
||||
<td align=center>+<?=number_format($goldIncome)?> / +<?=number_format($warIncome)?></td>
|
||||
<td align=center id=bg1>세곡/둔전</td>
|
||||
<td align=center>+$riceincomeList[0] / +$riceincomeList[1]</td>
|
||||
<td align=center id=bg1>지급율</td>
|
||||
<td align=center colspan=3>"; echo $me['nation']==0?"해당 없음":"{$nation['bill']} %"; echo "</td>
|
||||
<td align=center>+<?=number_format($riceIncome)?> / +<?=number_format($wallIncome)?></td>
|
||||
<td align=center id=bg1>지급률</td>
|
||||
<td align=center colspan=3><?=$nation['bill']?> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>수입/지출</td>
|
||||
<td align=center>+$goldincome / -$goldoutcome</td>
|
||||
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center id=bg1>수입/지출</td>
|
||||
<td align=center>+$riceincome / -$riceoutcome</td>
|
||||
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
|
||||
<td align=center id=bg1>속 령</td>
|
||||
<td width=98 align=center>$citycount</td>
|
||||
<td width=98 align=center><?=count($cityList)?></td>
|
||||
<td width=98 align=center id=bg1>장 수</td>
|
||||
<td width=98 align=center>{$nation['gennum']}</td>
|
||||
<td width=98 align=center><?=$nation['gennum']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>국고 예산</td>
|
||||
<td align=center>{$budgetgold} ({$budgetgolddiff})</td>
|
||||
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
|
||||
<td align=center id=bg1>병량 예산</td>
|
||||
<td align=center>{$budgetrice} ({$budgetricediff})</td>
|
||||
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
|
||||
<td align=center id=bg1>기술력</td>
|
||||
<td align=center>{$nation['tech']}</td>
|
||||
<td align=center><?=number_format(floor($nation['tech']))?></td>
|
||||
<td align=center id=bg1>작 위</td>
|
||||
<td align=center>".getNationLevel($nation['level'])."</td>
|
||||
<td align=center><?=getNationLevel($nation['level'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top id=bg1> 속령일람 :</td>
|
||||
<td colspan=7>";
|
||||
for($j=0; $j < $citycount; $j++) {
|
||||
echo "$cityname[$j], ";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td colspan=7><?=join(', ', $cityNames)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center valign=top id=bg1>국가열전</td>
|
||||
<td colspan=7 id=bg0>".ConvertLog($nation['history'])."</td>
|
||||
<td colspan=7 id=bg0><?=ConvertLog($nation['history'])?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>";
|
||||
|
||||
?>
|
||||
<br>
|
||||
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
|
||||
+76
-38
@@ -5,15 +5,19 @@ include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$mode = Util::getReq('mode', 'int', 2);
|
||||
$defence_train = Util::getReq('defence_train', 'int', 2);
|
||||
$tnmt = Util::getReq('tnmt', 'int', 1);
|
||||
//$detachNPC = Util::getReq('detachNPC', 'bool');
|
||||
$detachNPC = false;
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
if($mode < 0 || $mode > 2){
|
||||
$mode = 2;
|
||||
if ($defence_train <= 60) {
|
||||
$defence_train = 60;
|
||||
}
|
||||
else if($defence_train <= 80){
|
||||
$defence_train = 80;
|
||||
}
|
||||
else{
|
||||
$defence_train = 999;
|
||||
}
|
||||
|
||||
if($tnmt < 0 || $tnmt > 1){
|
||||
@@ -23,40 +27,48 @@ if($tnmt < 0 || $tnmt > 1){
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
$generalID = $session->generalID;
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("내정보", 1);
|
||||
|
||||
$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);
|
||||
$me = General::createGeneralObjFromDB($generalID);
|
||||
|
||||
|
||||
if ($me['myset'] > 0) {
|
||||
$myset = $me->getVar('myset');
|
||||
if ($myset > 0) {
|
||||
$submit = 'submit';
|
||||
} else {
|
||||
$submit = 'hidden';
|
||||
}
|
||||
|
||||
if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
if ($me['myset'] > 1) {
|
||||
if (($btn == "설정저장" || $detachNPC) && $myset > 0) {
|
||||
if ($myset > 1) {
|
||||
$submit = 'submit';
|
||||
} else {
|
||||
$submit = 'hidden';
|
||||
}
|
||||
|
||||
$me['myset'] -= 1;
|
||||
if($defence_train != $me->getVar('defence_train')){
|
||||
if($defence_train == 999){
|
||||
$me->increaseVar('myset', -1);
|
||||
$me->setVar('defence_train', $defence_train);
|
||||
$me->increaseVar('train', -3);
|
||||
$me->increaseVar('atmos', -3);
|
||||
}
|
||||
else{
|
||||
$me->increaseVar('myset', -1);
|
||||
$me->setVar('defence_train', $defence_train);
|
||||
}
|
||||
$myset -= 1;
|
||||
}
|
||||
|
||||
if($me->getVar('tnmt') != $tnmt){
|
||||
$me->setVar('tnmt', $tnmt);
|
||||
}
|
||||
|
||||
$db->update('general', [
|
||||
'myset'=>$db->sqleval('myset-1'),
|
||||
'mode'=>$mode,
|
||||
'tnmt'=>$tnmt
|
||||
], 'owner=%i', $userID);
|
||||
|
||||
if($me['npc'] == 1 && $detachNPC){
|
||||
if($me->getVar('npc') == 1 && $detachNPC){
|
||||
$turnterm = $gameStor->turnterm;
|
||||
|
||||
if($turnterm < 10){
|
||||
@@ -65,13 +77,10 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
else{
|
||||
$targetKillTurn = 60 / $turnterm;
|
||||
}
|
||||
$db->update('general', [
|
||||
'killturn'=>$targetKillTurn
|
||||
], 'owner=%i AND npc=1', $userID);
|
||||
|
||||
$me['killturn']=$targetKillTurn;
|
||||
$me->setVar('killturn', $targetKillTurn);
|
||||
}
|
||||
}
|
||||
$me->applyDB($db);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -81,9 +90,28 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 내정보</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/myPage.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<script>
|
||||
var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
jQuery(function($){
|
||||
|
||||
$('#die_immediately').click(function(){
|
||||
if(!availableDieImmediately){
|
||||
alert('삭제를 위해서는 생성 후 2턴 가량의 시간이 필요합니다.');
|
||||
location.reload();
|
||||
return false;
|
||||
}
|
||||
return confirm('정말로 삭제하시겠습니까?');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -93,28 +121,38 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=50%>
|
||||
<?php myInfo(); ?>
|
||||
<?php myInfo2(); ?>
|
||||
<?php generalInfo($me); ?>
|
||||
<?php generalInfo2($me); ?>
|
||||
</td>
|
||||
<td width=50% valign=top style="padding-left:4ch;">
|
||||
<form name=form1 action=b_myPage.php method=post>
|
||||
토너먼트 【
|
||||
<input type=radio name=tnmt value=0 <?=$me['tnmt']==0?"checked":""; ?>>수동참여
|
||||
<input type=radio name=tnmt value=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
|
||||
<input type=radio name=tnmt value=0 <?=$me->getVar('tnmt')==0?"checked":""; ?>>수동참여
|
||||
<input type=radio name=tnmt value=1 <?=$me->getVar('tnmt')==1?"checked":""; ?>>자동참여
|
||||
】<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":""; ?>>×
|
||||
<input type=radio name=defence_train value=80 <?=$me->getVar('defence_train')==80?"checked":""; ?>>◎(훈사80)
|
||||
<input type=radio name=defence_train value=60 <?=$me->getVar('defence_train')==60?"checked":""; ?>>○(훈사60)
|
||||
<input type=radio name=defence_train value=999 <?=$me->getVar('defence_train')==999?"checked":""; ?>>×
|
||||
】<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>
|
||||
∞<font color=orange>설정저장은 이달중 <?=$myset?>회 남았습니다.</font><br><br>
|
||||
</form>
|
||||
<?php if(!($gameStor->autorun_user['limit_minutes']??false)): ?>
|
||||
휴 가 신 청<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>
|
||||
<?php endif; ?>
|
||||
<!--빙의 해제용 삭턴 조절<br>
|
||||
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>-->
|
||||
|
||||
<?php if($showDieImmediatelyBtn): ?>
|
||||
가오픈 기간 내 장수 삭제<br>
|
||||
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br>
|
||||
<?php endif; ?>
|
||||
|
||||
개인용 CSS<br>
|
||||
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -123,10 +161,10 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?=getGenLogRecent($me['no'], 24)?>
|
||||
<?=getGenLogRecent($generalID, 24)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?=getBatLogRecent($me['no'], 24)?>
|
||||
<?=getBatLogRecent($generalID, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -135,10 +173,10 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<?=getGeneralHistoryAll($me['no'])?>
|
||||
<?=getGeneralHistoryAll($generalID)?>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?=getBatResRecent($me['no'], 24)?>
|
||||
<?=getBatResRecent($generalID, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("회의실", 1);
|
||||
|
||||
$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);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 회의실</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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:830px;>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<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>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//20개 메세지
|
||||
$index = $nation['boardindex'];
|
||||
for($i=0; $i < 20; $i++) {
|
||||
$who = "board{$index}_who";
|
||||
$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($nation["board{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["board{$index}_when"], $index, 0); }
|
||||
$index--;
|
||||
if($index < 0) { $index = 19; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table width=1000 class='tb_layout bg0'>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("국법", 1);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?=UniqueConst::$serverName?>: 국법</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
$query = "select rule from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$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:998px;height:500px;>{$nation['rule']}</textarea><br>
|
||||
<input type=submit value=저장하기>
|
||||
</form>";
|
||||
} else {
|
||||
echo "
|
||||
<textarea name=msg style=color:white;background-color:black;width:998px;height:500px; readonly>{$nation['rule']}</textarea><br>";
|
||||
}
|
||||
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td><?=backButton()?></td></tr>
|
||||
<tr><td><?=banner()?> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user