Compare commits

...
202 Commits
Author SHA1 Message Date
Hide_D fdf0a3135a Merge pull request '스크립트 기반을 WebPack + Babel + TypeScript + Vue3으로 변경' (#191) from ts_convert into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/191
2021-09-09 01:00:42 +09:00
Hide_D 3a1a455c48 [empty] this is a empty commit 2021-09-09 00:59:10 +09:00
Hide_D 3a786e835b Squashed commit of the following:
commit 3ef363a01e
Author: hide_d <hided62@gmail.com>
Date:   Mon Sep 6 02:30:00 2021 +0900

    fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정

commit 9e68bc90c2
Author: hide_d <hided62@gmail.com>
Date:   Mon Sep 6 02:17:56 2021 +0900

    재야에서 도시보기 warning

commit d2590607c2
Author: hide_d <hided62@gmail.com>
Date:   Sun Sep 5 23:05:06 2021 +0900

    fix: div 0

commit 2bce6e4f02
Author: hide_d <hided62@gmail.com>
Date:   Sun Sep 5 23:02:52 2021 +0900

    warning 메시지 수정

commit e64812da72
Author: hide_d <hided62@gmail.com>
Date:   Sat Sep 4 03:42:09 2021 +0900

    fix: m장, 의병장 숙련이 설정되지 않는 버그 수정

commit 7cd40fca03
Author: hide_d <hided62@gmail.com>
Date:   Sat Aug 21 16:04:03 2021 +0900

    fix: 모병/징병에서 조건 검사부 통솔 계산값

commit d1568a3b2c
Author: hide_d <hided62@gmail.com>
Date:   Sat Aug 21 02:50:54 2021 +0900

    허보에 수몰이 같이 들어간 버그 수정

commit e7dcc84afc
Author: hide_d <hided62@gmail.com>
Date:   Thu Aug 19 14:51:50 2021 +0900

    REAMDME.md 버전 수정

commit 8eaa940d4e
Author: hide_d <hided62@gmail.com>
Date:   Wed Aug 18 20:40:37 2021 +0900

    Revert "fix: 7.2에서 오동작 버그 수정"

    This reverts commit 9997675b1d.

commit 9997675b1d
Author: hide_d <hided62@gmail.com>
Date:   Wed Aug 18 20:32:47 2021 +0900

    fix: 7.2에서 오동작 버그 수정

commit 9ef566f11f
Author: hide_d <hided62@gmail.com>
Date:   Wed Aug 18 20:26:31 2021 +0900

    fix: 아이템중 WarActivateSkill 관련 중첩 해제 버그 수정
2021-09-09 00:53:35 +09:00
Hide_D c70181132f build: 서버별 build가 다를 가능성 고려 2021-09-09 00:32:42 +09:00
Hide_D 538615a1f5 fix: tryNpmInstall 이후 genJS까지 실행해야 안전 2021-09-09 00:17:27 +09:00
Hide_D aa20a60a1c fix: recent_map 에러 2021-09-08 23:55:37 +09:00
Hide_D 69fa1dac6c install: php 단에서 npm 설치 환경 구성 2021-09-08 23:50:38 +09:00
Hide_D 3ab349af6e dep: build script 변경 2021-09-08 22:39:14 +09:00
Hide_D 97ac7deb2f misc: npc_control 기존 파일 제거 2021-09-08 21:06:21 +09:00
Hide_D 3230cafb9f 요구사항에 nodejs 요구 추가 2021-09-08 20:41:55 +09:00
Hide_D 394284d8de vue: NPCControl
- 외향  모사(딱히 의미는 없으나..)
- 약간 반응형
2021-09-08 20:39:04 +09:00
Hide_D 6323b174c6 webpack: 최적화 옵션 변경 2021-09-08 03:29:43 +09:00
Hide_D 3d3e0e5139 vue: NPCControl
- 일단 모든 기능 작동
2021-09-08 03:04:40 +09:00
Hide_D ffc7d4bacc vue: NPCControl(WIP) 메인 기능 동작 2021-09-08 02:48:46 +09:00
Hide_D 598236a1d2 vue: NPCControl(WIP) 2021-09-07 03:03:25 +09:00
Hide_D 69207519bd vue-component: NumberInputWithInfo 2021-09-07 00:29:38 +09:00
Hide_D 022eb1012f ts: numberWithCommas 분리 2021-09-07 00:16:28 +09:00
Hide_D 0a9c59f91e fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정 2021-09-06 02:30:00 +09:00
Hide_D 7ebb22b892 재야에서 도시보기 warning 2021-09-06 02:17:56 +09:00
Hide_D 3dc7fc6f14 vue: NPCControl(WIP) 2021-09-06 02:12:28 +09:00
Hide_D 90dea7517b fix: div 0 2021-09-05 23:05:06 +09:00
Hide_D eae48f9564 warning 메시지 수정 2021-09-05 23:02:52 +09:00
Hide_D dd7afba5f5 delete-old: board 2021-09-05 21:27:41 +09:00
Hide_D 73357b6777 CssMinimizer 적용 2021-09-05 18:20:39 +09:00
Hide_D 53df6bbcc6 vue: board 2021-09-05 17:52:39 +09:00
Hide_D 9871559227 vue: Board(WIP) 2021-09-05 03:59:00 +09:00
Hide_D 9cbead1ddc defer 대응 2021-09-05 03:32:57 +09:00
Hide_D 6402028c17 fix: m장, 의병장 숙련이 설정되지 않는 버그 수정 2021-09-04 03:42:09 +09:00
Hide_D 76bd65cf53 vue: inheritPoint 샘플 작성 2021-09-04 00:06:54 +09:00
Hide_D 6e4113de11 vue: inheritPoint(WIP) 2021-09-03 02:42:50 +09:00
Hide_D 12f37f76c7 dep: ready for vue3 2021-09-02 23:03:19 +09:00
Hide_D acd77b2c0a web_pack_config 2021-09-02 01:51:37 +09:00
Hide_D f4fb4ec00d misc: move gateway path 2021-09-02 00:46:33 +09:00
Hide_D 46ae4669ea misc: msg template 통합 2021-08-31 02:35:50 +09:00
Hide_D 67b2dbfe98 js2ts: kingdomList 2021-08-31 02:27:00 +09:00
Hide_D 4f3b39fbfa js2ts: seleect_general_from_pool 2021-08-31 01:03:22 +09:00
Hide_D a28fc52309 js2ts: join 2021-08-30 02:11:07 +09:00
Hide_D d5f0d60794 js2ts: history 2021-08-30 02:02:53 +09:00
Hide_D 72e65587df js2ts: processing - plugin 구조 마저 변경 2021-08-30 01:47:42 +09:00
Hide_D b4d4d90784 js2ts: hallOfFame 2021-08-30 01:43:01 +09:00
Hide_D 3f81fb759d misc: 기존파일 제거 2021-08-30 01:38:24 +09:00
Hide_D d995b39e02 js2ts: currentCity 2021-08-30 01:30:56 +09:00
Hide_D 3bd09a1aa4 core: getJSFiles -> getJSPlugins
- 각각 js를 불러오기보다.. 초기화 함수를 직접 호출
- lazy loading은 어차피 나중에 새로 만들거니까 안 함.
2021-08-30 01:14:20 +09:00
Hide_D a6ff951c98 js2ts: diplomacy
- select2 관련 문제 해결?
2021-08-30 00:27:04 +09:00
Hide_D 604b1557e8 legacy: #bg0, #bg1, #bg2 제거 2021-08-29 02:16:12 +09:00
Hide_D 279bd5c71a misc: Pooper export, summernote lang 2021-08-29 02:05:16 +09:00
Hide_D 97dfb02ab6 js2ts: dipcenter(WIP)
- summernote 이식
- summernote/imageFip plugin 이식
2021-08-29 01:39:03 +09:00
Hide_D 32c7b02303 misc: 미사용 파일 제거 2021-08-28 23:40:37 +09:00
Hide_D e135835e61 jquery-redirect 제거 2021-08-28 23:34:11 +09:00
Hide_D 7ed9a8075c js2ts: main(WIP)
- jquery-redirect 제거
- linkifyStr import
2021-08-28 23:14:07 +09:00
Hide_D ead8110fb4 watch에 dev 모드 추가 2021-08-28 23:13:22 +09:00
Hide_D 586b1b6c15 dep: js package version up
- typscript
- sass
- typescript-eslint
- vue
- core-js
2021-08-28 19:03:28 +09:00
Hide_D e1727c8d80 fix: admin_member path 2021-08-28 18:56:50 +09:00
Hide_D 7bd8a7ff35 fix: msg 기본 동작 2021-08-28 17:25:33 +09:00
Hide_D de48651ae7 feat: exportWindow
- global을 지저분하게 하지 않고, window에 출력만 해줌
2021-08-28 17:20:44 +09:00
Hide_D 9902e07be0 js2ts: msg(WIP) 2021-08-28 06:26:25 +09:00
Hide_D 5e4b38895e js2ts: msg(WIP) 2021-08-28 06:23:25 +09:00
Hide_D 38bbbf261a js2ts: msg(WIP) 2021-08-28 06:22:30 +09:00
Hide_D def0a52578 String format 확장 제거 2021-08-27 03:53:15 +09:00
Hide_D 4f1f87bda0 fix: extExpandCity (format func) 2021-08-27 03:41:32 +09:00
Hide_D 15f9faa2fa js2ts: extExpandCity
- 이부분은 완벽히 새로만들어야 하므로 유지
2021-08-27 03:39:59 +09:00
Hide_D 7257491d8b js2ts: myCityInfo(wip) 2021-08-27 03:36:35 +09:00
Hide_D c19b2a9ebe luxon -> date-fns 2021-08-26 22:50:02 +09:00
Hide_D 54e7fd0293 misc: type module 지정 2021-08-26 21:50:06 +09:00
Hide_D 21f3a2082b misc: delete old gateway install.js 2021-08-26 21:20:47 +09:00
Hide_D f647eb5a7b js2ts: gateway install 2021-08-26 21:20:08 +09:00
Hide_D d7b1db0081 feat: jqValidateForm에 Values Type 지정 2021-08-26 21:10:02 +09:00
Hide_D 11511316d1 js2ts: index(login)
- fix-workaround: popper 로드
2021-08-26 18:11:51 +09:00
Hide_D 95a93c2c44 misc: 사용하지 않은 deprecated 함수 마저 제거 2021-08-26 04:00:52 +09:00
Hide_D 815ce10c25 misc: 개발용 코드 삭제 2021-08-26 03:39:33 +09:00
Hide_D 5f13bfe8a1 js2ts: join user 2021-08-26 03:35:49 +09:00
Hide_D 5cd494c00a js2ts: admin_userlist 2021-08-26 02:28:18 +09:00
Hide_D 5a0a8bedc1 refac: escapeHtml, nl2br, TemplateEngine 분리 2021-08-26 01:37:46 +09:00
Hide_D 3b9884160b js2ts: entrance, webpack(entrance/dist_js) 2021-08-26 01:25:58 +09:00
Hide_D 5b2b01328a webpack: dynamic js build on update 2021-08-25 03:35:51 +09:00
Hide_D e5b51dcd16 genJS 2021-08-25 02:55:11 +09:00
Hide_D 4d8b816acf target별 JS 생성 2021-08-25 02:44:46 +09:00
Hide_D fa109c1b0b feat: VersionGit hash 추가. dynamic추가. 버전 변수 방식 변경 2021-08-25 02:12:35 +09:00
Hide_D b987fce627 feat: VersionGit에 'hash' 추가.(WIP) 2021-08-25 02:05:27 +09:00
Hide_D b072cc3266 gitignore 준비 2021-08-25 01:22:03 +09:00
Hide_D 366b40ea90 build: boosInfo, myPage, convertFormData 2021-08-22 20:13:08 +09:00
Hide_D 3d3daa205d js2ts: bossInfo, myPage
- convertFormData에서 null -> ''
2021-08-22 15:45:10 +09:00
Hide_D 665ebbd11a js2ts: bossInfo 2021-08-22 14:49:03 +09:00
Hide_D 52a5a7697d fix: 리셋 옵션에서 '기본사령턴' 2021-08-22 02:48:14 +09:00
Hide_D 97a38d516a dep: package 2021-08-22 02:40:27 +09:00
Hide_D e89475bf52 dep: webpack cache
- 개발용
2021-08-22 02:31:10 +09:00
Hide_D 90a78b05ce dep: overwrite
- TODO: 서버에서 npm run build를 자동으로 해야함
2021-08-22 02:11:33 +09:00
Hide_D 8c6eff15f0 dep: missing select2 2021-08-22 02:06:50 +09:00
Hide_D 824c58b391 build: board 2021-08-21 21:41:43 +09:00
Hide_D b97500430c js2ts: board 2021-08-21 21:41:32 +09:00
Hide_D bacafc67c9 build: util.ts 분리 2021-08-21 20:45:24 +09:00
Hide_D f23ebcdc2d js2ts: util.ts 분리 2021-08-21 20:45:10 +09:00
Hide_D edbe8e3561 build: betting 2021-08-21 20:38:24 +09:00
Hide_D 05d1e33b30 js2ts: betting 2021-08-21 20:38:15 +09:00
Hide_D 96b60ce0f5 fix: 모병/징병에서 조건 검사부 통솔 계산값 2021-08-21 16:04:03 +09:00
Hide_D 6174bc7ffd build: select_npc 2021-08-21 05:16:07 +09:00
Hide_D 3bd022e03a js2ts: select_npc 2021-08-21 05:15:58 +09:00
Hide_D b0cc5b0b60 build: processing 2021-08-21 04:40:55 +09:00
Hide_D 5493f70458 js2ts: processing
- select2 version dependency 문제로 import는 유지
2021-08-21 04:40:40 +09:00
Hide_D 323b3d9d16 허보에 수몰이 같이 들어간 버그 수정 2021-08-21 02:50:54 +09:00
Hide_D 1b0742ad2a build: processing plugin 2021-08-21 00:30:05 +09:00
Hide_D 2eb7217f49 js2ts: processing plugin 정리 2021-08-21 00:29:50 +09:00
Hide_D b6f5a286b0 build: recent_map 2021-08-20 04:59:13 +09:00
Hide_D 66c496fb10 gateway: 입구의 지도를 iframe으로 변경 2021-08-20 04:58:45 +09:00
Hide_D 56ca588c1e gateway: 입구의 지도를 iframe으로 변경 2021-08-20 04:58:05 +09:00
Hide_D e2b09caff3 build: processing parts 2021-08-20 03:24:14 +09:00
Hide_D a5b4a4c59f js2ts: processing parts(WIP) 2021-08-20 03:24:03 +09:00
Hide_D a70312a90a build: battle_simulator 2021-08-20 02:55:07 +09:00
Hide_D 6c6a3238cb js2ts: battle_simulator 2021-08-20 02:54:57 +09:00
Hide_D 9af10d4bcb misc: showErrorLog
현재 에러로그에는 javascript가 필요하지 않음
2021-08-20 01:40:03 +09:00
Hide_D f6e1b4611e build: install & jqValidateForm 2021-08-20 01:31:32 +09:00
Hide_D 7bc762d357 js2ts-fix: install 2021-08-20 01:31:18 +09:00
Hide_D 8edf1da92b fix: jqValidateForm에서 복합 타입(radio, checkbox) 처리 오류 수정 2021-08-20 01:30:34 +09:00
Hide_D a18baf2ffe REAMDME.md 버전 수정 2021-08-19 14:51:50 +09:00
Hide_D 2d41bf8f2f Revert "fix: 7.2에서 오동작 버그 수정"
This reverts commit 9997675b1d.
2021-08-18 20:40:37 +09:00
Hide_D 334778bdae fix: 7.2에서 오동작 버그 수정 2021-08-18 20:32:47 +09:00
Hide_D 1b46a06eee fix: 아이템중 WarActivateSkill 관련 중첩 해제 버그 수정 2021-08-18 20:26:31 +09:00
Hide_D 1e860e9443 js2ts & wip: install
- jqValidateForm에 전/후처리 추가
2021-08-18 02:59:58 +09:00
Hide_D 0b973672d2 build-misc: BundleAnalyzerPlugin 2021-08-17 02:56:11 +09:00
Hide_D 868ed85c7f build: user_info 2021-08-17 02:25:15 +09:00
Hide_D 6f2a24ec66 js2ts: user_info
- moment js 사용 대상 제거
- sha512 추가
- 비어있는 func.js 제거
2021-08-17 02:25:04 +09:00
Hide_D e5d5899a15 build: entrance 2021-08-17 01:05:54 +09:00
Hide_D 243473a97d js2ts: entrance
- j_server_get_status 반환형 수정
- getDateTimeNow 추가
- common에서 TemplateEngine 코드 버그 수정
2021-08-17 01:05:41 +09:00
Hide_D 28d71b8ce2 js2ts: install_db.php
- jqValidateForm 구현
  - async-validator + 수작업
- common.js 없이 ventor -> 타겟 ts 직접
2021-08-16 23:50:12 +09:00
Hide_D 1acbf90261 gateway printJS 변경 2021-08-16 23:46:53 +09:00
Hide_D 94229f84a3 fix-dep: 로그인 대문 dependency문제로 지도 안나오는 문제 해결 2021-08-16 16:09:54 +09:00
Hide_D cead74238a build: map 2021-08-16 03:29:54 +09:00
Hide_D 73c60ea94c js2ts: map 2021-08-16 03:29:44 +09:00
Hide_D 73638da4db misc: 미사용 파일 삭제 2021-08-16 01:11:38 +09:00
Hide_D bc218b73e1 js2ts: chiefCenter
- common: unwrap_any
- jQuery export 수정
- axios로 변경
- moment -> luxon
2021-08-16 01:06:17 +09:00
Hide_D aac6632f4b js2ts: vendor, evergreen browsers
- IE11 제외(webpack)
- vendor에 bootstrap, jquery 번들
- common.js에서 번들된 jquery, bootstrap 초기화
- 기본 printJS 코드를 common_path, vendors, common으로 고정
2021-08-15 22:55:08 +09:00
Hide_D fdba3fdc74 js2ts: ext.plugin_troop
- async await 대응
- axios 준비
- troop.css
2021-08-15 21:04:06 +09:00
Hide_D 21bb61ec82 js2ts: common 분리, troop.js 2021-08-15 20:19:47 +09:00
Hide_D ce1203d64d js->ts: common.js 2021-08-15 19:59:34 +09:00
Hide_D 56daf15c8e webpack: scss, vue (#189)
WebPack에 scss와 vue를 사용할 수 있도록 세팅.

현재는 php서버와 코드가 강하게 엮여있기 때문에 vue-cli 대신 수동으로 webpack에 등록.

파일 번들링 경로는 다음과 같음

- scss + style -> css
- ts -> js

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/189
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
2021-08-14 05:47:16 +09:00
Hide_D 96faa924d8 Merge pull request 'PHP8 버전 대응, 버그 수정' (#188) from php8 into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/188
2021-08-13 00:00:32 +09:00
Hide_D ee8854451c fix: phan 지시에 따라 일부 버그 수정
- null && key_exists 버그
- or assign이 integer 대상이므로 직접 연산
- false 대신 0 입력한 곳 수정
- 자체 Deprecate 처리한 함수 회피
- 초기화되지 않은 [] 확인하여 처리
- sleep은 정수만 받으므로 usleep으로 변경
- 선언하지 않고 그냥 사용하던 member 변수 선언
- boolean operation 순서 틀린 부분 수정
2021-08-12 23:58:20 +09:00
Hide_D 0975e925a9 use class, function 커맨드를 php8에서 사용할 수 있도록 수정
- \ 토큰 해석 문제
- VSCode 자동 완성 문제로 use function \sammo\{ 를 모두 해제
2021-08-12 22:35:42 +09:00
Hide_D 83d6a2169b 유산 포인트 시스템, 추가 기수 대비 (#187)
- 유산 포인트
  - 기수 뒤로도 누적되는 포인트
  - 생존, 최대 임관년 수, 최대 연속 내정 성공, 병종 상성 우위 횟수, 전투 횟수, 계략 성공 횟수, 천통 기여(규모 상승, 천통 수뇌, 천통 군주), 숙련도, 토너먼트, 베팅 당첨
  - 유산 관리 페이지 제공

- 태수국
  - 181년 1월에 자동 생성되는 u장수국
  - 시간이 지나면 사실상 자동 소멸
  - 유저국과는 4칸 거리, 서로는 2칸 거리
  - 이 시스템으로 인해 m장 거병 차단

- NPC 원조시 불가침
  - 1년 세수만큼 받은 경우 24개월 불가침 제안
  - 최소 6개월
  - 불가침을 받지 않고 추가 원조한 경우 계속해서 기간 상승
  - 단, 불가침 수락 전에 선포를 할 수 있음

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/187
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
2021-08-11 21:57:52 +09:00
Hide_D 21e7a4d966 Dep: update
주로 PHAN
2021-08-06 22:39:09 +09:00
Hide_D 404cd24855 작위보상 비중 수정 2021-05-02 02:00:16 +09:00
Hide_D b4ad72ee67 환약을 유니크로 습득하는 버그 수정 2021-05-01 23:48:01 +09:00
Hide_D bea628b619 환약을 습득하게 되는 버그 수정 2021-05-01 23:46:33 +09:00
Hide_D 3637e54982 유니크 onCalcStat 버그 수정 2021-05-01 23:38:06 +09:00
Hide_D e0d1a0a612 아이템 효과 텍스트 수정 2021-04-30 22:36:24 +09:00
Hide_D 3040996671 무쌍 누락분 수정 2021-04-30 16:35:34 +09:00
Hide_D dd830e7500 TypeCode 추가 2021-04-29 22:38:46 +09:00
Hide_D d2dfe2c418 전투 수비 파트 약 상향 2021-04-29 21:10:47 +09:00
Hide_D 139fb6b6e0 국가 규모 승급시 아이템 습득 방식 변경 2021-04-29 20:31:32 +09:00
Hide_D c4f6976c42 유니크 아이템에 효과 추가 2021-04-29 19:50:12 +09:00
Hide_D ab428fc104 유니크 기본 획득 확률 변경 2021-04-29 18:49:19 +09:00
Hide_D aa97f78acd 무쌍 초반 버프, 후반 너프 2021-04-29 18:47:55 +09:00
Hide_D dbce900aeb 유니크 중복 획득 가능 2021-04-29 18:44:09 +09:00
Hide_D 30b382e2e7 초반 등록 NPC 30명 2021-04-29 18:30:46 +09:00
Hide_D 433c4abb86 fix: 이민족 종료 시점 2021-04-11 23:17:47 +09:00
Hide_D 64404e4092 fix: 이민족 종료조건 추가 2021-04-11 21:22:06 +09:00
Hide_D 08d483af8a fix: 후방 워프 인구 충분 판단 기준 수정 2021-04-10 16:01:21 +09:00
Hide_D fa19c17941 fix: AI 발령 턴 오류 수정 2021-04-10 15:39:03 +09:00
Hide_D c896a999ad fix: 전방 도시가 '관'처럼 인구가 적은 경우 후방 워프하지 않는 버그 수정
feat: 후방 발령 관련 로직도 후방 워프와 유사하게 재 적용
2021-04-10 11:51:10 +09:00
Hide_D f9bca935ac fix: 장수수 카운트에 "의병장"을 포함하여 계산하는 버그 수정 2021-04-02 14:39:57 +09:00
Hide_D 7abf274d89 이민족 난이도 기본 수치 변경 2021-03-29 22:45:43 +09:00
Hide_D e2ad417306 feat: 이민족 등장 2021-03-28 16:31:01 +09:00
Hide_D 2ea9655f6b fix: 이민족 2021-03-28 05:57:53 +09:00
Hide_D f450d5d9de fix: 수비자 도시 버그
fix: RaiseInvader 버그 수정 중
2021-03-28 04:12:10 +09:00
Hide_D f8f4b73a09 feat: RaiserInvader 초기 구현 2021-03-28 03:13:03 +09:00
Hide_D 926d96732d fix: 가상 역사 모드에서 후계자 지정이 사실 모드 설정을 따라가는 버그 수정 2021-03-23 13:24:34 +09:00
Hide_D 167113d6a3 fix: 빙의 해제시 owner 값 버그 수정 2021-03-23 13:19:40 +09:00
Hide_D 911cb614a5 fix: RegNPC 버그 수정, event handler 규격 버그 수정 2021-03-19 18:09:53 +09:00
Hide_D 7a939b7024 fix: RegNPC 버그 수정 2021-03-19 17:44:34 +09:00
Hide_D 6e57a60997 RegNPC 버그 수정 2021-03-19 17:36:13 +09:00
Hide_D 9f1151e699 fix: can부대구출발령 없음 2021-03-19 17:22:48 +09:00
Hide_D 3fbe1fb63d 디버그2 2021-02-28 01:39:47 +09:00
Hide_D d4906eec5a 디버그 코드 추가 2021-02-28 01:33:58 +09:00
Hide_D ebe0663e74 에러 로그용 추가 2021-02-28 01:05:27 +09:00
Hide_D 04c89b9711 긴급 호출 대비 2021-02-21 00:40:49 +09:00
Hide_D 4f2bc874e5 initFull을 할 필요가 없었던 것! 2021-02-10 21:24:04 +09:00
Hide_D 316ac5c3c8 불가침인데도 선포 가능한 버그 수정 2021-01-12 17:14:36 +09:00
Hide_D 7882aa667e 관리자 도구 수정 2021-01-07 22:22:04 +09:00
Hide_D 8b8d5eecbf 모반시도 버그 수정 2021-01-07 01:12:06 +09:00
Hide_D 65b76643ee feat: 빙의일람에 장수 선택 내역
fix: 장수 선택 내역에서 owner_name 미반영 버그 수정
fix: 온라인 장수에서 npc가 뜨는 버그 수정
2021-01-03 18:31:18 +09:00
Hide_D f33e645113 초반 m장 스탯 관련 문제 해결, 장수 선택 term 해결 2021-01-01 21:09:43 +09:00
Hide_D 528d30c317 의병모집 버그 수정 2021-01-01 19:56:29 +09:00
Hide_D 7f0a3d320c 버그 수정
- 의병 모집
- 장수 변경 시 생성 폼 남음
2021-01-01 19:54:28 +09:00
Hide_D 8e940aeb65 버그 수정. 시간 변경 2020-12-31 16:21:57 +09:00
Hide_D a77ee60809 버그.. 2020-12-31 13:34:37 +09:00
Hide_D 83383c29cd 버그 수정2 2020-12-31 13:33:45 +09:00
Hide_D b6393141e8 버그 수정 2020-12-31 13:29:57 +09:00
Hide_D 10ce1827d8 버그 수정 2020-12-31 13:27:11 +09:00
Hide_D 605f3a12ff select pool 수 증가 2020-12-31 13:24:33 +09:00
Hide_D a33539e75f 턴 변경을 합리적으로 변경 2020-12-31 08:09:23 +09:00
Hide_D b2cca3687a 버그 수정 2020-12-31 07:49:33 +09:00
Hide_D 628c54044f general_pool 에서 장수 선택 기능 추가 2020-12-31 07:43:56 +09:00
Hide_D c0e7a3eece readme 수정 2020-12-27 19:49:39 +09:00
Hide_D c7c13c19c1 일부 수정
composer update, README.md 업데이트
2020-12-27 02:11:53 +09:00
Hide_D d5f71b5878 DummySession 준비 2020-12-26 15:48:05 +09:00
Hide_D cb589e9e26 종전수락 버그 수정 2020-12-13 22:05:07 +09:00
Hide_D eaeed47297 도시 정보 출력 순서 변경 2020-11-11 23:34:53 +09:00
Hide_D e00e5c5cd7 이벤트 빼빼로 추가 2020-11-11 23:04:08 +09:00
Hide_D b3719f7166 수극 연속 사용 버그 수정 2020-09-09 14:20:15 +09:00
Hide_D 337896974b 피장파장 로그 버그 수정 2020-09-09 14:20:15 +09:00
Hide_D bb7d1fc9ab 수몰을 아무 국가에나 쓸 수 있는 버그 수정 2020-09-09 14:20:15 +09:00
Hide_D 07765c8d44 훈사 제한 버그 2020-08-17 09:21:37 +09:00
1513 changed files with 114646 additions and 45572 deletions
+15
View File
@@ -0,0 +1,15 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3,
"modules": false
}
]
],
"plugins": [
"lodash"
]
}
+27
View File
@@ -0,0 +1,27 @@
module.exports = {
root: true,
parser: "vue-eslint-parser",
parserOptions: {
"project": "./tsconfig.json"
},
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'],
overrides: [{
files: ['*.ts', '*.tsx', "*.vue"],
}],
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
'plugin:vue/essential',
'@vue/typescript',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
rules: {
'@typescript-eslint/no-floating-promises': 'error',
"vue/no-multiple-template-root": "off",
"vue/no-v-for-template-key": "off",
}
}
+16 -1
View File
@@ -4,7 +4,8 @@
!.vscode/launch.json
!.vscode/extensions.json
/node_modules
package-lock.json
# 체섭 ignore
@@ -29,11 +30,20 @@ d_shared
d_pic/*.jpg
d_pic/*.gif
d_pic/*.png
d_pic/*.webp
d_pic/uploaded_image
*/dist_misc/*
*/dist_js/*
*/dist_css/*
/dist_misc/*
/dist_js/*
/dist_css/*
d_setting/*.php
*/d_setting/*.php
*/d_setting/templates/*.php
!*.orig.php
*/data/file_cache
@@ -50,3 +60,8 @@ test.php
phpinfo.php
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
*.sqlite3
ingame/js/*
ingame/css/*
gateway/js/*
gateway/css/*
+15 -5
View File
@@ -7,7 +7,7 @@
*/
return [
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
// `'7.4'`, `null`.
// `'7.4'`, `'8.0'`, `'8.1'`, `null`.
// If this is set to `null`,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute Phan.
@@ -15,15 +15,14 @@ return [
// Note that the **only** effect of choosing `'5.6'` is to infer
// that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
"target_php_version" => '7.3',
'backward_compatibility_checks ' => false,
'minimum_severity'=>\Phan\Issue::SEVERITY_NORMAL,
"target_php_version" => '7.4',
'backward_compatibility_checks ' => true,
'minimum_severity'=>\Phan\Issue::SEVERITY_CRITICAL,
'file_list' => [
'f_config/config.php',
'hwe/a_bestGeneral.php',
'hwe/a_emperior.php',
'hwe/a_emperior2.php',
'hwe/a_emperior_detail.php',
'hwe/a_genList.php',
'hwe/a_hallOfFame.php',
@@ -42,11 +41,13 @@ return [
'hwe/b_dipcenter.php',
'hwe/b_diplomacy.php',
'hwe/b_genList.php',
'hwe/v_inheritPoint.php',
'hwe/b_myBossInfo.php',
'hwe/b_myCityInfo.php',
'hwe/b_myGenInfo.php',
'hwe/b_myKingdomInfo.php',
'hwe/b_myPage.php',
'hwe/b_npc_control.php',
'hwe/b_processing.php',
'hwe/b_tournament.php',
'hwe/b_troop.php',
@@ -87,14 +88,18 @@ return [
'hwe/j_diplomacy_respond_letter.php',
'hwe/j_diplomacy_rollback_letter.php',
'hwe/j_diplomacy_send_letter.php',
'hwe/j_export_simulator_object.php',
'hwe/j_general_log_old.php',
'hwe/j_general_set_permission.php',
'hwe/j_general_turn.php',
'hwe/j_getChiefTurn.php',
'hwe/j_get_basic_general_list.php',
'hwe/j_get_city_list.php',
'hwe/j_get_general_list.php',
'hwe/j_get_nation_general_list.php',
'hwe/j_get_reserved_command.php',
'hwe/j_get_select_npc_token.php',
'hwe/j_get_select_pool.php',
'hwe/j_image_upload.php',
'hwe/j_install.php',
'hwe/j_install_db.php',
@@ -108,15 +113,20 @@ return [
'hwe/j_msg_get_recent.php',
'hwe/j_msg_submit.php',
'hwe/j_myBossInfo.php',
'hwe/j_raise_event.php',
'hwe/j_select_npc.php',
'hwe/j_select_picked_general.php',
'hwe/j_server_basic_info.php',
'hwe/j_set_chief_command.php',
'hwe/j_set_general_command.php',
'hwe/j_set_my_setting.php',
'hwe/j_set_npc_control.php',
'hwe/j_simulate_battle.php',
'hwe/j_troop.php',
'hwe/j_vacation.php',
'hwe/lib.php',
'hwe/process_war.php',
'hwe/select_general_from_pool.php',
'hwe/select_npc.php',
'hwe/t_board.php',
'hwe/t_diplomacy.php',
+13 -11
View File
@@ -5,22 +5,24 @@
## 요구사항
* Apache2
* <code>mpm_event</code> 권장
* PHP 7.3 이상
* <code>php-fpm</code> 권장
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
* mysqlnd가 지원되어야합니다. (기본값: 지원)
* mysqli
* Apache2 또는 nginx
* Apache2인 경우 `mpm_event` 권장
* PHP 8.0 이상
* `php-fpm` 권장
* php에서 curl, pdo-sqlite을 실행가능해야 합니다.
* mysqli, mysqlnd
* gd
* mbstring
* NodeJS 14 이상
* 내부의 git을 통해 upgrade 때 `webpack build` 용도로 필요합니다.
* MariaDB 10.2.1 이상
* 현재 MySQL은 지원하지 않습니다.
* <code>git</code>
* <code>curl</code>
* `git`
* `curl`
Linux는 Ubuntu 16.04, 18.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
Linux는 Ubuntu 18.04, 20.04, Windows는 WSL2를 사용한 환경에서 테스트되었습니다.
Docker를 이용한 설치는 계획중입니다.
Docker를 이용한 설치도 제공하고 있습니다.
## Docker를 이용한 설치
+2 -2
View File
@@ -8,7 +8,7 @@
],
"config": {
"platform": {
"php": "7.3"
"php": "7.4"
}
},
"require": {
@@ -26,7 +26,7 @@
"ezyang/htmlpurifier": "^4.10",
"xemlock/htmlpurifier-html5": "^0.1.7",
"catfan/medoo": "^1.5",
"phan/phan": "^2.7",
"phan/phan": "*",
"erusev/parsedown-extra": "^0.8.1",
"nette/caching": "^3.0"
},
Generated
+1175 -289
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ab1175c8592ba7f7756d5f02a3aa051c",
"content-hash": "2aeb036fc53a6fdc343bd2707d4697ee",
"packages": [
{
"name": "brandonwamboldt/utilphp",
@@ -50,20 +50,24 @@
"php",
"utility"
],
"support": {
"issues": "https://github.com/brandonwamboldt/utilphp/issues",
"source": "https://github.com/brandonwamboldt/utilphp/tree/master"
},
"time": "2015-02-02T17:56:14+00:00"
},
{
"name": "catfan/medoo",
"version": "v1.7.8",
"version": "v1.7.10",
"source": {
"type": "git",
"url": "https://github.com/catfan/Medoo.git",
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
"url": "https://api.github.com/repos/catfan/Medoo/zipball/2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
"shasum": ""
},
"require": {
@@ -110,32 +114,37 @@
"sql",
"sqlite"
],
"time": "2019-12-19T05:04:34+00:00"
"support": {
"issues": "https://github.com/catfan/Medoo/issues",
"source": "https://github.com/catfan/Medoo"
},
"time": "2020-02-11T08:20:42+00:00"
},
{
"name": "composer/semver",
"version": "1.5.1",
"version": "3.2.5",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0"
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5"
"phpstan/phpstan": "^0.12.54",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
"dev-main": "3.x-dev"
}
},
"autoload": {
@@ -171,28 +180,48 @@
"validation",
"versioning"
],
"time": "2020-01-13T12:06:48+00:00"
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.2.5"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2021-05-24T12:41:47+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.4.1",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0"
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
"phpstan/phpstan": "^0.12.55",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"autoload": {
@@ -215,7 +244,26 @@
"Xdebug",
"performance"
],
"time": "2020-03-01T12:26:26+00:00"
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2021-07-31T17:03:58+00:00"
},
{
"name": "erusev/parsedown",
@@ -261,6 +309,10 @@
"markdown",
"parser"
],
"support": {
"issues": "https://github.com/erusev/parsedown/issues",
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
},
"time": "2019-12-30T22:54:17+00:00"
},
{
@@ -308,20 +360,24 @@
"parsedown",
"parser"
],
"support": {
"issues": "https://github.com/erusev/parsedown-extra/issues",
"source": "https://github.com/erusev/parsedown-extra/tree/0.8.x"
},
"time": "2019-12-30T23:20:37+00:00"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.12.0",
"version": "v4.13.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
"shasum": ""
},
"require": {
@@ -337,6 +393,9 @@
},
"files": [
"library/HTMLPurifier.composer.php"
],
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -355,29 +414,33 @@
"keywords": [
"html"
],
"time": "2019-10-28T03:44:26+00:00"
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
"source": "https://github.com/ezyang/htmlpurifier/tree/master"
},
"time": "2020-06-29T00:56:53+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.1.1",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447",
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447",
"shasum": ""
},
"require": {
"netresearch/jsonmapper": "^1.0 || ^2.0",
"php": ">=7.0",
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"php": "^7.1 || ^8.0",
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0.0"
"phpunit/phpunit": "^7.0 || ^8.0"
},
"type": "library",
"autoload": {
@@ -396,7 +459,11 @@
}
],
"description": "A more advanced JSONRPC implementation",
"time": "2020-03-11T15:21:41+00:00"
"support": {
"issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues",
"source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1"
},
"time": "2021-06-11T22:34:44+00:00"
},
{
"name": "firephp/firephp-core",
@@ -432,27 +499,33 @@
],
"description": "Traditional FirePHPCore library for sending PHP variables to the browser.",
"homepage": "https://github.com/firephp/firephp-core",
"support": {
"forum": "http://groups.google.com/group/firephp-dev",
"issues": "https://github.com/firephp/firephp-core/issues",
"source": "https://github.com/firephp/firephp-core"
},
"time": "2013-04-23T15:28:20+00:00"
},
{
"name": "guzzlehttp/guzzle",
"version": "6.5.2",
"version": "6.5.5",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5"
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.17.0"
},
"require-dev": {
"ext-curl": "*",
@@ -460,7 +533,6 @@
"psr/log": "^1.1"
},
"suggest": {
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware"
},
"type": "library",
@@ -499,27 +571,31 @@
"rest",
"web service"
],
"time": "2019-12-23T11:57:10+00:00"
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/6.5"
},
"time": "2020-06-16T21:01:06+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
"symfony/phpunit-bridge": "^4.4 || ^5.1"
},
"type": "library",
"extra": {
@@ -550,20 +626,24 @@
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1"
},
"time": "2021-03-07T09:25:29+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.6.1",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
},
"require": {
@@ -576,15 +656,15 @@
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
},
"autoload": {
@@ -621,29 +701,33 @@
"uri",
"url"
],
"time": "2019-07-01T23:21:34+00:00"
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
},
"time": "2021-04-26T09:17:50+00:00"
},
{
"name": "league/plates",
"version": "3.3.0",
"version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/plates.git",
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af"
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/plates/zipball/b1684b6f127714497a0ef927ce42c0b44b45a8af",
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af",
"url": "https://api.github.com/repos/thephpleague/plates/zipball/6d3ee31199b536a4e003b34a356ca20f6f75496a",
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a",
"shasum": ""
},
"require": {
"php": "^5.3 | ^7.0"
"php": "^7.0|^8.0"
},
"require-dev": {
"mikey179/vfsstream": "^1.4",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5"
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
@@ -665,10 +749,15 @@
"name": "Jonathan Reinink",
"email": "jonathan@reinink.ca",
"role": "Developer"
},
{
"name": "RJ Garcia",
"email": "ragboyjr@icloud.com",
"role": "Developer"
}
],
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
"homepage": "http://platesphp.com",
"homepage": "https://platesphp.com",
"keywords": [
"league",
"package",
@@ -676,27 +765,31 @@
"templating",
"views"
],
"time": "2016-12-28T00:14:17+00:00"
"support": {
"issues": "https://github.com/thephpleague/plates/issues",
"source": "https://github.com/thephpleague/plates/tree/v3.4.0"
},
"time": "2020-12-25T05:00:37+00:00"
},
{
"name": "microsoft/tolerant-php-parser",
"version": "v0.0.20",
"version": "v0.1.1",
"source": {
"type": "git",
"url": "https://github.com/microsoft/tolerant-php-parser.git",
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4"
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/6a965617cf484355048ac6d2d3de7b6ec93abb16",
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16",
"shasum": ""
},
"require": {
"php": ">=7.0"
"php": ">=7.2"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
"phpunit/phpunit": "^8.5.15"
},
"type": "library",
"autoload": {
@@ -717,20 +810,24 @@
}
],
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
"time": "2020-02-18T02:57:19+00:00"
"support": {
"issues": "https://github.com/microsoft/tolerant-php-parser/issues",
"source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.1"
},
"time": "2021-07-16T21:28:12+00:00"
},
{
"name": "monolog/monolog",
"version": "1.25.3",
"version": "1.26.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c6b00f05152ae2c9b04a448f99c7590beb6042f5",
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5",
"shasum": ""
},
"require": {
@@ -744,11 +841,10 @@
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpstan/phpstan": "^0.12.59",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
@@ -767,11 +863,6 @@
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
@@ -795,20 +886,34 @@
"logging",
"psr-3"
],
"time": "2019-12-20T14:15:16+00:00"
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/1.26.1"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"time": "2021-05-28T08:32:12+00:00"
},
{
"name": "netresearch/jsonmapper",
"version": "v2.1.0",
"version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/cweiske/jsonmapper.git",
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
"shasum": ""
},
"require": {
@@ -816,10 +921,10 @@
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.6"
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
"phpunit/phpunit": "~7.5 || ~8.0 || ~9.0",
"squizlabs/php_codesniffer": "~3.5"
},
"type": "library",
@@ -841,31 +946,37 @@
}
],
"description": "Map nested JSON structures onto PHP classes",
"time": "2020-04-16T18:48:43+00:00"
"support": {
"email": "cweiske@cweiske.de",
"issues": "https://github.com/cweiske/jsonmapper/issues",
"source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0"
},
"time": "2020-12-01T19:48:11+00:00"
},
{
"name": "nette/caching",
"version": "v3.0.1",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/nette/caching.git",
"reference": "b9ecbf920f240bd1ab14900d9a77876924ad7fb4"
"reference": "3e771c589dee414724be473c24ad16dae50c1960"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/caching/zipball/b9ecbf920f240bd1ab14900d9a77876924ad7fb4",
"reference": "b9ecbf920f240bd1ab14900d9a77876924ad7fb4",
"url": "https://api.github.com/repos/nette/caching/zipball/3e771c589dee414724be473c24ad16dae50c1960",
"reference": "3e771c589dee414724be473c24ad16dae50c1960",
"shasum": ""
},
"require": {
"nette/finder": "^2.4 || ^3.0",
"nette/utils": "^2.4 || ^3.0",
"php": ">=7.1"
"php": ">=7.2 <8.1"
},
"require-dev": {
"latte/latte": "^2.4",
"latte/latte": "^2.10",
"nette/di": "^v3.0",
"nette/tester": "^2.0",
"phpstan/phpstan": "^0.12",
"tracy/tracy": "^2.4"
},
"suggest": {
@@ -874,7 +985,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@@ -885,8 +996,8 @@
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0",
"GPL-3.0"
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
@@ -907,7 +1018,11 @@
"nette",
"sqlite"
],
"time": "2019-11-19T18:41:40+00:00"
"support": {
"issues": "https://github.com/nette/caching/issues",
"source": "https://github.com/nette/caching/tree/v3.1.1"
},
"time": "2021-03-06T14:07:38+00:00"
},
{
"name": "nette/finder",
@@ -970,24 +1085,31 @@
"iterator",
"nette"
],
"support": {
"issues": "https://github.com/nette/finder/issues",
"source": "https://github.com/nette/finder/tree/v2.5.2"
},
"time": "2020-01-03T20:35:40+00:00"
},
{
"name": "nette/utils",
"version": "v3.1.2",
"version": "v3.2.2",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "488f58378bba71767e7831c83f9e0fa808bf83b9"
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/488f58378bba71767e7831c83f9e0fa808bf83b9",
"reference": "488f58378bba71767e7831c83f9e0fa808bf83b9",
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=7.2 <8.1"
},
"conflict": {
"nette/di": "<3.0.6"
},
"require-dev": {
"nette/tester": "~2.0",
@@ -1006,7 +1128,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
"dev-master": "3.2-dev"
}
},
"autoload": {
@@ -1030,7 +1152,7 @@
"homepage": "https://nette.org/contributors"
}
],
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"homepage": "https://nette.org",
"keywords": [
"array",
@@ -1048,7 +1170,11 @@
"utility",
"validation"
],
"time": "2020-05-27T09:58:51+00:00"
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.2"
},
"time": "2021-03-03T22:53:25+00:00"
},
{
"name": "pguardiario/phpuri",
@@ -1072,47 +1198,52 @@
},
"notification-url": "https://packagist.org/downloads/",
"description": "A php library for converting relative urls to absolute.",
"support": {
"issues": "https://github.com/monkeysuffrage/phpuri/issues",
"source": "https://github.com/monkeysuffrage/phpuri/tree/1.0.0"
},
"time": "2015-05-24T09:13:17+00:00"
},
{
"name": "phan/phan",
"version": "2.7.1",
"version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/phan/phan.git",
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77"
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phan/phan/zipball/67c51bb1593e5c30271fc16d691b82e318b90b77",
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77",
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"shasum": ""
},
"require": {
"composer/semver": "^1.4",
"composer/xdebug-handler": "^1.3.2",
"composer/semver": "^1.4|^2.0|^3.0",
"composer/xdebug-handler": "^1.3.2|^2.0.0",
"ext-filter": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"felixfbecker/advanced-json-rpc": "^3.0.4",
"microsoft/tolerant-php-parser": "0.0.20",
"netresearch/jsonmapper": "^1.6.0|^2.0",
"php": "^7.1.0",
"sabre/event": "^5.0",
"symfony/console": "^2.3|^3.0|^4.0|^5.0",
"microsoft/tolerant-php-parser": "^0.1.0",
"netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0",
"php": "^7.2.0|^8.0.0",
"sabre/event": "^5.0.3",
"symfony/console": "^3.2|^4.0|^5.0",
"symfony/polyfill-mbstring": "^1.11.0",
"symfony/polyfill-php72": "^1.15"
"symfony/polyfill-php80": "^1.20.0",
"tysonandre/var_representation_polyfill": "^0.0.2"
},
"require-dev": {
"brianium/paratest": "^4.0.0",
"phpunit/phpunit": "^7.5.0"
"phpunit/phpunit": "^8.5.0"
},
"suggest": {
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.6+ is recommended.",
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.14+ is recommended.",
"ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
"ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",
"ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions."
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.",
"ext-var_representation": "Suggested for converting values to strings in issue messages"
},
"bin": [
"phan",
@@ -1146,7 +1277,11 @@
"php",
"static"
],
"time": "2020-04-12T01:25:29+00:00"
"support": {
"issues": "https://github.com/phan/phan/issues",
"source": "https://github.com/phan/phan/tree/5.0.0"
},
"time": "2021-08-01T18:17:28+00:00"
},
{
"name": "php-extended/php-system",
@@ -1186,6 +1321,10 @@
"php",
"system"
],
"support": {
"issues": "https://gitlab.com/php-extended/php-system/issues",
"source": "https://gitlab.com/php-extended/php-system"
},
"time": "2018-06-07T06:03:27+00:00"
},
{
@@ -1230,29 +1369,33 @@
"php",
"tail"
],
"support": {
"issues": "https://gitlab.com/php-extended/php-tail/issues",
"source": "https://gitlab.com/php-extended/php-tail"
},
"time": "2018-06-07T06:04:58+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.1.0",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"dev-2.x": "2.x-dev"
}
},
"autoload": {
@@ -1279,32 +1422,35 @@
"reflection",
"static analysis"
],
"time": "2020-04-27T09:25:28+00:00"
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
},
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.1.0",
"version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
"ext-filter": "^7.1",
"php": "^7.2",
"phpdocumentor/reflection-common": "^2.0",
"phpdocumentor/type-resolver": "^1.0",
"webmozart/assert": "^1"
"ext-filter": "*",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.3",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"doctrine/instantiator": "^1",
"mockery/mockery": "^1"
"mockery/mockery": "~1.3.2"
},
"type": "library",
"extra": {
@@ -1332,34 +1478,37 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2020-02-22T12:28:44+00:00"
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
},
"time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.1.0",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"shasum": ""
},
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "^7.2",
"mockery/mockery": "~1"
"ext-tokenizer": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
"dev-1.x": "1.x-dev"
}
},
"autoload": {
@@ -1378,31 +1527,30 @@
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2020-02-18T18:59:58+00:00"
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
},
"time": "2020-09-17T18:55:26+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -1415,7 +1563,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@@ -1427,7 +1575,11 @@
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1"
},
"time": "2021-03-05T17:36:06+00:00"
},
{
"name": "psr/http-message",
@@ -1477,20 +1629,23 @@
"request",
"response"
],
"support": {
"source": "https://github.com/php-fig/http-message/tree/master"
},
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.1.2",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
@@ -1514,7 +1669,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@@ -1524,7 +1679,10 @@
"psr",
"psr-3"
],
"time": "2019-11-01T11:05:21+00:00"
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -1564,28 +1722,33 @@
}
],
"description": "A polyfill for getallheaders.",
"support": {
"issues": "https://github.com/ralouphie/getallheaders/issues",
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
},
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "sabre/event",
"version": "5.1.0",
"version": "5.1.2",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276"
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d00a17507af0e7544cfe17096372f5d733e3b276",
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276",
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
"phpunit/phpunit": "^7 || ^8"
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"type": "library",
"autoload": {
@@ -1624,20 +1787,25 @@
"reactor",
"signal"
],
"time": "2020-01-31T18:52:29+00:00"
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event"
},
"time": "2020-10-03T11:02:22+00:00"
},
{
"name": "scssphp/scssphp",
"version": "1.0.6",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
"shasum": ""
},
"require": {
@@ -1646,11 +1814,19 @@
"php": ">=5.6.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
"squizlabs/php_codesniffer": "~2.5",
"twbs/bootstrap": "~4.3",
"bamarni/composer-bin-plugin": "^1.4",
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4",
"sass/sass-spec": "*",
"squizlabs/php_codesniffer": "~3.5",
"symfony/phpunit-bridge": "^5.1",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"zurb/foundation": "~6.5"
},
"suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"bin": [
"bin/pscss"
],
@@ -1685,24 +1861,28 @@
"scss",
"stylesheet"
],
"time": "2019-12-12T05:00:52+00:00"
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
},
"time": "2021-07-02T16:28:10+00:00"
},
{
"name": "sergeytsalkov/meekrodb",
"version": "v2.3",
"version": "v2.4",
"source": {
"type": "git",
"url": "https://github.com/SergeyTsalkov/meekrodb.git",
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1"
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/eb36858f1aff94ae1665900e681a1cfb78563ee1",
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1",
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/e30c240d54bc81f58c58507a9ed768032eb494a5",
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
@@ -1728,39 +1908,49 @@
"mysqli",
"pdo"
],
"time": "2014-06-16T22:40:22+00:00"
"support": {
"email": "support@meekro.com",
"issues": "https://github.com/SergeyTsalkov/meekrodb/issues",
"source": "https://github.com/SergeyTsalkov/meekrodb/tree/v2.4"
},
"time": "2021-06-29T04:31:23+00:00"
},
{
"name": "symfony/console",
"version": "v5.0.8",
"version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935"
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/service-contracts": "^1.1|^2"
"symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2",
"symfony/string": "^5.1"
},
"conflict": {
"psr/log": ">=3",
"symfony/dependency-injection": "<4.4",
"symfony/dotenv": "<5.1",
"symfony/event-dispatcher": "<4.4",
"symfony/lock": "<4.4",
"symfony/process": "<4.4"
},
"provide": {
"psr/log-implementation": "1.0"
"psr/log-implementation": "1.0|2.0"
},
"require-dev": {
"psr/log": "~1.0",
"psr/log": "^1|^2",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/event-dispatcher": "^4.4|^5.0",
@@ -1775,11 +1965,6 @@
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
@@ -1802,42 +1987,127 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"time": "2020-03-30T11:42:42+00:00"
"keywords": [
"cli",
"command line",
"console",
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.3.6"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-07-27T19:10:22+00:00"
},
{
"name": "symfony/lock",
"version": "v4.4.3",
"name": "symfony/deprecation-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"psr/log": "~1.0"
},
"conflict": {
"doctrine/dbal": "<2.5"
},
"require-dev": {
"doctrine/dbal": "~2.5",
"mongodb/mongodb": "~1.1",
"predis/predis": "~1.0"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-03-23T23:28:01+00:00"
},
{
"name": "symfony/lock",
"version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"psr/log": "^1|^2|^3",
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"doctrine/dbal": "<2.6"
},
"require-dev": {
"doctrine/dbal": "^2.6|^3.0",
"predis/predis": "~1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Lock\\": ""
@@ -1860,7 +2130,7 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Lock Component",
"description": "Creates and manages locks, a mechanism to provide exclusive access to a shared resource",
"homepage": "https://symfony.com",
"keywords": [
"cas",
@@ -1870,24 +2140,41 @@
"redlock",
"semaphore"
],
"time": "2020-01-04T13:00:46+00:00"
"support": {
"source": "https://github.com/symfony/lock/tree/v4.4.27"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-07-23T15:41:52+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.15.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -1895,7 +2182,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1928,24 +2219,293 @@
"polyfill",
"portable"
],
"time": "2020-02-27T09:26:54+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.15.0",
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Grapheme\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"grapheme",
"intl",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
"shasum": ""
},
"require": {
"php": ">=7.1",
"symfony/polyfill-intl-normalizer": "^1.10",
"symfony/polyfill-php72": "^1.10"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Laurent Bassin",
"email": "laurent@bassin.info"
},
{
"name": "Trevor Rowbotham",
"email": "trevor.rowbotham@pm.me"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"idn",
"intl",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-27T09:27:20+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"intl",
"normalizer",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -1953,7 +2513,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1987,29 +2551,50 @@
"portable",
"shim"
],
"time": "2020-03-09T19:04:49+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.15.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -2042,29 +2627,50 @@
"portable",
"shim"
],
"time": "2020-02-27T09:26:54+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-27T09:17:38+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.15.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -2100,25 +2706,125 @@
"portable",
"shim"
],
"time": "2020-02-27T09:26:54+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.0.1",
"name": "symfony/polyfill-php80",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "144c5e51266b281231e947b51223ba14acf1a749"
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
"reference": "144c5e51266b281231e947b51223ba14acf1a749",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/container": "^1.0"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-07-28T13:41:28+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1"
},
"suggest": {
"symfony/service-implementation": ""
@@ -2126,7 +2832,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -2158,27 +2868,178 @@
"interoperability",
"standards"
],
"time": "2019-11-18T17:27:11+00:00"
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-04-01T10:43:52+00:00"
},
{
"name": "vlucas/valitron",
"version": "v1.4.7",
"name": "symfony/string",
"version": "v5.3.3",
"source": {
"type": "git",
"url": "https://github.com/vlucas/valitron.git",
"reference": "a03072bed1679660200766d134507a30193eaf6d"
"url": "https://github.com/symfony/string.git",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
"reference": "a03072bed1679660200766d134507a30193eaf6d",
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "~1.15"
},
"require-dev": {
"symfony/error-handler": "^4.4|^5.0",
"symfony/http-client": "^4.4|^5.0",
"symfony/translation-contracts": "^1.1|^2",
"symfony/var-exporter": "^4.4|^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\String\\": ""
},
"files": [
"Resources/functions.php"
],
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
"homepage": "https://symfony.com",
"keywords": [
"grapheme",
"i18n",
"string",
"unicode",
"utf-8",
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.3.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-06-27T11:44:38+00:00"
},
{
"name": "tysonandre/var_representation_polyfill",
"version": "0.0.2",
"source": {
"type": "git",
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": "^7.2.0|^8.0.0"
},
"require-dev": {
"phan/phan": "^4.0",
"phpunit/phpunit": "^8.5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"VarRepresentation\\": "src/VarRepresentation"
},
"files": [
"src/var_representation.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tyson Andre"
}
],
"description": "Polyfill for var_representation",
"keywords": [
"var_export",
"var_representation"
],
"support": {
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues",
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.0.2"
},
"time": "2021-06-26T18:55:02+00:00"
},
{
"name": "vlucas/valitron",
"version": "v1.4.10",
"source": {
"type": "git",
"url": "https://github.com/vlucas/valitron.git",
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
"phpunit/phpunit": ">=4.8.35"
},
"suggest": {
"ext-mbstring": "It can support the multiple bytes string length."
@@ -2197,43 +3058,59 @@
{
"name": "Vance Lucas",
"email": "vance@vancelucas.com",
"homepage": "http://www.vancelucas.com"
"homepage": "https://www.vancelucas.com"
}
],
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
"homepage": "http://github.com/vlucas/valitron",
"homepage": "https://github.com/vlucas/valitron",
"keywords": [
"valid",
"validation",
"validator"
],
"time": "2019-08-29T19:49:43+00:00"
"support": {
"issues": "https://github.com/vlucas/valitron/issues",
"source": "https://github.com/vlucas/valitron/tree/v1.4.10"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/vlucas/valitron",
"type": "tidelift"
}
],
"time": "2021-07-08T16:18:03+00:00"
},
{
"name": "webmozart/assert",
"version": "1.8.0",
"version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
"url": "https://github.com/webmozarts/assert.git",
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0",
"php": "^7.2 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"vimeo/psalm": "<3.9.1"
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
"phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@@ -2255,7 +3132,11 @@
"check",
"validate"
],
"time": "2020-04-18T12:12:48+00:00"
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
},
"time": "2021-03-09T10:59:23+00:00"
},
{
"name": "xemlock/htmlpurifier-html5",
@@ -2306,6 +3187,10 @@
"validator",
"xss"
],
"support": {
"issues": "https://github.com/xemlock/htmlpurifier-html5/issues",
"source": "https://github.com/xemlock/htmlpurifier-html5/tree/master"
},
"time": "2019-08-07T17:19:21+00:00"
}
],
@@ -2319,5 +3204,6 @@
"platform-dev": [],
"platform-overrides": {
"php": "7.3"
}
},
"plugin-api-version": "2.0.0"
}
Regular → Executable
BIN
View File
Binary file not shown.
+240 -181
View File
@@ -1,182 +1,241 @@
@charset "utf-8";
body {
color:white; background-color:black; font-family: '맑은 고딕';
}
table {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
th, td {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
a.just_link {
text-decoration: none;
}
.with_border{
margin:0;
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
}
.section_title {
height:50px;
line-height:50px;
font-size: 30px; font-weight: bold;
text-align: center;
color:white;
padding:0;
}
.legacy_layout div {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';;
}
.obj_fill{
display:block;
width:100%;
height:100%;
}
button.with_skin {
padding:0 4px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
button.with_skin:disabled {
background-color:#333333;
}
input.with_skin {
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
input.with_skin:disabled {
background-color: #333333;
}
.font0 { font-size: 10px; }
.font1 { font-size: 13px; }
.font2 { font-size: 15px; }
.font3 { font-size: 20px; }
.font4 { font-size: 30px; }
.font5 { font-size: 50px; }
caption.section_title {
caption-side:top;
}
.samButton{
float:left;
display:block;
padding:0;
margin:0;
text-decoration: none;
position:relative;
}
a.samButton.disabled {
pointer-events: none;
cursor: default;
}
.samButtonOuter{
display: table;
border: outset 2px white;
box-sizing: border-box;
font-weight:bold;
padding: 1px 6px;
width:125px;
height:30px;
background-color:#000000;
color:#ffffff;
}
.samButtonOuter:active{
border: inset 2px white;
}
.samButtonInner{
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
text-align: center;
user-select: none;
}
.samToolbarButton > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:white;
}
.samToolbarButton2 > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:magenta;
}
.samCommandButton > .samButtonOuter{
width:111px;
height:30px;
}
.samCommandButton.disabled > .samButtonOuter{
background-color:transparent !important;
color:gray !important;
border-color:transparent !important;
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
content:'【'
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
content:'】'
}
.tooltip_copyable_info .tooltiptext{
display: inline;
color: rgba(0,0,0,0);
font-size: 0;
}
.tooltiptext {
display: none;
}
.hidden_but_copyable{
color: rgba(0,0,0,0);
font-size: 0;
@charset "utf-8";
body {
color: white;
background-color: black;
font-family: '맑은 고딕';
}
table {
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
th,
td {
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
a.just_link {
text-decoration: none;
}
.with_border {
margin: 0;
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
}
.section_title {
height: 50px;
line-height: 50px;
font-size: 30px;
font-weight: bold;
text-align: center;
color: white;
padding: 0;
}
.legacy_layout div {
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
;
}
.obj_fill {
display: block;
width: 100%;
height: 100%;
}
button.with_skin {
padding: 0 4px;
background-color: black;
color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
button.with_skin:disabled {
background-color: #333333;
}
input.with_skin {
background-color: black;
color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
input.with_skin:disabled {
background-color: #333333;
}
.font0 {
font-size: 10px;
}
.font1 {
font-size: 13px;
}
.font2 {
font-size: 15px;
}
.font3 {
font-size: 20px;
}
.font4 {
font-size: 30px;
}
.font5 {
font-size: 50px;
}
caption.section_title {
caption-side: top;
}
.samButton {
float: left;
display: block;
padding: 0;
margin: 0;
text-decoration: none;
position: relative;
}
a.samButton.disabled {
pointer-events: none;
cursor: default;
}
.samButtonOuter {
display: table;
border: outset 2px white;
box-sizing: border-box;
font-weight: bold;
padding: 1px 6px;
width: 125px;
height: 30px;
background-color: #000000;
color: #ffffff;
}
.samButtonOuter:active {
border: inset 2px white;
}
.samButtonInner {
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
text-align: center;
user-select: none;
}
.samToolbarButton>.samButtonOuter {
width: 125px;
height: 30px;
background-color: #225500;
color: white;
}
.samToolbarButton2>.samButtonOuter {
width: 125px;
height: 30px;
background-color: #225500;
color: magenta;
}
.samCommandButton>.samButtonOuter {
width: 111px;
height: 30px;
}
.samCommandButton.disabled>.samButtonOuter {
background-color: transparent !important;
color: gray !important;
border-color: transparent !important;
}
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::before {
content: '【'
}
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::after {
content: '】'
}
.tooltip_copyable_info .tooltiptext {
display: inline;
color: rgba(0, 0, 0, 0);
font-size: 0;
}
.tooltiptext {
display: none;
}
.hidden_but_copyable {
color: rgba(0, 0, 0, 0);
font-size: 0;
}
.vertical_flex {
height: 100%;
display: flex;
align-content: center;
flex-direction: column;
align-items: stretch;
}
.vertical_flex .item {
display: block;
flex-grow: 1;
}
.fill_box {
display: block;
width: 100%;
height: 100%;
}
+155 -140
View File
@@ -1,141 +1,156 @@
@charset "utf-8";
body{
line-height: 1.3;
}
#server_notice {
margin:10px 0;
border: none;
text-align:center;
}
#server_list_container{
width:800px;
position:absolute;
left:50%;
margin-left:-400px;
}
#server_list_table{
width:100%;
}
#server_list tr{
height:66px;
}
#server_list .server_create_and_select .general_create,
#server_list .server_create_and_select .general_select {
width: 120px; height: 33px;
float: left;
}
#server_list .general_create,
#server_list .general_login {
width: 120px; height: 66px;
float: left;
}
.ignore_border{
border:0;
margin:0;
padding:0;
}
#user_info {
margin-top:20px;
width: 800px; height: 130px;
}
#user_info button{
width: 200px;
height: 50px;
margin: 10px 50px;
}
.center_ordered_items{
text-align:center;
}
.Entrance_ServerList {
width: 800px; height: 64px;
border: none;
float: left;
}
.Entrance_ServerListServer {
width: 98px; height: 64px;
float: left;
}
.Entrance_ServerListDown {
width: 698px; height: 64px;
float: left;
}
.Entrance_ServerListInfo {
width: 398px; height: 64px;
float: left;
}
.Entrance_ServerListBlock {
width: 298px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListCharacter {
width: 64px; height: 64px;
float: left;
}
.Entrance_ServerListName {
width: 112px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListSelect {
width: 120px; height: 32px;
float: left;
}
#Entrance_000003 {
width: 798px; height: 155px;
text-align: left;
}
.Entrance_Alert {
color: red; font-size: 15px; font-weight: bold;
}
.Entrance_Che {
color: white; font-size: 15px; font-weight: bold;
}
.Entrance_Kwe {
color: yellow; font-size: 15px; font-weight: bold;
}
.Entrance_Pwe {
color: orange; font-size: 15px; font-weight: bold;
}
.Entrance_Twe {
color: magenta; font-size: 15px; font-weight: bold;
}
.Entrance_Nya {
color: #e67e22; font-size: 15px; font-weight: bold;
}
.Entrance_Pya {
color: #9b59b6; font-size: 15px; font-weight: bold;
}
.Entrance_Hwe {
color: red; font-size: 15px; font-weight: bold;
@charset "utf-8";
body {
line-height: 1.3;
}
#server_notice {
margin: 10px 0;
border: none;
text-align: center;
}
#server_list_container {
width: 800px;
position: absolute;
left: 50%;
margin-left: -400px;
}
#server_list_table {
width: 100%;
}
#server_list tr {
height: 66px;
}
.ignore_border {
border: 0;
margin: 0;
padding: 0;
}
#user_info {
margin-top: 20px;
width: 800px;
height: 130px;
}
#user_info button {
width: 200px;
height: 50px;
margin: 10px 50px;
}
.center_ordered_items {
text-align: center;
}
.Entrance_ServerList {
width: 800px;
height: 64px;
border: none;
float: left;
}
.Entrance_ServerListServer {
width: 98px;
height: 64px;
float: left;
}
.Entrance_ServerListDown {
width: 698px;
height: 64px;
float: left;
}
.Entrance_ServerListInfo {
width: 398px;
height: 64px;
float: left;
}
.Entrance_ServerListBlock {
width: 298px;
height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListCharacter {
width: 64px;
height: 64px;
float: left;
}
.Entrance_ServerListName {
width: 112px;
height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListSelect {
width: 120px;
height: 32px;
float: left;
}
#Entrance_000003 {
width: 798px;
height: 155px;
text-align: left;
}
.Entrance_Alert {
color: red;
font-size: 15px;
font-weight: bold;
}
.Entrance_Che {
color: white;
font-size: 15px;
font-weight: bold;
}
.Entrance_Kwe {
color: yellow;
font-size: 15px;
font-weight: bold;
}
.Entrance_Pwe {
color: orange;
font-size: 15px;
font-weight: bold;
}
.Entrance_Twe {
color: magenta;
font-size: 15px;
font-weight: bold;
}
.Entrance_Nya {
color: #e67e22;
font-size: 15px;
font-weight: bold;
}
.Entrance_Pya {
color: #9b59b6;
font-size: 15px;
font-weight: bold;
}
.Entrance_Hwe {
color: red;
font-size: 15px;
font-weight: bold;
}
.BtnPlate {
height: inherit;
}
+4 -2
View File
@@ -127,6 +127,8 @@ input::-webkit-input-placeholder {
border-radius: .2rem;
}
#running_map {
margin-top: 20px;
#running_map{
overflow: hidden;
border: none;
width:700px;
}
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -117,7 +117,7 @@ function logError(string $err, string $errstr, string $errpath, array $trace)
]);
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext=null)
{
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
+22 -25
View File
@@ -11,12 +11,9 @@ require(__DIR__.'/../vendor/autoload.php');
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>설치</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
<?=WebUtil::printJS('../js/common.js')?>
<?=WebUtil::printJS('../js/install.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('../dist_js/vendors.js') ?>
<?=WebUtil::printJS('../dist_js/install.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../css/install.css')?>
</head>
@@ -29,13 +26,13 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="card" id="db_form_card" style="display:none">
<h3 class="card-header">
설치(DB 설정)
</h3>
</h3>
<div class="card-body">
<form id="db_form" method="post" action="#">
<div class="form-group row">
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_host" id="db_host"
<input type="text" class="form-control" name="db_host" id="db_host"
placeholder="호스트" value="localhost" />
</div>
</div>
@@ -43,11 +40,11 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_port" id="db_port"
<input type="text" class="form-control" name="db_port" id="db_port"
placeholder="접속 포트" value="3306" />
</div>
</div>
<div class="form-group row">
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
<div class="col-sm-8">
@@ -55,11 +52,11 @@ require(__DIR__.'/../vendor/autoload.php');
</div>
</div>
<div class="form-group row">
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="db_pw" id="db_pw"
<input type="password" class="form-control" name="db_pw" id="db_pw"
placeholder="DB비밀번호"/>
</div>
</div>
@@ -67,7 +64,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_name" id="db_name"
<input type="text" class="form-control" name="db_name" id="db_name"
placeholder="DB명(예:sammo)"/>
</div>
</div>
@@ -75,7 +72,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="serv_host" id="serv_host"
<input type="text" class="form-control" name="serv_host" id="serv_host"
placeholder="접속경로(예:http://www.example.com)"/>
</div>
</div>
@@ -83,7 +80,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/icons" />
</div>
@@ -92,7 +89,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/game" />
</div>
@@ -101,7 +98,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
<div class="input-group col-sm-8">
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
value="" />
<div class="input-group-append">
@@ -115,7 +112,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
placeholder="카카오톡 API의 Rest Key"
value="" />
</div>
@@ -124,7 +121,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
placeholder="카카오톡 API의 Admin Key"
value="" />
</div>
@@ -133,7 +130,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<button type="submit"
<button type="submit"
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
</div>
</div>
@@ -144,7 +141,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="card" id="admin_form_card" style="display:none">
<h3 class="card-header">
설치(관리자 생성)
</h3>
</h3>
<div class="card-body">
<form id="admin_form" method="post" action="#">
<div class="form-group row">
@@ -155,11 +152,11 @@ require(__DIR__.'/../vendor/autoload.php');
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="password" id="password"
<input type="password" class="form-control" name="password" id="password"
placeholder="비밀번호"/>
</div>
</div>
@@ -167,7 +164,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
placeholder="비밀번호 확인"/>
</div>
</div>
@@ -175,7 +172,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row">
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nickname" id="nickname"
<input type="text" class="form-control" name="nickname" id="nickname"
placeholder="닉네임" value="운영자"/>
</div>
</div>
+1
View File
@@ -1,6 +1,7 @@
<?php
namespace kakao;
// @suppress PhanRedefineClass
class KakaoKey{
const REST_KEY = '_tK_REST_API_KEY_';
const ADMIN_KEY = '_tK_ADMIN_KEY_';
+5 -10
View File
@@ -6,38 +6,33 @@
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
/* 레거시. */
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
.map_detail .map_title{
background:
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
url('_tK_gameImagePath_/rtitle.jpg') no-repeat right;
}
.map_detail.map_spring .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/spring.gif') no-repeat right;
}
.map_detail.map_summer .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/summer.gif') no-repeat right;
}
.map_detail.map_fall .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/fall.gif') no-repeat right;
}
.map_detail.map_winter .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/winter.gif') no-repeat right;
}
+2 -2
View File
@@ -99,7 +99,7 @@ $sel2[$type2] = "selected";
</table>
<table align=center width=1600 class="tb_layout bg0">
<tr id=bg1>
<tr class='bg1'>
<td align=center>국명</td>
<td align=center>접률</td>
<td align=center>단접</td>
@@ -278,7 +278,7 @@ from city where nation=%i', $nation['nation']);
</table>
<table align=center width=1760 class="tb_layout bg0">
<tr id=bg1>
<tr class='bg1'>
<td width=30 align=center>년</td>
<td width=30 align=center>월</td>
<td width=50 align=center>국가수</td>
+9 -9
View File
@@ -52,9 +52,9 @@ if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
} else if ($reqArgType === 2) {
$generalBasicList = $db->query(
'SELECT no, name, nation, npc, turntime, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
'SELECT no, name, nation, npc, turntime, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %s',
$reqQueryType,
$reqQueryType
@@ -117,10 +117,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1>
<td width=50% align=center class='bg1'>
<font color=skyblue size=3>장 수 정 보</font>
</td>
<td width=50% align=center id=bg1>
<td width=50% align=center class='bg1'>
<font color=orange size=3>-</font>
</td>
</tr>
@@ -133,10 +133,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
</td>
</tr>
<tr>
<td align=center id=bg1>
<td align=center class='bg1'>
<font color=skyblue size=3>개인 기록</font>
</td>
<td align=center id=bg1>
<td align=center class='bg1'>
<font color=orange size=3>전투 기록</font>
</td>
</tr>
@@ -149,10 +149,10 @@ $generalObj = General::createGeneralObjFromDB($gen);
</td>
</tr>
<tr>
<td align=center id=bg1>
<td align=center class='bg1'>
<font color=skyblue size=3>장수 열전</font>
</td>
<td align=center id=bg1>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr>
+4 -4
View File
@@ -49,10 +49,10 @@ $sel[$type] = "selected";
<table width=1000 align=center class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
<tr>
<td width=130 align=center id=bg1>국 가 명</td>
<td width=130 align=center id=bg1>국 가 명</td>
<td width=80 align=center id=bg1>상 태</td>
<td width=60 align=center id=bg1>기 간</td>
<td width=130 align=center class='bg1'>국 가 명</td>
<td width=130 align=center class='bg1'>국 가 명</td>
<td width=80 align=center class='bg1'>상 태</td>
<td width=60 align=center class='bg1'>기 간</td>
</tr>
<?php
+4
View File
@@ -24,3 +24,7 @@ foreach ($db->queryFirstColumn(
) as $generalNo) {
CheckHall($generalNo);
}
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
$genObj->mergeTotalInheritancePoint();
}
+16 -18
View File
@@ -29,10 +29,9 @@ $templates = new \League\Plates\Engine(__DIR__.'/templates');
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head>
<body>
@@ -74,7 +73,7 @@ $types = [
}
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
$v['name'] = '???';
$v['name'] = '???';
$v['ownerName'] = null;
$v['bgColor'] = GameConst::$basecolor4;
$v['fgColor'] = newColor($v['bgColor']);
@@ -123,9 +122,9 @@ $types = [
$v['value'] = 0;
}
else{
$v['value'] = $v['ttw']/max(1, $totalCnt);
$v['value'] = $v['ttw']/max(1, $totalCnt);
}
return $v;
return $v;
}],
["통 솔 전 승 률", "percent", function($v){
$totalCnt = $v['tlw']+$v['tld']+$v['tll'];
@@ -135,7 +134,7 @@ $types = [
else{
$v['value'] = $v['tlw']/max(1, $totalCnt);
}
return $v;
return $v;
}],
["일 기 토 승 률", "percent", function($v){
$totalCnt = $v['tsw']+$v['tsd']+$v['tsl'];
@@ -155,7 +154,7 @@ $types = [
else{
$v['value'] = $v['tiw']/max(1, $totalCnt);
}
return $v;
}],
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
@@ -174,17 +173,17 @@ $types = [
$generals = [];
foreach($db->query(
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
experience, dedication,
dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item
dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general
){
$generalID = $general['no'];
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
$general['fgColor'] = newColor($general['bgColor']);
$general['nationName'] = $nationName[$general['nation']];
if(key_exists('picture', $general)){
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
@@ -265,7 +264,7 @@ foreach($generals as $general){
else{
$itemOwners[$itemClassName] = [$general];
}
}
}
@@ -280,7 +279,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
continue;
}
$itemClass = buildItemClass($itemClassName);
if($itemClass->isBuyable()){
continue;
}
@@ -288,7 +287,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
$info = $itemClass->getInfo();
$name = $itemClass->getName();
if($info){
$name = $templates->render('tooltip', [
'text'=>$name,
@@ -323,7 +322,7 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
$itemRanker[] = $card;
}
}
echo $templates->render('hallOfFrame', [
'typeName'=>$itemNameType,
'generals'=>$itemRanker
@@ -337,4 +336,3 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
</table>
</body>
</html>
+17 -17
View File
@@ -16,9 +16,9 @@ increaseRefresh("왕조일람", 1);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -70,9 +70,9 @@ foreach($emperiors as $emperior){
<tr>
<td bgcolor=skyblue align=center colspan=8>
<font size=5><?=$emperior['phase']?></font>
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button type='button'>자세히</button></a>
<?php if($emperior['server_id']): ?>
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button type='button'>역사 보기</button></a>
<?php endif ?>
@@ -84,33 +84,33 @@ foreach($emperiors as $emperior){
</td>
</tr>
<tr>
<td id=bg1 align=center width=80>국 력</td>
<td class='bg1' align=center width=80>국 력</td>
<td align=center width=170><?=$emperior['power']?></td>
<td id=bg1 align=center width=80>장 수</td>
<td class='bg1' align=center width=80>장 수</td>
<td align=center width=170><?=$emperior['gennum']?></td>
<td id=bg1 align=center width=80>속 령</td>
<td class='bg1' align=center width=80>속 령</td>
<td align=center width=170><?=$emperior['citynum']?></td>
<td id=bg1 align=center width=80>성 향</td>
<td class='bg1' align=center width=80>성 향</td>
<td align=center width=170><?=$emperior['type']?></td>
</tr>
<tr>
<td id=bg1 align=center>황 제</td>
<td class='bg1' align=center>황 제</td>
<td align=center><?=$emperior['l12name']?></td>
<td id=bg1 align=center>승 상</td>
<td class='bg1' align=center>승 상</td>
<td align=center><?=$emperior['l11name']?></td>
<td id=bg1 align=center>표 기 장 군</td>
<td class='bg1' align=center>표 기 장 군</td>
<td align=center><?=$emperior['l10name']?></td>
<td id=bg1 align=center>사 공</td>
<td class='bg1' align=center>사 공</td>
<td align=center><?=$emperior['l9name']?></td>
</tr>
<tr>
<td id=bg1 align=center>거 기 장 군</td>
<td class='bg1' align=center>거 기 장 군</td>
<td align=center><?=$emperior['l8name']?></td>
<td id=bg1 align=center>태 위</td>
<td class='bg1' align=center>태 위</td>
<td align=center><?=$emperior['l7name']?></td>
<td id=bg1 align=center>위 장 군</td>
<td class='bg1' align=center>위 장 군</td>
<td align=center><?=$emperior['l6name']?></td>
<td id=bg1 align=center>사 도</td>
<td class='bg1' align=center>사 도</td>
<td align=center><?=$emperior['l5name']?></td>
</tr>
</table>
+28 -31
View File
@@ -26,9 +26,6 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -57,25 +54,25 @@ if($emperior):
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center>국 가 수<br>(최종 / 최대)</td>
<td class='bg1' width=98 align=center>국 가 수<br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?=$emperior['nation_count']?></td>
<td id=bg1 width=98 align=center>장 수 수<br>(최종 / 최대)</td>
<td class='bg1' width=98 align=center>장 수 수<br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?=$emperior['gen_count']?></td>
</tr>
<tr>
<td id=bg1 align=center>등 장 국 가</td>
<td class='bg1' align=center>등 장 국 가</td>
<td colspan=5><?=$emperior['nation_name']?></td>
</tr>
<tr>
<td id=bg1 align=center>국가별 성향</td>
<td class='bg1' align=center>국가별 성향</td>
<td colspan=5><?=$emperior['nation_hist']?></td>
</tr>
<tr>
<td id=bg1 align=center>장 수 성 격</td>
<td class='bg1' align=center>장 수 성 격</td>
<td colspan=5><?=$emperior['personal_hist']?></td>
</tr>
<tr>
<td id=bg1 align=center>장 수 특 기</td>
<td class='bg1' align=center>장 수 특 기</td>
<td colspan=5><?=$emperior['special_hist']?></td>
</tr>
<tr>
@@ -84,75 +81,75 @@ if($emperior):
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center>국 력</td>
<td class='bg1' width=98 align=center>국 력</td>
<td align=center width=398 colspan=2><?=$emperior['power']?></td>
<td id=bg1 width=98 align=center>성 향</td>
<td class='bg1' width=98 align=center>성 향</td>
<td align=center width=398 colspan=2><?=$emperior['type']?></td>
</tr>
<tr>
<td id=bg1 width=98 align=center>장 수</td>
<td class='bg1' width=98 align=center>장 수</td>
<td align=center width=398 colspan=2><?=$emperior['gennum']?></td>
<td id=bg1 width=98 align=center>속 령</td>
<td class='bg1' width=98 align=center>속 령</td>
<td align=center width=398 colspan=2><?=$emperior['citynum']?></td>
</tr>
<tr>
<td id=bg1 align=center>총 인 구</td>
<td class='bg1' align=center>총 인 구</td>
<td align=center colspan=2><?=$emperior['pop']?></td>
<td id=bg1 align=center>인 구 율</td>
<td class='bg1' align=center>인 구 율</td>
<td align=center colspan=2><?=$emperior['poprate']?></td>
</tr>
<tr>
<td id=bg1 align=center>국 고</td>
<td class='bg1' align=center>국 고</td>
<td align=center colspan=2><?=$emperior['gold']?></td>
<td id=bg1 align=center>병 량</td>
<td class='bg1' align=center>병 량</td>
<td align=center colspan=2><?=$emperior['rice']?></td>
</tr>
<tr>
<td id=bg1 align=center>황 제</td>
<td class='bg1' align=center>황 제</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l12name']?></td>
<td id=bg1 align=center>승 상</td>
<td class='bg1' align=center>승 상</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l11name']?></td>
</tr>
<tr>
<td id=bg1 align=center>위 장 군</td>
<td class='bg1' align=center>위 장 군</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l10name']?></td>
<td id=bg1 align=center>사 공</td>
<td class='bg1' align=center>사 공</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l9name']?></td>
</tr>
<tr>
<td id=bg1 align=center>표 기 장 군</td>
<td class='bg1' align=center>표 기 장 군</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l8name']?></td>
<td id=bg1 align=center>태 위</td>
<td class='bg1' align=center>태 위</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l7name']?></td>
</tr>
<tr>
<td id=bg1 align=center>거 기 장 군</td>
<td class='bg1' align=center>거 기 장 군</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l6name']?></td>
<td id=bg1 align=center>사 도</td>
<td class='bg1' align=center>사 도</td>
<td width=64>&nbsp;</td>
<td width=332><?=$emperior['l5name']?></td>
</tr>
<tr>
<td id=bg1 align=center>오 호 장 군</td>
<td class='bg1' align=center>오 호 장 군</td>
<td colspan=5><?=$emperior['tiger']?></td>
</tr>
<tr>
<td id=bg1 align=center>건 안 칠 자</td>
<td class='bg1' align=center>건 안 칠 자</td>
<td colspan=5><?=$emperior['eagle']?></td>
</tr>
<tr>
<td id=bg1 align=center>장 수 들<br>(공헌도 순서)</td>
<td class='bg1' align=center>장 수 들<br>(공헌도 순서)</td>
<td colspan=5><?=$emperior['gen']?></td>
</tr>
<tr>
<td id=bg1 align=center>역 사 기 록</td>
<td class='bg1' align=center>역 사 기 록</td>
<td colspan=5><?=formatHistoryToHTML(Json::decode($emperior['history']))?></td>
</tr>
</table>
@@ -178,7 +175,7 @@ if($showServers){
$nation['levelName'] = getNationLevel($nation['level']);
/** @var int[]|null $nationGenerals */
$nationGenerals = $nation['generals'];
if($nationGenerals){
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
@@ -203,7 +200,7 @@ if($showServers){
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
$nation += Json::decode($nation['aux']);
}
echo $templates->render('oldNation', $nation);
}
}
+20 -21
View File
@@ -46,10 +46,9 @@ if($gameStor->isunited){
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head>
@@ -110,21 +109,21 @@ $generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special
echo"
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=64 align=center id=bg1>얼 굴</td>
<td width=140 align=center id=bg1>이 름</td>
<td width=45 align=center id=bg1>연령</td>
<td width=45 align=center id=bg1>성격</td>
<td width=80 align=center id=bg1>특기</td>
<td width=45 align=center id=bg1>레 벨</td>
<td width=140 align=center id=bg1>국 가</td>
<td width=55 align=center id=bg1>명 성</td>
<td width=55 align=center id=bg1>계 급</td>
<td width=75 align=center id=bg1>관 직</td>
<td width=45 align=center id=bg1>통솔</td>
<td width=45 align=center id=bg1>무력</td>
<td width=45 align=center id=bg1>지력</td>
<td width=45 align=center id=bg1>삭턴</td>
<td width=70 align=center id=bg1>벌점</td>
<td width=64 align=center class='bg1'>얼 굴</td>
<td width=140 align=center class='bg1'>이 름</td>
<td width=45 align=center class='bg1'>연령</td>
<td width=45 align=center class='bg1'>성격</td>
<td width=80 align=center class='bg1'>특기</td>
<td width=45 align=center class='bg1'>레 벨</td>
<td width=140 align=center class='bg1'>국 가</td>
<td width=55 align=center class='bg1'>명 성</td>
<td width=55 align=center class='bg1'>계 급</td>
<td width=75 align=center class='bg1'>관 직</td>
<td width=45 align=center class='bg1'>통솔</td>
<td width=45 align=center class='bg1'>무력</td>
<td width=45 align=center class='bg1'>지력</td>
<td width=45 align=center class='bg1'>삭턴</td>
<td width=70 align=center class='bg1'>벌점</td>
</tr>";
foreach($generalList as $general){
$nation = $nationname[$general['nation']];
@@ -149,7 +148,7 @@ foreach($generalList as $general){
$intel = "{$general['intel']}";
}
if ($general['npc'] >= 2) {
$name = "<font color=cyan>{$general['name']}</font>";
@@ -167,8 +166,8 @@ foreach($generalList as $general){
$imageTemp = GetImageURL($general['imgsvr']);
echo "
<tr data-general-id='{$general['no']}'
data-general-wounded='{$general['injury']}'
<tr data-general-id='{$general['no']}'
data-general-wounded='{$general['injury']}'
data-general-leadership='{$general['leadership']}'
data-general-leadership-bonus='{$lbonus}'
data-general-strength='{$general['strength']}'
+9 -13
View File
@@ -28,7 +28,7 @@ $scenarioList = (function(){
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
if($scenarioIdx !== null && key_exists($scenarioIdx, $scenarioList)){
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
}
@@ -50,12 +50,9 @@ else{
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJs('js/hallOfFame.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJs('dist_js/hallOfFame.js')?>
</head>
<body>
@@ -64,14 +61,14 @@ else{
<tr><td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
<option
data-season="<?=$iterSeasonIdx?>"
value=""
<option
data-season="<?=$iterSeasonIdx?>"
value=""
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
<?php foreach($subScenarioList as $info): ?>
<option
data-season="<?=$iterSeasonIdx?>"
data-season="<?=$iterSeasonIdx?>"
value="<?=$info['scenario']?>"
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
@@ -136,7 +133,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
$general['bgColor'] = $general['color'];
}
}
if(!key_exists('fgColor', $general)){
$general['fgColor'] = newColor($general['bgColor']);
}
@@ -175,4 +172,3 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
</table>
</body>
</html>
+5 -8
View File
@@ -99,13 +99,10 @@ $nations = Json::decode($history['nations']);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 연감</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/history.js')?>
<?=WebUtil::printJS('dist_js/history.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -139,7 +136,7 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</td></tr>
</table>
<table align=center width=1000 height=520 class='tb_layout bg0'>
<thead><tr><th colspan=5 align=center id=bg1>중 원 지 도</th></tr></thead>
<thead><tr><th colspan=5 align=center class='bg1'>중 원 지 도</th></tr></thead>
<tbody>
<tr height=520>
<td width=698>
@@ -169,13 +166,13 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</table>
</td>
</tr>
<tr><th colspan=5 align=center id=bg1>중 원 정 세</th></tr>
<tr><th colspan=5 align=center class='bg1'>중 원 정 세</th></tr>
<tr>
<td colspan=5 valign=top>
<?=formatHistoryToHTML(Json::decode($history['global_history']))?>
</td>
</tr>
<tr><th colspan=5 align=center id=bg1>장 수 동 향</th></tr>
<tr><th colspan=5 align=center class='bg1'>장 수 동 향</th></tr>
<tr>
<td colspan=5 valign=top>
<?=formatHistoryToHTML(Json::decode($history['global_action']))?>
+13 -14
View File
@@ -25,10 +25,9 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/extKingdoms.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -48,7 +47,7 @@ $nations[0] = getNationStaticInfo(0);
foreach($db->query('SELECT npc,name,city,nation,officer_level,penalty,permission FROM general ORDER BY dedication DESC') as $general){
$nationID = $general['nation'];
if(!key_exists('generals', $nations[$nationID])){
$nations[$nationID]['generals'] = [];
}
@@ -92,13 +91,13 @@ foreach ($nations as $nation) {
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>【 {$nation['name']} 】</td>
</tr>
<tr>
<td width=80 align=center id=bg1>성 향</td>
<td width=80 align=center class='bg1'>성 향</td>
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
<td width=80 align=center id=bg1>작 위</td>
<td width=80 align=center class='bg1'>작 위</td>
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
<td width=80 align=center id=bg1>국 력</td>
<td width=80 align=center class='bg1'>국 력</td>
<td width=170 align=center>{$nation['power']}</td>
<td width=80 align=center id=bg1>장수 / 속령</td>
<td width=80 align=center class='bg1'>장수 / 속령</td>
<td width=170 align=center>{$nation['gennum']} / ".count($nation['cities']??[])."</td>
";
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
@@ -113,9 +112,9 @@ foreach ($nations as $nation) {
}
echo "</tr>
<tr>
<td align=center id=bg1>외교권자</td><td colspan=5>";
<td align=center class='bg1'>외교권자</td><td colspan=5>";
echo join(', ', $ambassadors);
echo "</td><td align=center id=bg1>조언자</td><td align=center >";
echo "</td><td align=center class='bg1'>조언자</td><td align=center >";
echo count($auditors).'명';
echo "</td></tr>
<tr>
@@ -160,9 +159,9 @@ echo "
</tr>
<tr>
<td width=498 align=center>&nbsp;</td>
<td width=123 align=center id=bg1>장 수</td>
<td width=123 align=center class='bg1'>장 수</td>
<td width=123 align=center>{$nations[0]['gennum']}</td>
<td width=123 align=center id=bg1>속 령</td>
<td width=123 align=center class='bg1'>속 령</td>
<td width=123 align=center>".count($nations[0]['cities']??[])."</td>
</tr>
<tr>
@@ -177,7 +176,7 @@ echo"
<td colspan=5> 장수 일람 : ";
foreach($nations[0]['generals'] as $general) {
$generalText = getColoredName($general['name'], $general['npc']);
echo "{$generalText}, ";
echo "{$generalText}, ";
}
echo"
</td>
+21 -16
View File
@@ -26,9 +26,9 @@ $sel[$type] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -59,8 +59,13 @@ foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
}
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
if($generalListFromPool){
$generalList = array_merge($generalListFromPool, $generalList);
}
$sortType = [
1 => ['name', true],
2 => ['nation', true],
@@ -88,18 +93,18 @@ else{
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=102 align=center id=bg1>희생된 장수</td>
<td width=102 align=center id=bg1>악령 이름</td>
<td width=68 align=center id=bg1>레벨</td>
<td width=118 align=center id=bg1>국가</td>
<td width=68 align=center id=bg1>성격</td>
<td width=88 align=center id=bg1>특기</td>
<td width=68 align=center id=bg1>종능</td>
<td width=68 align=center id=bg1>통솔</td>
<td width=68 align=center id=bg1>무력</td>
<td width=68 align=center id=bg1>지력</td>
<td width=78 align=center id=bg1>명성</td>
<td width=78 align=center id=bg1>계급</td>
<td width=102 align=center class='bg1'>희생된 장수</td>
<td width=102 align=center class='bg1'>악령 이름</td>
<td width=68 align=center class='bg1'>레벨</td>
<td width=118 align=center class='bg1'>국가</td>
<td width=68 align=center class='bg1'>성격</td>
<td width=88 align=center class='bg1'>특기</td>
<td width=68 align=center class='bg1'>종능</td>
<td width=68 align=center class='bg1'>통솔</td>
<td width=68 align=center class='bg1'>무력</td>
<td width=68 align=center class='bg1'>지력</td>
<td width=78 align=center class='bg1'>명성</td>
<td width=78 align=center class='bg1'>계급</td>
</tr>
<?php foreach($generalList as $general): ?>
<tr>
+3 -5
View File
@@ -27,12 +27,11 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력도</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('dist_js/map.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
@@ -80,4 +79,3 @@ $(function(){
</body>
</html>
+16 -16
View File
@@ -52,9 +52,9 @@ if ($admin['maxonline'] < $curonline) {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -92,7 +92,7 @@ span.out_bar{
<table align=center width=1016>
<tr><td align=left>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5>접 속 량</font></td></tr>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 량</font></td></tr>
<?php
$refresh[] = $admin['refresh'];
foreach($refresh as $i=>$value){
@@ -101,8 +101,8 @@ foreach($refresh as $i=>$value){
$dt = substr($date[$i], 11, 5); ?>
<tr height=30>
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
<td width=60 align=center id=bg2><?=$dt?></td>
<td width=2 align=center id=bg1></td>
<td width=60 align=center class='bg2'><?=$dt?></td>
<td width=2 align=center class='bg1'></td>
<td width=320>
<?php if($w == 0): ?>
<span class="out_bar"><?=$value?></span>
@@ -111,15 +111,15 @@ foreach($refresh as $i=>$value){
<?php else:?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
<?php endif;?>
</td>
</tr>
<?php
}
?>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?=$admin['maxrefresh']?></td>
</tr>
@@ -127,7 +127,7 @@ foreach($refresh as $i=>$value){
</td>
<td align=right>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5>접 속 자</font></td></tr>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 자</font></td></tr>
<?php
$online[] = $curonline;
foreach($online as $i=>$value){
@@ -136,8 +136,8 @@ foreach($online as $i=>$value){
$dt = substr($date[$i], 11, 5); ?>
<tr height=30>
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
<td width=60 align=center id=bg2><?=$dt?></td>
<td width=2 align=center id=bg1></td>
<td width=60 align=center class='bg2'><?=$dt?></td>
<td width=2 align=center class='bg1'></td>
<td width=320>
<?php if($w == 0): ?>
<span class="out_bar"><?=$value?></span>
@@ -146,22 +146,22 @@ foreach($online as $i=>$value){
<?php else:?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
<?php endif;?>
</td>
</tr>
<?php
}
?>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?=$admin['maxonline']?></td>
</tr>
</table>
</td></tr>
</table>
<br>
<table align=center class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr>
<tr><td colspan=3 align=center class='bg2'><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr>
<?php
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합';
+13 -13
View File
@@ -12,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("설문조사", 1);
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
$isVoteAdmin |= $session->userGrade >= 5;
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
@@ -28,9 +28,9 @@ $vote = $admin['vote']?:['-'];
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -60,7 +60,7 @@ function captureKey(e) {
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center id=bg2><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<tr><td colspan=3 align=center class='bg2'><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<?php
if ($isVoteAdmin) {
@@ -76,7 +76,7 @@ if ($isVoteAdmin) {
$vote_title = Tag2Code($vote_title);
echo "
<tr>
<td colspan=2 width=148 align=center id=bg1>제 목</td>
<td colspan=2 width=148 align=center class='bg1'>제 목</td>
<td width=848 align=left>&nbsp;{$vote_title}</td>
</tr>
";
@@ -151,7 +151,7 @@ echo "
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=4 align=center id=bg1>댓 글</td>
<td colspan=4 align=center class='bg1'>댓 글</td>
</tr>
";
for ($i=0; $i < $commentCount; $i++) {
@@ -180,7 +180,7 @@ if ($me['no'] > 0) {
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5>
<tr><td colspan=3 align=center class='bg2'><font size=5>
전 체 통 계
<?php
if ($isVoteAdmin) {
@@ -238,8 +238,8 @@ if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
?>
<?php if($per == 0): ?>
@@ -303,7 +303,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
foreach($db->query('SELECT nation,color,name,gennum from nation order by gennum desc') as $i=>$nation){
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=%i AND npc<2', $nation['nation']);
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
if($memCount == 0){
@@ -312,7 +312,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
else{
$percentage = round($voteCount / $memCount * 100, 1);
}
echo "
<tr>
@@ -336,7 +336,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
?>
<?php if($per == 0): ?>
+14 -14
View File
@@ -49,9 +49,9 @@ if ($msg2 == "") {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -59,12 +59,12 @@ if ($msg2 == "") {
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td>거 래 장<br><?=closeButton()?></td></tr>
<tr><td align=center id=bg2><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr>
<tr><td align=center class='bg2'><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr>
<tr align=center id=bg1>
<tr align=center class='bg1'>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>판매자</td>
@@ -118,18 +118,18 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
}
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td align=center class='bg1'>등록결과</td>
<td colspan=10><?=ConvertLog($msg)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td align=center class='bg1'>입찰등록</td>
<td colspan=10>
 지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center id=bg1>거래등록</td>
<td align=center class='bg1'>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
 물품: 쌀
@@ -152,7 +152,7 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr>
<tr align=center id=bg1>
<tr align=center class='bg1'>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>구매자</td>
@@ -205,18 +205,18 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
}
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td align=center class='bg1'>등록결과</td>
<td colspan=10><?=ConvertLog($msg2)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td align=center class='bg1'>입찰등록</td>
<td colspan=10>
 수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center id=bg1>거래등록</td>
<td align=center class='bg1'>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>턴 후
 물품: 쌀
@@ -237,11 +237,11 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td align=center id=bg2><font size=5>최 근 기 록</font></td></tr>
<tr><td align=center class='bg2'><font size=5>최 근 기 록</font></td></tr>
<tr><td>
<?=getAuctionLogRecent(20)?>
</td></tr>
<tr><td align=center id=bg2><font size=5>도 움 말</font></td></tr>
<tr><td align=center class='bg2'><font size=5>도 움 말</font></td></tr>
<tr><td>
<font color=white size=2>
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
+13 -13
View File
@@ -87,10 +87,10 @@ else if($reqArgType===1){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
}
else if($reqArgType===2){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %s AND general.nation = %i',
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %s AND general.nation = %i',
$reqQueryType, $reqQueryType, $nationID
);
}
@@ -120,9 +120,9 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -153,8 +153,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1><font color=skyblue size=3>장 수 정 보</font></td>
<td width=50% align=center id=bg1><font color=orange size=3>장 수 열 전</font></td>
<td width=50% align=center class='bg1'><font color=skyblue size=3>장 수 정 보</font></td>
<td width=50% align=center class='bg1'><font color=orange size=3>장 수 열 전</font></td>
</tr>
<tr>
<td valign=top>
@@ -165,8 +165,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</td>
</tr>
<tr>
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td>
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td>
</tr>
<tr>
<td valign=top>
@@ -178,8 +178,8 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</tr>
<?php if($showGeneral->getNPCType() > 1 || $permission >= 2): ?>
<tr>
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>&nbsp;</font></td>
<td align=center class='bg1'><font color=orange size=3>개인 기록</font></td>
<td align=center class='bg1'><font color=orange size=3>&nbsp;</font></td>
</tr>
<tr>
<td valign=top>
+10 -11
View File
@@ -63,10 +63,9 @@ if($str3){
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 베팅장</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/betting.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/betting.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -79,7 +78,7 @@ if($str3){
<table align=center width=1120 class='tb_layout bg0'>
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr>
<tr><td height=50 colspan=16 align=center class='bg2'><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr>
</table>
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
<tr align=center><td height=10 colspan=16></td></tr>
@@ -311,7 +310,7 @@ for ($i=0; $i < 16; $i++) {
else{
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
}
}
?>
</tr>
@@ -393,8 +392,8 @@ if ($admin['tournament'] == 6) {
<tr align=center><td height=10 colspan=16></td></tr>
</table>
<table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=50 colspan=4 id=bg2><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
<tr align=center><td colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
<tr align=center><td height=50 colspan=4 class='bg2'><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
<tr align=center><td colspan=4 class='bg2'><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
<tr align=center>
<?php
@@ -430,7 +429,7 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
<td>
<table align=center width=280 class='tb_layout bg0'>
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4><?=$tournamentTypeText?></font></td></tr>
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center><?=$statTypeText?></td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr>
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center><?=$statTypeText?></td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr>
<?php
$prizeColumn = "{$rankColumn}p";
$gameColumn = "{$rankColumn}g";
@@ -446,8 +445,8 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
$result = -($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
if($result !== 0) return $result;
$result = -(
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
<=>
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
<=>
($rhs->getRankVar($winColumn)+$rhs->getRankVar($drawColumn)+$rhs->getRankVar($loseColumn))
);
if($result !== 0) return $result;
+3 -7
View File
@@ -15,12 +15,9 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 사령부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/chiefCenter.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/chiefCenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -108,4 +105,3 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
</div>
</body>
</html>
+16 -14
View File
@@ -16,7 +16,11 @@ $db = DB::db();
increaseRefresh("현재도시", 1);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation'])??[
'nation'=>0,
'level'=>0,
'spy'=>''
];
$templates = new \League\Plates\Engine('templates');
@@ -29,11 +33,9 @@ $templates = new \League\Plates\Engine('templates');
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/currentCity.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/currentCity.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
@@ -162,6 +164,7 @@ if(!key_exists($citylist, CityConst::all())){
if($userGrade >= 5){
$valid = true;
$showDetailedInfo = true;
}
if(!$valid) {
@@ -196,7 +199,7 @@ if($city['trade'] === null) {
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
if($showDetailedInfo){
$generals = $db->query(
'SELECT %l from general where city=%i order by name',
'SELECT %l from general where city=%i order by turntime',
Util::formatListOfBackticks($dbColumns),
$city['city']
);
@@ -228,7 +231,7 @@ $generalTurnList = [];
if($generals){
foreach($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]
){
@@ -267,7 +270,7 @@ foreach($generals as $general){
$isNPC = $general['npc']>1;
$wounded = $general['injury'];
$name = $general['name'];
$nameText = formatName($name, $general['npc']);
@@ -324,7 +327,7 @@ foreach($generals as $general){
else{
$turnText = '';
}
$generalsFormat[] = [
'ourGeneral'=>$ourGeneral,
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
@@ -376,7 +379,7 @@ $genTotal = 0;
foreach($generalsFormat as $general){
if($general['nation'] == 0){
if(!$general['nation'] || !$myNation['nation']){
continue;
}
if($general['nation'] != $myNation['nation']){
@@ -406,7 +409,7 @@ foreach($generalsFormat as $general){
}
$chkDef = false;
if($minTrain >= 80){
$crew80 += $general['crew'];
$gen80 += 1;
@@ -423,7 +426,7 @@ foreach($generalsFormat as $general){
$chkDef = true;
}
}
@@ -519,4 +522,3 @@ foreach($generalsFormat as $general){
</table>
</body>
</html>
+11 -15
View File
@@ -55,20 +55,16 @@ $nationStor->cacheValues(['notice', 'scout_msg']);
<title><?=UniqueConst::$serverName?>: 내무부</title>
<script>
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>;
var nationMsg = <?=Json::encode($nationStor->notice??'')?>;
var scoutmsg = <?=Json::encode($nationStor->scout_msg??'')?>;
var storedData = <?=Json::encode([
"nationMsg"=>$nationStor->notice??'',
"scoutMsg"=>$nationStor->scout_msg??''
])?>;
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/summernote-bs4.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/lang/summernote-ko-KR.js')?>
<?=WebUtil::printJS('../e_lib/summernote/plugin/image-sammo/summernote-image-flip.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/dipcenter.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/dipcenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
<?=WebUtil::printCSS('dist_css/vendors.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/dipcenter.css')?>
@@ -116,14 +112,14 @@ foreach($nationsList as $staticNation):
0 => "<font color=red>교 전</font>",
1 => "<font color=magenta>선포중</font>",
2 => "통 상",
7 => "<font color=green>불가침</font>",
7 => "<font color=green>불가침</font>",
][$diplomacyState['state']];
if($diplomacyState['term']){
$dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1;
$dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12);
$dipEndMonth = $dipEndMonth % 12 + 1;
$dipTermText = $diplomacyState['term'].'개월';
$dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月";
}
@@ -200,12 +196,12 @@ if ($budgetricediff > 0) {
</div>
</div>
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
<input type='hidden' class='input_form' name='scoutmsg' data-global='scoutmsg'>
<input type='hidden' class='input_form' name='scoutMsg' data-global='scoutMsg'>
<div style="width:870px;margin-left:auto;">
<div class='edit_form viewer'></div>
</div>
</div>
</div></td></tr>
<tr><td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td></tr>
<tr>
+11 -12
View File
@@ -31,8 +31,8 @@ foreach($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation !=
$realConflict = [];
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
$cityID,
$cityName,
$cityID,
$cityName,
$rawConflict
])
{
@@ -62,7 +62,7 @@ foreach($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you
if(!key_exists($me, $diplomacyList)){
$diplomacyList[$me] = [];
}
$diplomacyList[$me][$you] = $state;
}
@@ -90,12 +90,11 @@ $neutralStateCharMap = [
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('dist_js/map.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
@@ -163,9 +162,9 @@ else{
<table class='tb_layout bg0' style='width:100%;'>
<?php foreach($conflict as $item): ?>
<tr>
<td
<td
width=130
align=right
align=right
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
><?=$item['name']?>&nbsp;</td>
<td width=48 align=right><?=(float)$item['percent']?> %&nbsp;</td>
@@ -175,14 +174,14 @@ else{
</tr>
<?php endforeach; ?>
</table>
</td>
</tr>
<?php endforeach; ?>
<tr><td colspan=2 height=5 id=bg1></td></tr>
<tr><td colspan=2 height=5 class='bg1'></td></tr>
</table>
<?php endif; ?>
<?php endif; ?>
<br>
<table align=center width=1000 class='tb_layout bg0'>
+5 -5
View File
@@ -56,9 +56,9 @@ $templates = new \League\Plates\Engine('templates');
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head>
<body>
@@ -105,7 +105,7 @@ $generals = $db->query(
$generalTurnList = [];
foreach($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]
){
@@ -157,7 +157,7 @@ foreach ($generals as &$general) {
$general['modeText'] = formatDefenceTrain($general['defence_train']);
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name??'-';
if ($general['npc'] < 2) {
$turntext = [];
foreach($generalTurnList[$general['no']] as $turnRawIdx=>$turn){
+32 -33
View File
@@ -33,11 +33,10 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 인사부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/bossInfo.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('dist_js/bossInfo.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
@@ -48,7 +47,7 @@ var chiefStatMin = <?=GameConst::$chiefStatMin?>;
var myLevel = <?=$meLevel?>;
</script>
<?php
<?php
$ambassadors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nationID);
$auditors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nationID);
@@ -112,8 +111,8 @@ $level = Util::convertArrayToDict(
);
$tigers = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
$tigers = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nationID
);// 오호장군
@@ -122,9 +121,9 @@ $tigerstr = join(', ', array_map(function($arr){
return "{$arr['name']}【{$number}】";
}, $tigers));
$eagles = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$eagles = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nationID
);// 건안칠자
$eaglestr = join(', ', array_map(function($arr){
@@ -146,10 +145,10 @@ for($i=12; $i >= $lv; $i-=2) {
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']??0);
?>
<tr>
<td width=98 align=center id=bg1><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
<td width=98 align=center id=bg1><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
</tr>
@@ -158,11 +157,11 @@ for($i=12; $i >= $lv; $i-=2) {
?>
<tr>
<td width=98 align=center id=bg1>오호장군【승전】</td>
<td width=98 align=center class='bg1'>오호장군【승전】</td>
<td colspan=5><?=$tigerstr?></td>
</tr>
<tr>
<td width=98 align=center id=bg1>건안칠자【계략】</td>
<td width=98 align=center class='bg1'>건안칠자【계략】</td>
<td colspan=5><?=$eaglestr?></td>
</tr>
</table>
@@ -170,7 +169,7 @@ for($i=12; $i >= $lv; $i-=2) {
<tr><td colspan=6 height=5></td></tr>
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr>
<tr>
<td width=498 align=right id=bg1>대상 장수</td>
<td width=498 align=right class='bg1'>대상 장수</td>
<td width=498>
<?php
@@ -212,9 +211,9 @@ echo "
<tr><td colspan=4 height=5></td></tr>
<tr><td colspan=4 align=center bgcolor=blue>수 뇌 부 임 명</td></tr>
<tr>
<td width=98 align=right id=bg1>".getOfficerLevelText(12, $nation['level'])."</td>
<td width=98 align=right class='bg1'>".getOfficerLevelText(12, $nation['level'])."</td>
<td width=398>{$level[12]['name']} 【".CityConst::byID($level[12]['city'])->name."】</td>
<td width=98 align=right id=bg1>{$officerLevelText}</td>
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
<td width=398>
";
@@ -240,7 +239,7 @@ if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
if(key_exists(11, $level)){
echo "{$level[11]['name']} 【".CityConst::byID($level[11]['city'])->name."】";
}
}
echo "
</td>
@@ -251,11 +250,11 @@ for($i=10; $i >= $lv; $i--) {
if($i % 2 == 0) { echo "<tr>"; }
$officerLevelText = getOfficerLevelText($i, $nation['level']);
echo "
<td width=98 align=right id=bg1>{$officerLevelText}</td>
<td width=98 align=right class='bg1'>{$officerLevelText}</td>
<td width=398>
";
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $i)) {
echo "
<select id='genlist_{$i}' size=1 style=color:white;background-color:black;>
@@ -295,13 +294,13 @@ if($meLevel == 12):
<tr><td colspan='4' height='5'></td></tr>
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr>
<tr>
<td width=98 align=right id=bg1>외교권자</td>
<td width=98 align=right class='bg1'>외교권자</td>
<td width=398>
<select id="selectAmbassador" multiple="multiple">
</select>
<button id='changeAmbassador' type='button'>임명</button>
</td>
<td width=98 align=right id=bg1>조언자</td>
<td width=98 align=right class='bg1'>조언자</td>
<td width=398>
<select id="selectAuditor" multiple="multiple">
</select>
@@ -320,7 +319,7 @@ if($meLevel >= 5) {
echo "
<tr><td colspan=5 align=center bgcolor=orange>도 시 관 직 임 명</td></tr>
<tr>
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
<td colspan=2>
<select id='citylist_4' size=1 style=color:white;background-color:black;>
";
@@ -367,7 +366,7 @@ if($meLevel >= 5) {
</tr>";
$officerLevelText = getOfficerLevelText(3, $nation['level']);
echo "<tr>
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
<td colspan=2>
<select id='citylist_3' size=1 style=color:white;background-color:black;>
";
@@ -413,7 +412,7 @@ if($meLevel >= 5) {
</tr>";
$officerLevelText = getOfficerLevelText(2, $nation['level']);
echo "<tr>
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
<td colspan=3 align=right class='bg2'>{$officerLevelText} 임명</td>
<td colspan=2>
<select id='citylist_2' size=1 style=color:white;background-color:black;>
";
@@ -462,10 +461,10 @@ if($meLevel >= 5) {
}
echo "
<tr>
<td width=158 align=center id=bg1 colspan=2><font size=4>도 시</font></td>
<td width=278 align=center id=bg1><font size=4>태 수 (사관) 【현재도시】</font></td>
<td width=278 align=center id=bg1><font size=4>군 사 (사관) 【현재도시】</font></td>
<td width=278 align=center id=bg1><font size=4>종 사 (사관) 【현재도시】</font></td>
<td width=158 align=center class='bg1' colspan=2><font size=4>도 시</font></td>
<td width=278 align=center class='bg1'><font size=4>태 수 (사관) 【현재도시】</font></td>
<td width=278 align=center class='bg1'><font size=4>군 사 (사관) 【현재도시】</font></td>
<td width=278 align=center class='bg1'><font size=4>종 사 (사관) 【현재도시】</font></td>
</tr>
";
@@ -495,15 +494,15 @@ foreach($db->query('SELECT city,name,level,region,officer_set from city where na
$cityOfficerList = $officerList[$cityID]??[];
?>
<?php if($region != $city['region']): ?>
<tr><td colspan=5 height=3 id=bg1></td></tr>
<tr><td colspan=5 id=bg1><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr>
<tr><td colspan=5 height=3 class='bg1'></td></tr>
<tr><td colspan=5 class='bg1'><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr>
<?php endif; $region = $city['region']; ?>
<tr>
<td width=78 align=center style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'>【<?=$citylevel[$city['level']]?>】</td>
<td width=78 align=right style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'><?=$city['name']?>&nbsp;&nbsp;</td>
<?php foreach(Util::range(4, 1, -1) as $officerLevel): ?>
<?php if(key_exists($officerLevel, $cityOfficerList)):
<?php if(key_exists($officerLevel, $cityOfficerList)):
$officer = $cityOfficerList[$officerLevel];
?>
<td style="color:<?=isOfficerSet($city['officer_set'], $officerLevel)?'orange':'white'?>;"><?=$officer['name']?>(<?=$officer['belong']?>년) 【<?=CityConst::byID($officer['city'])->name?>】</td>
+18 -22
View File
@@ -37,13 +37,10 @@ $sel = [$type => "selected"];
<title><?=UniqueConst::$serverName?>: 세력도시</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.expand_city.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/extExpandCity.js')?>
</head>
@@ -129,10 +126,10 @@ foreach($cityList as $city){
];
$cityOfficerList = $officerList[$cityID]??[];
foreach($cityOfficerList as $cityOfficer){
foreach($cityOfficerList as $cityOfficer){
$officerName[$cityOfficer['officer_level']] = getColoredName($cityOfficer['name'], $cityOfficer['npc']);
}
if ($type == 10 && $city['region'] != $region) {
echo "<br>";
$region = $city['region'];
@@ -151,41 +148,41 @@ foreach($cityList as $city){
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2>【 ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." 】 {$city['name']}</font></td>
</tr>
<tr>
<td align=center width=46 id=bg1>주민</td>
<td align=center width=46 class='bg1'>주민</td>
<td align=center width=140>{$city['pop']}/{$city['pop_max']}</td>
<td align=center width=46 id=bg1>농업</td>
<td align=center width=46 class='bg1'>농업</td>
<td align=center width=140>{$city['agri']}/{$city['agri_max']}</td>
<td align=center width=46 id=bg1>상업</td>
<td align=center width=46 class='bg1'>상업</td>
<td align=center width=140>{$city['comm']}/{$city['comm_max']}</td>
<td align=center width=46 id=bg1>치안</td>
<td align=center width=46 class='bg1'>치안</td>
<td align=center width=140>{$city['secu']}/{$city['secu_max']}</td>
<td align=center width=46 id=bg1>수비</td>
<td align=center width=46 class='bg1'>수비</td>
<td align=center width=140>{$city['def']}/{$city['def_max']}</td>
<td align=center width=46 id=bg1>성벽</td>
<td align=center width=46 class='bg1'>성벽</td>
<td align=center width=140>{$city['wall']}/{$city['wall_max']}</td>
</tr>
<tr>
<td align=center id=bg1>민심</td>
<td align=center class='bg1'>민심</td>
<td align=center>".round($city['trust'], 1)."</td>
<td align=center id=bg1>시세</td>
<td align=center class='bg1'>시세</td>
<td align=center>{$city['trade']}%</td>
<td align=center id=bg1>인구</td>
<td align=center class='bg1'>인구</td>
<td align=center>".round($city['pop']/$city['pop_max']*100, 2)." %</td>
<td align=center id=bg1>태수</td>
<td align=center class='bg1'>태수</td>
<td align=center>";
echo $officerName[4];
echo "</td>
<td align=center id=bg1>군사</td>
<td align=center class='bg1'>군사</td>
<td align=center>";
echo $officerName[3];
echo "</td>
<td align=center id=bg1>종사</td>
<td align=center class='bg1'>종사</td>
<td align=center>";
echo $officerName[2];
echo "</td>
</tr>
<tr>
<td align=center id=bg1>장수</td>
<td align=center class='bg1'>장수</td>
<td colspan=11>";
$generalList = $db->query('SELECT npc, name FROM general WHERE city = %i AND nation = %i', $city['city'], $me['nation']);
if (!$generalList) {
@@ -209,4 +206,3 @@ foreach($cityList as $city){
</body>
<div id="helper_genlist" style="display:none;"></div>
</html>
+18 -19
View File
@@ -47,9 +47,9 @@ if($gameStor->isunited){
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head>
@@ -104,21 +104,21 @@ $generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special
echo"
<table align=center class='tb_layout bg0'>
<tr>
<td width=64 align=center id=bg1>얼 굴</td>
<td width=98 align=center id=bg1>이 름</td>
<td width=78 align=center id=bg1>관 직</td>
<td width=68 align=center id=bg1>계 급</td>
<td width=68 align=center id=bg1>명 성</td>
<td width=68 align=center id=bg1>봉 록</td>
<td width=48 align=center id=bg1>통솔</td>
<td width=48 align=center id=bg1>무력</td>
<td width=48 align=center id=bg1>지력</td>
<td width=68 align=center id=bg1>자 금</td>
<td width=68 align=center id=bg1>군 량</td>
<td width=48 align=center id=bg1>성 격</td>
<td width=78 align=center id=bg1>특 기</td>
<td width=48 align=center id=bg1>사 관</td>
<td width=70 align=center id=bg1>벌점</td>
<td width=64 align=center class='bg1'>얼 굴</td>
<td width=98 align=center class='bg1'>이 름</td>
<td width=78 align=center class='bg1'>관 직</td>
<td width=68 align=center class='bg1'>계 급</td>
<td width=68 align=center class='bg1'>명 성</td>
<td width=68 align=center class='bg1'>봉 록</td>
<td width=48 align=center class='bg1'>통솔</td>
<td width=48 align=center class='bg1'>무력</td>
<td width=48 align=center class='bg1'>지력</td>
<td width=68 align=center class='bg1'>자 금</td>
<td width=68 align=center class='bg1'>군 량</td>
<td width=48 align=center class='bg1'>성 격</td>
<td width=78 align=center class='bg1'>특 기</td>
<td width=48 align=center class='bg1'>사 관</td>
<td width=70 align=center class='bg1'>벌점</td>
</tr>";
foreach($generalList as $general){
@@ -183,4 +183,3 @@ foreach($generalList as $general){
</body>
</html>
+23 -24
View File
@@ -27,9 +27,9 @@ if($nationID == 0) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력정보</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -96,57 +96,57 @@ if ($budgetricediff > 0) {
<td colspan=8 align=center style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'>【<?=$nation['name']?>】</td>
</tr>
<tr>
<td width=98 align=center id=bg1>총주민</td>
<td width=98 align=center class='bg1'>총주민</td>
<td width=198 align=center><?=number_format($currPop)?>/<?=number_format($maxPop)?></td>
<td width=98 align=center id=bg1>총병사</td>
<td width=98 align=center class='bg1'>총병사</td>
<td width=198 align=center><?=number_format($currCrew)?>/<?=number_format($maxCrew)?></td>
<td width=98 align=center id=bg1>국 력</td>
<td width=98 align=center class='bg1'>국 력</td>
<td width=298 align=center colspan=3><?=$nation['power']?></td>
</tr>
<tr>
<td align=center id=bg1>국 고</td>
<td align=center class='bg1'>국 고</td>
<td align=center><?=number_format($nation['gold'])?></td>
<td align=center id=bg1>병 량</td>
<td align=center class='bg1'>병 량</td>
<td align=center><?=number_format($nation['rice'])?></td>
<td align=center id=bg1>세 율</td>
<td align=center class='bg1'>세 율</td>
<td align=center colspan=3><?=$nation['rate']?> %</td>
</td>
</tr>
<tr>
<td align=center id=bg1>세금/단기</td>
<td align=center class='bg1'>세금/단기</td>
<td align=center>+<?=number_format($goldIncome)?> / +<?=number_format($warIncome)?></td>
<td align=center id=bg1>세곡/둔전</td>
<td align=center class='bg1'>세곡/둔전</td>
<td align=center>+<?=number_format($riceIncome)?> / +<?=number_format($wallIncome)?></td>
<td align=center id=bg1>지급률</td>
<td align=center class='bg1'>지급률</td>
<td align=center colspan=3><?=$nation['bill']?> %</td>
</tr>
<tr>
<td align=center id=bg1>수입/지출</td>
<td align=center class='bg1'>수입/지출</td>
<td align=center>+<?=number_format($totalGoldIncome)?> / -<?=number_format($outcome)?></td>
<td align=center id=bg1>수입/지출</td>
<td align=center class='bg1'>수입/지출</td>
<td align=center>+<?=number_format($totalRiceIncome)?> / -<?=number_format($outcome)?></td>
<td align=center id=bg1>속 령</td>
<td align=center class='bg1'>속 령</td>
<td width=98 align=center><?=count($cityList)?></td>
<td width=98 align=center id=bg1>장 수</td>
<td width=98 align=center class='bg1'>장 수</td>
<td width=98 align=center><?=$nation['gennum']?></td>
</tr>
<tr>
<td align=center id=bg1>국고 예산</td>
<td align=center class='bg1'>국고 예산</td>
<td align=center><?=number_format($budgetgold)?> (<?=$budgetgolddiff?>)</td>
<td align=center id=bg1>병량 예산</td>
<td align=center class='bg1'>병량 예산</td>
<td align=center><?=number_format($budgetrice)?> (<?=$budgetricediff?>)</td>
<td align=center id=bg1>기술력</td>
<td align=center class='bg1'>기술력</td>
<td align=center><?=number_format(floor($nation['tech']))?></td>
<td align=center id=bg1>작 위</td>
<td align=center class='bg1'>작 위</td>
<td align=center><?=getNationLevel($nation['level'])?></td>
</tr>
<tr>
<td align=center valign=top id=bg1> 속령일람 :</td>
<td align=center valign=top class='bg1'> 속령일람 :</td>
<td colspan=7><?=join(', ', $cityNames)?></td>
</tr>
<tr>
<td align=center valign=top id=bg1>국가열전</td>
<td colspan=7 id=bg0><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
<td align=center valign=top class='bg1'>국가열전</td>
<td colspan=7 class='bg0'><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
</tr>
</table>
<br>
@@ -158,4 +158,3 @@ if ($budgetricediff > 0) {
</body>
</html>
+14 -10
View File
@@ -14,7 +14,7 @@ $generalID = $session->generalID;
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->cacheValues(['turntime', 'opentime', 'autorun_user']);
$gameStor->cacheValues(['turntime', 'opentime', 'autorun_user', 'npcmode']);
increaseRefresh("내정보", 1);
@@ -51,10 +51,10 @@ $use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
<script>
var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/myPage.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('dist_js/myPage.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -113,13 +113,18 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br>
<?php endif; ?>
<?php if($gameStor->npcmode==2 && $me->getNPCType()==0): ?>
다른 장수 선택 (<?=substr($me->getAuxVar('next_change')??TimeUtil::now(), 0, 19)?> 부터)<br>
<a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>다른 장수 선택</button></a><br><br>
<?php endif; ?>
개인용 CSS<br>
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
<td align=center class='bg1'><font color=skyblue size=3>개인 기록</font></td>
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td>
</tr>
<tr>
<td valign=top>
@@ -136,8 +141,8 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>장수 열전</font></td>
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
<td align=center class='bg1'><font color=skyblue size=3>장수 열전</font></td>
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td>
</tr>
<tr>
<td valign=top>
@@ -157,4 +162,3 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</table>
</body>
</html>
-420
View File
@@ -1,420 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->cacheValues(['autorun_user', 'develcost']);
increaseRefresh("NPC 정책", 1);
$me = $db->queryFirstRow('SELECT no, npc, nation, city, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$nationID = $me['nation'];
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,tech,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$permission = checkSecretPermission($me);
if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.';
die();
} else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->cacheValues(['npc_nation_policy', 'npc_general_policy']);
$gameStor->cacheAll();
$general = new General($me, null, null, $nation, $gameStor->year, $gameStor->month, false);
$rawServerPolicy = $gameStor->getValue('npc_nation_policy') ?? [];
$rawNationPolicy = $nationStor->getValue('npc_nation_policy') ?? [];
$rawServerGeneralPolicy = $gameStor->getValue('npc_general_policy') ?? [];
$rawNationGeneralPolicy = $nationStor->getValue('npc_general_policy') ?? [];
$defaultNationPolicy = ($rawServerPolicy['values'] ?? []) + AutorunNationPolicy::$defaultPolicy;
$currentNationPolicy = ($rawNationPolicy['values'] ?? []) + $defaultNationPolicy;
$defaultNationPriority = $rawServerPolicy['priority'] ?? (AutorunNationPolicy::$defaultPriority);
$currentNationPriority = $rawNationPolicy['priority'] ?? $defaultNationPriority;
$defaultGeneralActionPriority = $rawServerGeneralPolicy['priority'] ?? (AutorunGeneralPolicy::$default_priority);
$currentGeneralActionPriority = $rawNationGeneralPolicy['priority'] ?? $defaultGeneralActionPriority;
$autoPolicyVariable = [];
if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
$autoPolicyVariable['reqHumanWarUrgentRice'] = $currentNationPolicy['reqHumanWarUrgentRice'];
}
if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
}
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true));
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 임시 NPC 정책</title>
<script>
var nationID = <?= $nationID ?>;
var defaultNationPolicy = <?= Json::encode($defaultNationPolicy) ?>;
var currentNationPolicy = <?= Json::encode($currentNationPolicy) ?>;
var defaultNationPriority = <?= Json::encode($defaultNationPriority) ?>;
var currentNationPriority = <?= Json::encode($currentNationPriority) ?>;
var availableNationPriorityItems = <?= Json::encode(AutorunNationPolicy::$defaultPriority) ?>;
var defaultGeneralActionPriority = <?= Json::encode($defaultGeneralActionPriority) ?>;
var currentGeneralActionPriority = <?= Json::encode($currentGeneralActionPriority) ?>;
var availableGeneralActionPriorityItems = <?= Json::encode(AutorunGeneralPolicy::$default_priority) ?>;
var btnHelpMessage = {
'선전포고': '군주가 NPC이고, 전쟁중이 아닐 때,<br>주변국중 하나를 골라 선포합니다.<br><br>선포 시점은 다음을 참고합니다.<br>- 인구율<br>- 도시내정률<br>- NPC전투장권장 금 충족률<br>- NPC전투장권장 쌀 충족률<br><br>국력이 낮은 국가를 조금 더 선호합니다.',
'천도': '인구가 많은 곳을 찾아 천도를 시도합니다.<br>영토의 가운데를 선호합니다.<br><br>도시 인구가 충분하다면, 굳이 천도하지는 않습니다.',
'유저장긴급포상': '금/쌀이 부족한 유저전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 적어지더라도 시도합니다.',
'부대전방발령': '(작동하지 않음)<br>전투 부대를 접경으로 발령합니다.<br>수도->시작점->도착점 경로를 따릅니다.',
'유저장구출발령': '아군 영토에 있지 않은 유저장을 아군 영토로 발령합니다.<br>곧 집합하는 부대에 탑승한 경우는 제외합니다.',
'유저장후방발령': '유저전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
'부대유저장후방발령': '접경에 위치한 부대에 탑승한 유저전투장 중에,<br>- 병력이 충분하지 않고,<br>- 첫 턴이 징병턴이며,<br>- 부대장 집합 턴 사이라면,<br>인구가 충분한 후방도시로 발령합니다.<br><br>부대장의 위치와 유저장의 위치가 다르다면 발령하지 않습니다.',
'유저장전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
'유저장포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>유저전투장과 유저내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
'부대후방발령': '(작동하지 않음)<br>후방 부대가 위치한 도시의 인구가 충분하지 않을 경우,<br>인구가 충분한 도시로 발령합니다.',
'부대구출발령': '전투 부대, 후방 부대가 아닌 부대가 아군 영토에 있지 않을 때,<br>전방 도시 중 하나를 골라 발령합니다.',
'NPC긴급포상': '금/쌀이 부족한 NPC전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 \'약간\' 적어지더라도 시도합니다.',
'NPC구출발령': '아군 영토에 있지 않은 NPC장을 아군 영토로 발령합니다.',
'NPC후방발령': 'NPC전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
'NPC포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>NPC전투장과 NPC내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
'NPC전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
'유저장내정발령': '내정중인 유저장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
'NPC내정발령': '내정중인 NPC장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
'NPC몰수': '국고가 부족하다면 NPC에게서 몰수합니다. 내정NPC장은 국고가 부족하지 않아도 몰수합니다.',
'NPC사망대비': 'NPC의 사망까지 5턴 이내인 경우, 헌납합니다.<br>헌납할 금쌀이 없다면 물자조달을 수행합니다.',
'귀환': '아국 도시에 있지 않다면 귀환합니다.',
'금쌀구매': '전쟁 중에 금쌀의 비율이 크게 차이난다면 금쌀을 거래하여 비슷하게 맞춥니다.<br>금쌀 비율이 적절하는지 판단하는데 살상률을 포함합니다.<br>NPC는 상인이 없어도 금쌀을 구매할 수 있습니다.<br><br>또는 금쌀 한쪽이 지나치게 적은 경우에는 내정 중에도 금쌀을 거래합니다.',
'출병': '충분한 병력과 충분한 훈련/사기를 가지고 있는 경우 출병합니다.<br>접경이 여럿인 경우 무작위로 선택합니다.<br><br>타국과 전쟁중인 경우 공백지로는 출병하지 않습니다.',
'긴급내정': '전쟁중에 민심이 70 미만이거나,<br>인구가 제자리 징병이 가능하지 않을 정도로 적을 경우,<br>일정확률로 주민선정과 정착장려를 수행합니다.<br><br>통솔이 높을 수록 수행할 확률이 높습니다.',
'전투준비': '충분한 병력을 가지고 있지만 훈련과 사기가 부족한 경우 훈련과 사기진작을 수행합니다.',
'전방워프': '전투장이 충분한 병력을 가지고 있다면 전방으로 이동합니다.',
'NPC헌납': '국고가 부족한데 NPC전쟁장이 충분한 금쌀(권장량 대비 1.5배)을 가지고 있다면 일부를 헌납합니다. <br>NPC내정장은 국고가 넉넉하더라도 충분한 금쌀을 가지고 있다면 권장량만 유지하고 헌납합니다.',
'징병': '전쟁 중 병력을 소진하였다면 재 징병합니다.<br><br>기존에 사용한 병종군 중에서 사용가능한 병종을 랜덤하게 선택합니다.<br>고급 병종을 선택할 확률이 조금 더 높습니다.<br><br>NPC의 경우 도시의 인구가 충분하지 않다면 징병을 할 확률이 감소합니다.<br><br>유저장은 최대한 고급병종을 유지하며,<br>유저장 모병이 허용되는 경우 모병을 3회할 수 있다면 모병합니다.',
'후방워프': '전쟁 중 병력을 소진하였는데 도시의 인구가 충분하지 않다면,<br>인구가 많은 도시로 이동합니다.',
'전쟁내정': '전쟁 중 수행하는 내정입니다.<br>정착장려, 기술연구의 확률이 좀 더 높고,<br>치안강화, 농지개간, 상업투자의 확률이 낮습니다.<br><br>내정이 가능하다 하더라도 전시임을 고려해,<br>30% 확률로 다른 턴을 수행합니다.',
'소집해제': '전쟁 중이 아닌 데 병력이 남아있는 경우,<br>3/4 확률로 소집해제합니다.',
'일반내정': '도시에서 내정을 수행합니다. 낮은 내정일 수록 수행할 확률이 높습니다.<br>기술 연구는 1등급 이상 뒤쳐지지 않도록 노력합니다.',
'내정워프': '도시에서 더이상 내정을 수행할 수 없는 경우,<br>일정확률로 내정이 부족한 다른 도시로 이동합니다.',
};
</script>
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
<?= WebUtil::printJS('../e_lib/Sortable.min.js') ?>
<?= WebUtil::printJS('../e_lib/jquery-sortable.js') ?>
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
<?= WebUtil::printJS('../e_lib/jquery_toast/toast.js') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('js/common.js') ?>
<?= WebUtil::printJS('js/npc_control.js') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
<?= WebUtil::printCSS('../e_lib/font_awesome/css/all.min.css') ?>
<?= WebUtil::printCSS('../e_lib/jquery_toast/toast.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?>
<?= WebUtil::printCSS('css/npc_control.css') ?>
</head>
<body>
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
<div class='tb_layout bg0'>임시 NPC 정책<br>
<?= backButton() ?></div>
<div class='bg1 section_bar'>국가 정책</div>
<div class="text-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationPolicy['valueSetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['valueSetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class="form_list">
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNationGold" class="col-sm-6 col-form-label">국가 권장 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNationGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNationRice" class="col-sm-6 col-form-label">국가 권장 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNationRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarUrgentGold" class="col-sm-6 col-form-label">유저전투장 긴급포상 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
0이면 보병 6회 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarUrgentRice" class="col-sm-6 col-form-label">유저전투장 긴급포상 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarRecommandGold" class="col-sm-6 col-form-label">유저전투장 권장 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarRecommandRice" class="col-sm-6 col-form-label">유저전투장 권장 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanDevelGold" class="col-sm-6 col-form-label">유저내정장 권장 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanDevelRice" class="col-sm-6 col-form-label">유저내정장 권장 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNPCWarGold" class="col-sm-6 col-form-label">NPC전투장 권장 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCWarGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
0이면 기본 병종 4회(<?= number_format(GameConst::$defaultStatNPCMax * 100) ?> * 4) 징병비를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNPCWarRice" class="col-sm-6 col-form-label">NPC전투장 권장 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCWarRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatNPCMax * 100 * 4) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNPCDevelGold" class="col-sm-6 col-form-label">NPC내정장 권장 금</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.<br>0이면 30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCDevelGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNPCDevelRice" class="col-sm-6 col-form-label">NPC내정장 권장 쌀</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면 헌납합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minimumResourceActionAmount" class="col-sm-6 col-form-label">포상/몰수/헌납/삼/팜 최소 단위</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minimumResourceActionAmount" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">연산결과가 이 단위보다 적다면 수행하지 않습니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="minWarCrew" class="col-sm-6 col-form-label">최소 전투 가능 병력 수</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minWarCrew" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 적을 때에는 징병을 시도합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minNPCRecruitCityPopulation" class="col-sm-6 col-form-label">NPC 최소 징병 가능 인구 수</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minNPCRecruitCityPopulation" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 낮으면 NPC는 도시에서 징병하지 않고 후방 워프합니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="safeRecruitCityPopulationRatio" class="col-sm-6 col-form-label">제자리 징병 허용 인구율(%)</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="percent" id="safeRecruitCityPopulationRatio" min="0" max="100" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면 '충분하다'고 판단합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minNPCWarLeadership" class="col-sm-6 col-form-label">NPC 전투 참여 통솔 기준</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minNPCWarLeadership" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="properWarTrainAtmos" class="col-sm-6 col-form-label">훈련/사기진작 목표치</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="properWarTrainAtmos" min="0" max="100" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다.</small></div>
</div>
</div>
<div class="alert alert-secondary">
전투 부대는 작업중입니다(json양식: {부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br>
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br>
내정 부대는 작업중입니다(json양식: [부대번호,...])
<input type="hidden" value="{}" data-type="json" id="CombatForce">
<input type="hidden" value="[]" data-type="json" id="SupportForce">
<input type="hidden" value="[]" data-type="json" id="DevelopForce">
<input type="hidden" value="true" data-type="json" id="allowNpcAttackCity">
<!--allowNpcAttackCity는 현재 게임 내 비활성-->
</div>
<div class='control_bar' data-type="nationPolicy">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
<div class="row">
<div class="col-sm-6 half_section_left">
<div class='bg1 section_bar'>NPC 사령턴 우선순위</div>
<div class="float-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class='text-left px-2'><small class="text-muted">예턴이 없거나, 지정되어 있더라도 실패할경우<br>아래 순위에 따라 사령턴을 시도합니다.</small></div>
<div class="form_list">
<div class="row">
<div class="col-sm-6">
<div class="bg2 sub_bar">비활성</div>
<div id="nationPriorityDisabled" class="list-group col" data-type="list">
</div>
</div>
<div class="col-sm-6">
<div class="bg2 sub_bar">활성</div>
<div id="nationPriority" class="list-group col" data-type="list">
</div>
</div>
</div>
<div class='control_bar' data-type="nationPriority">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
</div>
<div class="col-sm-6 half_section_right">
<div class='bg1 section_bar'>NPC 일반턴 우선순위</div>
<div class="float-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationGeneralPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationGeneralPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class='text-left px-2'><small class="text-muted">순위가 높은 것부터 시도합니다. <br>아무것도 실행할 수 없으면 물자조달이나 인재탐색을 합니다.</small></div>
<div class="form_list">
<div class="row">
<div class="col-sm-6">
<div class="bg2 sub_bar">비활성</div>
<div id="generalPriorityDisabled" class="list-group col" data-type="list">
</div>
</div>
<div class="col-sm-6">
<div class="bg2 sub_bar">활성</div>
<div id="generalPriority" class="list-group col" data-type="list">
</div>
</div>
</div>
<div class='control_bar' data-type="generalPriority">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
+6 -12
View File
@@ -64,7 +64,7 @@ if(!$commandObj->hasPermissionToReserve()){
die_redirect();
}
$jsList = $commandObj->getJSFiles();
$jsList = $commandObj->getJSPlugins();
$cssList = $commandObj->getCSSFiles();
?>
@@ -75,26 +75,19 @@ $cssList = $commandObj->getCSSFiles();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/processing.js')?>
<?=WebUtil::printJS('dist_js/processing.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
window.command = '<?=$commandType?>';
window.turnList = [<?=join(', ',$turnList)?>];
window.isChiefTurn = <?=$isChiefTurn?'true':'false'?>;
var jsPlugins = <?=Json::encode($jsList)?>;
</script>
<?php
foreach($jsList as $js){
print(WebUtil::printJS($js));
}
?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
@@ -103,6 +96,7 @@ foreach($jsList as $js){
<?=WebUtil::printCSS('css/main.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<?=WebUtil::printCSS('css/processing.css')?>
<?php
foreach($cssList as $css){
print(WebUtil::printCSS($css));
+5 -5
View File
@@ -145,7 +145,7 @@ if($str3){
?>
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr>
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
<tr><td colspan=8 align=center id=bg2><font color=magenta size=5>16강 승자전</font></td></tr>
<tr><td colspan=8 align=center class='bg2'><font color=magenta size=5>16강 승자전</font></td></tr>
<tr><td height=10 colspan=8 align=center></td></tr>
<?php
@@ -398,7 +398,7 @@ if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) {
}
echo "
<tr><td height=10 colspan=8 align=center></td></tr>
<tr><td colspan=8 align=center id=bg2><font color=orange size=5>조별 본선 순위</font></td></tr>
<tr><td colspan=8 align=center class='bg2'><font color=orange size=5>조별 본선 순위</font></td></tr>
<tr>";
$num = array("一", "二", "三", "四", "五", "六", "七", "八");
@@ -409,7 +409,7 @@ for ($i=0; $i < 8; $i++) {
<td>
<table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
foreach($generalList as $k=>$general) {
@@ -427,7 +427,7 @@ if ($admin['tournament'] == 4 || $admin['tournament'] == 5) {
printFighting($admin['tournament'], $admin['phase']);
}
echo "
<tr><td colspan=8 align=center id=bg2><font color=yellow size=5>조별 예선 순위</font></td></tr>
<tr><td colspan=8 align=center class='bg2'><font color=yellow size=5>조별 예선 순위</font></td></tr>
<tr>";
for ($i=0; $i < 8; $i++) {
@@ -436,7 +436,7 @@ for ($i=0; $i < 8; $i++) {
<td>
<table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
foreach($generalList as $k=>$general) {
+10 -11
View File
@@ -44,7 +44,7 @@ if($troops){
$generalTurnList = [];
foreach($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($troopLeaders, 'no')
) as [$generalID, $turnIdx, $brief]
){
@@ -53,10 +53,10 @@ if($troops){
}
$generalTurnList[$generalID][$turnIdx] = $brief;
}
foreach($troopLeaders as $troopLeader){
$imageTemp = GetImageURL($troopLeader['imgsvr']);
$troopLeader['pictureFullPath'] = "$imageTemp/{$troopLeader['picture']}";
$troopLeader['cityText'] = CityConst::byID($troopLeader['city'])->name;
@@ -85,15 +85,14 @@ uasort($troops, function($lhs, $rhs){
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 부대편성</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/troop.js')?>
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
<?=WebUtil::preloadJS('dist_js/troop.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/troops.css')?>
<?=WebUtil::printCSS('dist_css/troop.css')?>
<script>
</script>
@@ -195,7 +194,7 @@ foreach ($troops as $troopNo=>$troop) {
<br>
<table width=1000 class='tb_layout bg0'>
<tr>
<td width=80 id=bg1>부 대 명</td>
<td width=80 class='bg1'>부 대 명</td>
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=18 id='nameplate'></td>
<?php if($me['troop'] == 0): ?>
<td><input type=button id='btnCreateTroop' value='부 대 창 설'></td>
@@ -210,6 +209,6 @@ foreach ($troops as $troopNo=>$troop) {
<tr><td><?=banner()?> </td></tr>
</table>
</div>
<?=WebUtil::printJS('dist_js/troop.js')?>
</body>
</html>
+8 -12
View File
@@ -50,17 +50,13 @@ else{
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/battle_simulator.css')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/download2.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<script>
var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
var city = <?=Json::encode($city)?>;
var nation = <?=Json::encode($nation)?>;
</script>
<?=WebUtil::printJS('js/battle_simulator.js')?>
<?=WebUtil::printJS('dist_js/battle_simulator.js')?>
</head>
<body>
<div id="container">
@@ -123,7 +119,7 @@ var nation = <?=Json::encode($nation)?>;
</div>
<select class="custom-select form_nation_type" style="width:25ch;">
<?php foreach(GameConst::$availableNationType as $typeID): ?>
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
<?php $nationTypeClass = buildNationTypeClass($typeID) ?>
<option value="<?=$typeID?>"><?=$nationTypeClass->getName()?> (<?=$nationTypeClass::$pros?>, <?=$nationTypeClass::$cons?>)</option>
<?php endforeach; ?>
</select>
@@ -163,10 +159,10 @@ var nation = <?=Json::encode($nation)?>;
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="0" autocomplete="off">N
</label>
</div>
</div>
<div class="input-group mb-1">
</div>
</div>
</div>
@@ -198,7 +194,7 @@ var nation = <?=Json::encode($nation)?>;
</div>
<select class="custom-select form_nation_type" style="width:25ch;">
<?php foreach(GameConst::$availableNationType as $typeID): ?>
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
<option value="<?=$typeID?>"><?=$nationTypeObj->getName()?> (<?=$nationTypeObj::$pros?>, <?=$nationTypeObj::$cons?>)</option>
<?php endforeach; ?>
</select>
@@ -305,7 +301,7 @@ var nation = <?=Json::encode($nation)?>;
<span class="input-group-text">Level</span>
</div>
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
@@ -484,7 +480,7 @@ var nation = <?=Json::encode($nation)?>;
</div>
</div>
</div><!-- <div class="col-sm"> -->
</div>
<div class="card mb-3">
+1 -2
View File
@@ -7,7 +7,7 @@ include "func.php";
$btn = Util::getPost('btn');
$msg = Util::getPost('msg');
$scoutmsg = Util::getPost('scoutmsg');
$scoutmsg = Util::getPost('scoutMsg');
$rate = Util::getPost('rate', 'int');
$bill = Util::getPost('bill', 'int');
$secretlimit = Util::getPost('secretlimit', 'int');
@@ -75,4 +75,3 @@ if($btn == "국가방침 수정") {
}
header('location:b_dipcenter.php');
+1 -1
View File
@@ -15,7 +15,7 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
$isVoteAdmin |= $session->userGrade >= 5;
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
-56
View File
@@ -1,56 +0,0 @@
#newArticle{
width:1000px;
margin: 0 auto;
}
.titleInput{
width:100%;
color:white;
background-color:transparent;
border:none;
margin:1px 5px;
}
.contentInput{
width:100%;
min-height:3em;
color:white;
background-color:transparent;
border:none;
padding:1px 5px;
}
.articleFrame{
width:1000px;
margin: 20px auto;
}
.commentText{
width:100%;
}
.authorName, .comment .author{
width:110px;
font-size:85%;
}
.date{
width:125px;
font-size:85%;
}
.text{
text-align:left;
padding:1px 5px;
}
.submitComment{
width:100%;
}
.commentText{
color:white;
background-color:transparent;
border:none;
padding:1px 5px;
}
+155 -135
View File
@@ -1,40 +1,56 @@
@charset "UTF-8";
/* font-boostring Block */
html * {max-height:1000000px;}
html, body{
background-color:black;
color:white;
line-height:1.3;
font-family:'맑은 고딕';
font-size:13px;
html * {
max-height: 1000000px;
}
table { font-family:'맑은 고딕'; }
font { font-family:'맑은 고딕'; }
input { font-family:'맑은 고딕'; font-size:13px; }
select { font-family:'굴림'; line-height:100%; }
.center{
text-align:center;
html,
body {
background-color: black;
color: white;
line-height: 1.3;
font-family: '맑은 고딕';
font-size: 13px;
}
table.mimic_flex{
table {
font-family: '맑은 고딕';
}
font {
font-family: '맑은 고딕';
}
input {
font-family: '맑은 고딕';
font-size: 13px;
}
select {
font-family: '굴림';
line-height: 100%;
}
.center {
text-align: center;
}
table.mimic_flex {
border-collapse: collapse;
border:none;
padding:0;
border: none;
padding: 0;
}
.mimic_flex td, .mimic_flex th {
border:none !important;
.mimic_flex td,
.mimic_flex th {
border: none !important;
padding: 0px;
word-break: break-all;
}
table.tb_layout {
table.tb_layout {
border-collapse: collapse;
padding: 0px;
font-size: 13px;
@@ -42,159 +58,161 @@ table.tb_layout {
font-family: '맑은 고딕';
}
.tb_layout td, .tb_layout th {
border:solid 1px gray;
.tb_layout td,
.tb_layout th {
border: solid 1px gray;
padding: 0px;
word-break: break-all;
font-family: '맑은 고딕';;
font-family: '맑은 고딕';
;
}
div.bar_out{
position:relative;
border-top:solid 1px #888888;
border-bottom:solid 1px #333333;
padding:0;
margin:0;
width:100%;
div.bar_out {
position: relative;
border-top: solid 1px #888888;
border-bottom: solid 1px #333333;
padding: 0;
margin: 0;
width: 100%;
overflow: hidden;
}
div.bar_out div{
position:absolute;
left:0;
top:0;
height:100%;
div.bar_out div {
position: absolute;
left: 0;
top: 0;
height: 100%;
}
div.bar_out div.bar_in{
width:100%;
div.bar_out div.bar_in {
width: 100%;
}
/* */
.ev_warning{
color:orangered;
.ev_warning {
color: orangered;
}
.ev_notice{
color:orangered;
.ev_notice {
color: orangered;
}
.ev_succes{
color:lightgreen;
.ev_succes {
color: lightgreen;
}
.ev_sell{
color:orange;
.ev_sell {
color: orange;
}
.ev_failed{
color:orangered;
.ev_failed {
color: orangered;
}
.ev_highlight{
color:orangered;
.ev_highlight {
color: orangered;
}
/* TODO: 색상값이 아니라 의미에 따라 클래스 지정 */
.o_bullet::before{
color:cyan;
content:"●";
.o_bullet::before {
color: cyan;
content: "●";
}
.o_diamond::before{
color:orangered;
content:"◆";
.o_diamond::before {
color: orangered;
content: "◆";
}
.small_war_log{
display:inline-block;
.small_war_log {
display: inline-block;
}
.small_war_log .war_type_attack{
color:cyan;
.small_war_log .war_type_attack {
color: cyan;
}
.small_war_log .war_type_defense{
color:magenta;
.small_war_log .war_type_defense {
color: magenta;
}
.small_war_log .war_type_siege{
color:white;
.small_war_log .war_type_siege {
color: white;
}
.small_war_log .name_plate{
.small_war_log .name_plate {
font-size: 0.75em;
}
.small_war_log .name_plate_cover{
color:yellow;
.small_war_log .name_plate_cover {
color: yellow;
}
.small_war_log .crew_plate{
color:orangered;
font-size:90%;
.small_war_log .crew_plate {
color: orangered;
font-size: 90%;
}
.t_date{
.t_date {
font-size: 0.75em;
}
.t_red{
color:red;
.t_red {
color: red;
}
.t_blue{
color:blue;
.t_blue {
color: blue;
}
.t_green{
color:green;
.t_green {
color: green;
}
.t_magenta{
color:magenta;
.t_magenta {
color: magenta;
}
.t_cyan{
color:cyan;
.t_cyan {
color: cyan;
}
.t_limegreen{
color:limegreen;
.t_limegreen {
color: limegreen;
}
.t_skyblue{
color:skyblue;
.t_skyblue {
color: skyblue;
}
.t_orangered{
color:orangered;
.t_orangered {
color: orangered;
}
.t_yellow{
color:yellow;
.t_yellow {
color: yellow;
}
.t_white{
color:white;
.t_white {
color: white;
}
.float_left{
float:left;
.float_left {
float: left;
}
.tooltip{
font-size:12px;
.tooltip {
font-size: 12px;
font-family: '맑은 고딕';
}
.tooltip_copyable_info .tooltiptext{
.tooltip_copyable_info .tooltiptext {
display: inline;
color: rgba(0,0,0,0);
color: rgba(0, 0, 0, 0);
font-size: 0;
}
@@ -202,67 +220,69 @@ div.bar_out div.bar_in{
display: none;
}
.hidden_but_copyable{
color: rgba(0,0,0,0);
.hidden_but_copyable {
color: rgba(0, 0, 0, 0);
font-size: 0;
}
.btn-group-xs > .btn, .btn-xs {
padding : .25rem .4rem;
font-size : .875rem;
line-height : .5;
border-radius : .2rem;
.btn-group-xs>.btn,
.btn-xs {
padding: .25rem .4rem;
font-size: .875rem;
line-height: .5;
border-radius: .2rem;
}
.edit_form.viewer{
max-height:200px;
overflow-y:auto;
.edit_form.viewer {
max-height: 200px;
overflow-y: auto;
}
.trumbowyg-box{
margin:0;
border-left:none;
border-right:none;
.trumbowyg-box {
margin: 0;
border-left: none;
border-right: none;
}
.edit_form.trumbowyg-editor{
margin:0;
padding:0;
.edit_form.trumbowyg-editor {
margin: 0;
padding: 0;
}
.commandBasic{
background-color:black;
color:white;
.commandBasic {
background-color: black;
color: white;
}
.compensatePositive{
color:skyblue;
.compensatePositive {
color: skyblue;
}
.compensateNegative{
color:orange;
.compensateNegative {
color: orange;
}
.compensateNeutral{
color:white;
.compensateNeutral {
color: white;
}
.commandBasic.commandImpossible{
background-color:red;
color:white;
.commandBasic.commandImpossible {
background-color: red;
color: white;
}
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
text-align: center;
}
.select2-dropdown.simple-select2-align-center li.select2-results__option{
.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 .select2-selection--single.text-secondary .select2-selection__rendered {
color: white;
}
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false]{
color:white;
}
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false] {
color: white;
}
-49
View File
@@ -1,49 +0,0 @@
.section_bar{
text-align:center;
border:0.5px solid #aaa;
padding-right:0;
padding-left:0;
}
.sub_bar{
text-align:center;
border:0.5px solid #aaa;
margin-left:-5px;
margin-right:-5px;
}
.reset_btn{
width:15ch;
}
.submit_btn{
margin-left:1em;
width:15ch;
}
.control_bar{
margin-top:8pt;
text-align:right;
}
.col-form-label{
text-align:right;
padding-right:2ch;
}
.form_list{
padding:8pt;
}
.half_section_left{
padding-right:0;
border-right:0.5px solid #aaa;
}
.half_section_right{
padding-left:0;
}
.popover{
max-width:100%;
}
+64
View File
@@ -0,0 +1,64 @@
@charset "UTF-8";
.container {
width: 1000px;
margin: 0 auto;
}
.card_holder {
text-align: center;
}
.general_card {
width: 125px;
display: inline-block;
}
.general_card h4 {
margin: 0;
}
.general_card p {
margin: 0;
}
.general_card .select_btn {
width: 100%;
}
.general_card label {
display: block;
padding-left: 15px;
text-indent: -15px;
}
.general_card input {
width: 13px;
height: 13px;
padding: 0;
margin: 0;
vertical-align: bottom;
position: relative;
top: -1px;
*overflow: hidden;
}
#outdate_token {
color: red;
display: none;
}
#left_pad button {
display: none;
}
.custom_picture {
display: none;
}
.custom_personality {
display: none;
}
.custom_stat {
display: none;
}
@@ -0,0 +1,6 @@
<?php
namespace sammo;
class VersionGit extends VersionGitDynamic {
}
//{"version":"dynamic","hash":"dynamic"}
+9 -2
View File
@@ -2,8 +2,15 @@
namespace sammo;
class VersionGit{
public static $version = '_tK_verionGit_';
static function getVersion()
{
return '_tK_verionGit_';
}
static function getHash(){
return '_tK_hash_';
}
private function __construct(){}
}
//{"version":"_tK_verionGit_"}
//{"version":"_tK_verionGit_","hash":"_tK_hash_"}
+70 -30
View File
@@ -21,10 +21,10 @@ require_once('func_command.php');
/**
* nationID를 이용하여 국가의 '어지간해선' 변경되지 않는 정보(이름, 색, 성향, 규모, 수도)를 반환해줌
*
*
* @param int|null $nationID 국가 코드, -1인 경우 전체, null인 경우 수행하지 않음. 0인 경우에는 재야임
* @param bool $forceRefresh 강제 갱신 여부
*
*
* @return array|null nationID에 해당하는 국가가 있을 경우 array 반환. 그외의 경우 null
*/
function getNationStaticInfo($nationID, $forceRefresh = false)
@@ -903,17 +903,16 @@ function nationMsg(General $general)
$db = DB::db();
$nationID = $general->getNationID();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
return $nationStor->notice??'';
}
function banner()
{
return sprintf(
'<font size=2>%s %s / %s</font>',
GameConst::$title,
VersionGit::$version,
VersionGit::getVersion(),
GameConst::$banner
);
}
@@ -1006,7 +1005,7 @@ function increaseRefresh($type = "", $cnt = 1)
$isunited = $gameStor->isunited;
$opentime = $gameStor->opentime;
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::DatetimeNow()) {
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::now()) {
$db->update('general', [
'lastrefresh' => $date,
'con' => $db->sqleval('con + %i', $cnt),
@@ -1224,15 +1223,15 @@ function updateOnline()
//동접수
$before5Min = TimeUtil::nowAddMinutes(-5);
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s', $before5Min);
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s AND npc < 2', $before5Min);
$onlineNum = count($onlineUser);
$onlineNationUsers = Util::arrayGroupBy($onlineUser, 'nation');
uasort($onlineNationUsers, function(array $lhs, array $rhs){
return -(count($lhs)<=>count($rhs));
});
$onlineNation = [];
$onlineNation = [];
foreach($onlineNationUsers as $nationID=>$rawOnlineUser){
$nationName = getNationStaticInfo($nationID)['name'];
@@ -1537,7 +1536,18 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
//일단은 '획득' 시에만 동작하므로 이대로 사용하기로...
$occupiedUnique = [];
$invalidItemType = [];
foreach(array_keys(GameConst::$allItems) as $itemType){
$ownItem = $general->getItems()[$itemType]??null;
if($ownItem !== null && !$ownItem->isBuyable()){
$invalidItemType[$itemType] = true;
}
}
foreach (array_keys(GameConst::$allItems) as $itemType) {
if(key_exists($itemType, $invalidItemType)){
continue;
}
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
$itemClass = buildItemClass($itemCode);
if (!$itemClass) {
@@ -1551,7 +1561,13 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
}
foreach (GameConst::$allItems as $itemType => $itemCategories) {
if(key_exists($itemType, $invalidItemType)){
continue;
}
foreach ($itemCategories as $itemCode => $cnt) {
if($cnt == 0){
continue;
}
if (!key_exists($itemCode, $occupiedUnique)) {
$availableUnique[] = [[$itemType, $itemCode], $cnt];
continue;
@@ -1604,37 +1620,55 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
return false;
}
$itemTypeCnt = count(GameConst::$allItems);
$trialCnt = $itemTypeCnt;
foreach ($general->getItems() as $item) {
if (!$item) {
continue;
}
if (!$item->isBuyable()) {
return false;
$trialCnt -= 1;
}
}
if($trialCnt <= 0){
LogText("{$general->getName()}, {$general->getID()} 모든 아이템", $trialCnt);
return false;
}
$scenario = $gameStor->scenario;
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
if ($scenario < 100) {
$prob = 1 / ($genCount * 5); // 5~6개월에 하나씩 등장
$prob = 1 / ($genCount * 3 * $itemTypeCnt); // 3~4개월에 하나씩 등장
} else {
$prob = 1 / $genCount; // 1~2개월에 하나씩 등장
$prob = 1 / ($genCount * $itemTypeCnt); // 1~2개월에 하나씩 등장
}
if ($acquireType == '설문조사') {
$prob = 1 / ($genCount * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
$prob = 1 / ($genCount * $itemTypeCnt * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
} else if ($acquireType == '랜덤 임관') {
$prob = 1 / ($genCount / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
} else if ($acquireType == '건국') {
$prob = 1 / ($genCount / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
}
$prob = Util::valueFit($prob, null, 1 / 3);
$prob = Util::valueFit($prob, null, 1 / 4);//최대치 감소
$result = false;
if (!Util::randBool($prob)) {
foreach(Util::range($trialCnt) as $_idx){
if (Util::randBool($prob)) {
$result = true;
break;
}
}
if(!$result){
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob);
return false;
}
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob);
return giveRandomUniqueItem($general, $acquireType);
}
@@ -1656,7 +1690,7 @@ function deleteNation(General $lord, bool $applyDB):array
$db = DB::db();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nationID);
$nationName = $nation['name'];
@@ -1665,17 +1699,17 @@ function deleteNation(General $lord, bool $applyDB):array
$josaUn = JosaUtil::pick($nationName, '은');
$logger->pushGlobalHistoryLog("<R><b>【멸망】</b></><D><b>{$nationName}</b></>{$josaUn} <R>멸망</>했습니다.");
$nationGeneralList = General::createGeneralObjListFromDB(
$db->queryFirstColumn(
'SELECT `no` FROM general WHERE nation=%i AND no != %i',
$nationID,
$lordID
),
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1
),
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'belong', 'aux'], 1
);
$nationGeneralList[$lordID] = $lord;
$nation['generals'] = array_keys($nationGeneralList);
$nation['aux'] = Json::decode($nation['aux']);
$nation['msg'] = $nationStor->notice;
@@ -1689,6 +1723,12 @@ function deleteNation(General $lord, bool $applyDB):array
// 전 장수 재야로
foreach($nationGeneralList as $general){
$general->setAuxVar('max_belong',
max(
$general->getVar('belong'),
$general->getAuxVar('max_belong')??0
)
);
$general->setVar('belong', 0);
$general->setVar('troop', 0);
$general->setVar('officer_level', 0);
@@ -1736,7 +1776,7 @@ function nextRuler(General $general)
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
[$year, $month, $fiction] = $gameStor->getValuesAsArray(['year', 'month', 'fiction']);
$nation = $general->getStaticNation();
$nationName = $nation['name'];
$nationID = $nation['nation'];
@@ -1744,7 +1784,7 @@ function nextRuler(General $general)
$candidate = null;
//npc or npc유저인 경우 후계 찾기
if ($general->getNPCType() > 0) {
if (!$fiction && $general->getNPCType() > 0) {
$candidate = $db->queryFirstRow(
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
$general->getVar('affinity'),
@@ -1847,7 +1887,7 @@ function searchDistance(int $from, int $maxDist = 99, bool $distForm = false)
* @param $from 기준 도시 코드
* @param $to 대상 도시 코드
* @param array|null $linkNationList 경로에 해당하는 국가 리스트, null인 경우 제한 없음
* @return null|int 거리.
* @return null|int 거리.
*/
function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
{
@@ -1861,7 +1901,7 @@ function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
if ($linkNationList !== null) {
$db = DB::db();
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
$allowedCityList = [];
foreach ($db->queryFirstColumn(
'SELECT city FROM city WHERE nation IN %li',
@@ -1924,7 +1964,7 @@ function searchDistanceListToDest(int $from, int $to, array $linkNationList)
$db = DB::db();
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
$allowedCityList = [];
foreach ($db->queryAllLists(
'SELECT city, nation FROM city WHERE nation IN %li',
+24
View File
@@ -378,6 +378,30 @@ function buildWarUnitTriggerClass(?string $type, WarUnit $unit, ?array $args = n
return $class->newInstanceArgs(array_merge([$unit], $args));
}
function getGeneralPoolClass(string $type){
static $basePath = __NAMESPACE__.'\\GeneralPool\\';
$classPath = ($basePath.$type);
if(class_exists($classPath)){
return $classPath;
}
throw new \InvalidArgumentException("{$type}은 GeneralPool이 아님");
}
/**
* @param \MeekroDB $db
* @param int $owner
* @param int $pickCnt
* @param null|string $prefix
* @return AbsGeneralPool[]
*/
function pickGeneralFromPool(\MeekroDB $db, int $owner, int $pickCnt, ?string $prefix=null):array{
/** @var AbsGeneralPool */
$class = getGeneralPoolClass(GameConst::$targetGeneralPool);
return $class::pickGeneralFromPool($db, $owner, $pickCnt, $prefix);
}
function countPureGeneralFromRawList(?array $rawGeneralList=null):int{
if(!$rawGeneralList){
return 0;
+72 -31
View File
@@ -623,30 +623,38 @@ function updateNationState()
$nation['nation'],
$targetKillTurn
);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong'], 2);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc'], 2);
$chiefObj = null;
$uniqueLotteryWeightList = [];
foreach ($nationGenList as $nationGen) {
$hasUnique = false;
if ($nationGen->getVar('officer_level') == 12) {
$chiefObj = $nationGen;
}
$trialCnt = count(GameConst::$allItems);
foreach ($nationGen->getItems() as $item) {
if (!$item->isBuyable()) {
$hasUnique = true;
break;
$trialCnt -= 1;
}
}
if ($hasUnique) {
if ($trialCnt <= 0) {
continue;
}
$score = $nationGen->getVar('belong') + 5;
if ($nationGen->getVar('officer_level') == 12) {
$score += 200; //NOTE: 꼬우면 군주하세요.
$score += 100; //NOTE: 꼬우면 군주하세요.
} else if ($nationGen->getVar('officer_level') == 11) {
$score += 70;
$score += 50;
} else if ($nationGen->getVar('officer_level') > 4) {
$score += 35;
}
$score *= $trialCnt;
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
}
@@ -661,6 +669,10 @@ function updateNationState()
giveRandomUniqueItem($winnerObj, '작위보상');
$winnerObj->applyDB($db);
}
if($chiefObj){
$chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff);
}
}
}
@@ -680,31 +692,22 @@ function updateNationState()
while ($assemblerCnt < $maxAssemblerCnt) {
$lastAssemblerID += 1;
$npcObj = new Scenario\NPC(
999,
$npcObj = new Scenario\GeneralBuilder(
sprintf('부대장%4d', $lastAssemblerID),
false,
null,
$nation['nation'],
null,
10,
10,
10,
1,
$admin['year'] - 15,
$admin['year'] + 15,
'은둔',
'척사'
$nation['nation']
);
$npcObj->killturn = 70;
$npcObj->gold = 0;
$npcObj->rice = 0;
$npcObj->npc = 5;
$npcObj->setAffinity(999)->setStat(10, 10, 10)
->setSpecialSingle('척사')->setEgo('che_은둔')
->setKillturn(70)->setGoldRice(0, 0)
->setNPCType(5)->fillRemainSpecAsZero($admin);
$npcObj->build($admin);
$npcID = $npcObj->generalID;
$npcID = $npcObj->getGeneralID();
$db->insert('troop', [
'troop_leader' => $npcID,
'name' => $npcObj->realName,
'name' => $npcObj->getGeneralName(),
'nation' => $nation['nation'],
]);
$db->update('general', [
@@ -742,7 +745,7 @@ function checkStatistic()
];
$avgGeneral = $db->queryFirstRow(
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
max(dex1+dex2+dex3+dex4) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
FROM general'
);
@@ -987,6 +990,15 @@ function checkEmperior()
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
if($genObj->getNationID() == $nationID){
if($genObj->getVar('officer_level') > 4){
$genObj->increaseInheritancePoint('unifier', 2000);
};
}
$genObj->mergeTotalInheritancePoint();
}
$gameStor->isunited = 2;
$gameStor->conlimit = $gameStor->conlimit * 100;
@@ -1010,8 +1022,8 @@ function checkEmperior()
$nation['generals'] = $nationGenerals;
$tigers = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nationID
); // 오호장군
@@ -1022,8 +1034,8 @@ function checkEmperior()
}, $tigers));
$eagles = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nationID
); // 건안칠자
@@ -1040,7 +1052,7 @@ function checkEmperior()
$generalLogger->flush();
}
$gen = join(', ', array_column($rawGeneral, 'name'));
$gen = join(', ', array_column($rawGeneralList, 'name'));
$stat = $db->queryFirstRow('SELECT max(nation_count) as nc, max(gen_count) as gc FROM statistic');
$genCnt = $db->queryFirstField('SELECT count(*) FROM general');
@@ -1137,3 +1149,32 @@ function checkEmperior()
//연감 월결산
LogHistory();
}
function resetInheritanceUser(int $userID, bool $isRebirth=false){
$rebirthDegraded = [
'dex'=>0.5,
];
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
$totalPoint = 0;
foreach($inheritStor->getAll() as $key=>[$value,]){
if(key_exists($key, $rebirthDegraded)){
$value *= $rebirthDegraded[$key];
}
$totalPoint += $value;
}
$totalPoint = Util::toInt($totalPoint);
$inheritStor->resetValues();
$inheritStor->setValue('previous', [$totalPoint, null]);
}
function updateMaxDomesticCritical(General $general, $score){
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical')??0;
$maxDomesticCritical += $score / 2;
$general->setAuxVar('max_domestic_critical', $maxDomesticCritical);
$oldMaxDomesticCritical = $general->getInheritancePoint('max_domestic_critical');
if($maxDomesticCritical > $oldMaxDomesticCritical){
$general->setInheritancePoint('max_domestic_critical', $maxDomesticCritical);
}
}
+20 -15
View File
@@ -173,7 +173,7 @@ function printRow($k, $npc, $name, $abil, $tgame, $win, $draw, $lose, $gd, $gl,
if($prmt > 0) { $name = "<font color=orange>".$name."</font>"; }
elseif($npc >= 2) { $name = "<font color=cyan>".$name."</font>"; }
elseif($npc == 1) { $name = "<font color=skyblue>".$name."</font>"; }
echo "<tr align=center><td id=bg2>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
echo "<tr align=center><td class='bg2'>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
}
function printFighting($tournament, $phase) {
@@ -246,7 +246,7 @@ function startTournament($auto, $type) {
}
$admin = $gameStor->getValues(['year', 'month']);
$gameStor->tnmt_auto = $auto;
$gameStor->tnmt_time = (new \DateTimeImmutable())->add(new \DateInterval("PT{$unit}M"))->format('Y-m-d H:i:s');
$gameStor->tournament = 1;
@@ -297,7 +297,7 @@ function startTournament($auto, $type) {
][$type];
$history[] = "<S>◆</>{$admin['year']}{$admin['month']}월:{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
}
@@ -689,7 +689,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
'grp_no'=>$general['grp_no'],
'reward'=>$cost,
'msg'=>"<span class='ev_highlight'>16강 진출</span>",
'logger'=>$logger
'logger'=>$logger,
'inheritance_point'=>10,
];
}
//8강자 명성 돈
@@ -723,6 +724,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
//포상 장수 이름, 금액
$resultHelper[$generalID]['reward'] += $cost;
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>4강 진출</span>";
General::createGeneralObjFromDB($generalID)->increaseInheritancePoint('tournament', 10);
}
//결승자 명성 돈
$cost = $admin['develcost'] * 6;
@@ -739,6 +741,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
//포상 장수 이름, 금액
$resultHelper[$generalID]['reward'] += $cost;
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>준우승</span>으";
$resultHelper[$generalID]['inheritance_point'] = 50;
if($general['lose'] > 0){
$runnerUp = $general;
}
@@ -761,6 +764,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
//포상 장수 이름, 금액
$resultHelper[$generalID]['reward'] += $cost;
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>우승</span>으";
$resultHelper[$generalID]['inheritance_point'] = 100;
$winner = $general;
}
@@ -775,9 +779,6 @@ function setGift($tnmt_type, $tnmt, $phase) {
$runnerUpLogger = $resultHelper[$runnerUp['no']]['logger'];
$runnerUpLogger->pushGeneralHistoryLog("<C>{$tp}</> 대회에서 준우승");
$winnerRewardText = number_format($resultHelper[$winner['no']]['reward']);
$runnerUpRewardText = number_format($resultHelper[$runnerUp['no']]['reward']);
@@ -786,12 +787,16 @@ function setGift($tnmt_type, $tnmt, $phase) {
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
foreach($resultHelper as $general){
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
foreach($resultHelper as $generalID=>$general){
$rewardText = number_format($general['reward']);
/** @var ActionLogger */
$logger = $general['logger'];
$logger->pushGeneralActionLog("<C>{$tp}</> 대회의 {$general['msg']}로 <C>{$rewardText}</>의 <S>상금</>, 약간의 <S>명성</> 획득!", ActionLogger::EVENT_PLAIN);
//TODO: 토너먼트의 다른 값이 모두 sql에 직접 입력하므로 기반을 바꿔야함.
$generalObjList[$generalID]->increaseInheritancePoint('tournament', $general['inheritance_point']);
}
//우승자 번호
@@ -829,7 +834,7 @@ function setRefund() {
$db->update('general', [
'gold'=>$db->sqleval('gold + %i', $cost)
], 'no IN %li', $generalIDList);
//베팅금 환수
$db->update(['general', [
'gold'=>$db->sqleval('gold + (SELECT bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 FROM betting WHERE general_id = general.no)')
@@ -862,16 +867,16 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
if($type == 0) { $turn = 10; }
else { $turn = 100; }
if($tnmt_type == 1) { $tp = "leadership"; $tp2 = "tl"; }
elseif($tnmt_type == 2) { $tp = "strength"; $tp2 = "ts"; }
elseif($tnmt_type == 3) { $tp = "intel"; $tp2 = "ti"; }
else /*$tnmt_type == 0*/{ $tp = "total"; $tp2 = "tt"; }
else /*$tnmt_type == 0*/{ $tp = "total"; $tp2 = "tt"; }
$e1 = $energy1 = Util::round($gen1[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
$e2 = $energy2 = Util::round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
foreach([$gen1, $gen2] as $gen){
$horse = buildItemClass($gen['h']);
@@ -883,7 +888,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$itemName = $horse->getName();
$itemRawName = $horse->getRawName();
switch(rand()%4) {
case 0:
case 0:
$josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 포효합니다!"; break;
case 1:
@@ -1085,7 +1090,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
'lose'=>$db->sqleval('lose+1'),
'gl'=>$db->sqleval('gl-%i', $gl)
], 'grp=%i AND grp_no=%i', $group, $g2);
if($general1['gl'] > $general2['gl']) { $gl1 = 1; $gl2 = 0; }
elseif($general1['gl'] == $general2['gl']) { $gl1 = 2; $gl2 = -1; }
else { $gl1 = 3; $gl2 = -2; }
+10 -16
View File
@@ -79,9 +79,11 @@ if ($gameStor->fiction == 0) {
}
if ($gameStor->npcmode == 0) {
$npcmode = "불가능";
} else {
} else if($gameStor->npcmode == 1){
$npcmode = "가능";
$valid = 1;
} else {
$npcmode = "선택 생성";
}
$color = "cyan";
$mapTheme = $gameStor->map_theme;
@@ -95,18 +97,10 @@ $serverCnt = $gameStor->server_cnt;
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
<?=WebUtil::printJS('../e_lib/linkify/linkify.min.js')?>
<?=WebUtil::printJS('../e_lib/linkify/linkify-string.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/main.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/msg.js')?>
<?=WebUtil::printJS('dist_js/main.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
@@ -134,7 +128,7 @@ $(function(){
<body class="img_back">
<div id="container">
<div><?=allButton($gameStor->npcmode!=0)?></div>
<div><?=allButton($gameStor->npcmode==1)?></div>
<table class="tb_layout bg0" style="width:1000px;">
<tr height=50>
<td colspan=5 id="server_title" align=center><font size=4>삼국지 모의전투 HiDCHe <?=$serverName.$serverCnt?>기 (<font color=cyan><?=$scenario?></font>)</font></td>
@@ -293,7 +287,7 @@ else if($session->userGrade == 4){
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:70px;font-size:13px;margin-left:1ch;margin-right:2ch;'
><input type=button value='▼미루기' id='pushTurn'
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;'
><input type=button value='▲당기기' id='pullTurn'
><input type=button value='▲당기기' id='pullTurn'
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;'
></td>
</tr>
@@ -304,7 +298,7 @@ else if($session->userGrade == 4){
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;'
><input type=button value='갱 신' id='refreshPage'
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;'
><input type=button value='로비로' onclick="location.replace('../')"
><input type=button value='로비로' onclick="location.replace('../')"
style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;font-size:13px;
>
</td>
@@ -341,7 +335,7 @@ else if($session->userGrade == 4){
<button id="msg_submit">서신전달&amp;갱신</button><br>
내용 없이 '서신전달&amp;갱신'을 누르면 메세지창이 갱신됩니다.
</div>
<div><?=allButton($gameStor->npcmode!=0)?></div>
<div><?=allButton($gameStor->npcmode==1)?></div>
<div id="message_board"><div style="left:0;" class="board_side bg0">
<div class="board_header bg0" id='public_talk_position'>전체 메시지(최고99자)</div>
<section class="public_message">
@@ -361,7 +355,7 @@ else if($session->userGrade == 4){
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="diplomacy">이전 메시지 불러오기</button>
</section>
</div></div>
<div style="clear:left;"><?=allButton($gameStor->npcmode!=0)?><?=banner()?></div>
<div style="clear:left;"><?=allButton($gameStor->npcmode==1)?><?=banner()?></div>
</div>
<?php
if ($con == 1) {
+35 -20
View File
@@ -14,7 +14,7 @@ $serverName = DB::prefix();
$serverAcl = $session->acl[$serverName]??[];
$allowReset = in_array('reset', $serverAcl);
$allowFullReset = in_array('fullReset',$serverAcl);
$allowReset |= $allowFullReset;
$allowReset = $allowReset || $allowFullReset;
if($session->userGrade < 5 && !$allowReset){
die('관리자 아님');
@@ -28,11 +28,9 @@ if($session->userGrade < 5 && !$allowReset){
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/install.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/install.js')?>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('css/install.css')?>
@@ -47,7 +45,7 @@ if($session->userGrade < 5 && !$allowReset){
<h3 class="card-header">
설치(환경 설정)
<!--턴시간, 시간동기화, 시나리오, 상성, 확장장수, NPC유저, 이미지설정-->
</h3>
</h3>
<div class="card-body">
<form id="game_form" method="post" action="#">
<div class="form-group row">
@@ -82,7 +80,7 @@ if($session->userGrade < 5 && !$allowReset){
</div>
</div>
<div class="form-group row">
<label for="sync" class="col-sm-3 col-form-label">시간 동기화</label>
<div class="col-sm-9" style="display: inline-flex;">
@@ -93,7 +91,7 @@ if($session->userGrade < 5 && !$allowReset){
<label class="btn btn-secondary">
<input type="radio" name="sync" value="0">N
</label>
</div>
<small class="text-muted">
시간 단위에 맞게 년/월이 설정됩니다. <br>예: 120분(오전1시=1월), 60분(오전/오후 1시=1월)
@@ -102,11 +100,11 @@ if($session->userGrade < 5 && !$allowReset){
</div>
<div class="form-group row">
<label for="confirm_password" class="col-sm-3 col-form-label">시나리오 선택</label>
<label for="scenario_sel" class="col-sm-3 col-form-label">시나리오 선택</label>
<div class="col-sm-9">
<select class="form-control" name="scenario" size="1" id="scenario_sel">
</select>
</div>
</div>
@@ -138,6 +136,20 @@ if($session->userGrade < 5 && !$allowReset){
</div>
</div>
<div class="form-group row">
<label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label>
<div class="col-sm-9">
<div id="block_general_create" class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="radio" name="block_general_create" value="0" checked>가능
</label>
<label class="btn btn-secondary active">
<input type="radio" name="block_general_create" value="1">불가
</label>
</div>
</div>
</div>
<div class="form-group row">
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
<div class="col-sm-9">
@@ -148,35 +160,38 @@ if($session->userGrade < 5 && !$allowReset){
<label class="btn btn-secondary active">
<input type="radio" name="npcmode" value="0" checked>불가
</label>
<label class="btn btn-secondary">
<input type="radio" name="npcmode" value="2">선택 생성 가능
</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">휴식 턴 시 장수 턴</label>
<label class="col-sm-3 col-form-label" id="autorun_set_label">휴식 턴 시 장수 턴</label>
<div class="col-sm-9">
<div class="input-group">
<div class="input-group-prepend btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="develop" name="autorun_develop" id="autorun_develop">내정
<input type="checkbox" class="autorun_user_chk" data-key="develop" name="autorun_user[]" value="develop">내정
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="warp" name="autorun_warp" id="autorun_warp">순간이동
<input type="checkbox" class="autorun_user_chk" data-key="warp" name="autorun_user[]" value="warp">순간이동
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="recruit" name="autorun_recruit" id="autorun_recruit">징병
<input type="checkbox" class="autorun_user_chk" data-key="recruit" name="autorun_user[]" value="recruit">징병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="recruit_high" name="autorun_recruit_high" id="autorun_recruit_high">모병
<input type="checkbox" class="autorun_user_chk" data-key="recruit_high" name="autorun_user[]" value="recruit_high">모병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="train" name="autorun_train" id="autorun_train">훈사
<input type="checkbox" class="autorun_user_chk" data-key="train" name="autorun_user[]" value="train">훈사
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="battle" name="autorun_battle" id="autorun_battle">출병
<input type="checkbox" class="autorun_user_chk" data-key="battle" name="autorun_user[]" value="battle">출병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="chief" name="autorun_chief" id="autorun_chief">기본 사령턴
<input type="checkbox" class="autorun_user_chk" data-key="chief" name="autorun_user[]" value="chief">기본 사령턴
</label>
</div>
<div class="input-group-append">
@@ -351,7 +366,7 @@ if($session->userGrade < 5 && !$allowReset){
</tbody>
<tfoot>
<tr><td colspan="2">
</td></tr>
</tfoot>
</table>
+7 -9
View File
@@ -21,11 +21,9 @@ if($session->userGrade == 5){
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/install_db.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/install_db.js')?>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('css/install.css')?>
@@ -39,7 +37,7 @@ if($session->userGrade == 5){
<div class="card" id="db_form_card">
<h3 class="card-header">
설치(DB 설정)
</h3>
</h3>
<div class="card-body">
<form id="db_form" method="post" action="#">
<?php if(class_exists('\\sammo\\DB')): ?>
@@ -53,7 +51,7 @@ if($session->userGrade == 5){
<label class="btn btn-secondary active">
<input type="radio" name="full_reset" value="0" checked>N
</label>
</div>
</div>
</div>
@@ -73,7 +71,7 @@ if($session->userGrade == 5){
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
</div>
</div>
<div class="form-group row">
<label for="db_id" class="col-sm-3 col-form-label">DB계정</label>
<div class="col-sm-9">
@@ -82,7 +80,7 @@ if($session->userGrade == 5){
</div>
</div>
<div class="form-group row">
<label for="db_pw" class="col-sm-3 col-form-label">DB비밀번호</label>
<div class="col-sm-9">
+1
View File
@@ -85,6 +85,7 @@ $result = ResetHelper::buildScenario(
$options['scenario'],
$options['fiction'],
$options['extend'],
$options['block_general_create'],
$options['npcmode'],
$options['show_img_level'],
$options['tournament_trig'],
+5 -3
View File
@@ -5,9 +5,11 @@ include('lib.php');
include 'func.php';
$result = [
"generalID"=>null,
"myNationID"=>null,
"isChief"=>false
"generalID"=>0,
"myNationID"=>0,
"isChief"=>false,
"officerLevel"=>0,
"permission"=>0,
];
$session = Session::requireGameLogin([])->setReadOnly();
$userID = Session::getUserID();
+1
View File
@@ -157,6 +157,7 @@ foreach ($customViewColumns as $column => $reqPermission) {
$resultColumns[] = $column;
}
$generalList = [];
foreach ($rawGeneralList as $rawGeneral) {
//General 생성?
+1 -1
View File
@@ -37,7 +37,7 @@ list(
$npcmode
) = $gameStor->getValuesAsArray(['maxgeneral', 'turnterm', 'npcmode']);
if(!$npcmode){
if($npcmode!=1){
Json::die([
'result'=>false,
'reason'=>'빙의 가능한 서버가 아닙니다'
+90
View File
@@ -0,0 +1,90 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
function sortTokens(&$tokens){
usort($tokens, function($lhs, $rhs){
return array_sum($lhs['dex'])<=>array_sum($rhs['dex']);
});
}
function putInfoText(&$info){
if(key_exists('specialDomestic', $info)){
$class = buildGeneralSpecialDomesticClass($info['specialDomestic']);
$info['specialDomesticName'] = $class->getName();
$info['specialDomesticInfo'] = $class->getInfo();
}
if(key_exists('specialWar', $info)){
$class = buildGeneralSpecialDomesticClass($info['specialWar']);
$info['specialWarName'] = $class->getName();
$info['specialWarInfo'] = $class->getInfo();
}
}
$session = Session::requireLogin([])->setReadOnly();
$userID = Session::getUserID();
$oNow = new \DateTimeImmutable();
$now = $oNow->format('Y-m-d H:i:s');
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$npcmode = $gameStor->getValue('npcmode');
if($npcmode!=2){
Json::die([
'result'=>false,
'reason'=>'선택 가능한 서버가 아닙니다'
]);
}
$rawGeneral = $db->queryFirstRow('SELECT no, aux FROM general WHERE `owner` = %i', $userID);
if($rawGeneral){
$generalAux = Json::decode($rawGeneral['aux']);
if(key_exists('next_change', $generalAux)&& $generalAux['next_change'] > $now){
Json::die([
'result'=>false,
'reason'=>'아직 다시 고를 수 없습니다'
]);
}
}
$tokens = $db->query('SELECT unique_name, reserved_until, info FROM `select_pool` WHERE `owner`=%i AND `reserved_until`>=%s', $userID, $now);
if($tokens){
$pick = [];
$valid_until = null;
$specialInfo = [];
foreach($tokens as $token){
$valid_until = $token['reserved_until'];
$info = Json::decode($token['info']);
putInfoText($info);
$info['uniqueName'] = $token['unique_name'];
$pick[] = $info;
}
sortTokens($pick);//좀 무식하지만..
Json::die([
'result'=>true,
'pick'=>$pick,
'validUntil'=>$valid_until
]);
}
$pick = [];
$valid_until = null;
foreach(pickGeneralFromPool($db, $userID, 14) as $pickObj){
$valid_until = $pickObj->getValidUntil();
$info = $pickObj->getInfo();
putInfoText($info);
$pick[] = $info;
}
sortTokens($pick);//좀 무식하지만..
Json::die([
'result'=>true,
'pick'=>$pick,
'validUntil'=>$valid_until
]);
+7 -1
View File
@@ -19,7 +19,7 @@ $serverName = DB::prefix();
$serverAcl = $session->acl[$serverName]??[];
$allowReset = in_array('reset', $serverAcl);
$allowFullReset = in_array('fullReset',$serverAcl);
$allowReset |= $allowFullReset;
$allowReset = $allowReset || $allowFullReset;
$reserve_open = Util::getPost('reserve_open');
if($reserve_open && $reserve_open < date('Y-m-d H:i')){
@@ -57,6 +57,7 @@ $v->rule('required', [
'scenario',
'fiction',
'extend',
'block_general_create',
'join_mode',
'npcmode',
'show_img_level',
@@ -67,6 +68,7 @@ $v->rule('required', [
'scenario',
'fiction',
'extend',
'block_general_create',
'npcmode',
'show_img_level',
'tournament_trig',
@@ -109,11 +111,13 @@ $scenario = (int)$_POST['scenario'];
$fiction = (int)$_POST['fiction'];
$extend = (int)$_POST['extend'];
$npcmode = (int)$_POST['npcmode'];
$block_general_create = (bool)$_POST['block_general_create'];
$show_img_level = (int)$_POST['show_img_level'];
$tournament_trig = (int)$_POST['tournament_trig'];
$join_mode = $_POST['join_mode'];
$autorun_user_minutes = (int)$_POST['autorun_user_minutes'];
$autorun_user_options = [];
foreach(Util::getPost('autorun_user', 'array_string', []) as $autorun_option){
$autorun_user_options[$autorun_option] = 1;
}
@@ -165,6 +169,7 @@ if($reserve_open){
'scenarioName'=>$scenarioObj->getTitle(),
'fiction'=>$fiction,
'extend'=>$extend,
'block_general_create'=>$block_general_create,
'npcmode'=>$npcmode,
'show_img_level'=>$show_img_level,
'tournament_trig'=>$tournament_trig,
@@ -200,6 +205,7 @@ Json::die(ResetHelper::buildScenario(
$scenario,
$fiction,
$extend,
$block_general_create,
$npcmode,
$show_img_level,
$tournament_trig,
+1 -1
View File
@@ -9,7 +9,7 @@ $serverName = DB::prefix();
$serverAcl = $session->acl[$serverName]??[];
$allowReset = in_array('reset', $serverAcl);
$allowFullReset = in_array('fullReset',$serverAcl);
$allowReset |= $allowFullReset;
$allowReset = $allowReset || $allowFullReset;
if($session->userGrade < 5 && !$allowReset){
Json::die([
+1 -1
View File
@@ -56,6 +56,6 @@ else{
Json::die([
'result' => $result===DiplomaticMessage::ACCEPTED,
'result' => $result!==DiplomaticMessage::INVALID,
'reason' => $reason
]);
+1 -1
View File
@@ -32,7 +32,7 @@ $lastMsgGet[] = TimeUtil::now();
$session->lastMsgGet = Json::encode($lastMsgGet);
if($delayTime){
sleep(0.2);
usleep(200);
}
$session->setReadOnly();
+1 -1
View File
@@ -59,7 +59,7 @@ list(
$npcmode
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode']);
if(!$npcmode){
if($npcmode!=1){
Json::die([
'result'=>false,
'reason'=>'빙의 가능한 서버가 아닙니다'
+170
View File
@@ -0,0 +1,170 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
WebUtil::requireAJAX();
$pick = Util::getPost('pick');
$leadership = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
$strength = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
$intel = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
$personal = Util::getPost('personal', 'string', null);
$use_own_picture = Util::getPost('use_own_picture', 'bool', false);
if(!$pick){
Json::die([
'result'=>false,
'reason'=>'장수를 선택하지 않았습니다'
]);
}
$session = Session::requireLogin([])->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$rootDB = RootDB::db();
$oNow = new \DateTimeImmutable();
$now = $oNow->format('Y-m-d H:i:s');
$hasGeneralID = $db->queryFirstField('SELECT no FROM general WHERE owner = %i', $userID);
if($hasGeneralID){
Json::die([
'result'=>false,
'reason'=>'이미 장수를 생성했습니다.'
]);
}
$env = $gameStor->getValues(['startyear', 'year', 'month', 'maxgeneral', 'npcmode', 'show_img_level', 'icon_path', 'turnterm', 'turntime']);
$env['fiction'] = false;
$npcmode = $env['npcmode'];
$maxgeneral = $env['maxgeneral'];
if($npcmode!=2){
Json::die([
'result'=>false,
'reason'=>'선택 가능한 서버가 아닙니다'
]);
}
$selectInfo = $db->queryFirstField('SELECT info FROM select_pool WHERE `owner` = %i AND `reserved_until`>=%s AND `unique_name`=%s', $userID, $now, $pick);
if(!$selectInfo){
Json::die([
'result'=>false,
'reason'=>'유효한 장수 목록이 없습니다.'
]);
}
$selectInfo = Json::decode($selectInfo);
$ownerInfo = RootDB::db()->queryFirstRow('SELECT `name`,`picture`,`imgsvr` FROM member WHERE `NO`=%i',$userID);
if(!$ownerInfo){
Json::die([
'result'=>false,
'reason'=>'멤버 정보를 가져오지 못했습니다.'
]);
}
$gencount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2');
if ($gencount >= $maxgeneral) {
Json::die([
'result'=>false,
'reason'=>'더 이상 등록 할 수 없습니다.'
]);
}
$poolClass = getGeneralPoolClass(GameConst::$targetGeneralPool);
/** @var AbsGeneralPool */
$pickedGeneral = new $poolClass($db, $selectInfo, $now);
$builder = $pickedGeneral->getGeneralBuilder();
foreach(GameConst::$generalPoolAllowOption as $allowOption){
if($allowOption == 'stat'){
$leadership = Util::valueFit($leadership, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
$strength = Util::valueFit($strength, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
$intel = Util::valueFit($intel, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
if($leadership + $strength + $intel > GameConst::$defaultStatTotal){
Json::die([
'result'=>false,
'reason'=>'스탯의 총 합이 올바르지 않습니다.'
]);
}
$builder->setStat($leadership, $strength, $intel);
}
else if($allowOption == 'picture' && $use_own_picture){
$builder->setPicture($ownerInfo['imgsvr'], $ownerInfo['picture']);
}
else if($allowOption == 'ego'){
if(!$personal || $personal == 'Random'){
$personal = Util::choiceRandom(GameConst::$availablePersonality);
}
if(!array_search($personal, GameConst::$availablePersonality)){
Json::die([
'result'=>false,
'reason'=>'올바르지 않은 성격입니다.'
]);
}
$builder->setEgo($personal);
}
}
$userNick = $ownerInfo['name'];
$builder->setOwner($userID);
$builder->setOwnerName($userNick);
$builder->setKillturn(5);
$builder->setNPCType(0);
$builder->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $env['turnterm']));
$builder->fillRemainSpecAsZero($env);
$builder->build($env);
$generalID = $builder->getGeneralID();
if(!$generalID){
Json::die([
'result'=>false,
'reason'=>'장수 등록에 실패했습니다.'
]);
}
$pickedGeneral->occupyGeneralName();
$db->update('select_pool',[
'owner'=>null,
'reserved_until'=>null,
], '(owner=%i or reserved_until < %s) AND general_id is NULL', $userID, $now);
$josaYi = JosaUtil::pick($userNick, '이');
$generalName = $builder->getGeneralName();
$josaRo = JosaUtil::pick($generalName, '로');
$cityName = CityConst::byID($builder->getCityID())->name;
$logger = new ActionLogger($generalID, 0, $env['year'], $env['month']);
$logger->pushGeneralHistoryLog("<Y>{$generalName}</>, <G>{$cityName}</>에서 등장");
$logger->pushGlobalActionLog("<G><b>{$cityName}</b></>에서 <Y>{$userNick}</>{$josaYi} <Y>{$generalName}</>{$josaRo} 등장합니다.");
$logger->flush();
pushAdminLog(["가입 : {$userID} // {$session->userName} // {$pick} // ".getenv("REMOTE_ADDR")]);
$rootDB->insert('member_log', [
'member_no' => $userID,
'date'=>TimeUtil::now(),
'action_type'=>'make_general',
'action'=>Json::encode([
'server'=>DB::prefix(),
'type'=>'select',
'generalID'=>$generalID,
'generalName'=>$generalName
])
]);
Json::die([
'result'=>true,
'reason'=>'success'
]);
+6 -5
View File
@@ -43,7 +43,7 @@ $session = Session::requireLogin([
'game'=>null,
'me'=>null
])->setReadOnly();
$userID = Session::getUserID();
$userID = $session->userID;
if(!class_exists('\\sammo\\DB')){
Json::die([
@@ -91,7 +91,8 @@ if(file_exists(__DIR__.'/.htaccess')){
'scenarioName'=>$options['scenarioName'],
'turnterm'=>$options['turnterm'],
'fictionMode'=>($options['fiction']?'가상':'사실'),
'npcMode'=>($options['npcmode']?'가능':'불가'),
'block_general_create'=>(!!$options['block_general_create']),
'npcMode'=>([0=>'불가',1=>'가능',2=>'선택 생성'][$options['npcmode']]),
'openDatetime'=>$reserved['date'],
'starttime'=>$options['starttime'],
'gameConf'=>$options['gameConf'],
@@ -104,7 +105,7 @@ if(file_exists(__DIR__.'/.htaccess')){
//TODO: 천통시에도 예약 오픈 알림이 필요..?
$admin = $gameStor->getValues(['isunited', 'npcmode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnterm', 'opentime', 'turntime', 'join_mode', 'fiction', 'autorun_user']);
$admin = $gameStor->getValues(['isunited', 'npcmode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnterm', 'opentime', 'turntime', 'join_mode', 'fiction', 'block_general_create', 'autorun_user']);
$admin['maxUserCnt'] = $admin['maxgeneral'];
$admin['npcMode'] = $admin['npcmode'];
$admin['turnTerm'] = $admin['turnterm'];
@@ -124,8 +125,8 @@ $admin['scenario'] = $admin['scenario_text'];
$admin['userCnt'] = $genCnt;
$admin['npcCnt'] = $npcCnt;
$admin['nationCnt'] = $nationCnt;
$admin['npcMode'] = $admin['npcMode']?'가능':'불가';
$admin['block_general_create'] = !!$admin['block_general_create'];
$admin['npcMode'] = [0=>'불가',1=>'가능',2=>'선택 생성'][$admin['npcMode']];
$admin['fictionMode'] = $admin['fiction']?'가상':'사실';
$otherTextInfo = [];
+2 -2
View File
@@ -43,8 +43,8 @@ if($defence_train != $me->getVar('defence_train')){
if($defence_train == 999){
$me->increaseVar('myset', -1);
$me->setVar('defence_train', $defence_train);
$me->increaseVar('train', -3);
$me->increaseVar('atmos', -3);
$me->increaseVarWithLimit('train', -3, 20);
$me->increaseVarWithLimit('atmos', -3, 20);
}
else{
$me->increaseVar('myset', -1);
+2
View File
@@ -140,6 +140,7 @@ if(!$v->validate()){
'reason'=>'[출병자]'.$v->errorStr()
]);
}
$rawAttacker['owner'] = 0;
$defenderList = [];
foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
@@ -152,6 +153,7 @@ foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
'reason'=>"[수비자{$idx}]".$v->errorStr()
]);
}
$rawDefenderGeneral['owner'] = 0;
$defenderList[] = new General($rawDefenderGeneral, extractRankVar($rawDefenderGeneral), $rawDefenderCity, $rawAttackerNation, $year, $month, true);
}
+151
View File
@@ -0,0 +1,151 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
WebUtil::requireAJAX();
$pick = Util::getPost('pick');
if(!$pick){
Json::die([
'result'=>false,
'reason'=>'장수를 선택하지 않았습니다'
]);
}
$session = Session::requireLogin([])->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$rootDB = RootDB::db();
$oNow = new \DateTimeImmutable();
$now = $oNow->format('Y-m-d H:i:s');
$generalID = $db->queryFirstField('SELECT no FROM general WHERE owner = %i', $userID);
if(!$generalID){
Json::die([
'result'=>false,
'reason'=>'장수가 생성하지 않았습니다. 이미 사망하지 않았는지 확인해보세요.'
]);
}
list(
$year,
$month,
$maxgeneral,
$npcmode,
$turnterm
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode', 'turnterm']);
if($npcmode!=2){
Json::die([
'result'=>false,
'reason'=>'선택 가능한 서버가 아닙니다'
]);
}
$info = $db->queryFirstField('SELECT info FROM select_pool WHERE `owner` = %i AND `reserved_until`>=%s AND `unique_name`=%s', $userID, $now, $pick);
if(!$info){
Json::die([
'result'=>false,
'reason'=>'유효한 장수 목록이 없습니다.'
]);
}
$ownerInfo = RootDB::db()->queryFirstRow('SELECT `name`,`picture`,`imgsvr` FROM member WHERE `NO`=%i',$userID);
if(!$ownerInfo){
Json::die([
'result'=>false,
'reason'=>'멤버 정보를 가져오지 못했습니다.'
]);
}
$info = Json::decode($info);
$generalObj = General::createGeneralObjFromDB($generalID);
$oldGeneralName = $generalObj->getName();
$db->update('select_pool', [
'general_id'=>-$generalID,
'owner'=>null,
'reserved_until'=>null
], 'unique_name=%s AND `reserved_until` IS NOT NULL AND owner = %i', $info['uniqueName'], $userID);
if($db->affectedRows()==0){
Json::die([
'result'=>false,
'reason'=>'동시성 제어에 문제가 발생했습니다. 버그 제보를 부탁드립니다.'
]);
}
$db->update('select_pool', [
'general_id'=>null,
'owner'=>null,
'reserved_until'=>null,
], 'unique_name != %s AND general_id = %i', $info['uniqueName'], $generalID);
$db->update('select_pool', [
'general_id'=>$generalID,
], 'general_id=%i', -$generalID);
if($db->affectedRows()==0){
Json::die([
'result'=>false,
'reason'=>'장수 선택 과정에 문제가 발생했습니다.. 버그 제보를 부탁드립니다.'
]);
}
$db->update('select_pool',[
'owner'=>null,
'reserved_until'=>null,
], '(owner=%i or reserved_until < %s) AND general_id is NULL', $userID, $now);
if(key_exists('leadership', $info)){
$generalObj->updateVar('leadership', $info['leadership']);
$generalObj->updateVar('strength', $info['strength']);
$generalObj->updateVar('intel', $info['intel']);
}
if(key_exists('picture', $info)){
$generalObj->updateVar('imgsvr', $info['imgsvr']);
$generalObj->updateVar('picture', $info['picture']);
}
if(key_exists('generalName', $info)){
$generalObj->updateVar('name', $info['generalName']);
}
if(key_exists('dex', $info)){
$generalObj->updateVar('dex1', $info['dex'][0]);
$generalObj->updateVar('dex2', $info['dex'][1]);
$generalObj->updateVar('dex3', $info['dex'][2]);
$generalObj->updateVar('dex4', $info['dex'][3]);
$generalObj->updateVar('dex5', $info['dex'][4]);
}
if(key_exists('ego', $info)){
$generalObj->updateVar('personal', $info['ego']);
}
if(key_exists('specialDomestic', $info)){
$generalObj->updateVar('special', $info['specialDomestic']);
}
if(key_exists('specialWar', $info)){
$generalObj->updateVar('special2', $info['specialWar']);
}
$generalObj->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $turnterm));
$userNick = $ownerInfo['name'];
$generalObj->setVar('owner_name', $userNick);
$josaYi = JosaUtil::pick($userNick, '이');
$generalName = $info['generalName'];
$josaRo = JosaUtil::pick($generalName, '로');
$logger = $generalObj->getLogger();
$logger->pushGeneralHistoryLog("장수를 <Y>{$oldGeneralName}</>에서 <Y>{$generalName}</>{$josaRo} 변경");
$logger->pushGlobalActionLog("<Y>{$userNick}</>{$josaYi} 장수를 <Y>{$oldGeneralName}</>에서 <Y>{$generalName}</>{$josaRo} 변경합니다.");
$generalObj->applyDB($db);
Json::die([
'result'=>true,
'reason'=>'success'
]);
+17 -14
View File
@@ -24,7 +24,12 @@ if (!$member) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['block_general_create','show_img_level','maxgeneral']);
if($admin['block_general_create']){
MessageBox("잘못된 접근입니다!!!");
echo "<script>history.go(-1);</script>";
exit(1);
}
?>
<!DOCTYPE html>
<html>
@@ -51,11 +56,10 @@ echo Json::encode((object)$charInfoText);
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/join.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('dist_js/join.js')?>
</head>
<body>
@@ -66,7 +70,6 @@ echo Json::encode((object)$charInfoText);
<tr><td align=center><?=info(0)?></td></tr>
</table>
<?php
$admin = $gameStor->getValues(['show_img_level','maxgeneral']);
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
@@ -91,10 +94,10 @@ echo getInvitationList($nationList);
<form id='join_form' name=form1 method=post action=join_post.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=3 align=center id=bg1>장수 생성</td>
<td colspan=3 align=center class='bg1'>장수 생성</td>
</tr>
<tr>
<td width=498 align=right id=bg1>장수명</td>
<td width=498 align=right class='bg1'>장수명</td>
<td colspan=2>
<input id="generalName" type=text name=name maxlength=18 size=18 style="color:white;background-color:black;" value="<?=$member['name']?>">(전각 9글자, 반각 18글자 이내)
</td>
@@ -104,7 +107,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
$imageTemp = GetImageURL($member['imgsvr']);
echo "
<tr>
<td align=right id=bg1>전콘 사용 여부</td>
<td align=right class='bg1'>전콘 사용 여부</td>
<td width=64 height=64>
<img width='64' height='64' src='{$imageTemp}/{$member['picture']}' border='0'>
</td>
@@ -121,7 +124,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
</td>
</tr>
<tr>
<td width=498 align=right id=bg1>성격</td>
<td width=498 align=right class='bg1'>성격</td>
<td colspan=2>
<select id="selChar" name=character size=1 maxlength=15 style=color:white;background-color:black;>
<option selected value='Random'>????</option>
@@ -133,19 +136,19 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
</td>
</tr>
<tr>
<td width=498 align=right id=bg1>통솔</td>
<td width=498 align=right class='bg1'>통솔</td>
<td colspan=2><input type="number" name="leadership" id="leadership" value="50"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>무력</td>
<td width=498 align=right class='bg1'>무력</td>
<td colspan=2><input type="number" name="strength" id="strength" value="50"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>지력</td>
<td width=498 align=right class='bg1'>지력</td>
<td colspan=2><input type="number" name="intel" id="intel" value="50"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>능력치 조정</td>
<td width=498 align=right class='bg1'>능력치 조정</td>
<td colspan=2>
<input type=button value=랜덤형 onclick=abilityRand()>
<input type=button value=통솔무력형 onclick=abilityLeadpow()>
+4 -2
View File
@@ -185,10 +185,10 @@ if($relYear < 3){
$experience = 0;
}
else{
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 5');
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 4');
$targetGenOrder = Util::round($expGenCount * 0.2);
$experience = $db->queryFirstField(
'SELECT experience FROM general WHERE nation != 0 AND npc < 5 ORDER BY experience ASC LIMIT %i, 1',
'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1',
$targetGenOrder - 1
);
$experience *= 0.8;
@@ -266,6 +266,8 @@ foreach(Util::range(GameConst::$maxTurn) as $turnIdx){
}
$db->insert('general_turn', $turnRows);
resetInheritanceUser($userID);
$rank_data = [];
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
$rank_data[] = [
-31
View File
@@ -1,31 +0,0 @@
jQuery(function($){
$('.submitBtn').click(function(){
var $this = $(this);
var target = parseInt($this.data('target'));
var amount = $('#target_{0}'.format(target)).val();
$.post({
url:'j_betting.php',
dataType:'json',
data:{
target:target,
amount:amount
}
}).then(function(data){
if(!data){
return quickReject('베팅을 실패했습니다.');
}
if(!data.result){
return quickReject('베팅을 실패했습니다. : '+data.reason);
}
location.reload();
}, errUnknown)
.fail(function(reason){
alert(reason);
location.reload();
});
return false;
});
});
-179
View File
@@ -1,179 +0,0 @@
function submitArticle(){
var $article = $('#newArticle');
var $title = $article.find('.titleInput');
var $text = $article.find('.contentInput');
var title = $.trim($title.val());
var text = $.trim($text.val());
if(!text && !title){
return false;
}
$title.val('');
$text.val('');
$.post({
url:'j_board_article_add.php',
dataType:'json',
data:{
isSecret:isSecretBoard,
title:title,
text:text
}
}).then(function(data){
if(!data){
$title.val(title);
$text.val(text);
return quickReject('글을 올리는데 실패했습니다.');
}
if(!data.result){
$title.val(title);
$text.val(text);
return quickReject('글을 올리는데 실패했습니다. : '+data.reason);
}
return loadArticles().done(drawArticles);
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function submitComment(){
var $this = $(this);
var $article = $this.closest('.articleObj').eq(0);
var articleNo = $article.data('no');
var $text = $article.find('input.commentText');
var text = $.trim($text.val());
if(!text){
return false;
}
$text.val('');
$.post({
url:'j_board_comment_add.php',
dataType:'json',
data:{
articleNo:articleNo,
text:text
}
}).then(function(data){
if(!data){
$text.val(text);
return quickReject('댓글을 다는데 실패했습니다.');
}
if(!data.result){
$text.val(text);
return quickReject('댓글을 다는데 실패했습니다. : '+data.reason);
}
return loadArticles().done(drawArticles);
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function drawArticle(idx, articleObj){
var $articleFrame = $('#articleTemplate > .articleFrame');
var $commentFrame = $($('#commentTemplate').prop('content'));
var $article = $articleFrame.clone();
$article.addClass('articleObj')
.data('no', articleObj.no)
.data('author', articleObj.general_no);
$article.find('.articleNo').text(articleObj.no);
$article.find('.authorName').text(articleObj.author);
$article.find('.articleTitle').text(articleObj.title);
$article.find('.date').text(articleObj.date);
if(articleObj.author_icon){
$article.find('.authorIcon').attr('src', articleObj.author_icon);
}
//$article.find('.text').text(articleObj.text);
$article.find('.text').html(nl2br(escapeHtml(articleObj.text)));
//TODO: 바꿀 것
var $articleComment = $article.find('.commentList');
$.each(articleObj.comment, function(_, commentObj){
var $comment = $commentFrame.clone();
$comment.find('.author').text(commentObj.author);
//$comment.find('.text').text(commentObj.text);
$comment.find('.text').html(nl2br(escapeHtml(commentObj.text)));
$comment.find('.date').text(commentObj.date);
$articleComment.append($comment);
});
$article.find('.submitComment').click(submitComment);
$article.find('.commentText').on('keypress', function (e) {
if(e.which === 13){
$article.find('.submitComment').click();
}
});
$article.find('.inputCommentHeader').click(function(){
$article.find('.commentText').focus();
})
var $board = $('#board');
$board.prepend($article);
}
function drawArticles(articlesObj){
var deferred = $.Deferred();
if(!articlesObj){
return quickReject('받아오는데 실패했습니다.');
}
if(!articlesObj.result){
return quickReject('에러가 발생했습니다. : '+articlesObj.reason);
}
$('.articleObj').detach();//첫 버전이니까 일괄 삭제 일괄 로드
$.each(articlesObj.articles, drawArticle);
return true;
}
function loadArticles(){
return $.post({
url:'j_board_get_articles.php',
dataType:'json',
data:{
isSecret:isSecretBoard, //첫 버전이니까 전체 다 불러오자
}
});
}
function resizeTextarea($obj){
$obj.height(1).height($obj.prop('scrollHeight')+12 );
}
$(function(){
$('textarea.autosize').on('keydown keyup', function(){
resizeTextarea($(this));
})
$('#submitArticle').click(submitArticle);
loadArticles()
.then(drawArticles, errUnknown)
.fail(function(reason){
alert(reason);
});
});
-195
View File
@@ -1,195 +0,0 @@
function changePermission(isAmbassador, rawGeneralList) {
console.log(isAmbassador);
console.log(rawGeneralList);
var generalList = [];
$.each(rawGeneralList, function(idx, value) {
generalList.push(parseInt(value.id));
})
$.post({
url: 'j_general_set_permission.php',
dataType: 'json',
data: {
isAmbassador: isAmbassador,
genlist: generalList
},
}).then(function(data) {
if (!data) {
alert('변경하지 못했습니다.');
return false;
}
if (!data.result) {
alert('변경하지 못했습니다. : ' + data.reason);
return false;
}
alert('변경했습니다.');
location.reload();
}, errUnknown);
}
$(function() {
$('#selectAmbassador').select2({
theme: 'bootstrap4',
placeholder: "",
allowClear: true,
language: "ko",
width: 300,
maximumSelectionLength: 2,
containerCss: {
display: "inline-block !important;",
color: 'white !important'
},
data: candidateAmbassadors,
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
});
$('#selectAuditor').select2({
theme: 'bootstrap4',
placeholder: "",
allowClear: true,
language: "ko",
width: 300,
maximumSelectionLength: 2,
containerCss: {
display: "inline-block !important;",
color: 'white !important'
},
data: candidateAuditors,
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
});
$('#changeAmbassador').click(function() {
if (!confirm('외교권자를 변경할까요?')) {
return false;
}
changePermission(true, $('#selectAmbassador').select2('data'));
return false;
});
$('#changeAuditor').click(function() {
if (!confirm('조언자를 변경할까요?')) {
return false;
}
changePermission(false, $('#selectAuditor').select2('data'));
return false;
});
$('#btn_kick').click(function() {
var $kickSelect = $('#genlist_kick option:selected');
var generalID = $kickSelect.val();
if (!generalID) {
alert('장수를 선택해주세요');
return false;
}
var generalName = $kickSelect.data('name');
if (!confirm('{0}를 추방하시겠습니까?'.format(generalName))) {
return false;
}
$.post({
url: 'j_myBossInfo.php',
dataType: 'json',
data: {
action: '추방',
destGeneralID: generalID
},
}).then(function(data) {
if (!data) {
alert('추방하지 못했습니다.');
return false;
}
if (!data.result) {
alert('추방하지 못했습니다. : ' + data.reason);
return false;
}
alert('{0}를 추방했습니다.'.format(generalName));
location.reload();
}, errUnknown);
return false;
});
$('.btn_appoint').click(function() {
var $btn = $(this);
var officerLevel = $btn.data('officer_level');
var officerLevelText = $btn.data('officer_level_text');
var cityID = 0;
var cityName = '_';
var $generalSelect = $('#genlist_{0} option:selected'.format(officerLevel));
var $citySelect = $('#citylist_{0} option:selected'.format(officerLevel));
var generalID = parseInt($generalSelect.val());
var generalName = $generalSelect.data('name');
var generalOfficerLevel = $generalSelect.data('officer_level');
if (officerLevel >= 5) {
if (generalID == 0) {
if (!confirm('{0}직을 비우시겠습니까?'.format(officerLevelText))) {
return false;
}
} else if (generalOfficerLevel >= 5) {
if (!confirm('이미 수뇌인 {0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
return false;
}
} else {
if (!confirm('{0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
return false;
}
}
} else {
cityID = $citySelect.val();
if (!cityID) {
alert('도시를 선택해주세요');
return false;
}
cityName = $citySelect.find('option:selected .name_field').text();
if (generalID == 0) {
if (!confirm('{0} {1}직을 비우시겠습니까?'.format(cityName, officerLevelText))) {
return false;
}
} else if (generalOfficerLevel >= 5) {
if (!confirm('수뇌인 {0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
return false;
}
} else {
if (!confirm('{0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
return false;
}
}
}
$.post({
url: 'j_myBossInfo.php',
dataType: 'json',
data: {
action: '임명',
destGeneralID: generalID,
destCityID: cityID,
officerLevel: officerLevel
},
}).then(function(data) {
if (!data) {
alert('임명하지 못했습니다.');
return false;
}
if (!data.result) {
alert('임명하지 못했습니다. : ' + data.reason);
return false;
}
if (generalID) {
alert('{0}을(를) 임명했습니다.'.format(generalName));
} else {
alert('관직을 비웠습니다.');
}
location.reload();
}, errUnknown);
})
})
-185
View File
@@ -1,185 +0,0 @@
var filledChiefList = {};
var chiefTableObj = {};
function clearTable(){
$('.chiefLevelText').html('-');
$('.chiefTurnTime, .chiefTurnText, .chiefName').html('&nbsp;');
}
function genChiefTableObj(){
var objTable = {
btns: $('#turnPush,#turnPull,#setCommand')
};
for(var chiefIdx = 5; chiefIdx <= 12; chiefIdx++){
var $plate = $('#chief_{0}'.format(chiefIdx));
var $officerLevelText = $plate.find('.chiefLevelText');
var $name = $plate.find('.chiefName');
var turn = [];
for(var turnIdx=0;turnIdx<maxChiefTurn;turnIdx++){
var $turn = $plate.find('.turn{0}'.format(turnIdx));
var $turnTime = $turn.find('.chiefTurnTime');
var $turnPad = $turn.find('.chiefTurnPad');
var $turnText = $turn.find('.chiefTurnText');
turn.push({turnTime:$turnTime,turnPad:$turnPad,turnText:$turnText});
}
objTable[chiefIdx] = {
officerLevelText: $officerLevelText,
name: $name,
turn: turn
};
}
return objTable;
}
function clearChief(chiefIdx){
var $plate = $('#chief_{0}'.format(chiefIdx));
$plate.find('.chiefLevelText').html('-');
$plate.find('.chiefTurnTime, .chiefTurnText, .chiefName').html('&nbsp;');
}
function reloadTable(){
$.post({
url:'j_getChiefTurn.php',
dataType:'json',
}).then(function(data){
if(!data.result){
alert(data.reason);
return;
}
var turnTerm = data.turnTerm;
var tmpFilledChiefList = {};
if(data.isChief){
chiefTableObj.btns.css('visibility', 'visible');
}
else{
chiefTableObj.btns.css('visibility', 'hidden');
}
$.each(data.nationTurnBrief, function(chiefIdx, chiefInfo){
tmpFilledChiefList[chiefIdx] = true;
filledChiefList[chiefIdx] = true;
var plateObj = chiefTableObj[chiefIdx];
if(chiefInfo.name){
var $name = $('<span>{0}</span>'.format(chiefInfo.name));
var nameColor = getNpcColor(chiefInfo.npcType);
if(nameColor){
$name.css('color',nameColor);
}
plateObj.name.html($name);
}
else{
plateObj.name.html('');
}
plateObj.officerLevelText.text(chiefInfo.officerLevelText);
if(chiefInfo.turnTime){
var turnTimeObj = moment(chiefInfo.turnTime);
}
else{
var turnTimeObj = null;
}
var turnList = plateObj.turn;
$.each(chiefInfo.turn, function(turnIdx, turnText){
if(turnTimeObj){
turnList[turnIdx].turnTime.text(turnTimeObj.format('HH:mm'));
}
else{
turnList[turnIdx].turnTime.text('');
}
turnList[turnIdx].turnText.html(turnText).css('font-size', '13px');
var oWidth = turnList[turnIdx].turnPad.innerWidth();
var iWidth = turnList[turnIdx].turnText.outerWidth();
if(iWidth > oWidth * 0.95){
var newFontSize = 13 * oWidth / iWidth * 0.9;
turnList[turnIdx].turnText.css('font-size', '{0}px'.format(newFontSize));
}
if(turnTimeObj){
turnTimeObj = turnTimeObj.add(turnTerm, 'minute');
}
});
});
for(var idx=5;idx<=12;idx++){
if(idx in tmpFilledChiefList){
continue;
}
if(idx in filledChiefList){
clearChief(chiefIdx);
}
}
filledChiefList = tmpFilledChiefList;
}, errUnknown);
}
function reserveTurn(turnList, command){
console.log(turnList, command);
$.post({
url:'j_set_chief_command.php',
dataType:'json',
data:{
action:command,
turnList:turnList
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadTable();
}, errUnknown);
}
function pushTurn(turnCnt){
$.post({
url:'j_chief_turn.php',
dataType:'json',
data:{
amount:turnCnt
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadTable();
}, errUnknown);
}
jQuery(function($){
chiefTableObj= genChiefTableObj();
reloadTable();
$('#reloadTable').click(reloadTable);
$('#setCommand').click(function(){
var turnList = $('#chiefTurnSelector').val().map(function(v){return parseInt(v);});
var $command = $('#chiefCommandList option:selected');
if($command.data('reqarg')){
$.redirect(
"b_processing.php", {
command: $command.val(),
turnList: turnList.join('_'),
is_chief: true
}, "GET");
}
else{
reserveTurn(turnList, $command.val());
}
return false;
});
$('#turnPush').click(function(){
pushTurn(1);
});
$('#turnPull').click(function(){
pushTurn(-1);
});
})
-375
View File
@@ -1,375 +0,0 @@
/**
* <>& 등을 html에서도 그대로 보이도록 escape주는 함수
* @see https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
* @param {string} string escape하고자 하는 문자열
* @returns {string}
*/
var escapeHtml = (function(string) {
var entityMap = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
'/': '&#x2F;',
'`': '&#x60;',
'=': '&#x3D;'
};
return function(string) {
return String(string).replace(/[&<>"'`=\/]/g, function(s) {
return entityMap[s];
});
}
})();
/**
* 변수가 정수인지 확인하는 함수
* @param {*} n 정수인지 확인하기 위한 인자
* @return {boolean} 정수인지 여부
*/
function isInt(n) {
return +n === n && !(n % 1);
}
;
(function(ns) {
//https://gist.github.com/demouth/3217440
/**
* mb_strwidth
* @param String
* @return int
* @see http://php.net/manual/ja/function.mb-strwidth.php
*/
var mb_strwidth = function(str) {
var i = 0,
l = str.length,
c = '',
length = 0;
for (; i < l; i++) {
c = str.charCodeAt(i);
if (0x0000 <= c && c <= 0x0019) {
length += 0;
} else if (0x0020 <= c && c <= 0x1FFF) {
length += 1;
} else if (0x2000 <= c && c <= 0xFF60) {
length += 2;
} else if (0xFF61 <= c && c <= 0xFF9F) {
length += 1;
} else if (0xFFA0 <= c) {
length += 2;
}
}
return length;
};
/**
* mb_strimwidth
* @param String
* @param int
* @param int
* @param String
* @return String
* @see http://www.php.net/manual/ja/function.mb-strimwidth.php
*/
var mb_strimwidth = function(str, start, width, trimmarker) {
if (typeof trimmarker === 'undefined') trimmarker = '';
var trimmakerWidth = mb_strwidth(trimmarker),
i = start,
l = str.length,
trimmedLength = 0,
trimmedStr = '';
for (; i < l; i++) {
var charCode = str.charCodeAt(i),
c = str.charAt(i),
charWidth = mb_strwidth(c),
next = str.charAt(i + 1),
nextWidth = mb_strwidth(next);
trimmedLength += charWidth;
trimmedStr += c;
if (trimmedLength + trimmakerWidth + nextWidth > width) {
trimmedStr += trimmarker;
break;
}
}
return trimmedStr;
};
ns.mb_strwidth = mb_strwidth;
ns.mb_strimwidth = mb_strimwidth;
})(window);
/**
* object의 array를 id를 key로 삼는 object로 재 변환
* @param {Array.{id: Object}} arr id를 가진 object의 array
* @returns {Object}
*/
function convertDictById(arr) {
var result = {};
arr.forEach(function(v, i) {
result[v.id] = v;
});
return result;
}
/**
* array를 set 형태의 object로 변환
* @param {Array} arr 값을 가진 array
* @returns {Object}
*/
function convertSet(arr) {
var result = {};
arr.forEach(function(v) {
result[v] = true;
});
return result;
}
/**
* {0}, {1}, {2}형태로 포맷해주는 함수
*/
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return (typeof args[number] != 'undefined') ? args[number] : match;
});
};
function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
function isBrightColor(color) {
color = hexToRgb(color);
if ((color.r * 0.299 + color.g * 0.587 + color.b * 0.114) > 140) {
return true;
} else {
return false;
}
}
/**
* 게임내에서 지원하는 color type만 선택할 수 있도록 해주는 함수
* @param {string} color #AAAAAA 또는 AAAAAA 형태로 작성된 RGB hex color string
* @returns {string}
*/
function convColorValue(color) {
if (color.charAt(0) == '#') {
color = color.substr(1);
}
color = color.toUpperCase();
var colorBase = convertSet([
'000080', '0000FF', '008000', '008080', '00BFFF', '00FF00', '00FFFF', '20B2AA',
'2E8B57', '483D8B', '6495ED', '7B68EE', '7CFC00', '7FFFD4', '800000', '800080',
'808000', '87CEEB', 'A0522D', 'A9A9A9', 'AFEEEE', 'BA55D3', 'E0FFFF', 'F5F5DC',
'FF0000', 'FF00FF', 'FF6347', 'FFA500', 'FFC0CB', 'FFD700', 'FFDAB9', 'FFFF00',
'FFFFFF'
]);
if (!colorBase.hasOwnProperty(color)) {
return '000000';
}
return color;
}
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function linkifyStrWithOpt(text) {
return linkifyStr(text, {});
}
/**
* 단순한 Template 함수. <%변수명%>으로 template 가능
* @see https://github.com/krasimir/absurd/blob/master/lib/processors/html/helpers/TemplateEngine.js
* @param {string} html
* @param {object} options
* @returns {string}
*/
var TemplateEngine = function(html, options) {
var re = /<%(.+?)%>/g,
reExp = /(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,
code = 'with(obj) { var r=[];\n',
cursor = 0,
result,
match;
var add = function(line, js) {
js ? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') :
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : '');
return add;
}
options.e = escapeHtml;
options.linkifyStr = linkifyStrWithOpt;
while (match = re.exec(html)) {
add(html.slice(cursor, match.index))(match[1], true);
cursor = match.index + match[0].length;
}
add(html.substr(cursor, html.length - cursor));
code = (code + 'return r.join(""); }').replace(/[\r\t\n]/g, ' ');
try { result = new Function('obj', code).apply(options, [options]); } catch (err) { console.error("'" + err.message + "'", " in \n\nCode:\n", code, "\n"); }
return result;
}
function getIconPath(imgsvr, picture) {
// ../d_shared/common_path.js 필요
if (!imgsvr) {
return pathConfig.sharedIcon + '/' + picture;
} else {
return pathConfig.root + '/d_pic/' + picture;
}
}
function activeFlip($obj) {
var $result;
if ($obj === undefined) {
$result = $('img[data-flip]');
} else {
$result = $obj.find('img[data-flip]');
}
$result.each(function() {
activeFlipItem($(this));
});
}
function combineObject(item, columnList) {
var newItem = {};
for (var columnIdx in columnList) {
var columnName = columnList[columnIdx];
newItem[columnName] = item[columnIdx];
}
return newItem;
}
function combineArray(array, columnList) {
var result = [];
for (var key in array) {
var item = array[key];
result[key] = combineObject(item, columnList);
}
return result;
}
function activeFlipItem($img) {
var imageList = [];
imageList.push($img.attr('src'));
$.each($img.data('flip').split(','), function(idx, value) {
var value = $.trim(value);
if (!value) {
return true;
}
imageList.push(value);
});
if (imageList.length <= 1) {
return;
}
$img.data('computed_flip_array', imageList);
$img.data('computed_flip_idx', 0);
$img.click(function() {
var arr = $img.data('computed_flip_array');
var idx = $img.data('computed_flip_idx');
idx = (idx + 1) % (arr.length);
$img.attr('src', arr[idx]);
$img.data('computed_flip_idx', idx);
});
$img.css('cursor', 'pointer');
}
jQuery(function($) {
$('.obj_tooltip').mouseover(function() {
var $objTooltip = $(this);
if ($objTooltip.data('setObjTooltip')) {
return true;
}
var tooltipClassText = $objTooltip.data('tooltip-class');
if (!tooltipClassText) {
tooltipClassText = '';
}
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
.format(tooltipClassText);
$objTooltip.tooltip({
title: function() {
return $.trim($(this).find('.tooltiptext').html());
},
template: template,
html: true
}).tooltip('show');
$objTooltip.data('setObjTooltip', true);
});
/*each(function(){
var $objTooltip = $(this);
});*/
activeFlip();
var customCSS = localStorage.getItem('sam_customCSS');
if (customCSS) {
var $style = $('<style type="text/css"></style>');
$style.text(customCSS);
$style.appendTo($('head'));
}
});
function errUnknown() {
alert('작업을 실패했습니다.');
}
function errUnknownToast() {
$.toast({
title: '에러!',
content: '작업을 실패했습니다.',
type: 'danger',
delay: 5000
});
}
function quickReject(errMsg) {
if (errMsg === undefined) {
errMsg = '작업을 실패했습니다.';
}
var deferred = $.Deferred();
deferred.reject(errMsg);
return deferred.promise();
}
function nl2br(text) {
return text.replace(/\n/g, "<br>");
}
/*
function br2nl (text) {
return text.replace(/<\s*\/?br\s*[\/]?>/gi, '\n');
}
*/
function getNpcColor(npcType) {
if (npcType >= 2) {
return 'cyan';
}
if (npcType == 1) {
return 'skyblue';
}
return null;
}
-17
View File
@@ -1,17 +0,0 @@
$(function() {
var $target = $("#destCityID");
reloadWorldMap({
isDetailMap: false,
clickableAll: true,
neutralView: true,
useCachedMap: true,
selectCallback: function(city) {
var currVal = $target.val();
$target.val(city.id).trigger("change");
if ($target.val() === null) {
$target.val(currVal).trigger("change");
}
return false;
}
});
});
-17
View File
@@ -1,17 +0,0 @@
$(function() {
var $target = $("#destNationID");
reloadWorldMap({
isDetailMap: false,
clickableAll: true,
neutralView: true,
useCachedMap: true,
selectCallback: function(city) {
var currVal = $target.val();
$target.val(city.nationId).trigger("change");
if ($target.val() === null) {
$target.val(currVal).trigger("change");
}
return false;
}
});
});
-135
View File
@@ -1,135 +0,0 @@
jQuery(function($){
function guiEditorInit($obj, editable){
var $submitBtn = $obj.find('.submit');
var $noticeInput = $obj.find('.input_form');
var globalVariableName = $noticeInput.data('global');
var $editForm = $obj.find('.edit_form');
var $cancelEdit = $obj.find('.cancel_edit');
var editMode = false;
function enableEditor(){
editMode = true;
$cancelEdit.show();
var inputText = window[globalVariableName];
if(!inputText || inputText == '<p></p>'){
inputText = '<p><br></p>';
}
$editForm.removeClass('viewer').summernote({
minHeight:200,
maxHeight:null,
focus:true,
lang:'ko-KR',
toolbar: [
// [groupName, [list of button]]
['do', ['undo', 'redo']],
['style', ['bold', 'italic', 'underline', 'clear']],
['font2', ['fontname', 'fontsize']],
['font', ['strikethrough', 'superscript', 'subscript']],
['color', ['color']],
['in', ['picture', 'link', 'video', 'table', 'hr']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height', 'codeview']]
],
popover: {
image: [
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']],
['custom', ['imageFlip']],
],
},
fontNames: ['맑은 고딕', 'Nanum Gothic', 'Nanum Myeongjo', 'Nanum Pen Script', '굴림', '굴림체', '바탕', '바탕체', '궁서', '궁서체'],
fontSizes: ['8', '9', '10', '11', '12', '14', '16', '20', '24', '28', '32', '36', '40', '46', '52', '60'],
callbacks: {
onImageUpload: function(files) {
$editForm.summernote('saveRange');
if(files.length == 0){
alert('업로드된 파일이 없습니다.');
return false;
}
var formData = new FormData();
formData.append('img', files[0]);
$editForm.summernote("pasteHtml", '');
$.ajax({
type:'post',
url:'j_image_upload.php',
dataType:'json',
contentType: false,
processData:false,
data:formData
}).then(function(result){
if(!result.result){
alert(result.reason);
return;
}
console.log($editForm.summernote('code'));
if($editForm.summernote('isEmpty')){
console.log('haha?');
var $img = $('<img>');
$img.attr('src', result.path);
$editForm.summernote('code', $img);
return;
}
$editForm.summernote("insertImage", result.path, result.path);
},function(){
alert('알 수 없는 이유로 아이콘 업로드를 실패했습니다.');
});
}
}
}).summernote('code', inputText);
}
function disableEditor(){
editMode = false;
$editForm.summernote('destroy');
$cancelEdit.hide();
$editForm.html(window[globalVariableName]).addClass('viewer');
activeFlip($editForm);
}
$cancelEdit.hide();
$editForm.html(window[globalVariableName]);
activeFlip($editForm);
if(editable){
$submitBtn.prop('disabled', false);
}
else{
$submitBtn.prop('disabled', true);
}
$submitBtn.click(function(e){
if(!editMode){
e.preventDefault();
enableEditor();
return false;
}
var text = $editForm.summernote('code');
window[globalVariableName] = text;
$noticeInput.val(text);
});
$cancelEdit.click(function(e){
e.preventDefault();
disableEditor();
});
}
guiEditorInit($('#noticeForm'), editable);
guiEditorInit($('#scoutMsgForm'), editable);
})
-422
View File
@@ -1,422 +0,0 @@
function submitLetter(){
var $brief = $('#inputBrief');
var $detail = $('#inputDetail');
var $prevNo = $('#inputPrevNo');
var $destNation = $('#inputDestNation');
var brief = $.trim($brief.val());
var detail = $.trim($detail.val());
var prevNo = parseInt($prevNo.val());
var destNation = parseInt($destNation.val());
if(prevNo !== null && prevNo < 1){
prevNo = null;
}
console.log(brief);
if(!brief){
return false;
}
$brief.val('');
$detail.val('');
$.post({
url:'j_diplomacy_send_letter.php',
dataType:'json',
data:{
brief:brief,
detail:detail,
destNation:destNation,
prevNo:prevNo
}
}).then(function(data){
if(!data){
$brief.val(brief);
$detail.val(detail);
return quickReject('외교 서신을 보내는데 실패했습니다.');
}
if(!data.result){
$brief.val(brief);
$detail.val(detail);
return quickReject('외교 서신을 보내는데 실패했습니다. : '+data.reason);
}
alert('전송했습니다.');
location.reload();
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function repondLetter(letterNo, isAgree, reason){
$.post({
url:'j_diplomacy_respond_letter.php',
dataType:'json',
data:{
letterNo:letterNo,
isAgree:isAgree,
reason:reason,
}
}).then(function(data){
if(!data){
return quickReject('응답을 실패했습니다.');
}
if(!data.result){
return quickReject('응답을 실패했습니다. : '+data.reason);
}
if(isAgree){
alert('승인했습니다.');
}
else{
alert('거부했습니다.');
}
location.reload();
return false;
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function rollbackLetter(letterNo){
$.post({
url:'j_diplomacy_rollback_letter.php',
dataType:'json',
data:{
letterNo:letterNo,
}
}).then(function(data){
if(!data){
return quickReject('회수를 실패했습니다.');
}
if(!data.result){
return quickReject('회수를 실패했습니다. : '+data.reason);
}
alert('회수 했습니다.');
location.reload();
return false;
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function destroyLetter(letterNo){
$.post({
url:'j_diplomacy_destroy_letter.php',
dataType:'json',
data:{
letterNo:letterNo,
}
}).then(function(data){
if(!data){
return quickReject('파기를 실패했습니다.');
}
if(!data.result){
return quickReject('파기를 실패했습니다. : '+data.reason);
}
if(data.state == 'activated'){
alert('파기를 요청 했습니다.');
}
else{
alert('파기 되었습니다.');
}
location.reload();
return false;
}, errUnknown)
.fail(function(reason){
alert(reason);
});
return false;
}
function drawLetter(idx, letterObj){
if(letterObj.state == 'cancelled'){
//TODO: 취소되거나, 대체된 문서도 보여줄 방법을 찾아볼 것
return;
}
console.log(letterObj);
var $letterFrame = $('#letterTemplate > .letterFrame');
var srcColorFormat = {
'background-color':letterObj.src.nationColor,
'color':isBrightColor(letterObj.src.nationColor)?'#000000':'#ffffff'
};
var destColorFormat = {
'background-color':letterObj.dest.nationColor,
'color':isBrightColor(letterObj.dest.nationColor)?'#000000':'#ffffff'
};
var targetNation = letterObj.src.nationID==myNationID?letterObj.dest:letterObj.src;
var targetColor = letterObj.src.nationID==myNationID?destColorFormat:srcColorFormat;
var $letter = $letterFrame.clone();
if(letterObj.state == 'replaced'){
$letter.hide();
}
$letter.addClass('letterObj')
.data('no', letterObj.no)
.data('brief', letterObj.brief)
.data('detail', letterObj.detail)
.attr('id', 'letter_'+letterObj.no);
$letter.find('.letterHeader').css(targetColor);
$letter.find('.letterNationName').text(targetNation.nationName);
$letter.find('.letterDate').text(letterObj.date);
$letter.find('.letterNo').text('#'+letterObj.no);
var stateText = {
'proposed':'제안됨',
'activated':'승인됨',
'cancelled':'거부됨',
'replaced':'대체됨',
};
var stateOptionText = {
'try_destroy_src':'송신측의 파기 요청',
'try_destroy_dest':'수신측의 파기 요청',
}
$letter.find('.letterStatus').text(stateText[letterObj.state]);
if(letterObj.state_opt !== null){
$letter.find('.letterStatusOpt').text('('+stateOptionText[letterObj.state_opt]+')');
}
if(letterObj.prev_no !== null){
var $showPrev = $('<a href="#">#{0}</a>'.format(letterObj.prev_no));
$showPrev.click(function(){
$('#letter_'+letterObj.prev_no).toggle();
})
$letter.find('.letterPrevNo').html($showPrev);
}
else{
$letter.find('.letterPrevNo').text('신규');
}
$letter.find('.letterBrief').html(nl2br(escapeHtml(letterObj.brief)));
$letter.find('.letterDetail').html(nl2br(escapeHtml(letterObj.detail)));
$letter.find('.letterSrc .signerImg img.generalIcon').attr('src', letterObj.src.generalIcon);
$letter.find('.letterSrc .signerNation').text(letterObj.src.nationName).css(srcColorFormat);
$letter.find('.letterSrc .signerName').text(letterObj.src.generalName).css(srcColorFormat);
if(letterObj.dest.generalName){
$letter.find('.letterDest .signerImg img.generalIcon').attr('src', letterObj.dest.generalIcon);
$letter.find('.letterDest .signerNation').text(letterObj.dest.nationName).css(destColorFormat);
$letter.find('.letterDest .signerName').text(letterObj.dest.generalName).css(destColorFormat);
}
if(letterObj.state == 'proposed' && letterObj.src.nationID != myNationID){
$letter.find('.btnAgree').show().click(function(){
if(!confirm('승인하시겠습니까?')){
return false;
}
return repondLetter(letterObj.no, true, null);
});
$letter.find('.btnDisagree').show().click(function(){
var reason = prompt('거부하시겠습니까? (이유 [최대 50자])');
if(reason === null){
return false;
}
reason = substr.substr(0, 50);
return repondLetter(letterObj.no, false, reason);
});
}
if(letterObj.state == 'proposed' && letterObj.src.nationID == myNationID){
$letter.find('.btnRollback').show().click(function(){
if(!confirm('회수하시겠습니까?')){
return false;
}
return rollbackLetter(letterObj.no);
});
}
if(letterObj.state == 'activated'){
var $btnDestroy = $letter.find('.btnDestroy');
if((letterObj.src.nationID==myNationID && letterObj.state_opt == 'try_destroy_src') ||
(letterObj.dest.nationID==myNationID && letterObj.state_opt == 'try_destroy_dest')){
$btnDestroy.show().prop('disabled', true);
}
else{
$btnDestroy.show().click(function(){
if(!confirm('본 문서를 파기하겠습니까? (상호 동의 필요)')){
return false;
}
return destroyLetter(letterObj.no);
})
}
}
$letter.find('.btnRenew').click(function(){
var $inputPrevNo = $('#inputPrevNo');
$inputPrevNo.val(letterObj.no);
$inputPrevNo.trigger('change');
})
$('#letters').prepend($letter);
}
function initNewLetterForm(lettersObj){
console.log(lettersObj);
var nationList = [];
$.each(lettersObj.nations, function(idx, nation){
nation.id = nation.nation;
nation.text = nation.name;
nationList.push(nation);
})
var $destNation = $('#inputDestNation').select2({
theme: 'bootstrap4',
placeholder: "",
language: "ko",
width:300,
containerCss: {
display: "inline-block !important;",
color: 'white !important'
},
data:nationList,
templateResult: colorNation,
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
});
var prevNoList = [{
id:0,
text:'-새 문서-',
nation:null,
}];
$.each(lettersObj.letters, function(idx, letterObj){
if(letterObj.state == 'replaced' || letterObj.state == 'cancelled'){
return true;
}
var targetNation = letterObj.src.nationID==myNationID?letterObj.dest:letterObj.src;
prevNoList.push({
id:letterObj.no,
text:'#{0} <{1}>'.format(letterObj.no, targetNation.nationName),
nation:targetNation.nationID
});
});
var $inputPrevNo = $('#inputPrevNo').select2({
theme: 'bootstrap4',
placeholder: "",
language: "ko",
width:300,
containerCss: {
display: "inline-block !important;",
color: 'white !important'
},
data:prevNoList,
containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
});
$inputPrevNo.on('change', function(e){
var data = $inputPrevNo.select2('data')[0];
console.log(data);
if(data.nation == null){
$destNation.prop("disabled", false);
}
else{
$destNation.val(data.nation).prop("disabled", true);
var $targetLetter = $('#letter_'+data.id);
resizeTextarea($('#inputBrief').val($targetLetter.data('brief')));
resizeTextarea($('#inputDetail').val($targetLetter.data('detail')));
}
});
$('#btnSend').click(submitLetter);
$('#newLetter').show();
}
function drawLetters(lettersObj){
var deferred = $.Deferred();
if(!lettersObj){
return quickReject('받아오는데 실패했습니다.');
}
if(!lettersObj.result){
return quickReject('에러가 발생했습니다. : '+lettersObj.reason);
}
window.myNationID = lettersObj.myNationID;
if(permissionLevel == 4){
initNewLetterForm(lettersObj);
$('.letterActionPlate').show();
}
$('.letterObj').detach();//첫 버전이니까 일괄 삭제 일괄 로드
$.each(lettersObj.letters, drawLetter);
return true;
}
function loadLetters(){
return $.post({
url:'j_diplomacy_get_letter.php',
dataType:'json', //첫 버전이니까 전체 다 불러오자
data:{
}
});
}
function colorNation(nationInfo){
if(!nationInfo.color){
return nationInfo.text;
}
var fgColor = isBrightColor(nationInfo.color)?'#000000':'#ffffff';
var $nationForm = $('<div>'+nationInfo.text+'</div>').css({
'color':fgColor,
'background-color':nationInfo.color
});
return $nationForm;
}
function resizeTextarea($obj){
$obj.height(1).height($obj.prop('scrollHeight')+12 );
}
$(function(){
$('textarea.autosize').on('keydown keyup', function(){
resizeTextarea($(this));
})
loadLetters()
.then(drawLetters, errUnknown)
.fail(function(reason){
alert(reason);
});
});
-899
View File
@@ -1,899 +0,0 @@
$(function() {
var cityList = {};
var userList = {};
var cityGroupOrder = ['하북','중원','서북','서촉','남중','초','오월','동이'];
var city규모 = {:1,:2,:3,:4,:5,:6,:7,:8};
window.cityList = cityList;
window.userList = userList;
var basicPath = document.location.pathname;
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
var mergeSort = function(arr,cmpFunc){
if(typeof cmpFunc == "undefined"){
cmpFunc = function(a,b){
if(a<b) return -1;
if(a>b) return 1;
return 0;
}
}
var merge = function(left,right){
var retVal=[];
var leftIdx=0;
var rightIdx=0;
while(leftIdx<left.length && rightIdx<right.length){
var cmpVal = cmpFunc(left[leftIdx],right[rightIdx]);
if(cmpVal<=0){
retVal.push(left[leftIdx]);
leftIdx++;
}
else{
retVal.push(right[rightIdx]);
rightIdx++;
}
}
retVal = retVal.concat(left.slice(leftIdx)).concat(right.slice(rightIdx))
return retVal;
};
var _mergeSort = function(arr){
if(arr.length<2){
return arr;
}
var middle = Math.floor(arr.length/2);
var left = arr.slice(0,middle);
var right = arr.slice(middle);
return merge(_mergeSort(left),_mergeSort(right));
};
return _mergeSort(arr);
};
window.mergeSort = mergeSort;
var extDutyWindow = function(userInfo){
window.currUser = userInfo;
//도시 순서 재구성
var subCityGroupList = {};
var subCityList = {};
var tmpOldVal = 0;
//var callCity = function(num){console.log('city no.'+num+' is clicked!')};
if($('#ext_win').length==0){
var $win = $('<div id="ext_win" style="padding:0;" title="관직 임명"><table style="padding:0;margin:0;" cellspacing="0" cellpadding="0" border="0"><tr><td width="700px" style="padding:0;"><iframe id="in_frame" src="map.php?type=1&amp;graphic=1" width="700" height="520" frameborder="0" marginwidth="0" marginheight="0" topmargin="0" scrolling="no"></iframe></td>'+
'<td width="305px" style="padding:0;vertical-align:top;height:520px;"><div style="height:520px;width:305px;overflow-y:scroll;overflow-x:hidden;">'+
'<table id="inner_table"><thead><tr><th width="35">도시</th><th width="85">태수</th><th width="85">군사</th><th width="85">종사</th></tr></thead><tbody class="content">'+
'</tbody></table></div></td></tr></table>'+
'<form name="form1" id="fake_form"><span id="user_name"></span> : <select name="double" id="city_select"></select>'+
'<div id="duty_radio" style="display:inline;">'+
'<input type="radio" id="duty_type1" value="4" name="duty_radio"><label for="duty_type1">태수</label>'+
'<input type="radio" id="duty_type2" value="3" name="duty_radio"><label for="duty_type2">군사</label>'+
'<input type="radio" id="duty_type3" value="2" name="duty_radio"><label for="duty_type3">종사</label>'+
'</div></form></div>');
$win.hide();
$win.css('font-size','9pt');
$('#fake_form').css('display','inline');
$('body').append($win);
$('#inner_table').attr('border','1').attr('cellspacing',"0").attr('cellpadding',"0")
.attr('bordercolordark',"gray").attr('bordercolorlight',"black").attr('align','center')
.css('font-size','13px').css('width','290px');
$('#inner_table thead tr');
$('#fake_form').submit(function(){
return false;
});
$('#in_frame').load(function(){
$('#in_frame').contents().find('div').click(function(){$('#city_select').change();});
});
$("#duty_radio").buttonset();
var $city_select = $('#city_select');
$city_select.css('color','white').css('background-color','black');
$city_select.change(function(event){
if($city_select.val()==null){
$city_select.val(tmpOldVal);
return false;
}
if($city_select.val() == tmpOldVal){
return false;
}
tmpOldVal = $city_select.val();
//console.log(tmpOldVal);
var newInfo = subCityList[tmpOldVal];
var cityInfo = newInfo.city;
var p태수 = cityInfo.p태수 && currUser.p태수;
var p군사 = cityInfo.p군사 && currUser.p군사;
var p종사 = cityInfo.p종사 && currUser.p종사;
//console.log(p태수,p군사,p종사);
$('#duty_type1').button({disabled:!p태수});
$('#duty_type2').button({disabled:!p군사});
$('#duty_type3').button({disabled:!p종사});
var $태수 = cityInfo.$태수;
var $군사 = cityInfo.$군사;
var $종사 = cityInfo.$종사;
return true;
});
$win.dialog({
autoOpen:false,
width:1005,
height:680,
buttons:{
"임명":function(){
//console.log("임명!");
var $checked = $('#duty_radio :radio:checked');
if($checked.length==0 || $checked.attr('disabled')=='disabled'){
alert('직책을 선택해주세요!');
return false;
}
var type = $checked.attr('value');
var text = $checked.next().text();
var userVal = currUser.val;
var userName = currUser.name;
var cityVal = $city_select.val();
var cityInfo = subCityList[cityVal].city;
$.post(basicPath+'j_myBossInfo.php',{
destCityID:cityVal,
destGeneralID:userVal,
officerLevel:type,
action:'임명'
},function(rawData){
cityInfo['p'+text]=false;
var $target = cityInfo.users.find('.mode_'+type);
$target.prop('disabled',true);
$target.css('background','transparent');
$target.css('border','0');
$target.css('color','');
cityInfo['$'+text].html(userName);
$win.dialog("close");
});
},
"닫기":function(){
$win.dialog("close");
}
}
});
//console.log($win.parent());
$win.parent().css('font-size','10pt');
}
$('#ext_win').dialog("close").dialog( "option", "position", { my: "center top", at: "center bottom", of: userInfo.$user} );
var $innerContent = $('#inner_table .content');
$innerContent.html('');
$("#user_name").html(userInfo.name+'['+userInfo.city+']');
$('#city_select').html('');
$.each(cityList,function(idx,cityInfo){
var 지역 = cityInfo.지역;
var p태수 = cityInfo.p태수 && currUser.p태수;
var p군사 = cityInfo.p군사 && currUser.p군사;
var p종사 = cityInfo.p종사 && currUser.p종사;
var newInfo = {
지역 : 지역,
규모 : cityInfo.규모,
이름 : cityInfo.이름,
val : cityInfo.val,
city : cityInfo,
p태수 : p태수,
p군사 : p군사,
p종사 : p종사
};
//console.log(newInfo);
if(p태수 || p군사 || p종사){
if(typeof subCityGroupList[지역] == 'undefined'){
subCityGroupList[지역] = [];
}
subCityGroupList[지역].push(newInfo);
subCityList[cityInfo.val] = newInfo;
}
});
$.each(cityGroupOrder,function(idx,groupName){
if(typeof subCityGroupList[groupName] == 'undefined'){
return true;
}
var subList = subCityGroupList[groupName];
var $group = $('<tr><td colspan="4" style="color:skyblue;">【 '+groupName+' 】</td></tr>');
$innerContent.append($group);
subList.sort(function(a,b){
var cmp규모 = city규모[a.규모] - city규모[b.규모];
if(cmp규모 != 0) return cmp규모;
return a.이름.localeCompare(b.이름);
});
var $optgroup = $('<optgroup label=" 【 '+groupName+' 】 " style="color:skyblue;"></optgroup>');
$.each(subList,function(idx,newInfo){
$optgroup.append('<option value="'+newInfo.val+'" style="color:white;">'+newInfo.이름+'</option>');
var cityInfo = newInfo.city;
var $city = $('<tr><td>'+newInfo.이름+'</td></tr>');
var $태수 = cityInfo.$태수.clone();
$city.append($태수);
if(!newInfo.p태수){
$태수.css('color','red');
}
else{
$태수.click(function(){
$('#duty_radio :radio:eq(0)').attr('checked','checked');
$('#duty_radio :radio').button('refresh');
}).css('cursor','pointer');
}
var $군사 = cityInfo.$군사.clone();
$city.append($군사);
if(!newInfo.p군사)$군사.css('color','red');
else{
$군사.click(function(){
$('#duty_radio :radio:eq(1)').attr('checked','checked');
$('#duty_radio :radio').button('refresh');
}).css('cursor','pointer');
}
var $종사 = cityInfo.$종사.clone();
$city.append($종사);
if(!newInfo.p종사)$종사.css('color','red');
else{
$종사.click(function(){
$('#duty_radio :radio:eq(2)').attr('checked','checked');
$('#duty_radio :radio').button('refresh');
}).css('cursor','pointer');
}
$innerContent.append($city);
$city.click(function(){
$('#city_select').val(newInfo.val).change();
});
});
$('#city_select').append($optgroup);
});
tmpOldVal = $('#city_select').val();
$('#city_select').change();
$('#ext_win').dialog("open");
};
var loadDuty = function(){
try{
$('.for_duty').remove();
$.get(basicPath+'b_myBossInfo.php',function(rawData){
$html = $(rawData);
//window.$html = $html;
var cnt =0;
var $tmpTable = $html.filter('#officer_list').eq(0);
$selects = $tmpTable.find("select");
if($selects.length == 0){
alert("수뇌가 아닙니다!");
return false;
}
var setUserAvailable = function($userList,typeName){
$userList.each(function(idx){
var $this = $(this);
var val = $this.val();
var name = $.trim($this.text());
for(var i=name.length-1;i>0;i--){
if(name[i]=='【'){
name = $.trim(name.substr(0,i));
break;
}
}
if(val == '0'){
return true;
}
if(typeof userList[name] != 'undefined'){
userList[name].val = val;
userList[name][typeName] = true;
}
});
};
var setCityAvailiable = function($cityList,typeName){
$cityList.each(function(idx){
var $this = $(this);
var val = $.trim($this.val());
var name = $.trim($this.text());
cityList[name].val = val;
cityList[name][typeName] = true;
});
}
$.each(cityList,function(idx,cityInfo){
cityInfo.p태수=false;
cityInfo.p군사=false;
cityInfo.p종사=false;
});
$.each(userList,function(idx,userInfo){
userInfo.p태수=false;
userInfo.p군사=false;
userInfo.p종사=false;
});
setUserAvailable($selects.eq(1).find("option"),"p태수");
setUserAvailable($selects.eq(3).find("option"),"p군사");
setUserAvailable($selects.eq(5).find("option"),"p종사");
setCityAvailiable($selects.eq(0).find("option"),"p태수");
setCityAvailiable($selects.eq(2).find("option"),"p군사");
setCityAvailiable($selects.eq(4).find("option"),"p종사");
$.each(cityList,function(idx,cityInfo){
//console.log(cityInfo.users.children());
cityInfo.users.children().each(function(idx){
//console.log(this);
var $this = $(this);
var username = $this.data('username');
var userInfo = userList[username];
if(!userInfo){
return true;
}
if(userInfo.val == '-1'){
return true;
}
$name = $this.find('.nameplate');
$name.append('<br class="for_duty">');
var addBtn=function($name,cityInfo,userInfo,type,text,warn){
var enabled = cityInfo['p'+text]&&userInfo['p'+text];
var cityVal = cityInfo.val;
var $btn = $('<button type="button">'+text.substr(0,1)+'</button>');
$btn.addClass('mode_'+type);
$btn.addClass('for_duty');
if(!enabled){
$btn.prop('disabled',true);
$btn.css('background','transparent');
$btn.css('border','0');
}
else{
if(userInfo.is수뇌){
$btn.css('color','red');
}
}
$btn.css('padding','1px 4px');
$btn.css('margin','0');
$btn.click(function(){
if(userInfo.is수뇌){
if(!confirm('수뇌입니다. 임명할까요?')){
return false;
}
}
$.post(basicPath+'j_myBossInfo.php',{
destCityID:cityVal,
destGeneralID:userInfo.val,
officerLevel:type,
action:'임명'
},function(rawData){
cityInfo['p'+text]=false;
var $target = cityInfo.users.find('.mode_'+type);
$target.prop('disabled',true);
$target.css('background','transparent');
$target.css('border','0');
$target.css('color','');
cityInfo['$'+text].html(userInfo.name);
});
});
//console.log($btn);
$name.append($btn);
};
addBtn($name,cityInfo,userInfo,4,'태수');
addBtn($name,cityInfo,userInfo,3,'군사');
addBtn($name,cityInfo,userInfo,2,'종사');
//특수 버튼!
if(userInfo.p태수||userInfo.p군사||userInfo.p종사){
var $btn = $('<button type="button">...</button>');
$btn.addClass('for_duty');
if(userInfo.is수뇌){
$btn.css('color','red');
}
$btn.css('padding','1px 4px');
$btn.css('margin','0');
$btn.click(function(){
if(userInfo.is수뇌){
if(!confirm('수뇌입니다. 임명할까요?')){
return false;
}
}
extDutyWindow(userInfo);
});
$btn.css('border','solid 1px Chocolate').css('background-color','#400000').css('margin-left','4px');
$btn.css('line-hight','20px').css('color','GhostWhite').css('padding','2px 2px').css('height','18px').css('line-height','8px');
//$name.append($btn);
}
});
});
});
}
catch(a){
console.log(a);
}
return false;
};
var loadUser = function(){
$.each(cityList,function(idx,val){
if(typeof val.users == "undefined"){
val.obj.append('<tr><td colspan="12"><table align="center" class="tb_layout cityUser bg0">'+
'<thead><tr>'+
'<td width="100" align="center" class="bg1">이 름</td><td width="100" align="center" class="bg1">통무지</td><td width="100" align="center" class="bg1">부 대</td><td width="60" align="center" class="bg1">자 금</td>'+
'<td width="60" align="center" class="bg1">군 량</td><td width="30" align="center" class="bg1">守</td><td width="60" align="center" class="bg1">병 종</td>'+
'<td width="60" align="center" class="bg1">병 사</td><td width="50" align="center" class="bg1">훈련</td><td width="50" align="center" class="bg1">사기</td><td width="150" align="center" class="bg1">명 령</td>'+
'<td width="60" align="center" class="bg1">삭턴</td><td width="60" align="center" class="bg1">턴</td>'+
'</tr></thead>'+
'<tbody class="cityUserBody"></tbody></table></td></tr>');
val.users = val.obj.find(".cityUserBody");
}
else{
val.users.html("");
}
});
$.get(basicPath+'b_genList.php',function(rawData){
var cnt =0;
var $helper = $('#helper_genlist');
$helper.html('').append($.parseHTML(rawData));
var tmpUsers = $('#general_list tbody tr');
tmpUsers.each(function(idx){
var $this = $(this);
var $city = $this.children('.i_city');
$city.remove();
var cityName = $.trim($city.text());
var $name = $this.children('.i_name');
$name.addClass('nameplate');
var name = $name.find('.t_name').text();
var $work = $this.children('.i_action');
var cityInfo = cityList[cityName];
if(typeof cityInfo == 'undefined'){
return true;
}
if(cityInfo.warn주민)$work.html($work.html().split('정착 장려').join('<span style="color:yellow;">정착 장려</span>'));
if(cityInfo.warn농업)$work.html($work.html().split('농지 개간').join('<span style="color:yellow;">농지 개간</span>'));
if(cityInfo.warn상업)$work.html($work.html().split('상업 투자').join('<span style="color:yellow;">상업 투자</span>'));
if(cityInfo.warn치안)$work.html($work.html().split('치안 강화').join('<span style="color:yellow;">치안 강화</span>'));
if(cityInfo.warn수비)$work.html($work.html().split('수비 강화').join('<span style="color:yellow;">수비 강화</span>'));
if(cityInfo.warn성벽)$work.html($work.html().split('성벽 보수').join('<span style="color:yellow;">성벽 보수</span>'));
var $stat = $this.children('.i_stat');
var stat = $stat.text();
var is수뇌 = stat.indexOf('+')>=0;
$this.data('username',name);
if(cityList[cityName].$태수.text() == name){
cityList[cityName].$태수.html('<span style="color:lightgreen">{0}</span>'.format(name));
}
if(cityList[cityName].$군사.text() == name){
cityList[cityName].$군사.html('<span style="color:lightgreen">{0}</span>'.format(name));
}
if(cityList[cityName].$종사.text() == name){
cityList[cityName].$종사.html('<span style="color:lightgreen">{0}</span>'.format(name));
}
userList[name]={
$city:cityInfo,
city:cityName,
$user:$this,
name:name,
val:'-1',
p태수:false,
p군사:false,
p종사:false,
is수뇌:is수뇌
};
if(cityList[cityName]){
cityList[cityName].users.append($this);
}
});
});
if($("#loadDutyBtn").length == 0){
var $onBossList = $('<button id="loadDutyBtn">인사부 연동</button>');
$onBossList.click(function(){
loadDuty();
return false;
});
$('form').append($onBossList);
}
$('#by_users').show();
};
var mainFunc = function(){
//대상 추출
window.cityList = {};
window.userList = {};
$("form").each(function(){
var $this = $(this);
$this.attr('name','p'+$this.attr('name'));
});
$("table").each(function(idx,val){
$this = $(this);
if($this.attr('class')=='tb_layout bg2'){
$this.addClass('cityInfo');
}
else{
return true;
}
window.$tmpTable = $this;
var cityInfo = {};
//이름 추출
{
var titleText = $this.find('tr:eq(0)>td:eq(0)').text();
var loc0 = titleText.indexOf("【");
var loc1 = titleText.indexOf("|");
var loc2 = titleText.indexOf("】");
var cityLoc = $.trim(titleText.substring(loc0+1,loc1));
var citySize = $.trim(titleText.substring(loc1+1,loc2));
var cityName = $.trim(titleText.substring(loc2+1));
cityName = cityName.replace("[","");
cityName = cityName.replace("]","");
$this.data('cityname',cityName);
cityInfo.지역 = cityLoc;
cityInfo.규모 = citySize;
cityInfo.이름 = cityName;
cityInfo.val = '-1';
cityInfo.p태수 = false;
cityInfo.p군사 = false;
cityInfo.p종사 = false;
}
//주민, 농상치성수
{
var $baseTr = $this.find('tr:eq(1)');
cityInfo.$주민 = $baseTr.find('td:eq(1)');
cityInfo.$농업 = $baseTr.find('td:eq(3)');
cityInfo.$상업 = $baseTr.find('td:eq(5)');
cityInfo.$치안 = $baseTr.find('td:eq(7)');
cityInfo.$수비 = $baseTr.find('td:eq(9)');
cityInfo.$성벽 = $baseTr.find('td:eq(11)');
var tmpVal;
tmpVal = cityInfo.$주민.text().split('/');
cityInfo.주민 = parseInt(tmpVal[0]);
cityInfo.max주민 = parseInt(tmpVal[1]);
tmpVal = cityInfo.$농업.text().split('/');
cityInfo.농업 = parseInt(tmpVal[0]);
cityInfo.max농업 = parseInt(tmpVal[1]);
tmpVal = cityInfo.$상업.text().split('/');
cityInfo.상업 = parseInt(tmpVal[0]);
cityInfo.max상업 = parseInt(tmpVal[1]);
tmpVal = cityInfo.$치안.text().split('/');
cityInfo.치안 = parseInt(tmpVal[0]);
cityInfo.max치안 = parseInt(tmpVal[1]);
tmpVal = cityInfo.$수비.text().split('/');
cityInfo.수비 = parseInt(tmpVal[0]);
cityInfo.max수비 = parseInt(tmpVal[1]);
tmpVal = cityInfo.$성벽.text().split('/');
cityInfo.성벽 = parseInt(tmpVal[0]);
cityInfo.max성벽 = parseInt(tmpVal[1]);
if (cityInfo.주민>cityInfo.max주민*0.9){ cityInfo.$주민.css('color','lightgreen');}
else if (cityInfo.주민>cityInfo.max주민*0.7){ cityInfo.$주민.css('color','yellow');}
else { cityInfo.$주민.css('color','orangered');}
if (cityInfo.농업>cityInfo.max농업*0.8){ cityInfo.$농업.css('color','lightgreen');}
else if (cityInfo.농업>cityInfo.max농업*0.4){ cityInfo.$농업.css('color','yellow');}
else { cityInfo.$농업.css('color','orangered');}
if (cityInfo.상업>cityInfo.max상업*0.8){ cityInfo.$상업.css('color','lightgreen');}
else if (cityInfo.상업>cityInfo.max상업*0.4){ cityInfo.$상업.css('color','yellow');}
else { cityInfo.$상업.css('color','orangered');}
if (cityInfo.치안>cityInfo.max치안*0.8){ cityInfo.$치안.css('color','lightgreen');}
else if (cityInfo.치안>cityInfo.max치안*0.4){ cityInfo.$치안.css('color','yellow');}
else { cityInfo.$치안.css('color','orangered');}
if (cityInfo.수비>cityInfo.max수비*0.6){ cityInfo.$수비.css('color','lightgreen');}
else if (cityInfo.수비>cityInfo.max수비*0.3){ cityInfo.$수비.css('color','yellow');}
else { cityInfo.$수비.css('color','orangered');}
if (cityInfo.성벽>cityInfo.max성벽*0.6){ cityInfo.$성벽.css('color','lightgreen');}
else if (cityInfo.성벽>cityInfo.max성벽*0.3){ cityInfo.$성벽.css('color','yellow');}
else { cityInfo.$성벽.css('color','orangered');}
cityInfo.remain주민 = cityInfo.주민-cityInfo.max주민;
cityInfo.remain농업 = cityInfo.농업-cityInfo.max농업;
cityInfo.remain상업 = cityInfo.상업-cityInfo.max상업;
cityInfo.remain치안 = cityInfo.치안-cityInfo.max치안;
cityInfo.remain수비 = cityInfo.수비-cityInfo.max수비;
cityInfo.remain성벽 = cityInfo.성벽-cityInfo.max성벽;
cityInfo.warn주민 = false;
cityInfo.warn농업 = false;
cityInfo.warn상업 = false;
cityInfo.warn치안 = false;
cityInfo.warn수비 = false;
cityInfo.warn성벽 = false;
if(cityInfo.remain주민 > -10*2000) cityInfo.warn주민 = true;
if(cityInfo.주민 > 0.92*cityInfo.max주민) cityInfo.warn주민 = true;
if(cityInfo.remain농업 > -10*100) cityInfo.warn농업 = true;
if(cityInfo.remain상업 > -10*100) cityInfo.warn상업 = true;
if(cityInfo.remain치안 > -10*100) cityInfo.warn치안 = true;
if(cityInfo.remain수비 > -10*70) cityInfo.warn수비 = true;
if(cityInfo.remain성벽 > -10*70) cityInfo.warn성벽 = true;
if(cityInfo.warn농업) cityInfo.$농업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain농업+']</span>');
if(cityInfo.warn상업) cityInfo.$상업.append('<span class="remain" style="color:yellow;">['+cityInfo.remain상업+']</span>');
if(cityInfo.warn치안) cityInfo.$치안.append('<span class="remain" style="color:yellow;">['+cityInfo.remain치안+']</span>');
if(cityInfo.warn수비) cityInfo.$수비.append('<span class="remain" style="color:yellow;">['+cityInfo.remain수비+']</span>');
if(cityInfo.warn성벽) cityInfo.$성벽.append('<span class="remain" style="color:yellow;">['+cityInfo.remain성벽+']</span>');
}
//태수,군사,종사
{
var $baseTr = $this.find('tr:eq(2)');
cityInfo.$태수 = $baseTr.find('td:eq(7)');
cityInfo.$군사 = $baseTr.find('td:eq(9)');
cityInfo.$종사 = $baseTr.find('td:eq(11)');
}
//기타
{
cityInfo.userCnt = $this.find('tr:eq(3) td:eq(1)').text().split(',').length -1;
}
cityInfo.obj = $this;
cityList[cityInfo.이름] = cityInfo;
});
var $onGenList = $('<button type="button">암행부 연동</button>');
$onGenList.click(function(){
loadUser();
return false;
});
$('form').append($onGenList);
$('table:eq(0) tr:last').after('<tr><td id="sort_more"></td></tr>');
$sort_more = $('#sort_more');
$sort_more.html('재 정렬 순서 :');
var sortIt = function(callback){
var arCity = [];
$('.cityInfo').each(function(){
var $this = $(this);
var cityName = $this.data('cityname');
var cityInfo = cityList[cityName];
arCity.push(cityInfo);
});
arCity = mergeSort(arCity,callback);
//console.log(arCity);
var $anchor = $('.anchor');
//console.log($anchor);
$('body > br').remove();
$('.cityInfo').detach();
$.each(arCity,function(idx,val){
$anchor.before('<br>');
$anchor.before(val.obj);
});
$anchor.before('<br>');
};
var $btn;
$btn = $('<button type="button">도시명</button>').click(function(){
sortIt(function(a,b){
return a.이름.localeCompare(b.이름);
});
});
$sort_more.append($btn);
$btn = $('<button type="button">인구율</button>').click(function(){
sortIt(function(a,b){
return 1.0*a.주민/a.max주민 - 1.0*b.주민/b.max주민;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 주민</button>').click(function(){
sortIt(function(a,b){
return a.remain주민 - b.remain주민;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 농업</button>').click(function(){
sortIt(function(a,b){
return a.remain농업 - b.remain농업;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 상업</button>').click(function(){
sortIt(function(a,b){
return a.remain상업 - b.remain상업;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 치안</button>').click(function(){
sortIt(function(a,b){
return a.remain치안 - b.remain치안;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 수비</button>').click(function(){
sortIt(function(a,b){
return a.remain수비 - b.remain수비;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">남은 성벽</button>').click(function(){
sortIt(function(a,b){
return a.remain성벽 - b.remain성벽;
});
});
$sort_more.append($btn);
$btn = $('<button type="button">배치 장수 수</button>').click(function(){
sortIt(function(a,b){
return b.userCnt - a.userCnt;
});
});
$sort_more.append($btn);
};
mainFunc();
});
-263
View File
@@ -1,263 +0,0 @@
$(function(){
var basicPath = document.location.pathname;
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
var headTbl = $('table:eq(0)');
var $userFrame;
var 국가테이블= $('table:gt(0):lt(-2)');
var getUserType = function(,,){
var = ++;
if( < 40){
if(+ < 40){
return "무능";
}
return "무지";
}
var 최대능력치 = Math.max(, , );
var 능력치2합 = Math.min(+, +, +);
if(최대능력치 >= 70 && 능력치2합 >= 최대능력치 * 1.7){
return "만능";
}
if( >= 60 && < *0.8){
return "무";
}
if( >= 60 && < *0.8){
return "지";
}
if( >= 60 && + < ){
return "통";
}
return "평범";
};
function formatScore(x) {
console.log(x);
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
var runAnalysis = function(){
var $content = $('#on_mover .content');
$.get(basicPath+'a_genList.php',function(rawData){
try{
var $html = $(rawData);
var $장수일람 = {};
var 국가별 = {};
var cnt =0;
$html.each(function(idx){
if(this.tagName == "TABLE"){
cnt+=1;
if(cnt==2){
$장수일람 = $(this);
return false;
}
}
});
$장수일람.find('tr:gt(0)').each(function(){
var 장수 = {};
$this = $(this);
$tds = $this.find('td');
var 장수명 = $.trim($tds.eq(1).text());
var 국가 = $.trim($tds.eq(6).text());
var 부상 = $this.data('general-wounded');
장수.html = $this.clone();
장수.장수명 = 장수명;
장수.국가 = 국가;
장수.벌점 = parseInt($tds.eq(-1).text());
장수. = parseInt($this.data('general-leadership'));
장수. = parseInt($this.data('general-strength'));
장수. = parseInt($this.data('general-intel'));
장수.삭턴 = parseInt($tds.eq(-2).text());
장수.종류 = getUserType(장수., 장수., 장수.);
장수.NPC = $this.data('is-npc');
if(!(국가 in 국가별)){
국가별[국가] = {};
국가별[국가].만능 = [];
국가별[국가]. = [];
국가별[국가]. = [];
국가별[국가]. = [];
국가별[국가].평범 = [];
국가별[국가].무지 = [];
국가별[국가].무능 = [];
//국가별[국가].NPC = [];
}
//if(장수.NPC) 국가별[국가].NPC.push(장수);
국가별[국가][장수.종류].push(장수);
장수.html.hide();
$content.append(장수.html);
});
국가테이블.each(function(idx){
var $this = $(this);
var $tbl = $this;
var $td = $this.find('td:last');
var name = $.trim($this.find('td:first').text());
name = name.substr(2,name.length-4);
var 국가정보 = 국가별[name];
var total = 0;
var 전투유저장수 = 0;
var 통솔합 = 0;
var 삭턴장수 = 0;
var 전투N장수 = 0;
var N장통솔합 = 0;
$td.html('<p class="sum" style="margin:0;font-weight:bold;color:yellow;text-align:center"></p>');
$td.css('text-indent','-5.8em').css('padding-left','5.8em');
for(var 종류명 in 국가정보){
var $p = $("<p></p>").css('margin','0');
var 테이블 = 국가정보[종류명];
if(테이블.length == 0)continue;
테이블.sort(function(, ){
if(.벌점 == .벌점){
return .장수명 > .장수명 ? 1 : 0;
}
return .벌점 - .벌점
});
var text = "  "+종류명;
text = text.substr(text.length-2);
$p.append(text+'장(');
text = ""+테이블.length;
$p.append(text + ')');
if(text.length<3){
$p.append("<span style='display:inline-block;width:"+(3-text.length)/2+"em;'>&nbsp;</span>");
}
$p.append(': ');
total += 테이블.length;
$.each(테이블,function(idx,val){
var 종능 = val. + val. + val.;
console.log(val);
if(종류명 != '무능' && 종류명 != '무지'){
if(val.삭턴 >= 80 && !val.NPC){
전투유저장수 += 1;
통솔합 += val.;
}
if(val.삭턴 > 5 && val.NPC){
전투N장수 += 1;
N장통솔합 += val.;
}
}
var $obj = $('<span></span>');
var $obj2 = $('<span></span>');
$obj.html(val.장수명);
if(!val.NPC && val.삭턴 < 80){
$obj.css('text-decoration','line-through');
삭턴장수+=1;
}
if(val.NPC){
$obj.css('color','cyan');
}
if(val.벌점 >= 1500) $obj.css('color','yellow');
else if(val.벌점 >= 200) $obj.css('color','lightgreen');
$obj2.append($obj);
if(idx < 테이블.length-1){
$obj2.append(', ');
}
$p.append($obj2);
$obj2.hover(function(){
var top = $tbl.offset().top + $tbl.outerHeight() + 3;
$userFrame.css('top',top);
val.html.show();
$userFrame.show();
console.log('올림!'+val.장수명);
},function(){
$userFrame.hide();
val.html.hide();
console.log('내림!'+val.장수명);
});
});
$td.append($p);
}
var result = "* 총("+total+"), 전투장("+전투유저장수+", 약 "+formatScore(통솔합*100)+"명), 전투N장("+전투N장수+", 약 "+formatScore(N장통솔합*100)+"명), 삭턴장("+삭턴장수+") *";
$tbl.find('.sum').html(result);
});
}
catch(err){
console.log(err);
}
});
}
$userFrame = $('<div id="on_mover" style="position:absolute;">'+
'<table class="tb_layout bg0" style="width:100%;"><thead><tr>'+
'<td width="64" align="center" class="bg1">얼 굴</td>'+
'<td width="100" align="center" class="bg1">이 름</td>'+
'<td width="50" align="center" class="bg1">연령</td>'+
'<td width="50" align="center" class="bg1">성격</td>'+
'<td width="90" align="center" class="bg1">특기</td>'+
'<td width="50" align="center" class="bg1">레 벨</td>'+
'<td width="100" align="center" class="bg1">국 가</td>'+
'<td width="60" align="center" class="bg1">명 성</td>'+
'<td width="60" align="center" class="bg1">계 급</td>'+
'<td width="80" align="center" class="bg1">관 직</td>'+
'<td width="45" align="center" class="bg1">통솔</td>'+
'<td width="45" align="center" class="bg1">무력</td>'+
'<td width="45" align="center" class="bg1">지력</td>'+
'<td width="45" align="center" class="bg1">삭턴</td>'+
'<td width="84" align="center" class="bg1">벌점</td>'+
'</tr></thead><tbody class="content"></tbody></table></div>');
$userFrame.find('thead td');
$userFrame.css('width','1000px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-500px');
$userFrame.css('box-shadow','0px 0px 7px 3px rgba(255,255,255,50)');
$userFrame.hide();
$('body').append($userFrame);
var $frame = $('table:eq(0) td:eq(0)');
$frame.find('br:last').remove();
var $btn = $('<input type="button" value="장수 일람 연동">');
$btn.click(function(){
runAnalysis();
$btn.prop("disabled",true);
var $tr0 = $('table:eq(0) tr:eq(0)');
$tr0.append('<td><strong>*벌점 순 정렬*</strong><br><span style="color:yellow">벌점 1500점 이상</span>, <span style="color:lightgreen">벌점 200점 이상</span>, '+
'<span style="text-decoration:line-through">삭턴장</span>, <span style="color:cyan">ⓝ장</span>'+'<br><strong>전투장 :</strong> 만능장 + 무장 + 지장 + 평범장 - 삭턴자(만능, 무, 지, 평범) </td>');
});
$frame.append($btn);
});
-116
View File
@@ -1,116 +0,0 @@
$(function(){
var userList = {};
var groupList = {};
var tGroup = [];
var basicPath = document.location.pathname;
basicPath = basicPath.substring(0, basicPath.lastIndexOf('/'))+'/';
var $userFrame;
window.userList = userList;
var runAnalysis = function(){
$.each(groupList,function(idx,val){
val.list = [];
});
userList = [];
var $content = $('#on_mover .content');
$content.html('');
$.get(basicPath+'b_genList.php',function(rawData){
try{
$html = $(rawData);
var cnt =0;
var tmpUsers = {};
$html.each(function(idx){
var $this = $(this);
if($this.attr('id') == "general_list"){
tmpUsers = $(this);
return false;
}
});
tmpUsers.find("tbody > tr").each(function(idx){
var $this = $(this);
var $부대 = $this.children('.i_troop');
var 부대 = $.trim($부대.text());
if(부대 == '-'){
//부대 안탔음!
return true;
}
$부대.remove();
var generalID = parseInt($this.data('general-id'));
userList[generalID] = $this;
$this.hide();
$content.append($this);
});
$('.troopUser').hover(function(){
var $this = $(this);
var parent = $this.closest('tr');
var generalID = parseInt($this.data('general-id'));
console.log(generalID);
var top = parent.offset().top + parent.outerHeight();
$userFrame.css('top',top);
userList[generalID].show();
$userFrame.show();
},function(){
var $this = $(this);
var parent = $this.closest('tr');
var generalID = parseInt($this.data('general-id'));
userList[generalID].hide();
$userFrame.hide();
});
}
catch(err){
console.log(err);
}
});
};
var $frame = $('table:eq(0) td:eq(0)');
$frame.find('br:last').remove();
var $btn = $('<input type="button" value="암행부 연동">');
$btn.click(function(){
runAnalysis();
});
$frame.append($btn);
$userFrame = $("<div id='on_mover' style='position:absolute;'>"+
"<table class='tb_layout bg0' style='width:100%;'><thead>"+
"<tr>"+
"<td width=98 class='bg1 center'>이 름</td>"+
"<td width=98 class='bg1 center'>통무지</td>"+
"<td width=53 class='bg1 center'>자 금</td>"+
"<td width=53 class='bg1 center'>군 량</td>"+
"<td width=48 class='bg1 center'>도시</td>"+
"<td width=28 class='bg1 center'>守</td>"+
"<td width=58 class='bg1 center'>병 종</td>"+
"<td width=63 class='bg1 center'>병 사</td>"+
"<td width=38 class='bg1 center'>훈련</td>"+
"<td width=38 class='bg1 center'>사기</td>"+
"<td width=213 class='bg1 center'>명 령</td>"+
"<td width=38 class='bg1 center'>삭턴</td>"+
"<td width=48 class='bg1 center'>턴</td>"+
"</tr>"+
"</thead></thead><tbody class='content'></tbody></table></div>");
$userFrame.find('thead td');
$userFrame.css('width','960px').css('margin','0').css('padding','0').css('left','50%').css('margin-left','-480px');
$userFrame.hide();
$('body').append($userFrame);
});
-10
View File
@@ -1,10 +0,0 @@
jQuery(function($){
$('#by_scenario').change(function(){
var $this = $(this);
var scenarioIdx = $this.val();
var seasonIdx = $(this).find('option:selected').data('season');
$.redirect('a_hallOfFame.php', {scenarioIdx:scenarioIdx, seasonIdx:seasonIdx}, 'get');
})
});
-31
View File
@@ -1,31 +0,0 @@
jQuery(function($){
var currYear = startYear;
var currMonth = startMonth;
var $yearMonth = $('#yearmonth');
var $elements = $();
var endDate = lastYear * 12 + lastMonth - 1;
var currDate = startYear * 12 + startMonth - 1;
while(currDate <= endDate){
var target = currYear*100 + currMonth;
var sel = '';
if(currYear == selectYear && currMonth == selectMonth){
sel = 'selected="selected"';
}
var option = $('<option value="{0}" {1} >{2}년 {3}월</option>'.format(target, sel, currYear, currMonth));
$elements = $elements.add(option);
currMonth += 1;
if(currMonth > 12){
currYear += 1;
currMonth -= 12;
}
currDate += 1;
}
$yearMonth.empty();
$yearMonth.append($elements);
});
-213
View File
@@ -1,213 +0,0 @@
/*
function showCityGeneral(cityIdx){
}
*/
/*
function loadScenarioPreview(scenarioIdx){
$(function(){
reloadWorldMap({
clickableAll:true,
selectCallback:showCityGeneral,
hrefTemplate:'#',
neutralView:true,
showMe:false,
targetJson:'j_get_scenario_map.php?scenarioIdx={0}'.format(scenarioIdx)
});
});
}
*/
function loadScenarios(){
$.ajax({
method:'post',
url:'j_load_scenarios.php',
dataType:'json'
}).then(function(result){
if(!result.result){
var deferred = $.Deferred();
deferred.reject('fail');
return deferred.promise();
}
var list = {};
$.each(result.scenario, function(idx, value){
var title = value.title || "-";
var pat = /【(.*?)[0-9\-_\.a-zA-Z]*】/;
var category = pat.exec(title);
category = category?category[1]:'-';
value.title = title;
value.category = category;
value.idx = idx;
value.year = value.year || 180;
if(!(category in list)){
list[category] = {};
}
list[category][idx] = value;
});
var $select = $('#scenario_sel');
$.each(list, function(category, items){
var $optgroup = $('<optgroup>').attr('label', category);
$.each(items, function(idx, scenario){
var $option = $('<option>')
.data('scenario',scenario)
.val(idx)
.html(scenario.title);
$optgroup.append($option);
});
$select.append($optgroup);
});
$select.val(0);
$select.change();
});
}
function scenarioPreview(){
var $select = $(this);
var $option = $select.find('option:selected');
var $year = $('#scenario_begin');
var $npc = $('#scenario_npc');
var $npcEx = $('#scenario_npc_extend');
var $nation = $('#scenario_nation');
var scenario = $option.data('scenario');
console.log(scenario.idx, scenario.title);
$year.html('{0}년'.format(scenario.year));
$npc.html('{0}명'.format(scenario.npc_cnt));
if(scenario.npcEx_cnt == 0){
$npcEx.html('');
}
else{
$npcEx.html('+{0}명'.format(scenario.npcEx_cnt));
}
$nation.html('');
$.each(scenario.nation, function(idx, nation){
$nation.append('<span style="color:{0}">{1}</span> {2}명. {3}<br>'.format(
nation.color, nation.name, nation.generals, nation.cities.join(', ')
));
});
}
function formSetup(){
$.validator.addMethod("autorun_user", function(value,element){
var parent = $(element).parent('.input-group');
var checkCnt = parent.find('input:checked').length;
if(value <= 0){
if(checkCnt > 0){
return false;
}
return true;
}
if(checkCnt == 0){
return false;
}
return true;
}, "유효 시간과 옵션은 동시에 설정해야합니다.");
$('#game_form').validate({
rules:{
turnterm:"required",
sync:"required",
scenario:"required",
fiction:"required",
extend:"required",
npcmode:"required",
show_img_level:"required",
tournament_trig:"required",
join_mode:'required',
autorun_user_minutes:{required: true, autorun_user: true, min:0}
},
errorElement: "div",
errorPlacement: function ( error, element ) {
// Add the `help-block` class to the error element
error.addClass( "invalid-feedback" );
if ( element.prop( "type" ) === "checkbox" ) {
error.insertAfter( element.parent( "label" ) );
} else {
error.insertAfter( element );
}
},
highlight: function ( element, errorClass, validClass ) {
$( element ).addClass( "is-invalid" ).removeClass( "is-valid" );
},
unhighlight: function (element, errorClass, validClass) {
$( element ).addClass( "is-valid" ).removeClass( "is-invalid" );
}
});
$('#game_form').submit(function(e){
e.preventDefault();
if(!$("#game_form").valid()){
return;
}
var autorun_user_minutes = parseInt($('#autorun_user_minutes').val());
var autorun_user = [];
if(autorun_user_minutes > 0){
$('.autorun_user_chk:checked').each(function(){
autorun_user.push($(this).data('key'));
});
}
$.ajax({
cache:false,
type:'post',
url:'j_install.php',
dataType:'json',
data:{
turnterm:$('#turnterm input:radio:checked').val(),
sync:$('#sync input:radio:checked').val(),
scenario:$('#scenario_sel').val(),
fiction:$('#fiction input:radio:checked').val(),
extend:$('#extend input:radio:checked').val(),
npcmode:$('#npcmode input:radio:checked').val(),
show_img_level:$('#show_img_level input:radio:checked').val(),
tournament_trig:$('#tournament_trig input:radio:checked').val(),
reserve_open:$('#reserve_open').val(),
pre_reserve_open:$('#pre_reserve_open').val(),
join_mode:$('#join_mode input:radio:checked').val(),
autorun_user_minutes:autorun_user_minutes,
autorun_user:autorun_user
}
}).then(function(result){
var deferred = $.Deferred();
if(!result.result){
alert(result.reason);
deferred.reject('fail');
}
else{
alert('게임이 리셋되었습니다.');
deferred.resolve();
}
return deferred.promise();
}).then(function(){
location.href = '..';
});
});
}
$(function(){
loadScenarios();
$('#scenario_sel').change(scenarioPreview);
formSetup();
})
-65
View File
@@ -1,65 +0,0 @@
$(document).ready( function () {
$('#db_form').validate({
rules:{
db_host:"required",
db_port:"required",
db_id:"required",
db_pw:"required",
db_name:"required"
},
errorElement: "div",
errorPlacement: function ( error, element ) {
// Add the `help-block` class to the error element
error.addClass( "invalid-feedback" );
if ( element.prop( "type" ) === "checkbox" ) {
error.insertAfter( element.parent( "label" ) );
} else {
error.insertAfter( element );
}
},
highlight: function ( element, errorClass, validClass ) {
$( element ).addClass( "is-invalid" ).removeClass( "is-valid" );
},
unhighlight: function (element, errorClass, validClass) {
$( element ).addClass( "is-valid" ).removeClass( "is-invalid" );
}
});
$('#db_form').submit(function(e){
e.preventDefault();
if(!$("#db_form").valid()){
return;
}
$.ajax({
cache:false,
type:'post',
url:'j_install_db.php',
dataType:'json',
data:{
full_reset:$('#full_reset input:radio:checked').val(),
db_host:$('#db_host').val(),
db_port:$('#db_port').val(),
db_id:$('#db_id').val(),
db_pw:$('#db_pw').val(),
db_name:$('#db_name').val()
}
}).then(function(result){
var deferred = $.Deferred();
if(!result.result){
alert(result.reason);
deferred.reject('fail');
}
else{
alert('DB.php가 생성되었습니다.');
deferred.resolve();
}
return deferred.promise();
}).then(function(){
location.href = 'install.php';
});
});
});
-205
View File
@@ -1,205 +0,0 @@
jQuery(function($){
var $leadership = $('#leadership');
var $strength = $('#strength');
var $intel = $('#intel');
function abilityRand(){
var leadership = Math.random()*65 + 10;
var strength = Math.random()*65 + 10;
var intel = Math.random()*65 + 10;
var rate = leadership + strength + intel;
leadership = Math.floor(leadership / rate * defaultStatTotal);
strength = Math.floor(strength / rate * defaultStatTotal);
intel = Math.floor(intel / rate * defaultStatTotal);
while(leadership+strength+intel < defaultStatTotal){
leadership+=1;
}
if(leadership > defaultStatMax || strength > defaultStatMax || intel > defaultStatMax || leadership < defaultStatMin || strength < defaultStatMin || intel < defaultStatMin){
return abilityRand();
}
$leadership.val(leadership);
$strength.val(strength);
$intel.val(intel);
}
function abilityLeadpow(){
var leadership = Math.random() * 6;
var strength = Math.random() * 6;
var intel = Math.random() * 1;
var rate = leadership + strength + intel;
leadership = Math.floor(leadership / rate * defaultStatTotal);
strength = Math.floor(strength / rate * defaultStatTotal);
intel = Math.floor(intel / rate * defaultStatTotal);
while(leadership+strength+intel < defaultStatTotal){
strength+=1;
}
if(intel < defaultStatMin){
leadership -= defaultStatMin - intel;
intel = defaultStatMin;
}
if(leadership > defaultStatMax){
strength += leadership - defaultStatMax;
leadership = defaultStatMax;
}
if(strength > defaultStatMax){
leadership += strength - defaultStatMax;
strength = defaultStatMax;
}
if(leadership > defaultStatMax){
intel += leadership - defaultStatMax;
leadership = defaultStatMax;
}
$leadership.val(leadership);
$strength.val(strength);
$intel.val(intel);
}
function abilityLeadint(){
var leadership = Math.random() * 6;
var strength = Math.random() * 1;
var intel = Math.random() * 6;
var rate = leadership + strength + intel;
leadership = Math.floor(leadership / rate * defaultStatTotal);
strength = Math.floor(strength / rate * defaultStatTotal);
intel = Math.floor(intel / rate * defaultStatTotal);
while(leadership+strength+intel < defaultStatTotal){
intel+=1;
}
if(strength < defaultStatMin){
leadership -= defaultStatMin - strength;
strength = defaultStatMin;
}
if(leadership > defaultStatMax){
intel += leadership - defaultStatMax;
leadership = defaultStatMax;
}
if(intel > defaultStatMax){
leadership += intel - defaultStatMax;
intel = defaultStatMax;
}
if(leadership > defaultStatMax){
strength += leadership - defaultStatMax;
leadership = defaultStatMax;
}
$leadership.val(leadership);
$strength.val(strength);
$intel.val(intel);
}
function abilityPowint(){
var leadership = Math.random() * 1;
var strength = Math.random() * 6;
var intel = Math.random() * 6;
var rate = leadership + strength + intel;
leadership = Math.floor(leadership / rate * defaultStatTotal);
strength = Math.floor(strength / rate * defaultStatTotal);
intel = Math.floor(intel / rate * defaultStatTotal);
while(leadership+strength+intel < defaultStatTotal){
intel+=1;
}
if(leadership < defaultStatMin){
strength -= defaultStatMin - leadership;
leadership = defaultStatMin;
}
if(strength > defaultStatMax){
intel += strength - defaultStatMax;
strength = defaultStatMax;
}
if(intel > defaultStatMax){
strength += intel - defaultStatMax;
intel = defaultStatMax;
}
if(strength > defaultStatMax){
leadership += strength - defaultStatMax;
strength = defaultStatMax;
}
$leadership.val(leadership);
$strength.val(strength);
$intel.val(intel);
}
window.abilityRand = abilityRand;
window.abilityLeadpow = abilityLeadpow;
window.abilityLeadint = abilityLeadint;
window.abilityPowint = abilityPowint;
var $charInfoText = $('#charInfoText');
var $selChar = $('#selChar');
$selChar.change(function(){
var $this = $(this);
var char = $this.val();
if(char in charInfoText){
$charInfoText.html(charInfoText[char]);
}
else{
$charInfoText.html('');
}
});
var $generalName = $('#generalName');
if($generalName.on('change keyup paste', function(){
var generalName = $generalName.val();
var len = mb_strwidth(generalName);
if(len == 0 || len > 18){
$generalName.css('color','red');
}
else{
$generalName.css('color','white');
}
}));
$('#join_form').submit(function(){
var generalName = $generalName.val();
if(mb_strwidth(generalName) > 18){
alert('장수 이름이 너무 깁니다!');
return false;
}
var currentStatTotal = parseInt($leadership.val()) + parseInt($strength.val()) + parseInt($intel.val());
if(currentStatTotal < defaultStatTotal){
if(!confirm('현재 능력치 총합은 {0}으로, {1}보다 낮습니다. 장수 생성을 진행할까요?'.format(currentStatTotal, defaultStatTotal))){
return false;
}
}
return true;
});
var randomGenType = Math.floor(Math.random()*7);
if(randomGenType < 3){
abilityLeadpow();
}
else if(randomGenType < 6){
abilityLeadint();
}
else{
abilityPowint();
}
});
-8
View File
@@ -1,8 +0,0 @@
{
"typeAcquisition": {
"include": [
"jquery"
]
}
}
-155
View File
@@ -1,155 +0,0 @@
jQuery(function($){
$('#refreshPage').click(function(){
document.location.reload();
return false;
});
function reloadCommandList(){
$.get({
url:'j_get_reserved_command.php',
dataType:'json',
cache: false,
}).then(function(data){
if(!data){
return;
}
if(!data.result){
return;
}
var game_clock = moment(data.date);
var now_clock = moment();
var $clock = $('#clock');
$clock.data('time-diff', game_clock.diff(now_clock));
$clock.val(game_clock.format('YYYY-MM-DD HH:mm:ss'));
var turnTime = moment(data.turnTime);
var nextTurnTime = turnTime.clone();
var year = data.year;
var month = data.month;
$.each(data.turn, function(turnIdx, turnInfo){
var $tr = $('#command_{0}'.format(turnIdx));
$tr.find('.time_pad').text(nextTurnTime.format('HH:mm'));
$tr.find('.month_pad').text('{0}年 {1}月'.format(year, month));
var $turn_pad = $tr.find('.turn_pad');
var $turn_text = $turn_pad.find('.turn_text');
$turn_text.text(turnInfo.brief).css('font-size','13px');
var oWidth = $turn_pad.innerWidth();
var iWidth = $turn_text.outerWidth();
if(iWidth > oWidth * 0.95){
var newFontSize = 13 * oWidth / iWidth * 0.9;
$turn_text.css('font-size', '{0}px'.format(newFontSize));
}
nextTurnTime.add(data.turnTerm, 'minutes');
month+=1;
if(month >= 13){
year += 1;
month -= 12;
}
});
console.log(data);
});
}
function myclock() {
var $clock = $('#clock');
var now_clock = moment();
if($clock.data('time-diff') == null){
return;
}
var game_clock = now_clock.add(parseInt($clock.data('time-diff')), 'milliseconds');
$('#clock').val(game_clock.format('YYYY-MM-DD HH:mm:ss'));
}
function pushTurn(pushAmount){
$.post({
url:'j_general_turn.php',
dataType:'json',
data:{
amount:pushAmount
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadCommandList();
}, errUnknown);
}
function repeatTurn(repeatAmount){
$.post({
url:'j_general_turn.php',
dataType:'json',
data:{
amount:repeatAmount,
is_repeat:true
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadCommandList();
}, errUnknown);
}
$('#pullTurn').click(function(){
pushTurn(-parseInt($('#repeatAmount').val()));
});
$('#pushTurn').click(function(){
pushTurn(parseInt($('#repeatAmount').val()));
});
$('#repeatTurn').click(function(){
repeatTurn(parseInt($('#repeatAmount').val()));
});
function reserveTurn(turnList, command){
console.log(turnList, command);
$.post({
url:'j_set_general_command.php',
dataType:'json',
data:{
action:command,
turnList:turnList
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadCommandList();
}, errUnknown);
}
$('#reserveTurn').click(function(){
var turnList = $('#generalTurnSelector').val().map(function(v){return parseInt(v);});
var $command = $('#generalCommandList option:selected');
if($command.data('reqarg')){
$.redirect(
"b_processing.php", {
command: $command.val(),
turnList: turnList.join('_')
}, "GET");
}
else{
reserveTurn(turnList, $command.val());
}
return false;
})
setInterval(myclock, 500);
reloadCommandList();
});

Some files were not shown because too many files have changed in this diff Show More