Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f78fcc2b71 | ||
|
|
fb2d30f2c9 | ||
|
|
8781e7c6ad | ||
|
|
c34317b1e5 | ||
|
|
b09730b422 | ||
|
|
0f1725a7ab | ||
|
|
b12e0358d6 | ||
|
|
7ef841746a | ||
|
|
2b52b2379e | ||
|
|
8dd5965c44 | ||
|
|
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 | ||
|
|
43da95b4a5 | ||
|
|
3d93a63caa | ||
|
|
9550607da3 | ||
|
|
d5d9798913 | ||
|
|
6cfe08235f | ||
|
|
49eb850ff1 | ||
|
|
5a558583d2 | ||
|
|
1e5f0d0555 | ||
|
|
c58caeda4c | ||
|
|
26fc56f2b8 | ||
|
|
6a9e7aa89d | ||
|
|
b6c3b0cdc3 | ||
|
|
5ae91ac620 | ||
|
|
70265c55ef | ||
|
|
7c3b5fc31e | ||
|
|
a9a830caa2 | ||
|
|
b49ff3d4ed | ||
|
|
42310fa170 | ||
|
|
bfff1d9e2f | ||
|
|
2c98777b9f | ||
|
|
4a91260a31 | ||
|
|
076971bcae | ||
|
|
01fcc9bcab | ||
|
|
348877c7cd | ||
|
|
478f26e75a | ||
|
|
57cc558b9b | ||
|
|
20b1f8eff8 | ||
|
|
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 | ||
|
|
c160c5a555 | ||
|
|
31c7bf5348 | ||
|
|
6eadf718fc | ||
|
|
effced24d1 | ||
|
|
09f399db9a | ||
|
|
2b73f6faea | ||
|
|
943662605e | ||
|
|
9a04962bd6 | ||
|
|
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 | ||
|
|
a277ac182b | ||
|
|
0eee613a95 | ||
|
|
b76fa38e09 | ||
|
|
c0f5c8a358 | ||
|
|
71dd82afe8 | ||
|
|
ea5425a528 | ||
|
|
d4ba13eee3 | ||
|
|
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 |
@@ -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
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
* <code>mpm_event</code> 권장
|
||||
* PHP 7.2 이상
|
||||
* <code>php-fpm</code> 권장
|
||||
* php에서 curl을 실행가능해야 합니다.
|
||||
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
|
||||
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
|
||||
* mysqlnd가 지원되어야합니다. (기본값: 지원)
|
||||
* MariaDB 10.2.1 이상
|
||||
* MySQL 5.6 이상도 가능하도록 할 예정입니다.
|
||||
* <code>git</code>
|
||||
* <code>curl</code>
|
||||
|
||||
@@ -47,7 +49,7 @@ Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의
|
||||
|
||||
현재 카카오로그인 API KEY를 입력하는 작업이 설치과정에 추가되어있지 않습니다.
|
||||
|
||||
<code>f_install/templates/KakaoKey.orig.php</code> 를 <code>d_setting/KakaoKey.php</code>로 복사한 후 API 키를 입력하여야 합니다.
|
||||
설치 후 <code>d_setting/KakaoKey.php</code>에서 API키를 입력해야 합니다.
|
||||
|
||||
|
||||
## 라이선스
|
||||
|
||||
+6
-2
@@ -52,8 +52,8 @@ input::-webkit-input-placeholder {
|
||||
|
||||
}
|
||||
|
||||
.login-button{
|
||||
margin-top: 5px;
|
||||
.login_btn_group{
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.login-register{
|
||||
@@ -98,6 +98,10 @@ input::-webkit-input-placeholder {
|
||||
z-index:800;
|
||||
}
|
||||
|
||||
#login_card{
|
||||
z-index:801;
|
||||
}
|
||||
|
||||
#btn_kakao_login{
|
||||
cursor: pointer;
|
||||
height:46px;
|
||||
|
||||
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
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 |
@@ -52,6 +52,7 @@ $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,
|
||||
|
||||
@@ -217,8 +217,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
|
||||
);
|
||||
@@ -263,6 +263,14 @@ $result = Util::generateFileUsingSimpleTemplate(
|
||||
]
|
||||
);
|
||||
|
||||
Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/templates/KakaoKey.orig.php',
|
||||
ROOT.'/d_setting/KakaoKey.php',
|
||||
[
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($result !== true) {
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
|
||||
@@ -20,16 +20,19 @@ ENGINE=InnoDB 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,
|
||||
|
||||
@@ -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
-2
@@ -40,10 +40,10 @@ case "분당김":
|
||||
$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);
|
||||
break;
|
||||
case "분지연":
|
||||
|
||||
+1
-38
@@ -73,7 +73,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 +94,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;
|
||||
}
|
||||
|
||||
@@ -115,37 +110,6 @@ for ($i=0; $i < $dipcount; $i++) {
|
||||
}
|
||||
|
||||
$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 = " ";
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
@@ -153,7 +117,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>";
|
||||
}
|
||||
|
||||
|
||||
+13
-5
@@ -6,8 +6,6 @@ include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -51,6 +49,12 @@ increaseRefresh("명장일람", 1);
|
||||
<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 +66,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'] = '???';
|
||||
@@ -168,7 +175,7 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
|
||||
|
||||
return $general;
|
||||
}, $db->query(
|
||||
"SELECT nation,no,name,name2 as owner_name, picture, imgsvr,
|
||||
"SELECT nation,no,name,name2 as owner_name, owner, 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,
|
||||
@@ -181,7 +188,8 @@ $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'];
|
||||
|
||||
|
||||
+4
-3
@@ -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,9 +54,6 @@ 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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+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,7 +37,7 @@ $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>
|
||||
</td></tr>
|
||||
@@ -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'])){
|
||||
|
||||
+35
-25
@@ -6,8 +6,6 @@ include "func.php";
|
||||
|
||||
$type = Util::getReq('type', 'int', 9);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -32,6 +30,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 +89,26 @@ foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationlevel[$nation['nation']] = $nation['level'];
|
||||
}
|
||||
|
||||
switch ($type) { //FIXME: $query 처리 조심.
|
||||
case 1: $query = "select no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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 no,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=>['leader', true],
|
||||
3=>['power', 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,leader,power,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,8 +129,7 @@ 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) {
|
||||
@@ -154,6 +158,8 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
$intel = "{$general['intel']}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($general['npc'] >= 2) {
|
||||
$name = "<font color=cyan>{$general['name']}</font>";
|
||||
} elseif ($general['npc'] == 1) {
|
||||
@@ -162,6 +168,10 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
$name = "{$general['name']}";
|
||||
}
|
||||
|
||||
if(key_exists($general['owner'], $ownerNameList)){
|
||||
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
|
||||
}
|
||||
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
@@ -174,7 +184,7 @@ for ($j=0; $j < $gencount; $j++) {
|
||||
data-general-intel='{$general['intel']}'
|
||||
data-is-npc='".($general['npc']>=2?'true':'false')."'
|
||||
>
|
||||
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
|
||||
<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>
|
||||
|
||||
+11
-1
@@ -92,12 +92,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;
|
||||
|
||||
@@ -7,8 +7,6 @@ $btn = Util::getReq('btn');
|
||||
$yearmonth = Util::getReq('yearmonth', 'int');
|
||||
$serverID = Util::getReq('serverID', 'string', null);
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
+26
-5
@@ -28,10 +28,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>
|
||||
|
||||
@@ -127,6 +130,19 @@ for($i=1; $i <= $count; $i++) {
|
||||
elseif($level5['npc'] == 1) { $l5 = "<font color=skyblue>{$level5['name']}</font>"; }
|
||||
else { $l5 = $level5['name']; }
|
||||
|
||||
$generals = $db->query('SELECT no,nation,npc,name,level,penalty,permission FROM general WHERE nation=%i ORDER BY no ASC', $nation['nation']);
|
||||
$ambassadors = [];
|
||||
$auditors = [];
|
||||
foreach($generals as $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'>
|
||||
<tr>
|
||||
@@ -140,7 +156,7 @@ 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>
|
||||
<td width=170 align=center>".count($generals)." / {$citycount}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
|
||||
@@ -162,6 +178,12 @@ for($i=1; $i <= $count; $i++) {
|
||||
<td align=center id=bg1>".getLevel( 5, $nation['level'])."</td>
|
||||
<td align=center>$l5</td>
|
||||
</tr>
|
||||
<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) {
|
||||
@@ -187,8 +209,7 @@ for($i=1; $i <= $count; $i++) {
|
||||
</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']}, "; }
|
||||
|
||||
+3
-6
@@ -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>
|
||||
|
||||
|
||||
+5
-1
@@ -53,6 +53,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 +170,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);
|
||||
?>
|
||||
|
||||
@@ -31,6 +31,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>
|
||||
|
||||
+4
-2
@@ -7,8 +7,6 @@ include "func.php";
|
||||
$msg = Util::getReq('msg');
|
||||
$msg2 = Util::getReq('msg2');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -59,6 +57,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>
|
||||
|
||||
+14
-9
@@ -16,8 +16,6 @@ if ($type < 0 || $type > 3) {
|
||||
$type = 0;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -35,7 +33,7 @@ $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 +47,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();
|
||||
}
|
||||
|
||||
//잘못된 접근
|
||||
@@ -77,6 +78,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')?>
|
||||
|
||||
@@ -156,7 +161,7 @@ for ($i=0; $i < $gencount; $i++) {
|
||||
<?=getBatResRecent($gen, 24)?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($npc > 1 || $meLevel >= 5): ?>
|
||||
<?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>
|
||||
|
||||
@@ -59,6 +59,10 @@ 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::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
</head>
|
||||
|
||||
@@ -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>
|
||||
|
||||
+13
-8
@@ -13,20 +13,21 @@ $connect=$db->get();
|
||||
|
||||
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 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();
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
echo '국가에 소속되어있지 않습니다.';
|
||||
die();
|
||||
}
|
||||
else if ($permission < 1) {
|
||||
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
|
||||
die();
|
||||
}
|
||||
|
||||
if($me['level'] >= 5) { $btn = "submit"; $btn2 = "button"; }
|
||||
@@ -81,6 +82,10 @@ 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('js/common.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<script type="text/javascript">
|
||||
|
||||
+36
-25
@@ -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>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,19 +149,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,7 +171,7 @@ echo "
|
||||
unset($city);
|
||||
|
||||
// 첩보된 도시까지만 허용
|
||||
if($valid == 0 && $session->userGrade < 5) {
|
||||
if($valid == 0 && $userGrade < 5) {
|
||||
$citylist = $me['city'];
|
||||
}
|
||||
|
||||
@@ -172,7 +179,7 @@ if($valid == 0 && $session->userGrade < 5) {
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
|
||||
$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']);
|
||||
@@ -208,6 +215,10 @@ for($j=0; $j < $gencount; $j++) {
|
||||
$ourGeneral = false;
|
||||
}
|
||||
|
||||
if($userGrade == 6){
|
||||
$ourGeneral = true;
|
||||
}
|
||||
|
||||
$isNPC = $general['npc']>1;
|
||||
$wounded = $general['injury'];
|
||||
|
||||
@@ -404,7 +415,7 @@ foreach($generalsFormat as $general){
|
||||
<td align=center><?=$gen1['name']??'-'?></td>
|
||||
<td align=center class=bg1>군사</td>
|
||||
<td align=center><?=$gen2['name']??'-'?></td>
|
||||
<td align=center class=bg1>시중</td>
|
||||
<td align=center class=bg1>종사</td>
|
||||
<td align=center><?=$gen3['name']??'-'?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+58
-53
@@ -13,13 +13,9 @@ $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);
|
||||
$nation = $db->queryFirstRow('SELECT msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -27,9 +23,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 +49,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,7 +85,6 @@ 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']);
|
||||
@@ -97,19 +110,15 @@ for ($i=0; $i < $nationcount; $i++) {
|
||||
<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']}'";
|
||||
$query = "select state,term 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);
|
||||
//속령수
|
||||
$query = "select city from city where nation='{$nation['nation']}'";
|
||||
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
@@ -135,33 +144,6 @@ for ($i=0; $i < $nationcount; $i++) {
|
||||
}
|
||||
|
||||
$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['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>
|
||||
@@ -179,15 +161,13 @@ for ($i=0; $i < $nationcount; $i++) {
|
||||
<td align=center>-</td>
|
||||
<td align=center>-</td>";
|
||||
}
|
||||
echo "
|
||||
<td align=left style=font-size:7px;>{$note}</td>
|
||||
</tr>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='{$me['nation']}'";
|
||||
$query = "select nation,name,color,type,gold,rice,bill,rate,scout,war,secretlimit from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
@@ -223,10 +203,35 @@ if ($budgetricediff > 0) {
|
||||
<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>870px 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>
|
||||
@@ -268,8 +273,8 @@ if ($budgetricediff > 0) {
|
||||
<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>
|
||||
|
||||
+1
-1
@@ -177,7 +177,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) : ?>
|
||||
|
||||
+18
-8
@@ -19,11 +19,11 @@ $connect=$db->get();
|
||||
|
||||
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']}'";
|
||||
$query = "select level from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
@@ -33,9 +33,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();
|
||||
}
|
||||
|
||||
$sel = [];
|
||||
@@ -99,10 +104,15 @@ switch ($type) {
|
||||
|
||||
$generals = $db->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 = %i %l', $me['nation'], $orderSQL);
|
||||
|
||||
$genCntEff = 0;
|
||||
foreach ($generals as &$general) {
|
||||
$general['cityText'] = CityConst::byID($general['city'])->name;
|
||||
$general['troopText'] = $troopName[$general['troop']]??'-';
|
||||
|
||||
if($general['npc'] != 5){
|
||||
$genCntEff += 1;
|
||||
}
|
||||
|
||||
if ($general['level'] == 12) {
|
||||
$lbonus = $nation['level'] * 2;
|
||||
} elseif ($general['level'] >= 5) {
|
||||
@@ -220,11 +230,11 @@ foreach($generals as $general){
|
||||
<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/$genCnt, 2)?></td>
|
||||
<td class='bg1'>평균 쌀</td><td><?=number_format($totalRice/$genCnt, 2)?></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($genCnt)?></td>
|
||||
<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>
|
||||
|
||||
+91
-20
@@ -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"; }
|
||||
@@ -73,6 +122,7 @@ $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connec
|
||||
$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),"");
|
||||
|
||||
|
||||
echo "
|
||||
<table align=center width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
@@ -88,10 +138,10 @@ for($i=12; $i >= $lv; $i-=2) {
|
||||
?>
|
||||
<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=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=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
|
||||
@@ -146,12 +196,15 @@ 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,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
if($general['npc'] == 5){
|
||||
continue;
|
||||
}
|
||||
echo "
|
||||
<option value={$general['no']}>{$general['name']} <small>({$general['leader']}/{$general['power']}/{$general['intel']}, {$general['killturn']}턴)</small></option>";
|
||||
}
|
||||
@@ -272,9 +325,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>
|
||||
@@ -388,7 +467,7 @@ 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;>
|
||||
";
|
||||
@@ -448,19 +527,11 @@ 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)"; // 도시 이름 목록
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
@@ -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>
|
||||
@@ -112,7 +113,7 @@ for ($j=0; $j < $citycount; $j++) {
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$gen2 = MYDB_fetch_array($genresult);
|
||||
|
||||
$query = "select name from general where no='{$city['gen3']}'"; // 시중
|
||||
$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);
|
||||
|
||||
@@ -162,7 +163,7 @@ for ($j=0; $j < $citycount; $j++) {
|
||||
<td align=center>";
|
||||
echo $gen2['name']==''?"-":"{$gen2['name']}";
|
||||
echo "</td>
|
||||
<td align=center id=bg1>시중</td>
|
||||
<td align=center id=bg1>종사</td>
|
||||
<td align=center>";
|
||||
echo $gen3['name']==''?"-":"{$gen3['name']}";
|
||||
echo "</td>
|
||||
|
||||
+35
-47
@@ -9,13 +9,12 @@ if($type <= 0 || $type > 15) {
|
||||
$type = 1;
|
||||
}
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
increaseRefresh("세력장수", 1);
|
||||
@@ -31,6 +30,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 +83,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=>['leader', true],
|
||||
5=>['power', 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,leader,power,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,8 +123,7 @@ 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;
|
||||
@@ -171,10 +155,14 @@ 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>".getDed($general['dedication'])."</td>
|
||||
|
||||
@@ -30,6 +30,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')?>
|
||||
|
||||
@@ -116,7 +120,7 @@ echo "
|
||||
<td align=center>+$goldincomeList[0] / +$deadIncome</td>
|
||||
<td align=center id=bg1>세곡/둔전</td>
|
||||
<td align=center>+$riceincomeList[0] / +$riceincomeList[1]</td>
|
||||
<td align=center id=bg1>지급율</td>
|
||||
<td align=center id=bg1>지급률</td>
|
||||
<td align=center colspan=3>"; echo $me['nation']==0?"해당 없음":"{$nation['bill']} %"; echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+30
-9
@@ -10,8 +10,6 @@ $tnmt = Util::getReq('tnmt', 'int', 1);
|
||||
//$detachNPC = Util::getReq('detachNPC', 'bool');
|
||||
$detachNPC = false;
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
if($mode < 0 || $mode > 2){
|
||||
$mode = 2;
|
||||
}
|
||||
@@ -30,7 +28,7 @@ $connect=$db->get();
|
||||
|
||||
increaseRefresh("내정보", 1);
|
||||
|
||||
$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'";
|
||||
$query = "select no,npc,mode,tnmt,myset,train,atmos from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -48,13 +46,33 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
$submit = 'hidden';
|
||||
}
|
||||
|
||||
$me['myset'] -= 1;
|
||||
if($mode == 0){
|
||||
$db->update('general', [
|
||||
'myset'=>$db->sqleval('myset-1'),
|
||||
'mode'=>$mode,
|
||||
'train'=>max(0, $me['train'] - 3),
|
||||
'atmos'=>max(0, $me['atmos'] - 3),
|
||||
], 'owner=%i AND mode!=%i', $userID, $mode);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'myset'=>$db->sqleval('myset-1'),
|
||||
'mode'=>$mode
|
||||
], 'owner=%i AND mode!=%i', $userID, $mode);
|
||||
}
|
||||
|
||||
$db->update('general', [
|
||||
'myset'=>$db->sqleval('myset-1'),
|
||||
'mode'=>$mode,
|
||||
'tnmt'=>$tnmt
|
||||
], 'owner=%i', $userID);
|
||||
if($db->affectedRows()){
|
||||
$me['myset'] -= 1;
|
||||
}
|
||||
|
||||
if($me['tnmt'] != $tnmt){
|
||||
$db->update('general', [
|
||||
'tnmt'=>$tnmt
|
||||
], 'owner=%i', $userID);
|
||||
}
|
||||
|
||||
$me['mode'] = $mode;
|
||||
$me['tnmt'] = $tnmt;
|
||||
|
||||
if($me['npc'] == 1 && $detachNPC){
|
||||
$turnterm = $gameStor->turnterm;
|
||||
@@ -84,6 +102,7 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
<?=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')?>
|
||||
@@ -119,6 +138,8 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
|
||||
<a href="c_vacation.php"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button></a><br><br>
|
||||
<!--빙의 해제용 삭턴 조절<br>
|
||||
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>-->
|
||||
개인용 CSS<br>
|
||||
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -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>
|
||||
|
||||
+8
-5
@@ -73,11 +73,14 @@ uasort($troops, function($lhs, $rhs){
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<title><?=UniqueConst::$serverName?>: 부대편성</title>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/troops.css')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -101,7 +104,7 @@ uasort($troops, function($lhs, $rhs){
|
||||
<?php elseif($me['troop'] == 0): ?>
|
||||
<input type=submit name=btn value='부 대 가 입'>
|
||||
<?php else: ?>
|
||||
<input type=submit name=btn value='부 대 탈 퇴' onclick='return confirm(\"정말 부대를 탈퇴하시겠습니까?\")'>
|
||||
<input type=submit name=btn value='부 대 탈 퇴' onclick='return confirm("정말 부대를 탈퇴하시겠습니까?")'>
|
||||
<?php endif;?>
|
||||
</td></tr></tfoot>
|
||||
<tbody>
|
||||
@@ -132,7 +135,7 @@ foreach ($troops as $troopNo=>$troop) {
|
||||
<tr>
|
||||
<td align=center rowspan=2><input type='radio' name='troop' value='<?=$troop['troop']?>'></td>
|
||||
<td align=center><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
|
||||
<td height=64 style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?=$genlistText?></td>
|
||||
<td rowspan=2><?=$troopLeader['turnText']?></td>
|
||||
</tr>
|
||||
@@ -145,7 +148,7 @@ foreach ($troops as $troopNo=>$troop) {
|
||||
<tr>
|
||||
<td align=center rowspan=2> </td>
|
||||
<td align=center ><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
|
||||
<td height=64 style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'> </td>
|
||||
<td rowspan=2 width=62><?=$genlistText?></td>
|
||||
<td rowspan=2>
|
||||
<?php if ($me['no'] == $troopLeader['no']): ?>
|
||||
|
||||
@@ -0,0 +1,473 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::requireLogin()->setReadOnly();
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$startYear = $gameStor->getValue('startyear');
|
||||
|
||||
?>
|
||||
<!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=1100" />
|
||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||
<?=WebUtil::printCSS('css/common.css')?>
|
||||
<?=WebUtil::printCSS('css/battle_simulator.css')?>
|
||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/download2.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<?=WebUtil::printJS('js/battle_simulator.js')?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
전역 설정
|
||||
</div>
|
||||
<div class="card-body dragpad_battle">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" aria-describedby="text_year" value="<?=$startYear?>" disabled>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">년 시작</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" id="year" value="<?=$startYear+3?>" min="<?=$startYear?>">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">년</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" id="month" value="1" min="1" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">월</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="input-group mr-2" role="group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">반복 횟수</span>
|
||||
</div>
|
||||
<select class="custom-select" id="repeat_cnt">
|
||||
<option value="1">1회 (로그 표기)</option>
|
||||
<option value="1000">1000회 (요약 표기)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group mr-2" role="group">
|
||||
<button type="button" class="btn btn-danger btn-begin_battle">전투</button>
|
||||
</div>
|
||||
<div class="btn-group mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-battle-save">모두 저장</button>
|
||||
<input type="file" class="form_load_battle_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-2 attacker_nation">
|
||||
<div class="card-header">
|
||||
출병국 설정
|
||||
</div>
|
||||
<div class="card-body nation_detail dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 성향</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(getNationTypeList() as $typeID => [$name,$pros,$cons]): ?>
|
||||
<option value="<?=$typeID?>"><?=$name?> (<?=$pros?>, <?=$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기술</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">등급</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_level">
|
||||
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
|
||||
<option value="<?=$nationLevel?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도시 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_city_level">
|
||||
<?php foreach(getCityLevelList() as $levelID => $name): ?>
|
||||
<option value="<?=$levelID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수도</span>
|
||||
</div>
|
||||
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="2" autocomplete="off" checked>N
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 attacker_form general_form" data-general_no='1'>
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
<div class="col-sm defender-column">
|
||||
<div class="card mb-2 defender_nation">
|
||||
<div class="card-header">
|
||||
수비국 설정
|
||||
</div>
|
||||
<div class="card-body dragpad_battle">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 성향</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_type" style="width:25ch;">
|
||||
<?php foreach(getNationTypeList() as $typeID => [$name,$pros,$cons]): ?>
|
||||
<option value="<?=$typeID?>"><?=$name?> (<?=$pros?>, <?=$cons?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기술</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">등급</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">국가 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_nation_level">
|
||||
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
|
||||
<option value="<?=$nationLevel?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도시 규모</span>
|
||||
</div>
|
||||
<select class="custom-select form_city_level">
|
||||
<?php foreach(getCityLevelList() as $levelID => $name): ?>
|
||||
<option value="<?=$levelID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수도</span>
|
||||
</div>
|
||||
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off" checked>N
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">수비</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">성벽</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 defender_add_form">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-success add-defender">추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-2 form_sample">
|
||||
<div class="card-header">
|
||||
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-warning copy-defender">복제</button>
|
||||
<button type="button" class="btn btn-danger delete-defender">제거</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body general_detail">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">이름</span>
|
||||
</div>
|
||||
<input type="text" class="form-control form_general_name" value="무명" style="width:15ch;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">직위</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_level" style="width:8ch;">
|
||||
<option value="1">일반</option>
|
||||
<option value="4">태수</option>
|
||||
<option value="3">군사</option>
|
||||
<option value="2">종사</option>
|
||||
<option value="10">무장 수뇌</option>
|
||||
<option value="9">지장 수뇌</option>
|
||||
<option value="11">참모</option>
|
||||
<option value="12">군주</option>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Level</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
|
||||
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">통솔</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">무력</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_power" value="50" min="1" max="300" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">지력</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1">
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">명마</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_horse">
|
||||
<?php foreach(range(0, 26) as $horseID): ?>
|
||||
<option value="<?=$horseID?>"><?=getHorseName($horseID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">무기</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_weap">
|
||||
<?php foreach(range(0, 26) as $weapID): ?>
|
||||
<option value="<?=$weapID?>"><?=getWeapName($weapID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">서적</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_book">
|
||||
<?php foreach(range(0, 26) as $bookID): ?>
|
||||
<option value="<?=$bookID?>"><?=getBookName($bookID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">부상</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">%(<span class="injury_helptext">건강</span>)</span>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">군량</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">도구</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_item">
|
||||
<?php foreach(range(0, 26) as $bookID): ?>
|
||||
<option value="<?=$bookID?>"><?=getItemName($bookID)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">병종</span>
|
||||
</div>
|
||||
<select class="custom-select form_crewtype">
|
||||
<?php foreach(GameUnitConst::all() as $crewTypeID => $crewType): ?>
|
||||
<?php if($crewTypeID < 0){ continue; } ?>
|
||||
<option value="<?=$crewTypeID?>"><?=$crewType->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">병사</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_crew" value="7000" min="100" step="100">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">성격</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_character">
|
||||
<?php foreach(getCharacterList() as $characterID => [$name,$info]): ?>
|
||||
<option value="<?=$characterID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">훈련</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_train" value="100" min="40" max="<?=GameConst::$maxTrainByWar?>" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">사기</span>
|
||||
</div>
|
||||
<input type="number" class="form-control form_atmos" value="100" min="40" max="<?=GameConst::$maxAtmosByWar?>" step="1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">전특</span>
|
||||
</div>
|
||||
<select class="custom-select form_general_special_war">
|
||||
<option value="0">-</option>
|
||||
<?php foreach(SpecialityConst::WAR as $specialWarID => [$name,$buff,$cond]): ?>
|
||||
<option value="<?=$specialWarID?>"><?=$name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">보병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex0">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">궁병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex10">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex20">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">귀병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex30">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">차병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex40">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="input-group-prepend only_defender">
|
||||
<span class="input-group-text">수비여부</span>
|
||||
</div>
|
||||
<select class="custom-select form_defend_mode only_defender">
|
||||
<option value="2">훈사 80</option>
|
||||
<option value="3">훈사 60</option>
|
||||
<option value="0">안함</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- <div class="col-sm"> -->
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
전투 요약
|
||||
</div>
|
||||
<table class="table">
|
||||
<tbody id="battle_result_summary">
|
||||
<tr><th style='width:18ch;'>전투 일시</th><td id='result_datetime'></td></tr>
|
||||
<tr><th>전투 횟수</th><td id='result_warcnt'></td></tr>
|
||||
<tr><th>전투 페이즈</th><td id='result_phase'></td></tr>
|
||||
<tr><th>준 피해</th><td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td></tr>
|
||||
<tr><th>받은 피해</th><td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td></tr>
|
||||
<tr><th>출병자 군량 소모</th><td id='result_attackerRice'></td></tr>
|
||||
<tr><th>수비자 군량 소모</th><td id='result_defenderRice'></td></tr>
|
||||
<tr><th>공격자 스킬</th><td id='result_attackerSkills'></td></tr>
|
||||
<tr class='result_defenderSkills'><th>수비자1 스킬</th><td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 로그
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleResultLog">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
마지막 전투 상세 로그
|
||||
</div>
|
||||
<div class="card-body" id="generalBattleDetailLog">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -27,7 +27,6 @@ $sel = Util::getReq('sel', 'int');
|
||||
$msg = '';
|
||||
$msg2 = '';
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$title = Util::getReq('title');
|
||||
$msg = Util::getReq('msg');
|
||||
$num = Util::getReq('num', 'int');
|
||||
$reply = Util::getReq('reply');
|
||||
// $title, $msg, $num
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
if (getBlockLevel() == 1 || getBlockLevel() == 3) {
|
||||
header('location:b_chiefboard.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
$title = str_replace("|", " ", $title);
|
||||
$msg = str_replace("|", " ", $msg);
|
||||
$reply = str_replace("|", " ", $reply);
|
||||
$title = trim($title);
|
||||
$msg = trim($msg);
|
||||
$reply = trim($reply);
|
||||
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//새글 추가시
|
||||
if($num == -1 && $title != "" && $msg != "") {
|
||||
$num = $nation['coreindex'] + 1;
|
||||
if($num >= 20) { $num = 0; }
|
||||
$msg = $title."|".$msg;
|
||||
$msg = addslashes(SQ2DQ($msg));
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='{$me['no']}',coreboard{$num}_when='$date' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update nation set coreindex='$num' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
//$num에 댓글시
|
||||
} elseif($num >= 0 && $reply != "") {
|
||||
$newmsg = $nation["coreboard{$num}"]."|".$me['no']."|".$reply;
|
||||
$newmsg = addslashes(SQ2DQ($newmsg));
|
||||
|
||||
$query = "update nation set coreboard{$num}='$newmsg' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
header('location:b_chiefboard.php');
|
||||
+10
-7
@@ -12,29 +12,32 @@ $rate = Util::getReq('rate', 'int');
|
||||
$bill = Util::getReq('bill', 'int');
|
||||
$secretlimit = Util::getReq('secretlimit', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
$me = $db->queryFirstRow('SELECT `no`,nation,`level` FROM general WHERE `owner`=%i', $userID);
|
||||
$me = $db->queryFirstRow('SELECT `no`,nation,`level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
|
||||
|
||||
//내가 수뇌부이어야함
|
||||
if($me['level'] < 5) {
|
||||
$permission = checkSecretPermission($me);
|
||||
if($permission < 0){
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
else if ($me['level'] < 5 && $permission != 4) {
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
if($btn == "국가방침") {
|
||||
if($btn == "국가방침 수정") {
|
||||
$msg = mb_substr($msg, 0, 16384);
|
||||
//$msg = StringUtil::
|
||||
$db->update('nation', [
|
||||
'msg'=>WebUtil::htmlPurify($msg)
|
||||
], 'nation=%i',$me['nation']);
|
||||
} elseif($btn == "임관권유") {
|
||||
} elseif($btn == "임관 권유문 수정") {
|
||||
$scoutmsg = mb_substr($scoutmsg, 0, 1000);
|
||||
$db->update('nation', [
|
||||
'scoutmsg'=>WebUtil::htmlPurify($scoutmsg)
|
||||
@@ -44,7 +47,7 @@ if($btn == "국가방침") {
|
||||
$db->update('nation', [
|
||||
'rate'=>$rate,
|
||||
], 'nation=%i', $me['nation']);
|
||||
} elseif($btn == "지급율") {
|
||||
} elseif($btn == "지급률") {
|
||||
$bill = Util::valueFit($bill, 20, 200);
|
||||
$db->update('nation', [
|
||||
'bill'=>$bill
|
||||
|
||||
@@ -93,11 +93,6 @@ if($command == 61) {
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['level'] >= 5) {
|
||||
$note = StringUtil::neutralize($note, 90);
|
||||
|
||||
$query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$count = count($turn);
|
||||
$str = "type=type";
|
||||
for($i=0; $i < $count; $i++) {
|
||||
|
||||
+48
-23
@@ -11,8 +11,6 @@ $genlist = Util::getReq('genlist', 'int');
|
||||
$outlist = Util::getReq('outlist', 'int');
|
||||
$citylist = Util::getReq('citylist', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
@@ -61,7 +59,7 @@ if($btn == "임명") {
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr from general where no='$outlist'";
|
||||
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr,permission,penalty,belong from general where no='$outlist'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -75,6 +73,19 @@ if($btn == "임명") {
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
//추방할사람이 외교권자이면 불가
|
||||
$permission = checkSecretPermission($general);
|
||||
if($permission == 4){
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
//NPC 부대장 추방 불가
|
||||
if($general['npc'] == 5){
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
//나와 대상 장수는 국가가 같아야 함
|
||||
@@ -139,18 +150,21 @@ if($btn == "추방") {
|
||||
'level'=>0,
|
||||
'nation'=>0,
|
||||
'belong'=>0,
|
||||
'permission'=>'normal',
|
||||
], 'no=%i', $general['no']);
|
||||
}
|
||||
else{
|
||||
$db->update('general', [
|
||||
'level'=>0,
|
||||
'permission'=>'normal',
|
||||
'nation'=>0,
|
||||
'belong'=>0,
|
||||
'betray'=>$db->sqleval('betray + 1'),
|
||||
'makelimit'=>12,
|
||||
'gold'=>$general['gold'],
|
||||
'rice'=>$general['rice'],
|
||||
'experience'=>$db->sqleval('experience * (1 - 0.1*betray)'),
|
||||
'dedication'=>$db->sqleval('dedication * (1 - 0.1*betray)'),
|
||||
'betray'=>$db->sqleval('betray + 1'),
|
||||
], 'no=%i', $general['no']);
|
||||
}
|
||||
}
|
||||
@@ -296,27 +310,29 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
|
||||
|
||||
if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
|
||||
switch($level) {
|
||||
case 4: $lv = 1; break;
|
||||
case 3: $lv = 2; break;
|
||||
case 2: $lv = 3; break;
|
||||
case 4: $genlv = 'gen1'; $genlvset = 'gen1set'; break;
|
||||
case 3: $genlv = 'gen2'; $genlvset = 'gen2set'; break;
|
||||
case 2: $genlv = 'gen3'; $genlvset = 'gen3set'; break;
|
||||
}
|
||||
|
||||
$query = "select gen{$lv} from city where nation='{$me['nation']}' and city='$citylist'";
|
||||
$query = "select {$genlv} from city where nation='{$me['nation']}' and city='$citylist'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($result);
|
||||
if(!$city){
|
||||
header('location:b_myBossInfo.php');
|
||||
die();
|
||||
}
|
||||
$oldlist = $city["gen{$lv}"];
|
||||
$oldlist = $city[$genlv];
|
||||
|
||||
if($oldlist != 0) {
|
||||
//기존 장수 일반으로
|
||||
$query = "update general set level=1 where no='$oldlist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'level'=>1
|
||||
], 'no=%i', $oldlist);
|
||||
//기존 자리 공석으로
|
||||
$query = "update city set gen{$lv}=0 where city='$citylist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('city', [
|
||||
$genlv=>0
|
||||
], 'city = %i AND nation = %i', $citylist , $me['nation']);
|
||||
}
|
||||
if($genlist != 0) {
|
||||
$valid = 0;
|
||||
@@ -328,17 +344,26 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
|
||||
|
||||
if($valid == 1) {
|
||||
// 신임 장수의 원래 자리 해제
|
||||
$query = "update city set gen1=0 where gen1='$genlist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update city set gen2=0 where gen2='$genlist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update city set gen3=0 where gen3='$genlist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('city', [
|
||||
'gen1'=>0,
|
||||
], 'gen1=%i', $genlist);
|
||||
$db->update('city', [
|
||||
'gen2'=>0,
|
||||
], 'gen2=%i', $genlist);
|
||||
$db->update('city', [
|
||||
'gen3'=>0,
|
||||
], 'gen3=%i', $genlist);
|
||||
|
||||
//신임 장수
|
||||
$query = "update general set level='$level' where no='$genlist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update city set gen{$lv}='$genlist',gen{$lv}set='1' where city='$citylist'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('city', [
|
||||
$genlv=>$genlist,
|
||||
$genlvset=>1
|
||||
], 'city=%i AND nation=%i', $citylist, $general['nation']);
|
||||
if($db->affectedRows() > 0){
|
||||
$db->update('general',[
|
||||
'level'=>$level
|
||||
], 'no=%i', $genlist);
|
||||
}
|
||||
}
|
||||
}
|
||||
header('location:b_myBossInfo.php');
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
// $title, $msg, $num
|
||||
$title = Util::getReq('title');
|
||||
$msg = Util::getReq('msg');
|
||||
$num = Util::getReq('num', 'int');
|
||||
$reply = Util::getReq('reply');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
if(getBlockLevel() != 1 && getBlockLevel() != 3) {
|
||||
$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);
|
||||
|
||||
$title = str_replace("|", " ", $title);
|
||||
$msg = str_replace("|", " ", $msg);
|
||||
$reply = str_replace("|", " ", $reply);
|
||||
$title = trim($title);
|
||||
$msg = trim($msg);
|
||||
$reply = trim($reply);
|
||||
|
||||
$nation = getNation($me['nation']);
|
||||
|
||||
//새글 추가시
|
||||
if($num == -1 && $title != "" && $msg != "") {
|
||||
$num = $nation['boardindex'] + 1;
|
||||
if($num >= 20) { $num = 0; }
|
||||
$msg = $title."|".$msg;
|
||||
$msg = addslashes(SQ2DQ($msg));
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$query = "update nation set board{$num}='$msg',board{$num}_who='{$me['no']}',board{$num}_when='$date' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update nation set boardindex='$num' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
//$num에 댓글시
|
||||
} elseif($num >= 0 && $reply != "") {
|
||||
$newmsg = $nation["board{$num}"]."|".$me['no']."|".$reply;
|
||||
$newmsg = addslashes(SQ2DQ($newmsg));
|
||||
|
||||
$query = "update nation set board{$num}='$newmsg' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
}
|
||||
|
||||
header('location:b_nationboard.php');
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
// $msg
|
||||
$msg = Util::getReq('msg');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$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);
|
||||
|
||||
$msg = addslashes(SQ2DQ($msg));
|
||||
|
||||
$query = "update nation set rule='$msg' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
header('location:b_nationrule.php');
|
||||
@@ -14,8 +14,6 @@ $gen = Util::getReq('gen', 'int');
|
||||
$sel = Util::getReq('sel', 'int');
|
||||
$trig = Util::getReq('trig', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
@@ -9,8 +9,6 @@ $name = Util::getReq('name');
|
||||
$gen = Util::getReq('gen', 'int');
|
||||
$troop = Util::getReq('troop', 'int');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = $session::getUserID();
|
||||
|
||||
+3
-1
@@ -12,7 +12,9 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$killturn = $gameStor->killturn;
|
||||
|
||||
$db->update('general', ['killturn'=>$killturn*3], 'owner=%i', $userID);
|
||||
$db->update('general', [
|
||||
'killturn'=>$killturn*3,
|
||||
], 'owner=%i', $userID);
|
||||
|
||||
|
||||
header('location:b_myPage.php');
|
||||
|
||||
@@ -10,8 +10,6 @@ $comment = Util::getReq('comment');
|
||||
$title = Util::getReq('title');
|
||||
$str = Util::getReq('str');
|
||||
|
||||
extractMissingPostToGlobals();
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
+5
-1
@@ -16,6 +16,10 @@ $db = DB::db();
|
||||
<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')?>
|
||||
<script type="text/javascript">
|
||||
@@ -107,7 +111,7 @@ function myCommandList() {
|
||||
echo "
|
||||
<tr height=28>
|
||||
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
|
||||
<td width=71 align=center height=24 id=bg1><b>{$year}年 {$month}月</b></td>
|
||||
<td width=71 align=center height=24 id=bg1 style='max-width:68px;white-space:nowrap;overflow:hidden;'><b>{$year}年 {$month}月</b></td>
|
||||
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
|
||||
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
|
||||
</tr>";
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#container{
|
||||
width:1024px;
|
||||
margin:auto;
|
||||
}
|
||||
|
||||
.defender_add_form .general_detail{
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
.form_sample{
|
||||
display:none;
|
||||
}
|
||||
|
||||
input[type=number]{
|
||||
text-align:right;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#newArticle{
|
||||
width:1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.titleInput{
|
||||
width:100%;
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
margin:1px 5px;
|
||||
}
|
||||
|
||||
.contentInput{
|
||||
width:100%;
|
||||
min-height:3em;
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
padding:1px 5px;
|
||||
}
|
||||
|
||||
.articleFrame{
|
||||
width:1000px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.commentText{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.authorName, .comment .author{
|
||||
width:110px;
|
||||
font-size:85%;
|
||||
}
|
||||
|
||||
.date{
|
||||
width:125px;
|
||||
font-size:85%;
|
||||
}
|
||||
|
||||
.text{
|
||||
text-align:left;
|
||||
padding:1px 5px;
|
||||
}
|
||||
|
||||
.submitComment{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.commentText{
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
padding:1px 5px;
|
||||
}
|
||||
+33
-1
@@ -201,4 +201,36 @@ div.bar_out div.bar_in{
|
||||
font-size : .875rem;
|
||||
line-height : .5;
|
||||
border-radius : .2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.edit_form.viewer{
|
||||
max-height:200px;
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
.trumbowyg-box{
|
||||
margin:0;
|
||||
border-left:none;
|
||||
border-right:none;
|
||||
}
|
||||
|
||||
.edit_form.trumbowyg-editor{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.select2-dropdown.simple-select2-align-center li.select2-results__option{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single.text-secondary .select2-selection__rendered{
|
||||
color:white;
|
||||
}
|
||||
|
||||
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false]{
|
||||
color:white;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#scoutMsgForm .viewer{
|
||||
max-height:200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.note-editor.card {
|
||||
background:inherit;
|
||||
color:inherit;
|
||||
font-family: inherit;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-editing-area .note-editable {
|
||||
background:inherit;
|
||||
color:inherit;
|
||||
font-family: inherit;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-statusbar{
|
||||
background-color:#444444;
|
||||
border-top: 1px solid rgba(0,0,0,0.125);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
#newLetter {
|
||||
width:1000px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
#newLetter th{
|
||||
width:20ch;
|
||||
}
|
||||
|
||||
#newLetter textarea{
|
||||
width:100%;
|
||||
min-height:3em;
|
||||
color:white;
|
||||
background-color:transparent;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.letterFrame{
|
||||
width:1000px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.letterFrame th{
|
||||
width:20ch;
|
||||
}
|
||||
|
||||
.letterHeader{
|
||||
position: relative;
|
||||
font-size:200%;
|
||||
}
|
||||
|
||||
.letterDate{
|
||||
position: absolute;
|
||||
right:1ch;
|
||||
bottom:0.2em;
|
||||
font-size:50%;
|
||||
|
||||
}
|
||||
|
||||
.letterBrief, .letterDetail{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.letterSignerPlate{
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.letterSrc, .letterDest{
|
||||
display:inline-block;
|
||||
margin: 0 10px;
|
||||
border: 1px solid gray;
|
||||
width:110px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.signerNation, .signerName{
|
||||
border-top: 1px solid gray;
|
||||
}
|
||||
@@ -67,4 +67,15 @@ color:white;
|
||||
|
||||
.nation_info td{
|
||||
height:18px;
|
||||
}
|
||||
|
||||
#sidebar{
|
||||
position:fixed;
|
||||
right:0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
#sidebar button{
|
||||
/*width:100px;*/
|
||||
}
|
||||
@@ -11,6 +11,12 @@
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.map_title_tooltiptext .tooltip-inner{
|
||||
max-width:220px;
|
||||
width:220px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.map_title_text{
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
@@ -55,6 +61,7 @@
|
||||
position:absolute;
|
||||
right:0;
|
||||
bottom:0;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.map_body .map_toggle_cityname::after{
|
||||
@@ -65,6 +72,18 @@
|
||||
content: "켜기"
|
||||
}
|
||||
|
||||
.map_body .map_toggle_single_tap{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.map_body .map_toggle_single_tap::after{
|
||||
content: "끄기"
|
||||
}
|
||||
|
||||
.map_body .map_toggle_single_tap.active::after{
|
||||
content: "켜기"
|
||||
}
|
||||
|
||||
.world_map .city_tooltip{
|
||||
position: absolute;
|
||||
z-index:6;
|
||||
|
||||
+27
-3
@@ -59,12 +59,16 @@
|
||||
height:667px;
|
||||
}
|
||||
|
||||
.private_message{
|
||||
height:667px;
|
||||
.diplomacy_message{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.national_message{
|
||||
height:1350px;
|
||||
height:667px;
|
||||
}
|
||||
|
||||
.private_message{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.msg_icon{
|
||||
@@ -83,6 +87,7 @@
|
||||
font-weight: bold;
|
||||
margin-bottom:3px;
|
||||
color:white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.message_input_form{
|
||||
@@ -129,6 +134,16 @@
|
||||
outline-style:solid;
|
||||
outline-width:1px;
|
||||
outline-color: gray;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
.board_side > div{
|
||||
height: 1.2em;
|
||||
}
|
||||
|
||||
.msg_invalid{
|
||||
color:rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.msg_body{
|
||||
@@ -143,6 +158,14 @@
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.btn-delete-msg{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
margin:2px 2px 0 2px;
|
||||
font-size:8px;
|
||||
}
|
||||
|
||||
/*
|
||||
.public_message .msg_target{
|
||||
box-shadow: 2px 2px darkslategrey;
|
||||
@@ -164,6 +187,7 @@
|
||||
.msg_content{
|
||||
margin-left:10px;
|
||||
margin-right:5px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.msg_prompt{
|
||||
|
||||
+114
-81
@@ -243,7 +243,7 @@ function cityInfo() {
|
||||
<td height=7>".bar($wall)."</td>
|
||||
<td rowspan=2 style='text-align:center;' class='bg1'><b>시세</b></td>
|
||||
<td height=7>".bar($trade)."</td>
|
||||
<td rowspan=2 style='text-align:center;' class='bg1'><b>시중</b></td>
|
||||
<td rowspan=2 style='text-align:center;' class='bg1'><b>종사</b></td>
|
||||
<td rowspan=2 style='text-align:center;'>{$gen3['name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -322,7 +322,7 @@ function myNationInfo() {
|
||||
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$nation['rice']}";echo "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='bg1 center'><b>지급율</b></td>
|
||||
<td class='bg1 center'><b>지급률</b></td>
|
||||
<td class='center'>";
|
||||
if($me['nation'] == 0) {
|
||||
echo "해당 없음";
|
||||
@@ -399,25 +399,89 @@ function myNationInfo() {
|
||||
";
|
||||
}
|
||||
|
||||
function checkSecretMaxPermission($me){
|
||||
$secretMax = 4;
|
||||
if($penalty['noTopSecret']??false){
|
||||
$secretMax = 1;
|
||||
}
|
||||
else if($penalty['noChief']??false){
|
||||
$secretMax = 1;
|
||||
}
|
||||
else if($penalty['noAmbassador']??false){
|
||||
$secretMax = 2;
|
||||
}
|
||||
return $secretMax;
|
||||
}
|
||||
|
||||
function checkSecretPermission($me, $checkSecretLimit=true){
|
||||
if(!key_exists('penalty', $me) || !key_exists('permission', $me)){
|
||||
trigger_error ('canAccessSecret() 함수에 필요한 인자가 부족');
|
||||
}
|
||||
$penalty = Json::decode($me['penalty'])??[];
|
||||
$permission = $me['permission'];
|
||||
|
||||
if(!$me['nation']){
|
||||
return -1;
|
||||
}
|
||||
|
||||
if($me['level'] == 0){
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if($pernalty['noSecret']??false){
|
||||
return 0;
|
||||
}
|
||||
|
||||
$secretMin = 0;
|
||||
$secretMax = checkSecretMaxPermission($me);
|
||||
|
||||
|
||||
if($me['level'] == 12){
|
||||
$secretMin = 4;
|
||||
}
|
||||
else if($me['permission'] == 'ambassador'){
|
||||
$secretMin = 4;
|
||||
}
|
||||
else if($me['permission'] == 'auditor'){
|
||||
$secretMin = 3;
|
||||
}
|
||||
else if($me['level'] >= 5){
|
||||
$secretMin = 2;
|
||||
}
|
||||
else if($me['level'] > 1){
|
||||
$secretMin = 1;
|
||||
}
|
||||
else if($checkSecretLimit){
|
||||
$db = DB::db();
|
||||
$secretLimit = $db->queryFirstField('SELECT secretlimit FROM nation WHERE nation = %i', $me['nation']);
|
||||
if ($me['belong'] >= $secretLimit) {
|
||||
$secretMin = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return min($secretMin, $secretMax);
|
||||
}
|
||||
|
||||
function addCommand($typename, $value, $valid = 1, $color=0) {
|
||||
if($valid == 1) {
|
||||
switch($color) {
|
||||
case 0:
|
||||
echo "
|
||||
<option style=color:white;background-color:black; value={$value}>{$typename}</option>";
|
||||
<option style='color:white;background-color:black;' value='{$value}'>{$typename}</option>";
|
||||
break;
|
||||
case 1:
|
||||
echo "
|
||||
<option style=color:skyblue;background-color:black; value={$value}>{$typename}</option>";
|
||||
<option style='color:skyblue;background-color:black;' value='{$value}'>{$typename}</option>";
|
||||
break;
|
||||
case 2:
|
||||
echo "
|
||||
<option style=color:orange;background-color:black; value={$value}>{$typename}</option>";
|
||||
<option style='color:orange;background-color:black;' value='{$value}'>{$typename}</option>";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
echo "
|
||||
<option style=color:white;background-color:red; value={$value}>{$typename}</option>";
|
||||
<option style='color:white;background-color:red;' value='{$value}'>{$typename}(불가)</option>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +501,7 @@ function commandTable() {
|
||||
$connect=$db->get();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost', 'scenario']);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost', 'scenario', 'join_mode']);
|
||||
|
||||
$query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -493,7 +557,7 @@ function commandTable() {
|
||||
<select name=commandtype size=1 style='height:20px;width:260px;color:white;background-color:black;font-size:12px;'>";
|
||||
addCommand("휴 식", 0);
|
||||
addCommand("요 양", 50);
|
||||
commandGroup("========= 내 정 ==========");
|
||||
commandGroup("======= 내 정 ========");
|
||||
if($me['level'] >= 1 && ($citycount != 0 || $admin['year'] >= $admin['startyear']+3) && $city['supply'] != 0) {
|
||||
addCommand("농지개간(지력경험, 자금$develcostA)", 1, 1, $colorA);
|
||||
addCommand("상업투자(지력경험, 자금$develcostA)", 2, 1, $colorA);
|
||||
@@ -519,7 +583,7 @@ function commandTable() {
|
||||
addCommand("물자조달(랜덤경험)", 9, 0);
|
||||
}
|
||||
commandGroup("", 1);
|
||||
commandGroup("========= 군 사 ==========");
|
||||
commandGroup("======= 군 사 ========");
|
||||
if($me['level'] >= 1 && $citycount > 0) {
|
||||
addCommand("첩보(통솔경험, 자금$develcost3, 군량$develcost3)", 31);
|
||||
addCommand("징병(통솔경험)", 11);
|
||||
@@ -544,7 +608,7 @@ function commandTable() {
|
||||
}
|
||||
|
||||
commandGroup("", 1);
|
||||
commandGroup("========= 인 사 ==========");
|
||||
commandGroup("======= 인 사 ========");
|
||||
addCommand("이동(통솔경험, 자금$develcost, 사기↓)", 21);
|
||||
addCommand("강행(통솔경험, 자금$develcost5, 병력/사기/훈련↓)", 30);
|
||||
|
||||
@@ -554,7 +618,10 @@ function commandTable() {
|
||||
addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0);
|
||||
}
|
||||
|
||||
if($me['level'] >= 1 && $city['supply'] != 0) {
|
||||
if($admin['join_mode'] == 'onlyRandom'){
|
||||
//do Nothing
|
||||
}
|
||||
else if($me['level'] >= 1 && $city['supply'] != 0) {
|
||||
addCommand("등용(자금{$develcost5}+장수가치)", 22);
|
||||
} else {
|
||||
addCommand("등용(자금{$develcost5}+장수가치)", 22, 0);
|
||||
@@ -576,7 +643,7 @@ function commandTable() {
|
||||
addCommand("임관", 25, 0);
|
||||
}
|
||||
commandGroup("", 1);
|
||||
commandGroup("========= 계 략 ==========");
|
||||
commandGroup("======= 계 략 ========");
|
||||
if($me['level'] >= 1 && (($nation['level'] > 0 && $city['nation'] == $me['nation'] && $city['supply'] != 0) || $nation['level'] == 0)) {
|
||||
addCommand("화계(지력경험, 자금$develcost5, 군량$develcost5)", 32);
|
||||
addCommand("탈취(무력경험, 자금$develcost5, 군량$develcost5)", 33);
|
||||
@@ -589,7 +656,7 @@ function commandTable() {
|
||||
addCommand("선동(통솔경험, 자금$develcost5, 군량$develcost5)", 35, 0);
|
||||
}
|
||||
commandGroup("", 1);
|
||||
commandGroup("========= 개 인 ==========");
|
||||
commandGroup("======= 개 인 ========");
|
||||
if($me['level'] >= 1) {
|
||||
addCommand("단련(자금$develcost, 군량$develcost)", 41);
|
||||
} else {
|
||||
@@ -709,7 +776,7 @@ function CoreCommandTable() {
|
||||
addCommand("몰수", 24, $valid);
|
||||
commandGroup("", 1);
|
||||
commandGroup("====== 외 교 ======");
|
||||
addCommand("통합 제의", 53, $valid);
|
||||
//addCommand("통합 제의", 53, $valid);
|
||||
|
||||
addCommand("항복 권고", 51, $valid);
|
||||
if($nation['level'] >= 2) {
|
||||
@@ -843,8 +910,8 @@ function generalInfo($no) {
|
||||
|
||||
if($nation['color'] == "") { $nation['color'] = "#000000"; }
|
||||
|
||||
if($general['age'] < 60) { $general['age'] = "<font color=limegreen>{$general['age']} 세</font>"; }
|
||||
elseif($general['age'] < 80) { $general['age'] = "<font color=yellow>{$general['age']} 세</font>"; }
|
||||
if($general['age'] < GameConst::$retirementYear*0.75) { $general['age'] = "<font color=limegreen>{$general['age']} 세</font>"; }
|
||||
elseif($general['age'] < GameConst::$retirementYear) { $general['age'] = "<font color=yellow>{$general['age']} 세</font>"; }
|
||||
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
|
||||
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
@@ -877,7 +944,7 @@ function generalInfo($no) {
|
||||
$imageTemp = GetImageURL($general['imgsvr']);
|
||||
echo "<table width=498 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td width=64 height=64 rowspan=3 style='text-align:center;background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;'> </td>
|
||||
<td width=64 height=64 rowspan=3 class='generalIcon' style='text-align:center;background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;'> </td>
|
||||
<td colspan=9 height=16 style=text-align:center;color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$general['name']} 【 {$level} | {$call} | {$color}{$injury}</font> 】 ".substr($general['turntime'], 11)."</td>
|
||||
</tr>
|
||||
<tr height=16>
|
||||
@@ -1125,59 +1192,6 @@ function nationMsg() {
|
||||
return $msg?:'';
|
||||
}
|
||||
|
||||
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
$message = explode('|', $msg);
|
||||
$count = (count($message) - 2)/2;
|
||||
$message[0] = Tag2Code($message[0]);
|
||||
$message[1] = Tag2Code($message[1]);
|
||||
// $message[0] = str_replace("\n", "<br>", $message[0]);
|
||||
// $message[1] = str_replace("\n", "<br>", $message[1]);
|
||||
|
||||
if($type == 0) { $board = "c_nationboard.php"; }
|
||||
else { $board = "c_chiefboard.php"; }
|
||||
|
||||
$imageTemp = GetImageURL($imgsvr);
|
||||
echo "
|
||||
<table style='text-align:center;' width=1000 class='tb_layout bg0'>
|
||||
<tr>
|
||||
<td width=90 style='text-align:center;' class='bg1'><font size=1>$name</font></td>
|
||||
<td width=746 style='text-align:center;' class='bg1'><font size=4><b>$message[0]</b></font></td>
|
||||
<td width=148 style='text-align:center;' class='bg1'>$when</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=90 height=64 valign=top><img width='64' height='64' src={$imageTemp}/{$picture} border='0'></td>
|
||||
<td width=906 colspan=2>$message[1]</td>
|
||||
</tr>";
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$who = Tag2Code($message[2+$i*2]);
|
||||
$reply = Tag2Code($message[3+$i*2]);
|
||||
$query = "select name from general where no='$who'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$regen = MYDB_fetch_array($result);
|
||||
echo "
|
||||
<tr>
|
||||
<td width=90 style='text-align:center;'><font size=1>{$regen['name']}</font></td>
|
||||
<td width=906 colspan=2>$reply</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<form name=reply_form{$num} method=post action=$board>
|
||||
<td width=90 style='text-align:center;'>댓글달기</td>
|
||||
<td width=906 colspan=2>
|
||||
<input type=textarea name=reply maxlength=250 style=color:white;background-color:black;width:804px;>
|
||||
<input type=submit value=댓글달기>
|
||||
<input type=hidden name=num value=$num>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<br>";
|
||||
}
|
||||
|
||||
function banner() {
|
||||
|
||||
return sprintf(
|
||||
@@ -1245,14 +1259,16 @@ function increaseRefresh($type="", $cnt=1) {
|
||||
$session = Session::getInstance();
|
||||
$userID = $session->userID;
|
||||
$generalID = $session->generalID;
|
||||
$userGrade = $session->userGrade;
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$gameStor->refresh = $gameStor->refresh+$cnt; //TODO: +로 증가하는 값은 별도로 분리
|
||||
$isunited = $gameStor->isunited;
|
||||
|
||||
if($generalID) {
|
||||
if($isunited != 2 && $generalID && $userGrade < 6) {
|
||||
$db->update('general', [
|
||||
'lastrefresh'=>$date,
|
||||
'con'=>$db->sqleval('con + %i', $cnt),
|
||||
@@ -1426,10 +1442,10 @@ function checkDelay() {
|
||||
$threshold = 1;
|
||||
}
|
||||
else if($term >= 10){
|
||||
$threshold = 2;
|
||||
$threshold = 3;
|
||||
}
|
||||
else{
|
||||
$threshold = 3;
|
||||
$threshold = 6;
|
||||
}
|
||||
//지연 해야할 밀린 턴 횟수
|
||||
$iter = intdiv($timeMinDiff, $term);
|
||||
@@ -1937,6 +1953,7 @@ function updateTurntime($no) {
|
||||
'npc'=>$general['npc_org'],
|
||||
'killturn'=>$general['killturn'],
|
||||
'mode'=>2,
|
||||
'permission'=>'normal',
|
||||
'name2'=>null
|
||||
], 'no=%i',$no);
|
||||
|
||||
@@ -1952,7 +1969,7 @@ function updateTurntime($no) {
|
||||
nextRuler($general);
|
||||
}
|
||||
|
||||
//도시의 태수, 군사, 시중직도 초기화
|
||||
//도시의 태수, 군사, 종사직도 초기화
|
||||
$query = "update city set gen1='0' where gen1='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$query = "update city set gen2='0' where gen2='{$general['no']}'";
|
||||
@@ -2061,7 +2078,7 @@ function updateTurntime($no) {
|
||||
}
|
||||
}
|
||||
|
||||
if($general['age'] >= 80 && $general['npc'] == 0) {
|
||||
if($general['age'] >= GameConst::$retirementYear && $general['npc'] == 0) {
|
||||
if($admin['isunited'] == 0) {
|
||||
CheckHall($no);
|
||||
}
|
||||
@@ -2134,6 +2151,11 @@ function CheckHall($no) {
|
||||
|
||||
[$scenarioIdx, $scenarioName, $startTime] = $gameStor->getValuesAsArray(['scenario', 'scenario_text', 'starttime']);
|
||||
|
||||
$ownerName = $general['name2'];
|
||||
if($general['owner']){
|
||||
$ownerName = RootDB::db()->queryFirstField('SELECT name FROM member WHERE no = %i', $general['owner']);
|
||||
}
|
||||
|
||||
foreach($types as $idx=>$typeName) {
|
||||
|
||||
|
||||
@@ -2163,7 +2185,7 @@ function CheckHall($no) {
|
||||
'imgsvr'=>$general['imgsvr'],
|
||||
'startTime'=>$startTime,
|
||||
'unitedTime'=>$unitedDate,
|
||||
'owner_name'=>$general['name2'],
|
||||
'owner_name'=>$ownerName,
|
||||
'serverID'=>UniqueConst::$serverID,
|
||||
'serverIdx'=>$serverCnt,
|
||||
'serverName'=>UniqueConst::$serverName,
|
||||
@@ -2171,7 +2193,7 @@ function CheckHall($no) {
|
||||
];
|
||||
$jsonAux = Json::encode($aux);
|
||||
|
||||
$db->insertUpdate('ng_hall', [
|
||||
$db->insertIgnore('ng_hall', [
|
||||
'server_id'=>UniqueConst::$serverID,
|
||||
'scenario'=>$scenarioIdx,
|
||||
'general_no'=>$no,
|
||||
@@ -2179,10 +2201,21 @@ function CheckHall($no) {
|
||||
'value'=>$general[$typeName]??0,
|
||||
'owner'=>$general['owner']??null,
|
||||
'aux'=>$jsonAux
|
||||
],[
|
||||
'value'=>$general[$typeName]??0,
|
||||
'aux'=>$jsonAux
|
||||
]);
|
||||
|
||||
if($db->affectedRows() == 0){
|
||||
$db->update('ng_hall', [
|
||||
'value'=>$general[$typeName]??0,
|
||||
'aux'=>$jsonAux
|
||||
],
|
||||
'server_id = %s AND scenario = %i AND general_no = %i AND type = %i AND value < %d',
|
||||
UniqueConst::$serverID,
|
||||
$scenarioIdx,
|
||||
$no,
|
||||
$idx,
|
||||
$general[$typeName]??0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2543,7 +2576,7 @@ function deleteNation($general) {
|
||||
$oldNation['aux'] = Json::decode($oldNation['aux']);
|
||||
|
||||
// 전 장수 재야로 // 전 장수 소속 무소속으로
|
||||
$query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'";
|
||||
$query = "update general set belong=0,troop=0,level=0,nation=0,permission='normal',makelimit=12 where nation='{$general['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 도시 공백지로
|
||||
$query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='{$general['nation']}'";
|
||||
|
||||
+28
-16
@@ -105,12 +105,19 @@ function getTurn(array $general, $type, $font=1) {
|
||||
case 25: //임관
|
||||
$double = $command[1];
|
||||
|
||||
$nation = getNationStaticInfo($double);
|
||||
if($double == 98){
|
||||
$nationName = '건국된 임의 국가';
|
||||
}
|
||||
else if($double == 99){
|
||||
$nationName = '임의의 국가';
|
||||
}
|
||||
else{
|
||||
$nationName = getNationStaticInfo($double)['name']??'?!?!';
|
||||
}
|
||||
|
||||
|
||||
if(!$nation['name']) { $nation['name'] = '????'; }
|
||||
|
||||
$josaRo = JosaUtil::pick($nation['name'], '로');
|
||||
$str[$i] = "【{$nation['name']}】{$josaRo} 임관";
|
||||
$josaRo = JosaUtil::pick($nationName, '로');
|
||||
$str[$i] = "【{$nationName}】{$josaRo} 임관";
|
||||
break;
|
||||
case 26: //집합
|
||||
$str[$i] = "집합";
|
||||
@@ -471,9 +478,7 @@ function processCommand($no) {
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar from general where no='$no'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
$general = $db->queryFirstRow('SELECT npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar,myset from general where no = %i', $no);
|
||||
|
||||
list($month, $killturn) = $gameStor->getValuesAsArray(['month', 'killturn']);
|
||||
$log = [];
|
||||
@@ -511,7 +516,7 @@ function processCommand($no) {
|
||||
case 27: process_27($general); break; //발령
|
||||
case 51: process_51($general); break; //항복권고
|
||||
case 52: process_52($general); break; //원조
|
||||
case 53: process_53($general); break; //통합제의
|
||||
//case 53: process_53($general); break; //통합제의
|
||||
case 61: process_61($general); break; //불가침제의
|
||||
case 62: process_62($general); break; //선전 포고
|
||||
case 63: process_63($general); break; //종전 제의
|
||||
@@ -533,23 +538,30 @@ function processCommand($no) {
|
||||
}
|
||||
|
||||
//장수정보 재로드
|
||||
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar from general where no='$no'";
|
||||
$query = "select npc,no,name,picture,imgsvr,nation,nations,city,troop,injury,affinity,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar,myset from general where no='$no'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
}
|
||||
|
||||
$command = DecodeCommand($general['turn0']);
|
||||
$newKillturn = $killturn;
|
||||
//삭턴 처리
|
||||
if($general['npc'] >= 2 || $general['killturn'] > $killturn) {
|
||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$newKillturn = $general['killturn'] - 1;
|
||||
} elseif($command[0] == 0) {
|
||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$newKillturn = $general['killturn'] - 1;
|
||||
} else {
|
||||
$query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='{$killturn}' where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$newKillturn = $killturn;
|
||||
}
|
||||
|
||||
$newMySet = min($general['myset'] + 1, 3);
|
||||
$db->update('general', [
|
||||
'recturn'=>$db->sqleval('turn0'),
|
||||
'resturn'=>'FAIL',
|
||||
'con'=>0,
|
||||
'killturn'=>$newKillturn,
|
||||
'myset'=>$newMySet
|
||||
], 'no = %i', $general['no']);
|
||||
//FIXME: 운영자 같이 사망하면 안되는 인물에 대한 처리가 필요
|
||||
|
||||
//연속턴 아닌경우 텀 리셋
|
||||
|
||||
+123
-169
@@ -8,43 +8,43 @@ namespace sammo;
|
||||
* Side effect 없이 값의 변환만을 수행하는 함수들의 모음.
|
||||
*/
|
||||
|
||||
|
||||
function NationCharCall($call) {
|
||||
switch($call) {
|
||||
case '명가': $type =13; break;
|
||||
case '음양가': $type =12; break;
|
||||
case '종횡가': $type =11; break;
|
||||
case '불가': $type =10; break;
|
||||
case '도적': $type = 9; break;
|
||||
case '오두미도':$type = 8; break;
|
||||
case '태평도': $type = 7; break;
|
||||
case '도가': $type = 6; break;
|
||||
case '묵가': $type = 5; break;
|
||||
case '덕가': $type = 4; break;
|
||||
case '병가': $type = 3; break;
|
||||
case '유가': $type = 2; break;
|
||||
case '법가': $type = 1; break;
|
||||
default: $type = 0; break;
|
||||
static $invTable = [];
|
||||
if(!$invTable){
|
||||
foreach(getNationTypeList() as $typeID => [$name, $pros, $cons]){
|
||||
$invTable[$name] = $typeID;
|
||||
}
|
||||
}
|
||||
return $type;
|
||||
return $invTable[$call]??0;
|
||||
}
|
||||
|
||||
function getCharacterList(){
|
||||
$infoText = [
|
||||
9=>['안전', '사기 -5, 징·모병 비용 -20%'],
|
||||
8=>['유지', '훈련 -5, 징·모병 비용 -20%'],
|
||||
7=>['재간', '명성 -10%, 징·모병 비용 -20%'],
|
||||
6=>['출세', '명성 +10%, 징·모병 비용 +20%'],
|
||||
5=>['할거', '명성 -10%, 훈련 +5'],
|
||||
4=>['정복', '명성 -10%, 사기 +5'],
|
||||
3=>['패권', '훈련 +5, 징·모병 비용 +20%'],
|
||||
2=>['의협', '사기 +5, 징·모병 비용 +20%'],
|
||||
1=>['대의', '명성 +10%, 훈련 -5'],
|
||||
0=>['왕좌', '명성 +10%, 사기 -5'],
|
||||
10=>['은둔', '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%'],
|
||||
];
|
||||
return $infoText;
|
||||
}
|
||||
|
||||
function CharCall($call) {
|
||||
switch($call) {
|
||||
case '은둔': $type =10; break;
|
||||
case '안전'; $type = 9; break;
|
||||
case '유지'; $type = 8; break;
|
||||
case '재간'; $type = 7; break;
|
||||
case '출세'; $type = 6; break;
|
||||
case '할거'; $type = 5; break;
|
||||
case '정복'; $type = 4; break;
|
||||
case '패권'; $type = 3; break;
|
||||
case '의협'; $type = 2; break;
|
||||
default:
|
||||
case '대의'; $type = 1; break;
|
||||
case '왕좌'; $type = 0; break;
|
||||
static $invTable = [];
|
||||
if(\key_exists($call, $invTable)){
|
||||
return $invTable[$call];
|
||||
}
|
||||
return $type;
|
||||
|
||||
foreach(getCharacterList() as $id => [$name, $info]){
|
||||
$invTable[$name] = $id;
|
||||
}
|
||||
return $invTable[$call];
|
||||
}
|
||||
|
||||
function SpecCall($call) {
|
||||
@@ -120,42 +120,14 @@ function getNationLevel($level) {
|
||||
}
|
||||
|
||||
function getGenChar($type) {
|
||||
switch($type) {
|
||||
case 10: $call = '은둔'; break;
|
||||
case 9: $call = '안전'; break;
|
||||
case 8: $call = '유지'; break;
|
||||
case 7: $call = '재간'; break;
|
||||
case 6: $call = '출세'; break;
|
||||
case 5: $call = '할거'; break;
|
||||
case 4: $call = '정복'; break;
|
||||
case 3: $call = '패권'; break;
|
||||
case 2: $call = '의협'; break;
|
||||
case 1: $call = '대의'; break;
|
||||
case 0: $call = '왕좌'; break;
|
||||
}
|
||||
return $call;
|
||||
return getCharacterList()[$type][0];
|
||||
}
|
||||
|
||||
function getCharInfo(?int $type):?string {
|
||||
if($type === null){
|
||||
return null;
|
||||
}
|
||||
|
||||
$infoText = [
|
||||
10=>['은둔', '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%'],
|
||||
9=>['안전', '사기 -5, 징·모병 비용 -20%'],
|
||||
8=>['유지', '훈련 -5, 징·모병 비용 -20%'],
|
||||
7=>['재간', '명성 -10%, 징·모병 비용 -20%'],
|
||||
6=>['출세', '명성 +10%, 징·모병 비용 +20%'],
|
||||
5=>['할거', '명성 -10%, 훈련 +5'],
|
||||
4=>['정복', '명성 -10%, 사기 +5'],
|
||||
3=>['패권', '훈련 +5, 징·모병 비용 +20%'],
|
||||
2=>['의협', '사기 +5, 징·모병 비용 +20%'],
|
||||
1=>['대의', '명성 +10%, 훈련 -5'],
|
||||
0=>['왕좌', '명성 +10%, 사기 -5'],
|
||||
];
|
||||
|
||||
return $infoText[$type][1]??null;
|
||||
return getCharacterList()[$type][1]??null;
|
||||
}
|
||||
|
||||
function getGenSpecial($type) {
|
||||
@@ -228,7 +200,7 @@ function getSpecialInfo(?int $type):?string{
|
||||
42 => ['환술', '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%'],
|
||||
43 => ['집중', '[전투] 계략 성공 시 대미지 +50%'],
|
||||
44 => ['신중', '[전투] 계략 성공 확률 100%'],
|
||||
45 => ['반계', '[전투] 상대의 계략을 30% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'],
|
||||
45 => ['반계', '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'],
|
||||
|
||||
50 => ['보병', '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%'],
|
||||
51 => ['궁병', '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p'],
|
||||
@@ -237,7 +209,7 @@ function getSpecialInfo(?int $type):?string{
|
||||
|
||||
60 => ['돌격', '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%'],
|
||||
61 => ['무쌍', '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p'],
|
||||
62 => ['견고', '[전투] 상대 필살 불가, 상대 계략 시도시 성공 확률 -10%p'],
|
||||
62 => ['견고', '[전투] 상대 필살, 격노, 위압, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -5%'],
|
||||
63 => ['위압', '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)'],
|
||||
|
||||
70 => ['저격', '[전투] 전투 개시 시 1/3 확률로 저격 발동'],
|
||||
@@ -251,24 +223,20 @@ function getSpecialInfo(?int $type):?string{
|
||||
return $infoText[$type][1]??null;
|
||||
}
|
||||
|
||||
function getNationType($type) {
|
||||
switch($type) {
|
||||
case 13: $call = '명 가'; break;
|
||||
case 12: $call = '음 양 가'; break;
|
||||
case 11: $call = '종 횡 가'; break;
|
||||
case 10: $call = '불 가'; break;
|
||||
case 9: $call = '도 적'; break;
|
||||
case 8: $call = '오 두 미 도'; break;
|
||||
case 7: $call = '태 평 도'; break;
|
||||
case 6: $call = '도 가'; break;
|
||||
case 5: $call = '묵 가'; break;
|
||||
case 4: $call = '덕 가'; break;
|
||||
case 3: $call = '병 가'; break;
|
||||
case 2: $call = '유 가'; break;
|
||||
case 1: $call = '법 가'; break;
|
||||
case 0: $call = '-'; break;
|
||||
function getNationType(?int $type) {
|
||||
if($type === null){
|
||||
return '-';
|
||||
}
|
||||
return $call;
|
||||
static $cache = [];
|
||||
if(\key_exists($type, $cache)){
|
||||
return $cache[$type];
|
||||
}
|
||||
|
||||
$text = getNationTypeList()[$type][0]??'-';
|
||||
$text = join(' ', StringUtil::splitString($text));
|
||||
$cache[$type] = $text;
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
@@ -287,24 +255,12 @@ function getConnect($con) {
|
||||
return $conname;
|
||||
}
|
||||
|
||||
function getNationType2($type) {
|
||||
switch($type) {
|
||||
case 13: $call = '<font color=cyan>기술↑ 인구↑</font> <font color=magenta>쌀수입↓ 수성↓</font>'; break;
|
||||
case 12: $call = '<font color=cyan>내정↑ 인구↑</font> <font color=magenta>기술↓ 전략↓</font>'; break;
|
||||
case 11: $call = '<font color=cyan>전략↑ 수성↑</font> <font color=magenta>금수입↓ 내정↓</font>'; break;
|
||||
case 10: $call = '<font color=cyan>민심↑ 수성↑</font> <font color=magenta>금수입↓</font>'; break;
|
||||
case 9: $call = '<font color=cyan>계략↑</font> <font color=magenta>금수입↓ 치안↓ 민심↓</font>'; break;
|
||||
case 8: $call = '<font color=cyan>쌀수입↑ 인구↑</font> <font color=magenta>기술↓ 수성↓ 내정↓</font>'; break;
|
||||
case 7: $call = '<font color=cyan>인구↑ 민심↑</font> <font color=magenta>기술↓ 수성↓</font>'; break;
|
||||
case 6: $call = '<font color=cyan>인구↑</font> <font color=magenta>기술↓ 치안↓</font>'; break;
|
||||
case 5: $call = '<font color=cyan>수성↑</font> <font color=magenta>기술↓</font>'; break;
|
||||
case 4: $call = '<font color=cyan>치안↑인구↑ 민심↑</font> <font color=magenta>쌀수입↓ 수성↓</font>'; break;
|
||||
case 3: $call = '<font color=cyan>기술↑ 수성↑</font> <font color=magenta>인구↓ 민심↓</font>'; break;
|
||||
case 2: $call = '<font color=cyan>내정↑ 민심↑</font> <font color=magenta>쌀수입↓</font>'; break;
|
||||
case 1: $call = '<font color=cyan>금수입↑ 치안↑</font> <font color=magenta>인구↓ 민심↓</font>'; break;
|
||||
case 0: $call = '-'; break;
|
||||
function getNationType2(?int $type) {
|
||||
if($type === null){
|
||||
return '-';
|
||||
}
|
||||
return $call;
|
||||
[$name, $pros, $cons] = getNationTypeList()[$type]??['-', '', ''];
|
||||
return "<font color=cyan>{$pros}</font> <font color=magenta>{$cons}</font>";
|
||||
}
|
||||
|
||||
function getLevel($level, $nlevel=8) {
|
||||
@@ -322,11 +278,11 @@ function getLevel($level, $nlevel=8) {
|
||||
|
||||
case 712: $call = '황제'; break; case 612: $call = '왕'; break;
|
||||
case 711: $call = '승상'; break; case 611: $call = '광록훈'; break;
|
||||
case 710: $call = '위장군'; break; case 610: $call = '전장군'; break;
|
||||
case 710: $call = '표기장군'; break; case 610: $call = '좌장군'; break;
|
||||
case 709: $call = '사공'; break; case 609: $call = '상서령'; break;
|
||||
case 708: $call = '표기장군'; break; case 608: $call = '좌장군'; break;
|
||||
case 708: $call = '거기장군'; break; case 608: $call = '우장군'; break;
|
||||
case 707: $call = '태위'; break; case 607: $call = '중서령'; break;
|
||||
case 706: $call = '거기장군'; break; case 606: $call = '우장군'; break;
|
||||
case 706: $call = '위장군'; break; case 606: $call = '전장군'; break;
|
||||
case 705: $call = '사도'; break; case 605: $call = '비서령'; break;
|
||||
|
||||
case 512: $call = '공'; break; case 412: $call = '주목'; break;
|
||||
@@ -346,7 +302,7 @@ function getLevel($level, $nlevel=8) {
|
||||
|
||||
case 4: $call = '태수'; break;
|
||||
case 3: $call = '군사'; break;
|
||||
case 2: $call = '시중'; break;
|
||||
case 2: $call = '종사'; break;
|
||||
case 1: $call = '일반'; break;
|
||||
case 0: $call = '재야'; break;
|
||||
default: $call = '-'; break;
|
||||
@@ -358,7 +314,7 @@ function getCall($leader, $power, $intel) {
|
||||
$call = '평범';
|
||||
|
||||
if($leader < 40){
|
||||
if($power + $intel < $leader){
|
||||
if($power + $intel < 40){
|
||||
return '아둔';
|
||||
}
|
||||
if($intel >= GameConst::$chiefStatMin && $power < $intel * 0.8){
|
||||
@@ -381,6 +337,9 @@ function getCall($leader, $power, $intel) {
|
||||
if($intel >= GameConst::$chiefStatMin - GameConst::$statGradeLevel && $power < $intel * 0.8){
|
||||
return '명장';
|
||||
}
|
||||
if($leader >= GameConst::$chiefStatMin - GameConst::$statGradeLevel && $power + $intel < $leader){
|
||||
return '차장';
|
||||
}
|
||||
return '평범';
|
||||
}
|
||||
|
||||
@@ -491,78 +450,73 @@ function getTechCall($tech) : string {
|
||||
return "{$techLevel}등급";
|
||||
}
|
||||
|
||||
function getDexCall($dex) : string {
|
||||
if($dex < 2500) { $str = '<font color="navy">F-</font>'; }
|
||||
elseif($dex < 7500) { $str = '<font color="navy">F</font>'; }
|
||||
elseif($dex < 15000) { $str = '<font color="navy">F+</font>'; }
|
||||
elseif($dex < 25000) { $str = '<font color="skyblue">E-</font>'; }
|
||||
elseif($dex < 37500) { $str = '<font color="skyblue">E</font>'; }
|
||||
elseif($dex < 52500) { $str = '<font color="skyblue">E+</font>'; }
|
||||
elseif($dex < 70000) { $str = '<font color="seagreen">D-</font>'; }
|
||||
elseif($dex < 90000) { $str = '<font color="seagreen">D</font>'; }
|
||||
elseif($dex < 112500) { $str = '<font color="seagreen">D+</font>'; }
|
||||
elseif($dex < 137500) { $str = '<font color="teal">C-</font>'; }
|
||||
elseif($dex < 165000) { $str = '<font color="teal">C</font>'; }
|
||||
elseif($dex < 195000) { $str = '<font color="teal">C+</font>'; }
|
||||
elseif($dex < 227500) { $str = '<font color="limegreen">B-</font>'; }
|
||||
elseif($dex < 262500) { $str = '<font color="limegreen">B</font>'; }
|
||||
elseif($dex < 300000) { $str = '<font color="limegreen">B+</font>'; }
|
||||
elseif($dex < 340000) { $str = '<font color="gold">A-</font>'; }
|
||||
elseif($dex < 382500) { $str = '<font color="gold">A</font>'; }
|
||||
elseif($dex < 427500) { $str = '<font color="gold">A+</font>'; }
|
||||
elseif($dex < 475000) { $str = '<font color="darkorange">S-</font>'; }
|
||||
elseif($dex < 525000) { $str = '<font color="darkorange">S</font>'; }
|
||||
elseif($dex < 577500) { $str = '<font color="darkorange">S+</font>'; }
|
||||
elseif($dex < 632500) { $str = '<font color="tomato">SS-</font>'; }
|
||||
elseif($dex < 690000) { $str = '<font color="tomato">SS</font>'; }
|
||||
elseif($dex < 750000) { $str = '<font color="tomato">SS+</font>'; }
|
||||
elseif($dex < 812500) { $str = '<font color="red">SSS-</font>'; }
|
||||
elseif($dex < 877500) { $str = '<font color="red">SSS</font>'; }
|
||||
elseif($dex < 945000) { $str = '<font color="red">SSS+</font>'; }
|
||||
elseif($dex < 1015000) { $str = '<font color="darkviolet">Z-</font>'; }
|
||||
elseif($dex < 1087500) { $str = '<font color="darkviolet">Z</font>'; }
|
||||
elseif($dex < 1162500) { $str = '<font color="darkviolet">Z+</font>'; }
|
||||
else { $str = '<font color="white">?</font>'; }
|
||||
return $str;
|
||||
function getDexLevelList(): array{
|
||||
return [
|
||||
[0, 'navy', 'F-'],
|
||||
[350, 'navy', 'F'],
|
||||
[1375, 'navy', 'F+'],
|
||||
[3500, 'skyblue', 'E-'],
|
||||
[7125, 'skyblue', 'E'],
|
||||
[12650, 'skyblue', 'E+'],
|
||||
[20475, 'seagreen', 'D-'],
|
||||
[31000, 'seagreen', 'D'],
|
||||
[44625, 'seagreen', 'D+'],
|
||||
[61750, 'teal', 'C-'],
|
||||
[82775, 'teal', 'C'],
|
||||
[108100, 'teal', 'C+'],
|
||||
[138125, 'limegreen', 'B-'],
|
||||
[173250, 'limegreen', 'B'],
|
||||
[213875, 'limegreen', 'B+'],
|
||||
[260400, 'darkorange', 'A-'],
|
||||
[313225, 'darkorange', 'A'],
|
||||
[372750, 'darkorange', 'A+'],
|
||||
[439375, 'tomato', 'S-'],
|
||||
[513500, 'tomato', 'S'],
|
||||
[595525, 'tomato', 'S+'],
|
||||
[685850, 'darkviolet', 'Z-'],
|
||||
[784875, 'darkviolet', 'Z'],
|
||||
[893000, 'darkviolet', 'Z+'],
|
||||
[1010625, 'gold', 'EX-'],
|
||||
[1138150, 'gold', 'EX'],
|
||||
[1275975, 'white', 'EX+'],
|
||||
];
|
||||
}
|
||||
|
||||
function getDexLevel($dex) : int {
|
||||
if($dex < 2500) { $lvl = 0; }
|
||||
elseif($dex < 7500) { $lvl = 1; }
|
||||
elseif($dex < 15000) { $lvl = 2; }
|
||||
elseif($dex < 25000) { $lvl = 3; }
|
||||
elseif($dex < 37500) { $lvl = 4; }
|
||||
elseif($dex < 52500) { $lvl = 5; }
|
||||
elseif($dex < 70000) { $lvl = 6; }
|
||||
elseif($dex < 90000) { $lvl = 7; }
|
||||
elseif($dex < 112500) { $lvl = 8; }
|
||||
elseif($dex < 137500) { $lvl = 9; }
|
||||
elseif($dex < 165000) { $lvl = 10; }
|
||||
elseif($dex < 195000) { $lvl = 11; }
|
||||
elseif($dex < 227500) { $lvl = 12; }
|
||||
elseif($dex < 262500) { $lvl = 13; }
|
||||
elseif($dex < 300000) { $lvl = 14; }
|
||||
elseif($dex < 340000) { $lvl = 15; }
|
||||
elseif($dex < 382500) { $lvl = 16; }
|
||||
elseif($dex < 427500) { $lvl = 17; }
|
||||
elseif($dex < 475000) { $lvl = 18; }
|
||||
elseif($dex < 525000) { $lvl = 19; }
|
||||
elseif($dex < 577500) { $lvl = 20; }
|
||||
elseif($dex < 632500) { $lvl = 21; }
|
||||
elseif($dex < 690000) { $lvl = 22; }
|
||||
elseif($dex < 750000) { $lvl = 23; }
|
||||
elseif($dex < 812500) { $lvl = 24; }
|
||||
elseif($dex < 877500) { $lvl = 25; }
|
||||
elseif($dex < 945000) { $lvl = 26; }
|
||||
elseif($dex < 1015000) { $lvl = 27; }
|
||||
elseif($dex < 1087500) { $lvl = 28; }
|
||||
elseif($dex < 1162500) { $lvl = 29; }
|
||||
else { $lvl = 30; }
|
||||
return $lvl;
|
||||
function getDexCall(int $dex) : string {
|
||||
if($dex < 0){
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
$color = null;
|
||||
$name = null;
|
||||
foreach(getDexLevelList() as $dexLevel => [$dexKey, $nextColor, $nextName]){
|
||||
if($dex < $dexKey){
|
||||
break;
|
||||
}
|
||||
$color = $nextColor;
|
||||
$name = $nextName;
|
||||
}
|
||||
|
||||
return "<font color='{$color}'>{$name}</font>";
|
||||
}
|
||||
|
||||
function getDexLevel(int $dex) : int {
|
||||
if($dex < 0){
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
$retVal = null;
|
||||
foreach(getDexLevelList() as $dexLevel => [$dexKey, $nextColor, $nextName]){
|
||||
if($dex < $dexKey){
|
||||
break;
|
||||
}
|
||||
$retVal = $dexLevel;
|
||||
}
|
||||
return $dexLevel;
|
||||
}
|
||||
|
||||
function getDexLog($dex1, $dex2) {
|
||||
$ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1;
|
||||
$ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 55 + 1;
|
||||
return $ratio;
|
||||
}
|
||||
|
||||
|
||||
+115
-14
@@ -5,6 +5,51 @@ namespace sammo;
|
||||
* 게임 룰에 해당하는 함수 모음
|
||||
*/
|
||||
|
||||
function getNationLevelList():array{
|
||||
$table = [
|
||||
0 => ['방랑군', 2, 0],
|
||||
1 => ['호족', 2, 1],
|
||||
2 => ['군벌', 4, 2],
|
||||
3 => ['주자사', 4, 5],
|
||||
4 => ['주목', 6, 8],
|
||||
5 => ['공', 6, 11],
|
||||
6 => ['왕', 8, 16],
|
||||
7 => ['황제', 8, 21],
|
||||
];
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getNationTypeList():array{
|
||||
$table = [
|
||||
13=>['명가', '기술↑ 인구↑', '쌀수입↓ 수성↓'],
|
||||
12=>['음양가', '내정↑ 인구↑', '기술↓ 전략↓'],
|
||||
11=>['종횡가', '전략↑ 수성↑', '금수입↓ 내정↓'],
|
||||
10=>['불가', '민심↑ 수성↑', '금수입↓'],
|
||||
9=>['도적', '계략↑', '금수입↓ 치안↓ 민심↓'],
|
||||
8=>['오두미도', '쌀수입↑ 인구↑', '기술↓ 수성↓ 내정↓'],
|
||||
7=>['태평도', '인구↑ 민심↑', '기술↓ 수성↓'],
|
||||
6=>['도가', '인구↑', '기술↓ 치안↓'],
|
||||
5=>['묵가', '수성↑', '기술↓'],
|
||||
4=>['덕가', '치안↑인구↑ 민심↑', '쌀수입↓ 수성↓'],
|
||||
3=>['병가', '기술↑ 수성↑', '인구↓ 민심↓'],
|
||||
2=>['유가', '내정↑ 민심↑', '쌀수입↓'],
|
||||
1=>['법가', '금수입↑ 치안↑', '인구↓ 민심↓'],
|
||||
];
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getCityLevelList():array{
|
||||
return [
|
||||
1 => '수',
|
||||
2 => '진',
|
||||
3 => '관',
|
||||
4 => '이',
|
||||
5 => '소',
|
||||
6 => '중',
|
||||
7 => '대',
|
||||
8 => '특'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 게임 내부에 사용하는 유틸리티 함수들을 분리
|
||||
@@ -184,7 +229,7 @@ function SetNationFront($nationNo) {
|
||||
|
||||
if($adj){
|
||||
$db->update('city', [
|
||||
'front'=>1
|
||||
'front'=>($enemyCities?1:2),
|
||||
], 'nation=%i and city in %li', $nationNo, array_keys($adj));
|
||||
}
|
||||
}
|
||||
@@ -517,11 +562,14 @@ function postUpdateMonthly() {
|
||||
$genCount = $genNum[$dip['me']];
|
||||
// 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산
|
||||
// 4000 / 10 * 0.25 = 100
|
||||
$term = Util::round($dip['dead'] / 100 / $genCount) + 1;
|
||||
if($dip['term'] > $term) { $term = $dip['term']; }
|
||||
if($term > 13) { $term = 13; }
|
||||
$query = "update diplomacy set term='{$term}' where (me='{$dip['me']}' and you='{$dip['you']}')";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$term = floor($dip['dead'] / 100 / $genCount);
|
||||
$dip['dead'] -= $term * 100 * $genCount;
|
||||
$term = Util::valueFit($dip['term'] + $term, 0, 13);
|
||||
|
||||
$db->update('diplomacy', [
|
||||
'term' => $term,
|
||||
'dead'=> $dip['dead'],
|
||||
], 'me = %i AND you = %i', $dip['me'], $dip['you']);
|
||||
}
|
||||
|
||||
//개전국 로그
|
||||
@@ -564,7 +612,7 @@ function postUpdateMonthly() {
|
||||
}
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
//사상자 초기화
|
||||
$query = "update diplomacy set dead=0";
|
||||
$query = "update diplomacy set dead=0 WHERE state != 0";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
//외교 기한-1
|
||||
$query = "update diplomacy set term=term-1 where term!=0";
|
||||
@@ -726,6 +774,11 @@ function checkMerge() {
|
||||
'data'=>Json::encode($oldNation)
|
||||
]);
|
||||
|
||||
$db->update('general', [
|
||||
'nation'=>0,
|
||||
'permission'=>'normal',
|
||||
], 'nation=%i AND npc = 5', $me['nation']);
|
||||
|
||||
$query = "delete from nation where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 아국 모든 도시들 상대국 소속으로
|
||||
@@ -868,6 +921,11 @@ function checkSurrender() {
|
||||
'data'=>Json::encode($oldNation)
|
||||
]);
|
||||
|
||||
$db->update('general', [
|
||||
'nation'=>0,
|
||||
'permission'=>'normal',
|
||||
], 'nation=%i AND npc = 5', $me['nation']);
|
||||
|
||||
$query = "delete from nation where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 군주가 있는 위치 구함
|
||||
@@ -915,9 +973,9 @@ function updateNationState() {
|
||||
$connect=$db->get();
|
||||
|
||||
$history = array();
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'fiction', 'startyear', 'show_img_level', 'turnterm']);
|
||||
|
||||
$query = "select nation,name,level from nation";
|
||||
$query = "select nation,name,level,gennum,tech from nation";
|
||||
$nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nationcount = MYDB_num_rows($nationresult);
|
||||
|
||||
@@ -928,10 +986,6 @@ function updateNationState() {
|
||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$citycount = MYDB_num_rows($cityresult);
|
||||
|
||||
$query = "select no from general where nation='{$nation['nation']}'";
|
||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($genresult);
|
||||
|
||||
if($citycount == 0) {
|
||||
$nationlevel = 0; // 방랑군
|
||||
} elseif($citycount == 1) {
|
||||
@@ -951,6 +1005,7 @@ function updateNationState() {
|
||||
}
|
||||
|
||||
if($nationlevel > $nation['level']) {
|
||||
$oldLevel = $nation['level'];
|
||||
$nation['level'] = $nationlevel;
|
||||
|
||||
switch($nationlevel) {
|
||||
@@ -975,16 +1030,62 @@ function updateNationState() {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$lastAssemblerID = $gameStor->assembler_id??0;
|
||||
for($levelGen = max(1, $oldLevel) + 1; $levelGen <= $nationlevel; $levelGen+=1){
|
||||
if(in_array($levelGen, [3, 5, 7])){
|
||||
$genStep = 2;
|
||||
}
|
||||
else{
|
||||
$genStep = 1;
|
||||
}
|
||||
|
||||
while($genStep > 0){
|
||||
$lastAssemblerID += 1;
|
||||
$npcObj = new Scenario\NPC(
|
||||
999, '부대장'.$lastAssemblerID, null, $nation['nation'], null,
|
||||
10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, '은둔', '척사'
|
||||
);
|
||||
$npcObj->npc = 5;
|
||||
$npcObj->build($admin);
|
||||
$npcID = $npcObj->generalID;
|
||||
|
||||
$db->insert('troop', [
|
||||
'name'=>$npcObj->realName,
|
||||
'nation'=>$nation['nation'],
|
||||
'no'=>$npcID
|
||||
]);
|
||||
$troopID = $db->insertId();
|
||||
|
||||
$command = EncodeCommand(0, 0, 0, 26); //집합
|
||||
$db->update('general', [
|
||||
'troop'=>$troopID,
|
||||
'turn0'=>$command,
|
||||
'turn1'=>$command,
|
||||
'turn2'=>$command,
|
||||
'turn3'=>$command,
|
||||
'turn4'=>$command,
|
||||
'turn5'=>$command,
|
||||
'killturn'=>80
|
||||
], 'no=%i', $npcID);
|
||||
$genStep -= 1;
|
||||
}
|
||||
}
|
||||
$gameStor->assembler_id = $lastAssemblerID;
|
||||
|
||||
//작위 상승
|
||||
$query = "update nation set level='{$nation['level']}' where nation='{$nation['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
refreshNationStaticInfo();
|
||||
}
|
||||
|
||||
$gencount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation=%i', $nation['nation']);
|
||||
|
||||
$gennum = $gencount;
|
||||
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
|
||||
//기술 및 변경횟수 업데이트
|
||||
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
||||
$query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
@@ -5,14 +5,15 @@ function getMailboxList(){
|
||||
|
||||
$generalNations = [];
|
||||
|
||||
foreach(DB::db()->queryAllLists('select `no`, `name`, `nation`, `level`, `npc` from `general` where `npc` < 2') as $general)
|
||||
foreach(DB::db()->query('select `no`, `name`, `nation`, `level`, `npc`, `permission`, `penalty` from `general` where `npc` < 2') as $general)
|
||||
{
|
||||
list($generalID, $generalName, $nationID, $level, $npc) = $general;
|
||||
[$generalID, $generalName, $nationID, $level, $npc] = [$general['no'], $general['name'], $general['nation'], $general['level'], $general['npc']];
|
||||
if(!isset($generalNations[$nationID])){
|
||||
$generalNations[$nationID] = [];
|
||||
}
|
||||
|
||||
$obj = [$generalID, $generalName, 0];
|
||||
$permission = checkSecretPermission($general, false);
|
||||
|
||||
if($level == 12){
|
||||
$obj[2] |= 1;
|
||||
@@ -22,6 +23,10 @@ function getMailboxList(){
|
||||
$obj[2] |= 2;
|
||||
}
|
||||
|
||||
if($permission == 4){
|
||||
$obj[2] |= 4;
|
||||
}
|
||||
|
||||
$generalNations[$nationID][] = $obj;
|
||||
}
|
||||
|
||||
@@ -37,7 +42,7 @@ function getMailboxList(){
|
||||
"mailbox"=>$mailbox,
|
||||
"name"=>$nationName,
|
||||
"color"=>$color,
|
||||
"general"=>$generals
|
||||
"general"=>$generals,
|
||||
];
|
||||
}, array_merge([getNationStaticInfo(0)], getAllNationStaticInfo()));
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user