Compare commits

..
509 Commits
Author SHA1 Message Date
Hide_D 65aa4c29a4 NPC 버그 수정, NPC 징병 룰 변경
징병시 최대 통솔 반영
발령 시 인구 바닥난 곳 고려 안하던 것 보정
징병 기준을 통솔과 관계없이 40000명인 경우에 시도하던 버그 수정
NPC는 30000 + 20000 일 경우에만 징병함.
2019-11-10 04:08:48 +09:00
Hide_D e75b6f2d5b miniche_b js 등록 2019-10-25 18:40:32 +09:00
Hide_D dbc758095f miniche_b 추가 2019-10-24 02:19:46 +09:00
Hide_D 57a94e4a7d 연감 버그 수정 2019-10-16 02:34:46 +09:00
Hide_D 50526383f9 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-10-16 02:32:51 +09:00
Hide_D 639b1dcac7 연감 출력 개선 2019-10-16 02:32:44 +09:00
Hide_D a984651888 포켓몬 맵 js 등록 2019-10-04 01:18:45 +09:00
Hide_D a8befe5478 찐 유저무쌍 추가 2019-10-03 23:39:47 +09:00
Hide_D 43ba732aad 기본 증축량 버그 수정 2019-10-03 21:15:52 +09:00
Hide_D 158068273e 포켓몬스터 전콘 안뜨는 문제 수정 2019-10-03 20:52:51 +09:00
Hide_D 94a00dbdac 포켓몬 v1 추가 2019-10-03 19:50:22 +09:00
Hide_D fedc7e5ef5 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-10-03 15:12:35 +09:00
Hide_D 78ff016def 감축 조건 변경, 증/감축시 변화량을 지정가능하도록 변경 2019-10-03 15:12:25 +09:00
Hide_D 30d8324a0a 핫픽스 2019-10-02 13:37:30 +09:00
Hide_D de1fa34922 병력없을 때 공격 루틴 타는 것 방지 2019-10-01 22:06:38 +09:00
Hide_D a74b9a5e80 서신전달 빈칸 입력 테스트 2019-09-28 11:54:19 +09:00
Hide_D 79a199cbd3 자동 진행 모드일 때 모반이 거의 항상 가능해지는 버그 수정 2019-09-28 07:56:32 +09:00
Hide_D 2f2062c9e5 랜임코드 버그 수정 2019-09-26 18:42:51 +09:00
Hide_D 1dcace7a62 자율행동 항상 유효 변경 2019-09-25 02:17:27 +09:00
Hide_D 8f107b56b3 서버에서 자율행동란에 시간 추가, tooltip에 copyable_info 추가 2019-09-25 02:14:49 +09:00
Hide_D 8c6afee7c9 부대장 사망의 경우도 고려 2019-09-24 07:34:55 +09:00
Hide_D d4982f3ed9 README.md 변경 2019-09-23 01:19:49 +09:00
Hide_D f2a785f2fc imagePull 기능 추가, 인스톨러 완성 2019-09-23 00:28:15 +09:00
Hide_D 6fafcfae4e 훈사 분리 2019-09-21 23:27:43 +09:00
Hide_D 33e075f669 훈사를 분리 2019-09-21 21:29:20 +09:00
Hide_D e5fc467c4e 버그 수정 2019-09-21 21:04:17 +09:00
Hide_D b7a5de49c6 표기 일부 변경 2019-09-21 18:09:37 +09:00
Hide_D 3f145abd6f 모훈사 기준을 징병 6회로 변경 2019-09-21 17:39:13 +09:00
Hide_D 4612834870 워프 기준, 쌀 삼팜 기준 변경 2019-09-21 14:41:23 +09:00
Hide_D 83c5609fad 징병 버그 수정 2 2019-09-21 11:42:10 +09:00
Hide_D d142056098 징병 안되는 버그 수정 2019-09-21 11:39:51 +09:00
Hide_D 4d8ecf4191 진짜로 삭턴 버그 수정 2019-09-21 02:44:00 +09:00
Hide_D af6c3f466d 삭턴 버그 수정 2019-09-21 02:38:06 +09:00
Hide_D 033a2d8674 삭턴 버그 수정 2019-09-21 02:35:15 +09:00
Hide_D 9079788b2b 삭턴 기준 변경 2019-09-21 02:33:39 +09:00
Hide_D 44ddb2e480 git fetch에도 -q 2019-09-21 02:28:49 +09:00
Hide_D 295ba84071 자동 행동 세부를 툴팁으로 2019-09-21 02:27:05 +09:00
Hide_D 8773250aab 초기 병종이 보병일 때 고정되는 버그 수정 2019-09-21 02:14:25 +09:00
Hide_D c5a4602fe1 옵션 표기 버그 수정 2019-09-21 02:11:54 +09:00
Hide_D 5f4c43baf6 Merge branch 'devel' into autorun 2019-09-21 02:07:26 +09:00
Hide_D 0ef3921e17 update 서버 변경 2019-09-21 02:06:49 +09:00
Hide_D efcf0f772e server checkout 추가2 2019-09-21 01:50:36 +09:00
Hide_D ccabe847bb 루트도 git tree-ish 지정 가능 2019-09-21 01:42:21 +09:00
Hide_D 45ed63ffe3 버그 수정 2019-09-21 01:38:29 +09:00
Hide_D 7bebbe3a16 징병, 모병 추가 2019-09-21 01:09:17 +09:00
Hide_D 53ba1db79f autorun_user 초기 세팅 2019-09-20 02:12:42 +09:00
Hide_D 76c306a122 npc AI를 '사전 턴' 수행 이후에 처리하도록 변경 2019-09-20 00:41:38 +09:00
Hide_D 89c2c163cb 서버 정보에 자동행동 표기 2019-09-20 00:35:13 +09:00
Hide_D 8826061266 autorun_user 인자 세팅 2019-09-20 00:05:40 +09:00
Hide_D e684877c94 리셋 화면에서 '휴식 턴 시 장수 턴' 추가 2019-09-19 02:21:51 +09:00
Hide_D 12c8152901 docker 메시지 수정 2019-09-19 01:16:21 +09:00
Hide_D 8ba20bf4d2 Docker를 이용한 설치 안내 2019-09-15 23:25:11 +09:00
Hide_D 0bc1ad09d1 년도 변경 2019-09-15 23:19:04 +09:00
Hide_D 231c79132a run_daemon 1분 유지 수정 2019-09-15 20:59:35 +09:00
Hide_D 089803c599 cron 수정 2019-09-15 20:53:23 +09:00
Hide_D 4ea373aff6 gitignore change 2019-09-15 20:08:57 +09:00
Hide_D 0d94b8c742 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-09-15 19:49:32 +09:00
Hide_D d444f19043 date_default_timezone_set 해제 2019-09-15 19:49:24 +09:00
Hide_D 87a0e73c96 인스톨러 버그 수정 2019-09-15 02:59:38 +09:00
Hide_D b5922095f0 인스톨러 임시 트윅 2019-09-15 02:50:10 +09:00
Hide_D 3fee29e9e9 setup_db에서 global_salt 추가 2019-09-15 00:55:57 +09:00
Hide_D 4e351b3be8 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-09-15 00:38:00 +09:00
Hide_D 3432b900df 설치 직후 기본 gitpath 변경 2019-09-15 00:37:46 +09:00
Hide_D fb7c67f317 빙의 안되는 버그 수정, 가입/빙의 시 락 2019-08-18 18:01:11 +09:00
Hide_D 28d5a5c39a 장수 생성시 빠르게 쿼리를 날려 중복 생성하는 것이 불가능하도록 2019-08-18 17:50:38 +09:00
Hide_D e2754511d9 부대탈퇴 시 propergation 처리 실수 수정 2019-08-18 00:46:39 +09:00
Hide_D 71d179de76 서버 시간을 더 정교하게 반영하도록 수정 2019-08-16 23:42:46 +09:00
Hide_D 08523852da 마지막 남은 iframe 안녕!!! 2019-08-16 23:27:28 +09:00
Hide_D 3dd52942d2 부대 명령을 json api로 변경 2019-08-16 22:16:28 +09:00
Hide_D bb24e45028 서버가 오픈되지 않으면 벌점이 늘지 않도록 변경 2019-08-15 19:37:03 +09:00
Hide_D f8c72a6a0a NPC기술연구 관련 마저 고침 2019-08-15 16:10:39 +09:00
Hide_D fa246ff810 단순 건국 상품 롤백 2019-08-15 00:37:49 +09:00
Hide_D 1a1d384a3e 최종 보정 수정 2019-08-14 01:36:41 +09:00
Hide_D 6d85c609fd 동시에 관직이 여러번 뛸때에도 관직 보상 많이 줌 2019-08-14 01:33:50 +09:00
Hide_D e1b8dde60a 보정 롤백 2019-08-14 01:27:37 +09:00
Hide_D e8d32eef4e 작위보상의 수뇌 보정을 낮춤 2019-08-14 01:26:05 +09:00
Hide_D ec0fa686a9 여유를 '절대 시간' 으로 변경 2019-08-14 01:00:10 +09:00
Hide_D 7604273c1a 삭턴에 조금 여유를 줌 2019-08-14 00:58:56 +09:00
Hide_D 00db927ce7 작위 보상 추가 2019-08-14 00:55:45 +09:00
Hide_D 9fea24f0f6 건국 즉시 얻는 템 삭제, 유니크 복권 리팩토링, '고정된 한개'를 주는 유니크 복권 추가 2019-08-14 00:27:36 +09:00
Hide_D c903ce929f 서버 정보 추가 제공 2019-08-13 23:37:46 +09:00
Hide_D d48d9f85b3 가오픈시 별도 표기 추가 2019-08-13 23:24:05 +09:00
Hide_D 5bdf7ba316 가오픈시 삭제는 유저장만 가능하도록 변경 2019-08-13 02:24:58 +09:00
Hide_D 518c74736f 가 오픈기간내 장수 삭제/빙의해제 가능 2019-08-13 02:23:27 +09:00
Hide_D 223d2cf786 서버 가오픈시 대비 넉넉하게 시간 제공 2019-08-13 01:30:41 +09:00
Hide_D cfa2cff34a NPC의 기술 연구 기준을 '기술제한이 아니면'으로 변경 2019-08-13 00:20:07 +09:00
Hide_D 26eacfe795 랜임 버그 핫픽스 2019-07-18 21:21:58 +09:00
Hide_D b1b937ee31 (6턴 제외) 삭턴사시 본닉 공개 2019-07-17 23:32:59 +09:00
Hide_D 122479158c '장수를 따라' 임관하는 기능 추가 2019-07-17 23:06:20 +09:00
Hide_D 0af5e9ec84 외교권자 임명 시 내부적으로 warning뜨는 버그 수정 2019-07-17 21:19:34 +09:00
Hide_D cb5414f789 youtube, vimeo iframe 가능하도록 변경 2019-07-17 21:12:25 +09:00
sars 224cb1b913 server_title id 추가 2019-07-10 19:52:29 -07:00
sars 8bd84cc701 serverCnt 변수로 지정 2019-07-10 19:39:25 -07:00
sars a14dcf8b3e 깃수 출력 2019-07-10 15:27:44 -07:00
Hide_D a1a26bf8fe 훈련,사기템 효과 두배 증가, 철벽서 버그 수정 2019-06-21 10:06:05 +09:00
Hide_D fea229c4ad 사령부 턴 높이 늘림 2019-06-21 09:58:17 +09:00
Hide_D 7040d940ac 왕조 일람 정보 추가 2019-06-21 09:55:40 +09:00
Hide_D a576d72335 메인 페이지 부대 이름 관련 보조정보 추가 2019-06-21 09:51:39 +09:00
Hide_D 5aab373d20 발령, 포상, 몰수에서 보조 데이터 추가 2019-06-21 09:29:33 +09:00
Hide_D 32f8160eb2 시즌 값 추가 2019-06-18 03:32:14 +09:00
Hide_D 701355beb3 시즌 별 검색 기능 추가, 기본 값으로 현재 시즌 표기 2019-06-18 03:30:09 +09:00
Hide_D 28de7c517b UniqueConst와 game_env에 seasonIdx 추가 2019-06-18 03:12:36 +09:00
Hide_D 7365ca7a64 숙련전환 커맨드 추가 2019-06-16 04:42:43 +09:00
Hide_D 2a61813b67 스1 시나리오 업데이트 2019-06-14 23:55:43 +09:00
Hide_D 85e9223603 서버의 오픈 시간을 기록했으므로 변경 2019-05-09 02:00:25 +09:00
Hide_D 943e2be676 커맨드 창에서 가오픈 때문에 턴이 이상하게 보이는 버그 수정 2019-05-09 01:59:06 +09:00
Hide_D 2f09df7521 가오픈 일자 표시 2019-05-09 01:34:06 +09:00
Hide_D 445e445e49 예약턴 초기 릴리즈 2019-05-09 01:28:49 +09:00
Hide_D f20e4bd572 동작 시간 베이스로 변경 2019-05-05 20:13:48 +09:00
Hide_D e731371ab1 빙의 선택 시 성격과 국가 표기 2019-05-04 20:41:27 +09:00
Hide_D 5559693cb3 entrance 띄어쓰기 장수 전콘 문제 수정 2019-05-04 20:28:41 +09:00
Hide_D ca33c3b259 빙의에 약간의 편의성 추가 2019-05-04 20:09:52 +09:00
Hide_D a78fa98b3d 장수 목록에 pagenation 추가 2019-05-04 20:01:17 +09:00
Hide_D 956dc82555 장수 빙의에 장수 리스트 띄움 2019-05-04 19:46:55 +09:00
Hide_D d30a824481 디버그 코드 제거 2019-05-04 18:37:41 +09:00
Hide_D a643182eee 장수 일람 시간 문제 수정 2019-05-04 18:33:48 +09:00
Hide_D e1dbc46d8d 장수일람 API 생성 2019-05-04 18:33:09 +09:00
Hide_D e33d8776bc 서버 루트 js include 순서 변경 2019-05-04 17:08:36 +09:00
Hide_D f6d16883de 서버 기간 표기 수정 2019-05-04 17:05:48 +09:00
Hide_D 51bdd3bbfd 서버가 열린 경우 서버가 열린 기간을 표기하도록 수정 2019-05-04 17:03:03 +09:00
Hide_D 8f9ae78b8c 서버 리셋 권한자는 서버 시작, 또는 천통시 닫을 수 있음 2019-05-04 16:38:44 +09:00
Hide_D 584b7b8e45 영릉 장사 구지도 복구 2019-05-04 16:18:53 +09:00
Hide_D f74e903f1f 병종 전콘 문제 수정 2019-05-02 01:20:45 +09:00
Hide_D 4cedf112f5 sidebar 다시 제거 2019-05-02 00:53:09 +09:00
Hide_D d607a8da0f chess 맵 테스트로 추가, 전차전 php 코드 버그 수정 2019-05-02 00:50:40 +09:00
Hide_D 84a12e28df 지도 등을 추가할 경우 css, js를 새로 설정하는 기능 추가 2019-05-02 00:50:24 +09:00
Hide_D 54aa47d1a8 충차전 기본 코드 추가 2019-05-01 14:55:42 +09:00
Hide_D faaee4b945 충차전 코드 준비 2019-05-01 14:41:06 +09:00
Hide_D 0b46303f9f 시간이 지날 수록 접경 수도 농상, 성수의 디버프가 생김 2019-05-01 03:08:46 +09:00
Hide_D b98668bc60 부대장 삭턴 계산 방식 일부 변경 2019-05-01 02:57:48 +09:00
Hide_D 947e8e9512 코드 버그 수정 2019-05-01 02:47:27 +09:00
Hide_D 681918cb63 유니크 획득시 골고루 획득하도록 변경 2019-05-01 02:42:23 +09:00
Hide_D d0fae44430 도시 목록에도 전콘을 띄워줌 2019-05-01 02:33:49 +09:00
Hide_D 3e752461e8 스마트폰이더라도 neutralView(도시선택모드)에서는 두번선택 해제 2019-05-01 02:21:06 +09:00
Hide_D 1a9e6f3b1a m장 의병장 초 강화! 2019-05-01 02:06:51 +09:00
Hide_D 580275a8cf 로그인 버그 수정 2019-05-01 01:52:50 +09:00
Hide_D ee74771f16 부대장 이름을 정렬하기에 편리하도록 수정 2019-05-01 01:51:49 +09:00
Hide_D 81fa97d3ee 에러 로그 강화 2019-04-30 23:20:39 +09:00
Hide_D ae8b94b2d7 redirect 변경 2019-04-23 12:03:36 +09:00
Hide_D 7670d55f3c 갱신 되돌림.. 2019-04-23 11:05:09 +09:00
Hide_D 528ab4e203 갱신방식 변경 2019-04-23 11:01:42 +09:00
Hide_D cf1dc90137 갱신 버튼 변경 2019-04-23 10:59:03 +09:00
Hide_D f78fcc2b71 여백 주기 2019-04-11 19:53:27 +09:00
Hide_D fb2d30f2c9 서버별 아이콘 적용 가능 2019-04-11 19:50:59 +09:00
Hide_D 8781e7c6ad tooltip 처리 방식을 지연 처리로 변경 2019-04-10 23:27:53 +09:00
Hide_D c34317b1e5 년, 월로 넘치더라도 그냥 자름 2019-04-08 01:56:57 +09:00
Hide_D b09730b422 스타크래프트 1 프로게이대전 추가 2019-04-08 01:51:38 +09:00
Hide_D 0f1725a7ab 인탐 조건에서 방랑군은 다시 불가능하게. 2019-04-08 01:45:05 +09:00
Hide_D b12e0358d6 방랑군이거나, 국가의 인구가 다 차더라도 인구 탐색 가능 2019-04-08 01:43:01 +09:00
Hide_D 7ef841746a 장수수 > 10, 집합장 제외 장수수 < 10일 때, 기술이 과도하게 오르는버그 수정 2019-04-08 01:33:49 +09:00
Hide_D 2b52b2379e 새 숙련도 공식 반영, 제곱식 기반에서 세제곱식 기반으로 2019-04-08 01:21:06 +09:00
Hide_D 8dd5965c44 진유저무쌍 릴리즈 2019-04-07 23:55:44 +09:00
Hide_D b273082492 세력 장수 쿼리 버그 수정 2019-04-07 17:15:16 +09:00
Hide_D da088d88ba 세력장수 본닉 2019-04-06 14:46:07 +09:00
Hide_D fd13570074 천통시 장수 일람 2019-04-06 14:25:12 +09:00
Hide_D b5630a9dae 오타(?) 수정 2019-03-26 15:47:17 +09:00
Hide_D 0e2cab6409 명전 재 갱신 코드 추가 2019-03-26 15:44:04 +09:00
Hide_D 38dc587318 명전 등록시 문자 문제 수정 2019-03-26 15:36:38 +09:00
Hide_D 6fbddcb7c2 cache control 수정 2019-03-22 09:30:24 +09:00
Hide_D df1df2964d session_cache_limiter 삭제. no-cache가 기본값임 2019-03-22 09:26:52 +09:00
Hide_D 9b9c2546c8 확률 추가 수정 2019-03-15 15:15:00 +09:00
Hide_D 6ce0e72b33 인탐 확률 핫픽스 2019-03-15 15:00:12 +09:00
Hide_D a7784d7870 지연 threshold 증가 2019-03-10 17:20:44 +09:00
Hide_D 306ca3e04f 점령 시 도시 관직 초기화. 코드 정리 2019-03-10 17:19:35 +09:00
Hide_D 82988b0e08 장사-영릉이 이어진걸로 나오는 일반지도 버그 수정 2019-03-10 14:19:29 +09:00
Hide_D 8b27d0e249 불가침 서신 거부 불가능한 버그 수정 2019-03-10 00:47:13 +09:00
Hide_D bfae547240 은퇴 연령 값을 GameConst로 이동 2019-03-09 17:08:11 +09:00
Hide_D 0abd026f78 인탐, 의병에서 발생할 수 있는 숙련 예외 케이스 제거 2019-03-09 16:50:31 +09:00
Hide_D 3362a76de7 값 실수 수정 2019-03-09 16:41:41 +09:00
Hide_D 355b6c2e7d 인탐 확률 추가 수정 2019-03-09 16:23:47 +09:00
Hide_D 4e3c643e43 시나리오 최대 장수값 조절 2019-03-09 13:45:29 +09:00
Hide_D 760cb97db4 인탐 가속 조건 강화 2019-03-09 06:12:26 +09:00
Hide_D 0be6f7f57e 오타 수정 2019-03-09 03:43:15 +09:00
Hide_D d31223fa0c 커맨드 attr 수정 2019-03-09 02:30:12 +09:00
Hide_D 86ee9befc1 커맨드 버그 수정? 2019-03-09 02:26:50 +09:00
Hide_D d5689b061f 의병 고용으로는 무지장이 안나옴 2019-03-09 01:59:41 +09:00
Hide_D a3c4da4455 의병고용 버그 수정 2019-03-09 01:57:51 +09:00
Hide_D ee9f97f917 m장 합산 능력치 버그 수정 2019-03-09 01:05:47 +09:00
Hide_D 270c7377de 사령턴 실행후 재 로드시 수비 켬끔 리셋 관련 버그 수정 2019-03-09 00:59:16 +09:00
Hide_D 9044b57306 영입 금지시에는 인탐 확률 보정 없음 2019-03-09 00:41:38 +09:00
Hide_D 9ad815a44a Revert "커밋 취소"
This reverts commit 0843da7a7c.
2019-03-09 00:40:16 +09:00
Hide_D b7e432228b 커밋 취소 2019-03-09 00:39:13 +09:00
Hide_D 78da30f2ad m장이 아주 적을땐 잘 뽑히도록 2019-03-09 00:33:14 +09:00
Hide_D aeea53017f 인탐 장수 비율 4:4:2로 변경. 인탐장 숙련도 평준화. 인탐 확률 상승. 발견 추가. 2019-03-09 00:15:51 +09:00
Hide_D f21ebfc366 관리자 턴 당김 버그 수정 2019-03-09 00:00:00 +09:00
Hide_D 2549aa5809 의병, 인탐장도 적은 비중으로 장수 카운트에 추가 2019-03-08 22:20:45 +09:00
Hide_D b733b70ad8 황제가 있을 경우 황제. 없으면 이전 천통 군주의 명으로 토너먼트 개최 2019-03-06 01:44:24 +09:00
Hide_D f9f59bd7c2 토너먼트 변경이 변경 횟수를 깎지 않음. 수비 끔 시 훈사 3 감소 2019-03-06 01:09:34 +09:00
Hide_D 58933a6bcd 인자 버그 수정 2019-03-06 00:40:56 +09:00
Hide_D 45d7a29a95 수비 순서에 훈사 영향을 더 강하게 주도록 변경 2019-03-06 00:38:35 +09:00
Hide_D e9d1fdb4ee 두번 탭 해 도시 이동 기능 재 부활, 옵션 설정 가능 2019-03-05 23:06:34 +09:00
Hide_D 2785ca9f31 천통 시에는 계략 명장이 보임 2019-03-05 02:32:42 +09:00
Hide_D 12912a62aa 아이템에 장수명을 띄우는것은 비합리적으로 보임 2019-03-05 02:29:10 +09:00
Hide_D 2c2b078514 명장일람에서 계략 시도 장수 본닉이 뜨는 문제 수정 2019-03-05 02:27:22 +09:00
Hide_D 110294103f 천통 후에는 명장 일람에 장수 본닉이 뜨도록 2019-03-05 02:23:28 +09:00
Hide_D a9f3b839ec 명전에서 장수의 본닉이 뜨도록 2019-03-05 02:11:52 +09:00
Hide_D 6bd677ad6f 은퇴 후 명전 등록 시 '이전 값보다 높아진 경우'에만 경신하도록 수정 2019-03-05 01:45:03 +09:00
Hide_D 7d1c5f3510 집합장이 군주인 경우 아무에게나 선양 2019-03-05 01:20:27 +09:00
Hide_D a49508fd20 외교권자 등에서 인사부 연동이 안되는 버그 해결 2019-02-27 23:33:18 +09:00
Hide_D 5870213ff0 권한 관련 버그 수정 2019-02-27 23:23:53 +09:00
Hide_D 65c3d7f925 선양 버그 수정 2019-02-25 21:27:17 +09:00
Hide_D 33f4fd8fee 외교권자 버그 수정 2019-02-25 21:25:29 +09:00
Hide_D 9bdc34dc42 버그 수정 2019-02-24 19:41:00 +09:00
Hide_D ff654df997 본인 국가 아닌 곳에 임명 가능한 버그 수정 2019-02-24 01:12:59 +09:00
Hide_D b7758da2f3 회의실 기밀실 '타이틀'이 거꾸로 표기되는 버그 수정 2019-02-24 00:56:25 +09:00
Hide_D 747089f1a8 게시판 위아래 가운데 정렬.. 2019-02-24 00:55:13 +09:00
Hide_D 9ee3021b76 NPC 군주는 유저장 수뇌에게 외교권자 권한 부여 2019-02-24 00:52:42 +09:00
Hide_D 0c60ea66e3 자국 내 외교권자에게는 메시지 보낼 수 있도록 수정 2019-02-24 00:42:34 +09:00
Hide_D c3bb312b5f 선양시 외교권자 지정 코드 수정 2019-02-24 00:37:01 +09:00
Hide_D 7447a42d40 외교 서신 수락시, 국메, 외교 둘다 뜨도록 수정 2019-02-24 00:32:22 +09:00
Hide_D 3e9cc367af 게시판 이름 ㅇ 2019-02-24 00:23:45 +09:00
Hide_D 4c1790014f 메시지 변경 2019-02-20 01:40:56 +09:00
Hide_D 03fc7a579a 비재야망명 버그 수정 2019-02-17 23:57:26 +09:00
Hide_D a53db257cf 외교부 버그 수정 2019-02-14 21:28:15 +09:00
Hide_D b093cab493 한칸 띄움 2019-02-03 02:18:07 +09:00
Hide_D 9b484dc819 간이 툴바 생성 2019-02-03 01:54:58 +09:00
Hide_D 5ab26a9f8c 메시지 자동 링크 2019-02-03 00:28:29 +09:00
Hide_D b800a63bd2 고대무장 신대륙국가 추가 2019-01-31 02:24:18 +09:00
Hide_D 43a5e47fb3 애니집결 5차 반영 2019-01-31 02:14:10 +09:00
Hide_D 319545106e 외교부 버튼 조건 변경 2019-01-30 02:54:38 +09:00
Hide_D 39b261b8a0 버그 수정 2019-01-30 00:04:33 +09:00
Hide_D c9e61d1098 버그 수정 2019-01-30 00:03:36 +09:00
Hide_D 0bffdaa5fc 외교 메시지 과거 권한 문제 수정 2019-01-30 00:02:28 +09:00
Hide_D 9228510834 댓글 입력도 투명하게 2019-01-29 23:46:47 +09:00
Hide_D 0b002a8946 댓글 엔터시 입력 2019-01-29 23:43:37 +09:00
Hide_D ad43ddabe6 Merge branch 'ng_diplomacy' of ssh://storage.hided.net:2525/devsam/core into ng_diplomacy 2019-01-29 23:40:35 +09:00
Hide_D 24c022a329 회의실 기밀실 템플릿 2019-01-29 23:40:28 +09:00
Hide_D 0e48cee0d6 하야 임관시 권한 초기화 2019-01-29 17:12:04 +09:00
Hide_D 4ad1794d95 버그 수정 2019-01-29 02:57:24 +09:00
Hide_D 46cf25b585 승인시 이전 내용 중첩 2019-01-29 02:53:39 +09:00
Hide_D b3d78fc30f 파기 요청 추가 2019-01-29 02:48:41 +09:00
Hide_D 556bc06da4 시중->종사, 감찰부 권한 정리 2019-01-28 20:33:44 +09:00
Hide_D 7e8f9c463b 공개, 비밀 문구 변경 2019-01-26 06:58:12 +09:00
Hide_D 568c7779b6 템플릿 미완 부분 수정 2019-01-26 06:56:19 +09:00
Hide_D 0a0d237f4d 대체된 메시지 보기 가능 2019-01-26 06:44:34 +09:00
Hide_D c243ccbdce 틀 일부 수정 2019-01-26 06:36:48 +09:00
Hide_D 64b79d6af5 외교부 추가 2019-01-26 06:30:29 +09:00
Hide_D 016c0f3743 외교 메시지 필터링에 invalid 옵션 추가 2019-01-26 04:03:15 +09:00
Hide_D fd1599e0a7 외교 메시지 전송시 알림 2019-01-26 03:50:08 +09:00
Hide_D 7408aa6b72 조언자 인원수로 보여줌 2019-01-26 03:40:01 +09:00
Hide_D e6b2107fa9 외교부 틀 작성중. 재야의 외교 메시지는 항상 보이도록 2019-01-26 03:31:04 +09:00
Hide_D 9aff52eaad 권한 문제 수정 2019-01-25 23:29:35 +09:00
Hide_D bf5bda0f85 내무부 권한 수정 2019-01-25 22:35:49 +09:00
Hide_D ffbf2d0a93 국적 변경시 permission 초기화 2019-01-25 20:30:02 +09:00
Hide_D 82f59ef5a2 게시물 순서 변경 2019-01-25 20:17:36 +09:00
Hide_D c2c40abbb4 외교권자 기밀실 버튼 활성화 2019-01-25 19:49:29 +09:00
Hide_D bb54d732d0 수락 불가능한 문제 해결 2019-01-25 19:46:32 +09:00
Hide_D eee4e0c676 없는것보단 나은 회의실 css 2019-01-25 19:40:13 +09:00
Hide_D d9457ae017 내무부 비고란 제거 2019-01-25 19:34:36 +09:00
Hide_D bbc0b18b19 외교 메시지 삭제 조건 완화 2019-01-25 19:32:13 +09:00
Hide_D da7651311e 메시지 삭제가 안되던 버그 수정 2019-01-25 19:30:33 +09:00
Hide_D 72846f0817 인사부 수정 2019-01-25 19:22:30 +09:00
Hide_D 05ef3387ab 외교권자 임명 대기중 2019-01-25 03:16:34 +09:00
Hide_D eed44e5737 외교권자 목록 출력 2019-01-25 02:18:20 +09:00
Hide_D 27c7a85a21 게시판 기능만 동작 2019-01-25 02:11:54 +09:00
Hide_D 4f6dd046ec 게시판이 '동작만 함' 2019-01-25 01:51:26 +09:00
Hide_D 89fad9ada7 이전 외교 메시지를 불러 올 수 있음 2019-01-25 01:39:45 +09:00
Hide_D bc31b49b99 외교권자에게는 메시지를 보낼 수 없음 2019-01-25 01:28:06 +09:00
Hide_D 09444e3624 1차 버그 수정 2019-01-25 01:02:13 +09:00
Hide_D 7586243a95 DB 스키마 변경 2019-01-25 00:13:04 +09:00
Hide_D 1e1c7801e1 중간반영 2019-01-24 03:34:03 +09:00
Hide_D a363f6ef5f 외교부 틀 작성 2019-01-23 03:11:07 +09:00
Hide_D 334e1fd2da 국메 처리 방식을 변경. 국가간 메시지는 외교권자만 가능 2019-01-23 02:36:03 +09:00
Hide_D 2e8e29e93c 외교메시지 수신 기준 변경중 2019-01-23 01:37:40 +09:00
Hide_D 5e5a1a3668 기존 회의실, 기밀실 코드 삭제 2019-01-22 03:17:44 +09:00
Hide_D b93b464ebf 외교서신 응답 2019-01-22 02:47:27 +09:00
Hide_D 842ba46a95 파일 명을 namespace를 고려하여 수정 2019-01-21 02:25:54 +09:00
Hide_D 03b27d8e8f 외교 서신 추가 기능 2019-01-21 02:23:23 +09:00
Hide_D c11b41c6ba 게시물 코드 2019-01-21 02:00:48 +09:00
Hide_D 018cc526ee 게시판 글, 댓글 작성 초안 2019-01-21 01:45:32 +09:00
Hide_D edf4508e6b 권한 세팅 2019-01-18 03:01:02 +09:00
Hide_D d26a1f0312 왕 무장 관직 순서 변경 2019-01-17 23:01:05 +09:00
Hide_D 2984f6a453 무관 최종 관직을 실제 삼국지 관직 순서에 맞게 변경 2019-01-17 22:59:54 +09:00
Hide_D a00058d959 시중->종사 2019-01-17 22:44:18 +09:00
Hide_D 8e56a457f1 게시물 구조 설정 2019-01-17 03:12:26 +09:00
Hide_D 74d5f021cd tui-editor와 새 게시판 준비 2019-01-17 02:54:58 +09:00
Hide_D a37715315d permission, penalty 대응 준비 2019-01-16 02:47:48 +09:00
Hide_D d9c9977610 장수 schema 수정 2019-01-16 02:26:28 +09:00
Hide_D c2f0cbb10a 버튼 이동 코드 정리 2019-01-16 02:18:42 +09:00
Hide_D a34d00d822 DB 스키마 정리, diplomacy 테이블 정리, 코드 정리 2019-01-16 01:59:07 +09:00
Hide_D 9924ec6963 국법 기능 제거. 외교부를 위한 자리 추가 2019-01-12 18:53:01 +09:00
Hide_D 9036201887 DB 스키마 준비 2019-01-12 07:21:34 +09:00
Hide_D b2435d2430 걸그룹 전콘 문제 일부 수정 2018-12-08 20:55:48 +09:00
Hide_D afd6148770 걸그룹 대전 0.5 반영 2018-12-02 22:28:10 +09:00
Hide_D b70b58a35a 지급율 -> 지급률 2018-12-01 23:37:40 +09:00
Hide_D df963c2780 외교 메시지는 삭제 할 수 없도록 2018-12-01 18:36:43 +09:00
Hide_D 1b732c76e6 국메 삭제 가능 2018-11-30 21:49:19 +09:00
Hide_D f9489b0173 디버그 코드 제거 2018-11-30 21:44:59 +09:00
Hide_D 18942c55ae 메시지 삭제 기능 추가 2018-11-30 21:29:31 +09:00
Hide_D bf34b2f1ca 메시지 타이밍 정책 일부 수정 2018-11-30 19:03:26 +09:00
Hide_D a717a021c2 페이지당 갱신 시간을 10초에서 5초로 변경 2018-11-30 02:05:33 +09:00
Hide_D dcf718d592 메시지를 띄울 때 flex 적용 2018-11-30 01:51:24 +09:00
Hide_D f5eeb2b839 로그아웃 되었을 경우 무한히 호출하는 버그 수정 2018-11-30 01:24:45 +09:00
Hide_D bc435adc11 이전 메시지 가져오기 기능 추가 2018-11-30 01:18:07 +09:00
Hide_D aeb8e82cbd 부상으로 인한 전투 우선순위 감소를 완화 2018-11-28 23:43:42 +09:00
Hide_D 5cb2ed3ccd 등갑, 맹수 너프 2018-11-28 01:24:29 +09:00
Hide_D 93b1864d1b 자객병의 기동을 8로 상향 2018-11-28 01:20:32 +09:00
Hide_D a6efffda45 selector에 검은색 추가 2018-11-28 01:14:43 +09:00
Hide_D c89d6f1a58 도시 목록에 select2를 시험 적용 2018-11-28 01:02:56 +09:00
Hide_D d4f16abfac 암행부의 장수수에서 '부대장'이 제외됩니다. 2018-11-28 00:29:53 +09:00
Hide_D 8529f3f355 임관턴이 어찌저찌 어거지로 동작하던 버그 수정 2018-11-28 00:26:29 +09:00
Hide_D 2eb136827d 랜덤 임관을 더 고르게 합니다. 2018-11-28 00:18:09 +09:00
Hide_D 9594e6eb32 부대장은 기술연구, 전투시 기술 상승에 영향을 주지 않도록 변경 2018-11-28 00:16:34 +09:00
Hide_D 9e8111994a 통합, 합병시 부대장까지 같이 포함되는 문제 수정 2018-11-28 00:14:36 +09:00
Hide_D af0c2b7129 select2 설치 2018-11-27 23:52:12 +09:00
Hide_D 96b73a0cef 도시 목록 등 불필요한 가로바 길이 줄임 2018-11-26 22:29:11 +09:00
Hide_D 6c290ee2d3 추방시 명성 안깎이는 버그 수정, 첫 하야시 패널티 없음 2018-11-26 18:12:21 +09:00
Hide_D ca53e3de3a 반계 상향 2018-11-26 18:08:57 +09:00
Hide_D 6ea3ec700a 수비 우선 순위를 부상여부, 수뇌여부, 훈사 여부를 반영하도록 변경 2018-11-26 15:17:51 +09:00
Hide_D fe3355e08e gitignore 변경 2018-11-26 15:08:33 +09:00
Hide_D 43da95b4a5 디버그 코드 제거 2018-11-25 00:51:59 +09:00
Hide_D 3d93a63caa php의 rename을 OS의 mv로 변경 2018-11-25 00:50:41 +09:00
Hide_D 9550607da3 디버그 모드 2018-11-25 00:39:49 +09:00
Hide_D d5d9798913 rename 재수정 2018-11-25 00:37:24 +09:00
Hide_D 6cfe08235f base을 filename으로 수정 시도 2018-11-25 00:35:11 +09:00
Hide_D 49eb850ff1 파일명 에러 수정 2018-11-25 00:29:26 +09:00
Hide_D 5a558583d2 폴더명 실수.. 2018-11-24 23:46:04 +09:00
Hide_D 1e5f0d0555 이전 디렉토리를 이동하도록 변경 2018-11-24 23:44:33 +09:00
Hide_D c58caeda4c 국방 표기 방식 변경 2018-11-13 19:55:40 +09:00
Hide_D 26fc56f2b8 extractMissingPostToGlobals(); 제거 2018-11-13 02:11:00 +09:00
Hide_D 6a9e7aa89d msg overflow 적용 2018-11-11 23:32:19 +09:00
Hide_D b6c3b0cdc3 방랑군이 아니어도 건국 가능한 버그 수정 2018-10-29 03:15:45 +09:00
Hide_D 5ae91ac620 견문 무력 버그 수정 2018-10-25 01:26:59 +09:00
Hide_D 70265c55ef 3인 임관 실패시 견문 2018-10-25 01:21:52 +09:00
Hide_D 7c3b5fc31e 견문 시 무력이 떨어지지 않도록 변경 2018-10-25 01:17:04 +09:00
Hide_D a9a830caa2 기타 설정 추가 2018-10-24 03:27:22 +09:00
Hide_D b49ff3d4ed 예약 안되는 버그 수정 2018-10-24 03:22:41 +09:00
Hide_D 42310fa170 랜임 개월 수 버그 수정 2018-10-24 01:17:03 +09:00
Hide_D bfff1d9e2f 랜임 모드 버그 수정 2018-10-24 00:54:18 +09:00
Hide_D 2c98777b9f 등용장 무효화 2018-10-23 23:33:12 +09:00
Hide_D 4a91260a31 오타 수정 설명 수정 2018-10-23 16:38:25 +09:00
Hide_D 076971bcae 오타 수정 2018-10-23 16:35:28 +09:00
Hide_D 01fcc9bcab 랜덤 임관 모드 추가 2018-10-23 15:05:19 +09:00
Hide_D 348877c7cd NPC 부대장 수치 버그 수정 2018-10-07 21:46:28 +09:00
sars 478f26e75a camelCase대신 underscore_case 사용 2018-10-04 00:16:08 +09:00
sars 57cc558b9b 장수 동향, 개인 기록, 중원 정세 id 등록 2018-10-04 00:07:46 +09:00
Hide_D 20b1f8eff8 전투 우선순위에 '유니크 아이템'의 효과가 과도하게 측정되는 버그 수정 2018-10-01 23:10:47 +09:00
Hide_D f0a7990404 계략 기본 성공률을 '보급'과 거꾸로 적용한 버그 수정 2018-09-27 17:00:56 +09:00
Hide_D 27f53ff4a6 임관 코드 최종 수정 2018-09-27 16:36:55 +09:00
Hide_D 9ec5dfc8b1 사실 모드 임관 수정 2018-09-27 16:29:49 +09:00
Hide_D e4c1e414c8 사실 모드 랜임 코드 버그 수정 2018-09-27 16:27:38 +09:00
Hide_D a391650472 인증 코드 자리 수 하나 감소 2018-09-25 10:45:21 +09:00
Hide_D 3cfde2b40d 주자사, 공, 황제일 때 장수 수가 내부적으로 1 차이나게 적용되는 버그 수정 2018-09-25 10:12:42 +09:00
Hide_D 8bf1ed33dc 전환 시 '빈칸' 보정, 설명 추가 2018-09-24 04:23:47 +09:00
Hide_D 422b3be0c5 flip image 추가 2018-09-24 04:17:54 +09:00
Hide_D c34e44c4ec data-flip을 허용하고, summernote에 img 태그에 data-flip을 추가하도록 2018-09-24 03:58:40 +09:00
Hide_D a2b20eca67 장수 생성시 초기 스탯으로 '임의 버튼을 클릭'하도록 지정 2018-09-24 02:16:42 +09:00
Hide_D d41c316bfb 설치 설명에서 MariaDB만 지원한다고 변경 2018-09-23 17:31:40 +09:00
Hide_D ca1d8aab84 WebUtil.php에서 drawMenu fallback 추가. 설치시 '활성화되지 않은' KakaoKey.php 파일 추가 2018-09-23 17:31:30 +09:00
Hide_D 32e3dcff7c 이미지 업로드 기능 추가 2018-09-22 03:05:58 +09:00
Hide_D 9a23470622 초반 제한 기간 텍스트 수정 2018-09-21 02:08:51 +09:00
Hide_D c37a186802 툴팁 class 수정. 지도의 년월에 올리면 초반 제한, 기술 제한 툴팁 2018-09-21 02:06:45 +09:00
Hide_D 84c17e3b22 왕조 일람 버그 수정 2018-09-20 02:26:20 +09:00
Hide_D 64e0fca124 전쟁 기한 공식을 스택형으로 변경 2018-09-20 01:15:50 +09:00
Hide_D 5c6537fd7a 멸망 시 접경 재설정 코드 버그 수정 2018-09-20 01:02:29 +09:00
Hide_D 764a82df00 버그 수정 2018-09-20 00:43:36 +09:00
Hide_D e904911fd9 후발 주자에게, 명성, 전특, 내특에 대해 일정 부분 보상 제공 2018-09-20 00:35:38 +09:00
Hide_D a7494f72f6 NPC 부대장에게 포상하지 않도록 수정 2018-09-19 23:56:33 +09:00
Hide_D b6b53b028d 부대탄 유저장도 발령하지 않도록 수정 2018-09-19 23:37:36 +09:00
Hide_D 1743ce714a 전투 코드를 모두 generator 기반으로 변경 2018-09-19 23:29:36 +09:00
Hide_D 656f0c5d11 부대장 주는 횟수 변경 2018-09-19 22:57:06 +09:00
Hide_D d80aebe1f4 집합장 때문에 총 기술치가 깎이는 버그 수정 2018-09-19 22:55:48 +09:00
Hide_D ad48bc1962 접경 내정 상승량 감소는 '수도가 아닐때' 적용 2018-09-19 03:01:38 +09:00
Hide_D d72fbb7098 부대장에게는 금쌀이 제공되지 않도록 수정 2018-09-19 02:21:38 +09:00
Hide_D 95d5eaa09b 주석 수정 2018-09-19 02:13:44 +09:00
Hide_D b997a6159e 치안에 따른 재난 확률 변경 2018-09-19 02:09:08 +09:00
Hide_D 1cd8b7a450 전쟁 중 접경에서는 농상성수 가 제대로 안 오르도록 2018-09-19 02:00:29 +09:00
Hide_D c5a8eb4261 접경지 처리시, 공백지 접경인지 적군 접경인지 구분 2018-09-19 01:49:46 +09:00
Hide_D 8891c29cbd 트래픽이 0인 경우 버그 수정 2018-09-19 01:46:15 +09:00
Hide_D 2facdfa1dd 루드라사움에서도 보병의 성벽 대미지 증가 2018-09-19 01:33:33 +09:00
Hide_D 65c9fa0c21 보병의 성벽 상대 전투력 20% 증가 2018-09-19 01:32:04 +09:00
Hide_D e53c85dbaf 돌격에 저지 불가 제거 2018-09-19 01:16:50 +09:00
Hide_D 3a231e8e61 저지 숙련 증가 2018-09-19 01:00:25 +09:00
Hide_D 4dc7776387 차병은 성벽 전투시 부상을 입지 않음 2018-09-19 00:39:15 +09:00
Hide_D 5ca043e0f1 견고 설명 수정 2018-09-19 00:29:24 +09:00
Hide_D 9ef052c814 견고 추가 상향 2018-09-19 00:28:09 +09:00
Hide_D 6d1690beaa 소울소드 리마스터 시나리오 업데이트 2018-09-18 23:19:30 +09:00
Hide_D 171656e5be 버그 수정 ㅜ 2018-09-18 03:30:40 +09:00
Hide_D 385e7f4871 천통했을 때에는 벌점이 늘어나지 않도록 수정 2018-09-18 03:26:12 +09:00
Hide_D 89c5485784 NPC 안생기는 버그 수정 2018-09-18 03:22:55 +09:00
Hide_D 02d191ec28 변수 대소문자 버그 수정 2018-09-18 03:17:20 +09:00
Hide_D 47c3090f3a NPC 생성 루프 수정 2018-09-18 03:15:40 +09:00
Hide_D 476dac1ac1 주목, 왕이되면 NPC 부대장 하나 더 추가 2018-09-18 02:56:35 +09:00
Hide_D 8ca0d0ced4 메시지 전송 시 장수명 순서대로 정렬 2018-09-18 02:31:41 +09:00
Hide_D ab197489d7 집합장 NPC 삭턴이 실행되지 않는 문제 수정 2018-09-18 02:25:03 +09:00
Hide_D 99736d187b 통합 제의 임시 삭제 2018-09-18 02:15:48 +09:00
Hide_D 197c09bd0d 집합장 턴을 그나마 확인할 수 있도록 삭턴 조정 2018-09-18 02:02:26 +09:00
Hide_D 6cc634ba1f 집합장은 턴이 항상 풀로 차도록.. 2018-09-18 02:01:55 +09:00
Hide_D 4c89ad91d2 부대장 시작 도시를 랜덤으로 2018-09-18 01:56:32 +09:00
Hide_D d66233bce0 NPC 부대장 버그 수정 2018-09-18 01:51:28 +09:00
Hide_D b485e6927e 부대장 번호 버그 수정 2018-09-18 01:47:48 +09:00
Hide_D 74b9e8bd7b 집합장 명칭을 부대장으로 변경 2018-09-18 01:46:37 +09:00
Hide_D 545742ecc0 부대 탄 사람은 발령 로직에서 최대한 배제 2018-09-18 01:27:30 +09:00
Hide_D d9f1f65352 NPC 부대 생성 버그 수정 2018-09-18 01:18:03 +09:00
Hide_D 0904d17a5f 집합장 등장 수식 수정 2018-09-18 00:36:05 +09:00
Hide_D 87171b4246 집합장 테스트 2018-09-18 00:29:44 +09:00
Hide_D 78f8b56203 reset_token에서 불필요한 명령 제거 2018-09-17 23:06:24 +09:00
Hide_D c160c5a555 천통시 모든 국가 등재 장수의 이름이 9글자 인 경우 발생하는 버그 수정 2018-09-12 01:46:16 +09:00
Hide_D 31c7bf5348 메뉴 아이템 길이 버그 2018-09-12 01:16:17 +09:00
Hide_D 6eadf718fc meta keyword 추가 2018-09-12 00:35:50 +09:00
Hide_D effced24d1 sitemap을 위하여 메뉴를 php에서 직접 출력하도록 변경 2018-09-12 00:12:32 +09:00
Hide_D 09f399db9a robots.txt 재등록 2018-09-11 23:50:29 +09:00
Hide_D 2b73f6faea 로봇에 대문자 들어가서 삭제 2018-09-11 23:50:16 +09:00
Hide_D 943662605e Robots.txt 설명 추가 2018-09-11 23:48:02 +09:00
Hide_D 9a04962bd6 대문에 meta 태그 추가 2018-09-11 23:03:10 +09:00
Hide_D c371f6bbb5 refresh_token 변수가 잘못된 것 수정 2018-09-11 11:13:37 +09:00
Hide_D 8324e2e454 access token 체크용 디버그 2018-09-11 11:08:37 +09:00
Hide_D 30307c1b56 로그인 인증 버그 체크 2018-09-11 10:55:53 +09:00
Hide_D f139d0d2a8 로그인 인증 디버깅용 코드 추가 2018-09-10 23:12:27 +09:00
Hide_D 33843764a7 로그인 토큰을 제대로 못 받은 경우 추가 2018-09-10 23:07:44 +09:00
Hide_D aca7d7c571 createOTP 반환형 버그 2018-09-10 01:49:11 +09:00
Hide_D bff72f609c 세션 로그인시 oauth token 값이 제대로 저장 안되는 버그 수정 2018-09-10 01:09:55 +09:00
Hide_D adb03b7420 인증시 로그아웃이 바로 풀리는 버그 수정 2018-09-10 00:38:06 +09:00
Hide_D 2094e18b60 IE에서 인증이 이상한 문제 해결 2018-09-10 00:35:59 +09:00
Hide_D 541d8ddd40 토큰 시간 초과시 즉시 로그아웃 되도록 변경 2018-09-10 00:22:57 +09:00
Hide_D f996172218 Merge branch 'kakao_login' into devel 2018-09-09 23:58:51 +09:00
Hide_D f9ffc1c1f3 oauth 인증중 token_valid_until만 table column으로 분리 2018-09-09 23:57:26 +09:00
Hide_D 05085ad504 5일이 지난후 로그인 토큰을 미리 초기화 가능하도록 수정 2018-09-09 23:18:23 +09:00
Hide_D 64aecaf28b 메인 페이지에 '비밀번호 초기화' 추가 2018-09-09 21:53:00 +09:00
Hide_D 7b3ef45300 카카오 로그인 작업 개선 2018-09-09 21:16:44 +09:00
Hide_D bd25de930b 카카오 로그인용 디버깅 코드 제거 2018-09-09 20:22:34 +09:00
Hide_D 15d43c9653 카카오 로그인 초기 구현 2018-09-09 20:19:00 +09:00
Hide_D 5b7eba61cc 반계에 '동그라미' 오타 제거 2018-09-09 15:54:17 +09:00
Hide_D 2445c79805 성벽 상대로 '혼란' 계략을 사용하지 않는 버그 수정 2018-09-08 12:33:41 +09:00
Hide_D 63be2dee47 운영자 찬스 수정 2018-09-07 02:06:13 +09:00
Hide_D 5bfef1be32 운영자 찬스2 2018-09-07 02:04:50 +09:00
Hide_D 8253526f23 운영자 찬스 2018-09-07 02:03:37 +09:00
Hide_D db19548e2c 불가능한 커맨드일 때 '불가' 표기 추가 2018-09-07 00:45:38 +09:00
Hide_D 10af31f042 customCSS를 조금 더 안전하게 적용 2018-09-06 23:38:47 +09:00
Hide_D e7c6e17590 왕조 일람의 '현재'에 대한 자세히 보기를 삭제 2018-09-05 23:39:16 +09:00
Hide_D a277ac182b 통합 안되는 버그 수정 2018-09-04 15:48:18 +09:00
Hide_D 0eee613a95 외교 커맨드 수정 2018-09-04 01:39:58 +09:00
Hide_D b76fa38e09 외교 커맨드 수식 오류 수정 2018-09-04 01:33:21 +09:00
Hide_D c0f5c8a358 내 정보에서 수비, 토너먼트가 즉시 반영되지 않는 버그 수정 2018-09-03 01:09:03 +09:00
Hide_D 71dd82afe8 메인 페이지 width 일부 수정 2018-09-02 21:00:05 +09:00
Hide_D ea5425a528 commandlist 가로로 짤리는 몇몇 유저용 수정 2018-09-02 20:55:47 +09:00
Hide_D d4ba13eee3 부대 탈퇴시 확인 창이 정상적으로 뜨지 않는 버그 수정 2018-09-02 14:19:17 +09:00
Hide_D 16831880dd 이전 시간대에 대해 리셋 가능하지 않도록 변경 2018-08-31 20:36:59 +09:00
Hide_D f79fc98ba6 customCSS 추가
장수 아이콘에 generalIcon 클래스 추가
2018-08-31 20:25:10 +09:00
Hide_D 0483c75dd7 전투 시뮬레이터에서 대미지 범위 표기 2018-08-31 19:32:56 +09:00
Hide_D 3a4dcacd56 글꼴 크기 범위 추가 2018-08-30 22:06:37 +09:00
Hide_D 5f6f09674e Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-08-30 22:02:58 +09:00
Hide_D c785027c5c 에디터 변경 2018-08-30 22:02:51 +09:00
Hide_D d2659cea5f 원조시 특정 경우에 쌀 소모를 줄일 수 있는 버그 수정 2018-08-30 11:51:02 +09:00
Hide_D a9b966b159 증축 시 쌀 2000이 아닌 0 기준으로 계산하는 버그 수정 2018-08-30 11:49:37 +09:00
Hide_D f2c23e21c5 천도 시 쌀이 2000 미만이어도 가능한 버그 수정 2018-08-30 11:49:06 +09:00
Hide_D 53b973e2d3 장수 일람 연동 코드 버그 수정 2018-08-30 09:08:19 +09:00
Hide_D b7a570cba2 폰트 크기 변경에 대해서 즉시 반영이 되지 않는 버그 수정 2018-08-30 03:04:05 +09:00
Hide_D c77b79f0d2 글꼴 크기 커스터마이징 완료 2018-08-30 02:41:58 +09:00
Hide_D ef6678d8b0 에디터 글꼴 크기 커스터마이징 2018-08-30 02:12:48 +09:00
Hide_D 21609fa9c4 GUI 에디터 추가 옵션 2018-08-30 01:56:47 +09:00
Hide_D accc083702 gui 에디터 추가 2018-08-30 01:25:45 +09:00
Hide_D 9e677f3871 스탯 분류 방식 변경 2018-08-29 20:36:43 +09:00
Hide_D 55290eac30 네임스페이스 버그 해결 2018-08-29 15:04:44 +09:00
Hide_D d480502d33 NPC 네임스페이스 버그 해결 2018-08-29 15:03:43 +09:00
Hide_D c1cda16be0 성벽 공격 로그 수정 2018-08-28 21:56:33 +09:00
Hide_D 8ca9df9f34 '성인이 되어 등장' 시 전콘이 안뜨는 문제 해결 2018-08-28 20:36:46 +09:00
Hide_D 406b67b081 애니 집결 시나리오 변경 2018-08-28 20:29:42 +09:00
Hide_D 2c9fecf3ef 의병 고용, 인재 탐색시 기본 변종에 0 코드가 없는 경우 수정 2018-08-28 20:17:43 +09:00
Hide_D 6bc78b67bd 튜토리얼 버튼을 전투 시뮬레이터로 변경 2018-08-28 20:13:54 +09:00
Hide_D 5bbc46e070 구버전 시뮬레이터 삭제 2018-08-28 13:22:17 +09:00
Hide_D 6a9ceda361 국가에는 escape가 되어있으므로 메시지 템플릿에 2중 escape는 필요하지 않음 2018-08-28 01:49:25 +09:00
Hide_D ab2d5fd58f 이미지 출력시 주소에 빈칸이 있는 경우 안보이는 문제 해결 2018-08-27 23:39:58 +09:00
Hide_DandGogs 7018413777 Merge branch 'devel' of cappu/core into devel 2018-08-27 23:31:51 +09:00
cappu 77385616a4 테스트 겸 스탯업데이트 2018-08-27 23:17:31 +09:00
Hide_D c809f27bf5 전투 시뮬레이터를 포함한 코드 적용 2018-08-27 21:11:05 +09:00
Hide_D 493e778124 계략수비 시 전특 징병의 통솔이 반영되지 않는 버그 수정 2018-08-27 17:46:43 +09:00
Hide_D 7373af50b9 계략시 '징병' 전특의 통솔 상승을 받지 못하는 버그 수정 2018-08-27 17:43:53 +09:00
Hide_D 309f053510 화계시 도시 내정이 반영 안되는 버그 수정 2018-08-27 17:39:05 +09:00
Hide_D d976cf8a27 화계시 도시 내정이 반영 안되는 버그 수정 2018-08-27 17:38:08 +09:00
Hide_D 5d60a62a38 단어 수정 2018-08-27 13:53:07 +09:00
Hide_D a3f7dbccea 시뮬레이터 UI 일부 수정 2018-08-27 13:52:51 +09:00
Hide_D 0c4cce3339 시뮬레이터 숙련도 반영 안되는 버그 수정 2018-08-27 13:47:51 +09:00
Hide_D 58ccbc4d3d 불러오기시 json을 확장자로 지정 2018-08-27 03:13:34 +09:00
Hide_D c6cabc2087 전투 시뮬레이터 모두 저장/모두 불러오기 구현 2018-08-27 03:08:35 +09:00
Hide_D ef1f2722fc 전투 시뮬레이터 기본 기능 구현 완료 2018-08-27 02:21:45 +09:00
Hide_D 6b4a7ee03b 전투 시뮬레이션 구현 (동작) 2018-08-27 01:23:45 +09:00
Hide_D 7745a2051d 수비시 국가 성향이 공격국으로 지정되는 버그 수정 2018-08-27 00:18:50 +09:00
Hide_D eabd5e9acc 전투 시뮬레이터 구현 2018-08-27 00:18:19 +09:00
Hide_D d7dcbf98ff 전투 순서 버그 수정 2018-08-26 23:29:15 +09:00
Hide_D ff4c73f3d3 전투 종료시 로그 순서 변경 2018-08-26 23:25:47 +09:00
Hide_D dbf044b418 Revert "전투 종료 시 뜨는 로그 순서 변경"
This reverts commit 568e1b2923.
2018-08-26 23:23:06 +09:00
Hide_D 7a514e2492 쌀 소모에 '명성 버프/디버프' 성격이 적용되는 기존 버그 수정 2018-08-26 23:19:21 +09:00
Hide_D a73e533287 전투 종료 시 뜨는 로그 순서 변경 2018-08-26 23:19:09 +09:00
Hide_D 0f175ac4c6 수비 순서대로 정렬 버튼 활성화 2018-08-26 23:16:42 +09:00
Hide_D be15f1c698 쌀 소모에 '명성 버프/디버프' 성격이 적용되는 기존 버그 수정 2018-08-26 23:11:19 +09:00
Hide_D a315da6041 전투 종료 시 뜨는 로그 순서 변경 2018-08-26 22:59:14 +09:00
Hide_D 3f43f218ac 시뮬레이터 전투 준비 2018-08-26 22:32:37 +09:00
Hide_D 5c8ad646af ajax 쿼리 validation 종료 2018-08-26 22:31:14 +09:00
Hide_D 77f5fddd90 계략 실패 계수가 거꾸로 적용되는 버그 수정 2018-08-26 20:29:59 +09:00
Hide_D eab8b1ede5 전투 시뮬레이터 구현 중 2018-08-26 20:29:42 +09:00
Hide_D 2ab0896523 계략 실패 계수가 거꾸로 적용되는 버그 수정 2018-08-26 20:29:32 +09:00
Hide_D 639fe920df 전투 시뮬레이터 추가 구현 2018-08-26 20:01:08 +09:00
Hide_D 7577c84eca 국가 성향 버그 수정 2018-08-26 18:25:14 +09:00
Hide_D 22c4ec2d4a 국가 성향 출력 버그 수정 2018-08-26 18:24:35 +09:00
Hide_D 8ac85881a9 국가 성향이 제대로 등록되지 않는 버그 수정. 시뮬레이터 구현 2018-08-26 18:19:27 +09:00
Hide_D 724804efc6 전투 시뮬레이터 로컬 기능 구현 2018-08-26 17:20:47 +09:00
Hide_D ca57ef17fc 전투 시뮬레이터 추가 구현 2018-08-26 04:54:43 +09:00
Hide_D 480f015fb0 전투 시뮬레이터 구현 중 2018-08-25 11:27:29 +09:00
Hide_D d90e087f20 전투 시뮬레이터 추가 구현 2018-08-25 11:25:34 +09:00
Hide_D 3916cc0562 전투 시뮬레이터 UI 추가 구현 2018-08-25 11:15:33 +09:00
Hide_D cb54e56417 전투 시뮬레이터 작업 중 2018-08-24 03:46:21 +09:00
Hide_D 6aa606f2fa 전투 시뮬레이터 틀 작성 중 2018-08-24 01:09:17 +09:00
Hide_D 53d13a11ce 장수 생성시 능력치 덧셈이 이상한 버그 수정 2018-08-23 20:26:23 +09:00
Hide_D 9ba2b4142d 계략 시 수비 장수를 무시하는 버그 수정 2018-08-23 19:26:15 +09:00
Hide_D f5161a5b99 Merge branch 'devel' into battle_simulator 2018-08-23 18:45:32 +09:00
Hide_D f9d5d190d5 유니크 훈련,사기 템에서 훈련, 사기가 영구적으로 오르는 버그 수정 2018-08-23 16:21:18 +09:00
Hide_D eead9639a2 도시 점령시, 승수, 사기가 추가로 오르는 버그 수정 2018-08-23 16:10:49 +09:00
Hide_D 5044d5d3b4 파일 준비 2018-08-23 16:07:11 +09:00
282 changed files with 37600 additions and 7156 deletions
+3 -7
View File
@@ -1,11 +1,4 @@
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# 체섭 ignore
*.log
@@ -16,6 +9,7 @@ d_log/*.zip
sess_*
*/logs/*.txt
*/logs/*/*.txt
*/logs/preserved
err.txt
che/.htaccess
kwe/.htaccess
@@ -28,6 +22,7 @@ d_shared
d_pic/*.jpg
d_pic/*.gif
d_pic/*.png
d_pic/uploaded_image
d_setting/*.php
*/d_setting/*.php
@@ -46,3 +41,4 @@ test.php
phpinfo.php
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
*.sqlite3
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2018 Hide_D, 62che
Copyright (c) 2019 Hide_D, 62che
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+17 -10
View File
@@ -9,16 +9,23 @@
* <code>mpm_event</code> 권장
* PHP 7.2 이상
* <code>php-fpm</code> 권장
* php에서 curl을 실행가능해야 합니다.
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
* mysqlnd가 지원되어야합니다. (기본값: 지원)
* mysqli
* gd
* MariaDB 10.2.1 이상
* 현재 MySQL은 지원하지 않습니다.
* <code>git</code>
* <code>curl</code>
Linux는 Ubuntu 16.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
Linux는 Ubuntu 16.04, 18.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
Docker를 이용한 설치는 계획중입니다.
## 설치
## Docker를 이용한 설치
https://storage.hided.net/gogs/devsam/docker 를 참고해 주세요.
## 수동 설치
본 게임은 <code>git</code>을 이용한 업그레이드 시스템을 구현하였으므로, <code>git</code>이 필요합니다.
또한 웹 서비스 데몬을 운영중인 사용자(일반적으로 <code>www-data</code>, <code>apache</code>)에게 디렉토리 권한이 주어져야합니다.
@@ -28,11 +35,11 @@ Docker를 이용한 설치는 계획중입니다.
웹 데몬 user가 <code>www-data</code>인 경우 다음과 같이 입력하여 최신 배포버전과 이미지 파일을 얻을 수 있습니다.
```
sudo -u www-data git clone ssh://git@storage.hided.net:2525/devsam/core.git
git clone ssh://git@storage.hided.net:2525/devsam/image.git
sudo -u www-data git clone https://storage.hided.net/gogs/devsam/core.git
sudo -u www-data git clone https://storage.hided.net/gogs/devsam/image.git
```
> 이미지는 git hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
> 이미지는 hook/git_hook.php을 통해 동기화되며, 서버 설치 과정에 이미지 갱신 키를 지정하는 것으로 '훼' 서버 업데이트 시 동기화됩니다. 이미지 서버가 게임 서버와 별개여도 동작하나, php와 git을 지원해야합니다.
### 설치
@@ -45,9 +52,9 @@ Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의
## 카카오로그인 연동
현재 카카오로그인 API KEY를 입력하는 작업이 설치과정에 추가되어있지 않습니다.
서버 설치 시 카카오 로그인 연동을 위한 API KEY를 입력습니다.
<code>f_install/templates/KakaoKey.orig.php</code> 를 <code>d_setting/KakaoKey.php</code>로 복사한 후 API 키를 입력하여야 합니다.
만약 설치 이후 API KEY를 변경하고자 하는 경우 <code>d_setting/KakaoKey.php</code>에서 API키를 변경해야 합니다.
## 라이선스
+15
View File
@@ -164,4 +164,19 @@ a.samButton.disabled {
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
content:'】'
}
.tooltip_copyable_info .tooltiptext{
display: inline;
color: rgba(0,0,0,0);
font-size: 0;
}
.tooltiptext {
display: none;
}
.hidden_but_copyable{
color: rgba(0,0,0,0);
font-size: 0;
}
+6 -2
View File
@@ -52,8 +52,8 @@ input::-webkit-input-placeholder {
}
.login-button{
margin-top: 5px;
.login_btn_group{
margin-top: 5px;
}
.login-register{
@@ -98,6 +98,10 @@ input::-webkit-input-placeholder {
z-index:800;
}
#login_card{
z-index:801;
}
#btn_kakao_login{
cursor: pointer;
height:46px;
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
+132
View File
@@ -0,0 +1,132 @@
//download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support
// data can be a string, Blob, File, or dataURL
function download(data, strFileName, strMimeType) {
var self = window, // this script is only for browsers anyway...
u = "application/octet-stream", // this default mime also triggers iframe downloads
m = strMimeType || u,
x = data,
D = document,
a = D.createElement("a"),
z = function(a){return String(a);},
B = self.Blob || self.MozBlob || self.WebKitBlob || z,
BB = self.MSBlobBuilder || self.WebKitBlobBuilder || self.BlobBuilder,
fn = strFileName || "download",
blob,
b,
ua,
fr;
//if(typeof B.bind === 'function' ){ B=B.bind(self); }
if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
x=[x, m];
m=x[0];
x=x[1];
}
//go ahead and download dataURLs right away
if(String(x).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/)){
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
navigator.msSaveBlob(d2b(x), fn) :
saver(x) ; // everyone else can save dataURLs un-processed
}//end if dataURL passed?
try{
blob = x instanceof B ?
x :
new B([x], {type: m}) ;
}catch(y){
if(BB){
b = new BB();
b.append([x]);
blob = b.getBlob(m); // the blob
}
}
function d2b(u) {
var p= u.split(/[:;,]/),
t= p[1],
dec= p[2] == "base64" ? atob : decodeURIComponent,
bin= dec(p.pop()),
mx= bin.length,
i= 0,
uia= new Uint8Array(mx);
for(i;i<mx;++i) uia[i]= bin.charCodeAt(i);
return new B([uia], {type: t});
}
function saver(url, winMode){
if ('download' in a) { //html5 A[download]
a.href = url;
a.setAttribute("download", fn);
a.innerHTML = "downloading...";
D.body.appendChild(a);
setTimeout(function() {
a.click();
D.body.removeChild(a);
if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(a.href);}, 250 );}
}, 66);
return true;
}
//do iframe dataURL download (old ch+FF):
var f = D.createElement("iframe");
D.body.appendChild(f);
if(!winMode){ // force a mime that will download:
url="data:"+url.replace(/^data:([\w\/\-\+]+)/, u);
}
f.src = url;
setTimeout(function(){ D.body.removeChild(f); }, 333);
}//end saver
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
return navigator.msSaveBlob(blob, fn);
}
if(self.URL){ // simple fast and modern way using Blob and URL:
saver(self.URL.createObjectURL(blob), true);
}else{
// handle non-Blob()+non-URL browsers:
if(typeof blob === "string" || blob.constructor===z ){
try{
return saver( "data:" + m + ";base64," + self.btoa(blob) );
}catch(y){
return saver( "data:" + m + "," + encodeURIComponent(blob) );
}
}
// Blob but not URL:
fr=new FileReader();
fr.onload=function(e){
saver(this.result);
};
fr.readAsDataURL(blob);
}
return true;
} /* end download() */
+1
View File
@@ -0,0 +1 @@
"use strict";!function(t,r){var n=function(t){function r(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function n(t){return t.replace(/"/g,"&quot;")}function e(t){if(!t)return"";var r=[];for(var e in t){var i=t[e]+"";r.push(e+'="'+n(i)+'"')}return r.join(" ")}function i(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i=new a(i);for(var f=o(t),u=[],c=0;c<f.length;c++){var p=f[c];if("nl"===p.type&&i.nl2br)u.push("<br>\n");else if(p.isLink&&i.check(p)){var l=i.resolve(p),s=l.formatted,g=l.formattedHref,y=l.tagName,h=l.className,v=l.target,k=l.attributes,S="<"+y+' href="'+n(g)+'"';h&&(S+=' class="'+n(h)+'"'),v&&(S+=' target="'+n(v)+'"'),k&&(S+=" "+e(k)),S+=">"+r(s)+"</"+y+">",u.push(S)}else u.push(r(p.toString()))}return u.join("")}var o=t.tokenize,f=t.options,a=f.Options;if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{a:function(){},get:function(){return function(t){return i(this,t)}}})}catch(u){String.prototype.linkify||(String.prototype.linkify=function(t){return i(this,t)})}return i}(r);t.linkifyStr=n}(window,linkify);
+1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
/*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
+188
View File
@@ -0,0 +1,188 @@
/* select2-bootstrap4 with Darkly */
.select2-container--bootstrap4 { color: black; }
.select2-container--bootstrap4 .select2-selection { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; outline: 0; }
.select2-container--bootstrap4 .select2-selection.form-control { border-radius: 0.25rem; }
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; }
.select2-container--bootstrap4 .select2-search__field { outline: 0; }
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder { color: #6c757d; opacity: 1; }
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-results__option { padding: 0.75rem 0.375rem; font-size: 1rem; }
.select2-container--bootstrap4 .select2-results__option[role=group] { padding: 0; }
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] { color: #6c757d; cursor: not-allowed; }
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] { background-color: #f8f9fa; color: #16181b; }
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] { background-color: #007bff; color: #fff; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option { padding: 0.75rem 0.375rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group { padding-left: 0; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.375rem; padding-left: 0.75rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.75rem; padding-left: 1.125rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.125rem; padding-left: 1.5rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.5rem; padding-left: 1.875rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.875rem; padding-left: 2.25rem; }
.select2-container--bootstrap4 .select2-results__group { color: #6c757d; display: block; padding: 0.75rem 0.375rem; font-size: 75%; line-height: 1; white-space: nowrap; }
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; border-color: #80bdff; }
@media screen and (prefers-reduced-motion: reduce) { .select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: none; } }
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.25rem 0.25rem 0.25rem; }
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection { border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-color: transparent; }
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent; }
.select2-container--bootstrap4 .select2-selection__clear { color: #6c757d; cursor: pointer; float: right; font-weight: bold; margin-right: 10px; }
.select2-container--bootstrap4 .select2-selection__clear:hover { color: #343a40; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection { border-color: #ced4da; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-search__field { cursor: not-allowed; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice { background-color: #e9ecef; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove { display: none; }
.select2-container--bootstrap4 .select2-dropdown { border-color: #80bdff; border-width: 1px; overflow-x: hidden; margin-top: -1px; }
.select2-container--bootstrap4 .select2-dropdown--above { margin-top: 1px; }
.select2-container--bootstrap4 .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
.select2-container--bootstrap4 .select2-selection--single { height: calc(2.25rem + 2px); line-height: 1; padding: 0.75rem 1.125rem 0.75rem 0.375rem; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { position: absolute; bottom: 0; right: 0.375rem; top: 0; width: 0.25rem; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-color: #6c757d transparent transparent transparent; border-style: solid; border-width: 0.25rem 0.25rem 0 0.25rem; height: 0; left: 0; margin-left: -0.25rem; margin-top: -0.125rem; position: absolute; top: 50%; width: 0; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { color: #495057; padding: 0; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.25rem + 2px); padding: 0; height: auto; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { box-sizing: border-box; display: block; line-height: 1; list-style: none; margin: 0; overflow: hidden; padding: 0.75rem 0.375rem 0 0.75rem; width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder { color: #6c757d; float: left; margin-top: 5px; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { color: #495057; background: transparent; border: 1px solid #343a40; border-radius: 0.25rem; cursor: default; float: left; margin: -0.25rem 0 0 0.1875rem; padding: 0 0.75rem; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { background: transparent; padding: 0 0.375rem; height: calc(2.25rem + 2px)-2; line-height: 1; margin-top: 0; min-width: 5em; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove { color: #6c757d; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 0.375rem; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover { color: #343a40; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.75rem; }
.select2-container--bootstrap4 .select2-selection--single.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--single, .form-group-sm .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.2rem; font-size: 75%; height: calc(1.8125rem + 2px); line-height: 1; padding: 0.5rem 1rem 0.5rem 0.25rem; }
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b, .input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { margin-left: -0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(1.8125rem + 2px); border-radius: 0.2rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { padding: 0.5rem 0.25rem 0 0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 75%; line-height: 1; margin: 0 0 0 0.125rem; padding: 0 0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.25rem; font-size: 75%; height: calc(1.8125rem + 2px)-2; line-height: 1; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.5rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--single, .form-group-lg .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.3rem; font-size: 1.25rem; height: calc(2.875rem + 2px); line-height: 1; padding: 1rem 1.4375rem 1rem 0.5rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { width: 0.3125rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-width: 0.3125rem 0.3125rem 0 0.3125rem; margin-left: -0.3125rem; margin-left: -1rem; margin-top: -0.15625rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.875rem + 2px); border-radius: 0.3rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 1.25rem; line-height: 1; border-radius: 0.25rem; margin: 0rem 0 0 0.25rem; padding: 0 1rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.5rem; font-size: 1.25rem; height: calc(2.875rem + 2px)-2; line-height: 1; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 1rem; }
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single { padding-left: 1.125rem; padding-right: 0.375rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 0; padding-left: 0; text-align: right; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 0.375rem; right: auto; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b { margin-left: 0; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline { float: right; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 0; margin-right: 0.1875rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
.has-warning .select2-dropdown, .has-warning .select2-selection { border-color: #ffc107; }
.has-warning .select2-container--focus .select2-selection, .has-warning .select2-container--open .select2-selection { border-color: #d39e00; }
.has-warning.select2-drop-active { border-color: #d39e00; }
.has-warning.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #d39e00; }
.has-error .select2-dropdown, .has-error .select2-selection { border-color: #dc3545; }
.has-error .select2-container--focus .select2-selection, .has-error .select2-container--open .select2-selection { border-color: #bd2130; }
.has-error.select2-drop-active { border-color: #bd2130; }
.has-error.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #bd2130; }
.has-success .select2-dropdown, .has-success .select2-selection { border-color: #28a745; }
.has-success .select2-container--focus .select2-selection, .has-success .select2-container--open .select2-selection { border-color: #1e7e34; }
.has-success.select2-drop-active { border-color: #1e7e34; }
.has-success.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #1e7e34; }
.input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection, .input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection.form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection.form-control { border-radius: 0; }
.input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection.form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .select2-container--bootstrap4 { display: table; table-layout: fixed; position: relative; z-index: 2; width: 100%; margin-bottom: 0; }
.input-group > .select2-container--bootstrap4 > .selection > .select2-selection.form-control { float: none; }
.input-group > .select2-container--bootstrap4.select2-container--open, .input-group > .select2-container--bootstrap4.select2-container--focus { z-index: 3; }
.input-group > .select2-container--bootstrap4, .input-group > .select2-container--bootstrap4 .input-group-btn, .input-group > .select2-container--bootstrap4 .input-group-btn .btn { vertical-align: top; }
.form-control.select2-hidden-accessible { position: absolute !important; width: 1px !important; }
@media (min-width: 576px) { .form-inline .select2-container--bootstrap4 { display: inline-block; } }
+484
View File
@@ -0,0 +1,484 @@
.select2-container {
box-sizing: border-box;
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle; }
.select2-container .select2-selection--single {
box-sizing: border-box;
cursor: pointer;
display: block;
height: 28px;
user-select: none;
-webkit-user-select: none; }
.select2-container .select2-selection--single .select2-selection__rendered {
display: block;
padding-left: 8px;
padding-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.select2-container .select2-selection--single .select2-selection__clear {
position: relative; }
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
padding-right: 8px;
padding-left: 20px; }
.select2-container .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 32px;
user-select: none;
-webkit-user-select: none; }
.select2-container .select2-selection--multiple .select2-selection__rendered {
display: inline-block;
overflow: hidden;
padding-left: 8px;
text-overflow: ellipsis;
white-space: nowrap; }
.select2-container .select2-search--inline {
float: left; }
.select2-container .select2-search--inline .select2-search__field {
box-sizing: border-box;
border: none;
font-size: 100%;
margin-top: 5px;
padding: 0; }
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.select2-dropdown {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
box-sizing: border-box;
display: block;
position: absolute;
left: -100000px;
width: 100%;
z-index: 1051; }
.select2-results {
display: block; }
.select2-results__options {
list-style: none;
margin: 0;
padding: 0; }
.select2-results__option {
padding: 6px;
user-select: none;
-webkit-user-select: none; }
.select2-results__option[aria-selected] {
cursor: pointer; }
.select2-container--open .select2-dropdown {
left: 0; }
.select2-container--open .select2-dropdown--above {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--open .select2-dropdown--below {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-search--dropdown {
display: block;
padding: 4px; }
.select2-search--dropdown .select2-search__field {
padding: 4px;
width: 100%;
box-sizing: border-box; }
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.select2-search--dropdown.select2-search--hide {
display: none; }
.select2-close-mask {
border: 0;
margin: 0;
padding: 0;
display: block;
position: fixed;
left: 0;
top: 0;
min-height: 100%;
min-width: 100%;
height: auto;
width: auto;
opacity: 0;
z-index: 99;
background-color: #fff;
filter: alpha(opacity=0); }
.select2-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important; }
.select2-container--default .select2-selection--single {
background-color: #fff;
border: 1px solid #aaa;
border-radius: 4px; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
color: #444;
line-height: 28px; }
.select2-container--default .select2-selection--single .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold; }
.select2-container--default .select2-selection--single .select2-selection__placeholder {
color: #999; }
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
float: left; }
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
left: 1px;
right: auto; }
.select2-container--default.select2-container--disabled .select2-selection--single {
background-color: #eee;
cursor: default; }
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
display: none; }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.select2-container--default .select2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
box-sizing: border-box;
list-style: none;
margin: 0;
padding: 0 5px;
width: 100%; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
list-style: none; }
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
color: #999;
margin-top: 5px;
float: left; }
.select2-container--default .select2-selection--multiple .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-top: 5px;
margin-right: 10px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
color: #999;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #333; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
float: right; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: solid black 1px;
outline: 0; }
.select2-container--default.select2-container--disabled .select2-selection--multiple {
background-color: #eee;
cursor: default; }
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
display: none; }
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--default .select2-search--dropdown .select2-search__field {
border: 1px solid #aaa; }
.select2-container--default .select2-search--inline .select2-search__field {
background: transparent;
border: none;
outline: 0;
box-shadow: none;
-webkit-appearance: textfield; }
.select2-container--default .select2-results > .select2-results__options {
max-height: 200px;
overflow-y: auto; }
.select2-container--default .select2-results__option[role=group] {
padding: 0; }
.select2-container--default .select2-results__option[aria-disabled=true] {
color: #999; }
.select2-container--default .select2-results__option[aria-selected=true] {
background-color: #ddd; }
.select2-container--default .select2-results__option .select2-results__option {
padding-left: 1em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
padding-left: 0; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
margin-left: -1em;
padding-left: 2em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -2em;
padding-left: 3em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -3em;
padding-left: 4em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -4em;
padding-left: 5em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -5em;
padding-left: 6em; }
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #5897fb;
color: white; }
.select2-container--default .select2-results__group {
cursor: default;
display: block;
padding: 6px; }
.select2-container--classic .select2-selection--single {
background-color: #f7f7f7;
border: 1px solid #aaa;
border-radius: 4px;
outline: 0;
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
.select2-container--classic .select2-selection--single:focus {
border: 1px solid #5897fb; }
.select2-container--classic .select2-selection--single .select2-selection__rendered {
color: #444;
line-height: 28px; }
.select2-container--classic .select2-selection--single .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px; }
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
color: #999; }
.select2-container--classic .select2-selection--single .select2-selection__arrow {
background-color: #ddd;
border: none;
border-left: 1px solid #aaa;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
float: left; }
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
border: none;
border-right: 1px solid #aaa;
border-radius: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
left: 1px;
right: auto; }
.select2-container--classic.select2-container--open .select2-selection--single {
border: 1px solid #5897fb; }
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
background: transparent;
border: none; }
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
.select2-container--classic .select2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text;
outline: 0; }
.select2-container--classic .select2-selection--multiple:focus {
border: 1px solid #5897fb; }
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
list-style: none;
margin: 0;
padding: 0 5px; }
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
display: none; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
color: #888;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #555; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
float: right; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.select2-container--classic.select2-container--open .select2-selection--multiple {
border: 1px solid #5897fb; }
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--classic .select2-search--dropdown .select2-search__field {
border: 1px solid #aaa;
outline: 0; }
.select2-container--classic .select2-search--inline .select2-search__field {
outline: 0;
box-shadow: none; }
.select2-container--classic .select2-dropdown {
background-color: white;
border: 1px solid transparent; }
.select2-container--classic .select2-dropdown--above {
border-bottom: none; }
.select2-container--classic .select2-dropdown--below {
border-top: none; }
.select2-container--classic .select2-results > .select2-results__options {
max-height: 200px;
overflow-y: auto; }
.select2-container--classic .select2-results__option[role=group] {
padding: 0; }
.select2-container--classic .select2-results__option[aria-disabled=true] {
color: grey; }
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
background-color: #3875d7;
color: white; }
.select2-container--classic .select2-results__group {
cursor: default;
display: block;
padding: 6px; }
.select2-container--classic.select2-container--open .select2-dropdown {
border-color: #5897fb; }
+6457
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+5746
View File
File diff suppressed because it is too large Load Diff
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
+155
View File
@@ -0,0 +1,155 @@
(function($) {
$.extend($.summernote.lang, {
'ko-KR': {
font: {
bold: '굵게',
italic: '기울임꼴',
underline: '밑줄',
clear: '글자 효과 없애기',
height: '줄간격',
name: '글꼴',
superscript: '위 첨자',
subscript: '아래 첨자',
strikethrough: '취소선',
size: '글자 크기'
},
image: {
image: '사진',
insert: '사진 추가',
resizeFull: '100% 크기로 변경',
resizeHalf: '50% 크기로 변경',
resizeQuarter: '25% 크기로 변경',
floatLeft: '왼쪽 정렬',
floatRight: '오른쪽 정렬',
floatNone: '정렬하지 않음',
shapeRounded: '스타일: 둥근 모서리',
shapeCircle: '스타일: 원형',
shapeThumbnail: '스타일: 액자',
shapeNone: '스타일: 없음',
dragImageHere: '텍스트 혹은 사진을 이곳으로 끌어오세요',
dropImage: '텍스트 혹은 사진을 내려놓으세요',
selectFromFiles: '파일 선택',
maximumFileSize: 'Maximum file size',
maximumFileSizeError: 'Maximum file size exceeded.',
url: '사진 URL',
remove: '사진 삭제',
original: 'Original'
},
video: {
video: '동영상',
videoLink: '동영상 링크',
insert: '동영상 추가',
url: '동영상 URL',
providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion, Youku 사용 가능)'
},
link: {
link: '링크',
insert: '링크 추가',
unlink: '링크 삭제',
edit: '수정',
textToDisplay: '링크에 표시할 내용',
url: '이동할 URL',
openInNewWindow: '새창으로 열기'
},
table: {
table: '테이블',
addRowAbove: 'Add row above',
addRowBelow: 'Add row below',
addColLeft: 'Add column left',
addColRight: 'Add column right',
delRow: 'Delete row',
delCol: 'Delete column',
delTable: 'Delete table'
},
hr: {
insert: '구분선 추가'
},
style: {
style: '스타일',
p: '본문',
blockquote: '인용구',
pre: '코드',
h1: '제목 1',
h2: '제목 2',
h3: '제목 3',
h4: '제목 4',
h5: '제목 5',
h6: '제목 6'
},
lists: {
unordered: '글머리 기호',
ordered: '번호 매기기'
},
options: {
help: '도움말',
fullscreen: '전체 화면',
codeview: '코드 보기'
},
paragraph: {
paragraph: '문단 정렬',
outdent: '내어쓰기',
indent: '들여쓰기',
left: '왼쪽 정렬',
center: '가운데 정렬',
right: '오른쪽 정렬',
justify: '양쪽 정렬'
},
color: {
recent: '마지막으로 사용한 색',
more: '다른 색 선택',
background: '배경색',
foreground: '글자색',
transparent: '투명',
setTransparent: '투명',
reset: '취소',
resetToDefault: '기본 값으로 변경'
},
shortcut: {
shortcuts: '키보드 단축키',
close: '닫기',
textFormatting: '글자 스타일 적용',
action: '기능',
paragraphFormatting: '문단 스타일 적용',
documentStyle: '문서 스타일 적용',
extraKeys: 'Extra keys'
},
help: {
'insertParagraph': 'Insert Paragraph',
'undo': 'Undoes the last command',
'redo': 'Redoes the last command',
'tab': 'Tab',
'untab': 'Untab',
'bold': 'Set a bold style',
'italic': 'Set a italic style',
'underline': 'Set a underline style',
'strikethrough': 'Set a strikethrough style',
'removeFormat': 'Clean a style',
'justifyLeft': 'Set left align',
'justifyCenter': 'Set center align',
'justifyRight': 'Set right align',
'justifyFull': 'Set full align',
'insertUnorderedList': 'Toggle unordered list',
'insertOrderedList': 'Toggle ordered list',
'outdent': 'Outdent on current paragraph',
'indent': 'Indent on current paragraph',
'formatPara': 'Change current block\'s format as a paragraph(P tag)',
'formatH1': 'Change current block\'s format as H1',
'formatH2': 'Change current block\'s format as H2',
'formatH3': 'Change current block\'s format as H3',
'formatH4': 'Change current block\'s format as H4',
'formatH5': 'Change current block\'s format as H5',
'formatH6': 'Change current block\'s format as H6',
'insertHorizontalRule': 'Insert horizontal rule',
'linkDialog.show': 'Show Link Dialog'
},
history: {
undo: '실행 취소',
redo: '다시 실행'
},
specialChar: {
specialChar: '특수문자',
select: '특수문자를 선택하세요'
}
}
});
})(jQuery);
@@ -0,0 +1,16 @@
.ext-databasic {
position: relative;
display: block;
min-height: 50px;
background-color: cyan;
text-align: center;
padding: 20px;
border: 1px solid white;
border-radius: 10px;
}
.ext-databasic p {
color: white;
font-size: 1.2em;
margin: 0;
}
@@ -0,0 +1,292 @@
(function(factory) {
/* global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(window.jQuery);
}
}(function($) {
// pull in some summernote core functions
var ui = $.summernote.ui;
var dom = $.summernote.dom;
// define the popover plugin
var DataBasicPlugin = function(context) {
var self = this;
var options = context.options;
var lang = options.langInfo;
self.icon = '<i class="fa fa-object-group"/>';
// add context menu button for dialog
context.memo('button.databasic', function() {
return ui.button({
contents: self.icon,
tooltip: lang.databasic.insert,
click: context.createInvokeHandler('databasic.showDialog')
}).render();
});
// add popover edit button
context.memo('button.databasicDialog', function() {
return ui.button({
contents: self.icon,
tooltip: lang.databasic.edit,
click: context.createInvokeHandler('databasic.showDialog')
}).render();
});
// add popover size buttons
context.memo('button.databasicSize100', function() {
return ui.button({
contents: '<span class="note-fontsize-10">100%</span>',
tooltip: lang.image.resizeFull,
click: context.createInvokeHandler('editor.resize', '1')
}).render();
});
context.memo('button.databasicSize50', function() {
return ui.button({
contents: '<span class="note-fontsize-10">50%</span>',
tooltip: lang.image.resizeHalf,
click: context.createInvokeHandler('editor.resize', '0.5')
}).render();
});
context.memo('button.databasicSize25', function() {
return ui.button({
contents: '<span class="note-fontsize-10">25%</span>',
tooltip: lang.image.resizeQuarter,
click: context.createInvokeHandler('editor.resize', '0.25')
}).render();
});
self.events = {
'summernote.init': function(we, e) {
// update existing containers
$('data.ext-databasic', e.editable).each(function() { self.setContent($(this)); });
// TODO: make this an undo snapshot...
},
'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function() {
self.update();
},
'summernote.dialog.shown': function() {
self.hidePopover();
}
};
self.initialize = function() {
// create dialog markup
var $container = options.dialogsInBody ? $(document.body) : context.layoutInfo.editor;
var body = '<div class="form-group row-fluid">' +
'<label>' + lang.databasic.testLabel + '</label>' +
'<input class="ext-databasic-test form-control" type="text" />' +
'</div>';
var footer = '<button href="#" class="btn btn-primary ext-databasic-save">' + lang.databasic.insert + '</button>';
self.$dialog = ui.dialog({
title: lang.databasic.name,
fade: options.dialogsFade,
body: body,
footer: footer
}).render().appendTo($container);
// create popover
self.$popover = ui.popover({
className: 'ext-databasic-popover'
}).render().appendTo('body');
var $content = self.$popover.find('.popover-content');
context.invoke('buttons.build', $content, options.popover.databasic);
};
self.destroy = function() {
self.$popover.remove();
self.$popover = null;
self.$dialog.remove();
self.$dialog = null;
};
self.update = function() {
// Prevent focusing on editable when invoke('code') is executed
if (!context.invoke('editor.hasFocus')) {
self.hidePopover();
return;
}
var rng = context.invoke('editor.createRange');
var visible = false;
if (rng.isOnData()) {
var $data = $(rng.sc).closest('data.ext-databasic');
if ($data.length) {
var pos = dom.posFromPlaceholder($data[0]);
self.$popover.css({
display: 'block',
left: pos.left,
top: pos.top
});
// save editor target to let size buttons resize the container
context.invoke('editor.saveTarget', $data[0]);
visible = true;
}
}
// hide if not visible
if (!visible) {
self.hidePopover();
}
};
self.hidePopover = function() {
self.$popover.hide();
};
// define plugin dialog
self.getInfo = function() {
var rng = context.invoke('editor.createRange');
if (rng.isOnData()) {
var $data = $(rng.sc).closest('data.ext-databasic');
if ($data.length) {
// Get the first node on range(for edit).
return {
node: $data,
test: $data.attr('data-test')
};
}
}
return {};
};
self.setContent = function($node) {
$node.html('<p contenteditable="false">' + self.icon + ' ' + lang.databasic.name + ': ' +
$node.attr('data-test') + '</p>');
};
self.updateNode = function(info) {
self.setContent(info.node
.attr('data-test', info.test));
};
self.createNode = function(info) {
var $node = $('<data class="ext-databasic"></data>');
if ($node) {
// save node to info structure
info.node = $node;
// insert node into editor dom
context.invoke('editor.insertNode', $node[0]);
}
return $node;
};
self.showDialog = function() {
var info = self.getInfo();
var newNode = !info.node;
context.invoke('editor.saveRange');
self
.openDialog(info)
.then(function(dialogInfo) {
// [workaround] hide dialog before restore range for IE range focus
ui.hideDialog(self.$dialog);
context.invoke('editor.restoreRange');
// insert a new node
if (newNode) {
self.createNode(info);
}
// update info with dialog info
$.extend(info, dialogInfo);
self.updateNode(info);
})
.fail(function() {
context.invoke('editor.restoreRange');
});
};
self.openDialog = function(info) {
return $.Deferred(function(deferred) {
var $inpTest = self.$dialog.find('.ext-databasic-test');
var $saveBtn = self.$dialog.find('.ext-databasic-save');
var onKeyup = function(event) {
if (event.keyCode === 13) {
$saveBtn.trigger('click');
}
};
ui.onDialogShown(self.$dialog, function() {
context.triggerEvent('dialog.shown');
$inpTest.val(info.test).on('input', function() {
ui.toggleBtn($saveBtn, $inpTest.val());
}).trigger('focus').on('keyup', onKeyup);
$saveBtn
.text(info.node ? lang.databasic.edit : lang.databasic.insert)
.click(function(event) {
event.preventDefault();
deferred.resolve({ test: $inpTest.val() });
});
// init save button
ui.toggleBtn($saveBtn, $inpTest.val());
});
ui.onDialogHidden(self.$dialog, function() {
$inpTest.off('input keyup');
$saveBtn.off('click');
if (deferred.state() === 'pending') {
deferred.reject();
}
});
ui.showDialog(self.$dialog);
});
};
};
// Extends summernote
$.extend(true, $.summernote, {
plugins: {
databasic: DataBasicPlugin
},
options: {
popover: {
databasic: [
['databasic', ['databasicDialog', 'databasicSize100', 'databasicSize50', 'databasicSize25']]
]
}
},
// add localization texts
lang: {
'en-US': {
databasic: {
name: 'Basic Data Container',
insert: 'insert basic data container',
edit: 'edit basic data container',
testLabel: 'test input'
}
}
}
});
}));
@@ -0,0 +1,81 @@
(function(factory) {
/* global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(window.jQuery);
}
}(function($) {
// Extends plugins for adding hello.
// - plugin is external module for customizing.
$.extend($.summernote.plugins, {
/**
* @param {Object} context - context object has status of editor.
*/
'hello': function(context) {
var self = this;
// ui has renders to build ui elements.
// - you can create a button with `ui.button`
var ui = $.summernote.ui;
// add hello button
context.memo('button.hello', function() {
// create button
var button = ui.button({
contents: '<i class="fa fa-child"/> Hello',
tooltip: 'hello',
click: function() {
self.$panel.show();
self.$panel.hide(500);
// invoke insertText method with 'hello' on editor module.
context.invoke('editor.insertText', 'hello');
}
});
// create jQuery object from button instance.
var $hello = button.render();
return $hello;
});
// This events will be attached when editor is initialized.
this.events = {
// This will be called after modules are initialized.
'summernote.init': function(we, e) {
console.log('summernote initialized', we, e);
},
// This will be called when user releases a key on editable.
'summernote.keyup': function(we, e) {
console.log('summernote keyup', we, e);
}
};
// This method will be called when editor is initialized by $('..').summernote();
// You can create elements for plugin
this.initialize = function() {
this.$panel = $('<div class="hello-panel"/>').css({
position: 'absolute',
width: 100,
height: 100,
left: '50%',
top: '50%',
background: 'red'
}).hide();
this.$panel.appendTo('body');
};
// This methods will be called when editor is destroyed by $('..').summernote('destroy');
// You should remove elements on `initialize`.
this.destroy = function() {
this.$panel.remove();
this.$panel = null;
};
}
});
}));
@@ -0,0 +1,153 @@
/* Forked from https://github.com/asiffermann/summernote-image-title */
(function (factory) {
/* Global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(window.jQuery);
}
}(function ($) {
$.extend(true, $.summernote.lang, {
'en-US': {
imageFlip: {
edit: 'Flip image',
flipLabel: 'Alternative Image'
}
},
'ko-KR': {
imageFlip: {
edit: '이미지 전환',
flipLabel: '대체 이미지( , 로 구분)'
}
},
});
$.extend($.summernote.options, {
imageFlip: {
icon: '<i class="note-icon-pencil"/>',
tooltip: 'Image Flip'
}
});
$.extend($.summernote.plugins, {
'imageFlip': function (context) {
var self = this;
var ui = $.summernote.ui;
var $note = context.layoutInfo.note;
var $editor = context.layoutInfo.editor;
var $editable = context.layoutInfo.editable;
var $toolbar = context.layoutInfo.toolbar;
if (typeof context.options.imageFlip === 'undefined') {
context.options.imageFlip = {};
}
var options = context.options;
var lang = options.langInfo;
context.memo('button.imageFlip', function () {
var button = ui.button({
contents: ui.icon(options.icons.pencil),
container: false,
tooltip: lang.imageFlip.edit,
click: function (e) {
context.invoke('imageFlip.show');
}
});
return button.render();
});
this.initialize = function () {
var $container = options.dialogsInBody ? $(document.body) : $editor;
var body = '<div class="form-group">' +
'<label>' + lang.imageFlip.flipLabel + '</label>' +
'<input class="note-image-flip-text form-control" type="text" />' +
'</div>';
var footer = '<button href="#" class="btn btn-primary note-image-flip-btn">' + lang.imageFlip.edit + '</button>';
this.$dialog = ui.dialog({
title: lang.imageFlip.edit,
body: body,
footer: footer
}).render().appendTo($container);
};
this.destroy = function () {
ui.hideDialog(this.$dialog);
this.$dialog.remove();
};
this.bindEnterKey = function ($input, $btn) {
$input.on('keypress', function (event) {
if (event.keyCode === 13) {
$btn.trigger('click');
}
});
};
this.show = function () {
var $img = $($editable.data('target'));
var imgInfo = {
imgDom: $img,
flip: $img.data('flip'),
};
this.showLinkDialog(imgInfo).then(function (imgInfo) {
ui.hideDialog(self.$dialog);
var $img = imgInfo.imgDom;
if (imgInfo.flip) {
$img.attr('data-flip', imgInfo.flip);
}
else {
$img.removeData('flip');
}
$note.val(context.invoke('code'));
$note.change();
});
};
this.showLinkDialog = function (imgInfo) {
return $.Deferred(function (deferred) {
var $imageFlip = self.$dialog.find('.note-image-flip-text');
var $editBtn = self.$dialog.find('.note-image-flip-btn');
ui.onDialogShown(self.$dialog, function () {
context.triggerEvent('dialog.shown');
$editBtn.click(function (event) {
event.preventDefault();
deferred.resolve({
imgDom: imgInfo.imgDom,
flip: $imageFlip.val(),
});
});
$imageFlip.val(imgInfo.flip).trigger('focus');
self.bindEnterKey($imageFlip, $editBtn);
});
ui.onDialogHidden(self.$dialog, function () {
$editBtn.off('click');
if (deferred.state() === 'pending') {
deferred.reject();
}
});
ui.showDialog(self.$dialog);
});
};
}
});
}));
@@ -0,0 +1,312 @@
(function(factory) {
/* global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(window.jQuery);
}
}(function($) {
$.extend($.summernote.plugins, {
'specialchars': function(context) {
var self = this;
var ui = $.summernote.ui;
var $editor = context.layoutInfo.editor;
var options = context.options;
var lang = options.langInfo;
var KEY = {
UP: 38,
DOWN: 40,
LEFT: 37,
RIGHT: 39,
ENTER: 13
};
var COLUMN_LENGTH = 15;
var COLUMN_WIDTH = 35;
var currentColumn = 0;
var currentRow = 0;
var totalColumn = 0;
var totalRow = 0;
// special characters data set
var specialCharDataSet = [
'&quot;', '&amp;', '&lt;', '&gt;', '&iexcl;', '&cent;',
'&pound;', '&curren;', '&yen;', '&brvbar;', '&sect;',
'&uml;', '&copy;', '&ordf;', '&laquo;', '&not;',
'&reg;', '&macr;', '&deg;', '&plusmn;', '&sup2;',
'&sup3;', '&acute;', '&micro;', '&para;', '&middot;',
'&cedil;', '&sup1;', '&ordm;', '&raquo;', '&frac14;',
'&frac12;', '&frac34;', '&iquest;', '&times;', '&divide;',
'&fnof;', '&circ;', '&tilde;', '&ndash;', '&mdash;',
'&lsquo;', '&rsquo;', '&sbquo;', '&ldquo;', '&rdquo;',
'&bdquo;', '&dagger;', '&Dagger;', '&bull;', '&hellip;',
'&permil;', '&prime;', '&Prime;', '&lsaquo;', '&rsaquo;',
'&oline;', '&frasl;', '&euro;', '&image;', '&weierp;',
'&real;', '&trade;', '&alefsym;', '&larr;', '&uarr;',
'&rarr;', '&darr;', '&harr;', '&crarr;', '&lArr;',
'&uArr;', '&rArr;', '&dArr;', '&hArr;', '&forall;',
'&part;', '&exist;', '&empty;', '&nabla;', '&isin;',
'&notin;', '&ni;', '&prod;', '&sum;', '&minus;',
'&lowast;', '&radic;', '&prop;', '&infin;', '&ang;',
'&and;', '&or;', '&cap;', '&cup;', '&int;',
'&there4;', '&sim;', '&cong;', '&asymp;', '&ne;',
'&equiv;', '&le;', '&ge;', '&sub;', '&sup;',
'&nsub;', '&sube;', '&supe;', '&oplus;', '&otimes;',
'&perp;', '&sdot;', '&lceil;', '&rceil;', '&lfloor;',
'&rfloor;', '&loz;', '&spades;', '&clubs;', '&hearts;',
'&diams;'
];
context.memo('button.specialchars', function() {
return ui.button({
contents: '<i class="fa fa-font fa-flip-vertical">',
tooltip: lang.specialChar.specialChar,
click: function() {
self.show();
}
}).render();
});
/**
* Make Special Characters Table
*
* @member plugin.specialChar
* @private
* @return {jQuery}
*/
this.makeSpecialCharSetTable = function() {
var $table = $('<table/>');
$.each(specialCharDataSet, function(idx, text) {
var $td = $('<td/>').addClass('note-specialchar-node');
var $tr = (idx % COLUMN_LENGTH === 0) ? $('<tr/>') : $table.find('tr').last();
var $button = ui.button({
callback: function($node) {
$node.html(text);
$node.attr('title', text);
$node.attr('data-value', encodeURIComponent(text));
$node.css({
width: COLUMN_WIDTH,
'margin-right': '2px',
'margin-bottom': '2px'
});
}
}).render();
$td.append($button);
$tr.append($td);
if (idx % COLUMN_LENGTH === 0) {
$table.append($tr);
}
});
totalRow = $table.find('tr').length;
totalColumn = COLUMN_LENGTH;
return $table;
};
this.initialize = function() {
var $container = options.dialogsInBody ? $(document.body) : $editor;
var body = '<div class="form-group row-fluid">' + this.makeSpecialCharSetTable()[0].outerHTML + '</div>';
this.$dialog = ui.dialog({
title: lang.specialChar.select,
body: body
}).render().appendTo($container);
};
this.show = function() {
var text = context.invoke('editor.getSelectedText');
context.invoke('editor.saveRange');
this.showSpecialCharDialog(text).then(function(selectChar) {
context.invoke('editor.restoreRange');
// build node
var $node = $('<span></span>').html(selectChar)[0];
if ($node) {
// insert video node
context.invoke('editor.insertNode', $node);
}
}).fail(function() {
context.invoke('editor.restoreRange');
});
};
/**
* show image dialog
*
* @param {jQuery} $dialog
* @return {Promise}
*/
this.showSpecialCharDialog = function(text) {
return $.Deferred(function(deferred) {
var $specialCharDialog = self.$dialog;
var $specialCharNode = $specialCharDialog.find('.note-specialchar-node');
var $selectedNode = null;
var ARROW_KEYS = [KEY.UP, KEY.DOWN, KEY.LEFT, KEY.RIGHT];
var ENTER_KEY = KEY.ENTER;
function addActiveClass($target) {
if (!$target) {
return;
}
$target.find('button').addClass('active');
$selectedNode = $target;
}
function removeActiveClass($target) {
$target.find('button').removeClass('active');
$selectedNode = null;
}
// find next node
function findNextNode(row, column) {
var findNode = null;
$.each($specialCharNode, function(idx, $node) {
var findRow = Math.ceil((idx + 1) / COLUMN_LENGTH);
var findColumn = ((idx + 1) % COLUMN_LENGTH === 0) ? COLUMN_LENGTH : (idx + 1) % COLUMN_LENGTH;
if (findRow === row && findColumn === column) {
findNode = $node;
return false;
}
});
return $(findNode);
}
function arrowKeyHandler(keyCode) {
// left, right, up, down key
var $nextNode;
var lastRowColumnLength = $specialCharNode.length % totalColumn;
if (KEY.LEFT === keyCode) {
if (currentColumn > 1) {
currentColumn = currentColumn - 1;
} else if (currentRow === 1 && currentColumn === 1) {
currentColumn = lastRowColumnLength;
currentRow = totalRow;
} else {
currentColumn = totalColumn;
currentRow = currentRow - 1;
}
} else if (KEY.RIGHT === keyCode) {
if (currentRow === totalRow && lastRowColumnLength === currentColumn) {
currentColumn = 1;
currentRow = 1;
} else if (currentColumn < totalColumn) {
currentColumn = currentColumn + 1;
} else {
currentColumn = 1;
currentRow = currentRow + 1;
}
} else if (KEY.UP === keyCode) {
if (currentRow === 1 && lastRowColumnLength < currentColumn) {
currentRow = totalRow - 1;
} else {
currentRow = currentRow - 1;
}
} else if (KEY.DOWN === keyCode) {
currentRow = currentRow + 1;
}
if (currentRow === totalRow && currentColumn > lastRowColumnLength) {
currentRow = 1;
} else if (currentRow > totalRow) {
currentRow = 1;
} else if (currentRow < 1) {
currentRow = totalRow;
}
$nextNode = findNextNode(currentRow, currentColumn);
if ($nextNode) {
removeActiveClass($selectedNode);
addActiveClass($nextNode);
}
}
function enterKeyHandler() {
if (!$selectedNode) {
return;
}
deferred.resolve(decodeURIComponent($selectedNode.find('button').attr('data-value')));
$specialCharDialog.modal('hide');
}
function keyDownEventHandler(event) {
event.preventDefault();
var keyCode = event.keyCode;
if (keyCode === undefined || keyCode === null) {
return;
}
// check arrowKeys match
if (ARROW_KEYS.indexOf(keyCode) > -1) {
if ($selectedNode === null) {
addActiveClass($specialCharNode.eq(0));
currentColumn = 1;
currentRow = 1;
return;
}
arrowKeyHandler(keyCode);
} else if (keyCode === ENTER_KEY) {
enterKeyHandler();
}
return false;
}
// remove class
removeActiveClass($specialCharNode);
// find selected node
if (text) {
for (var i = 0; i < $specialCharNode.length; i++) {
var $checkNode = $($specialCharNode[i]);
if ($checkNode.text() === text) {
addActiveClass($checkNode);
currentRow = Math.ceil((i + 1) / COLUMN_LENGTH);
currentColumn = (i + 1) % COLUMN_LENGTH;
}
}
}
ui.onDialogShown(self.$dialog, function() {
$(document).on('keydown', keyDownEventHandler);
self.$dialog.find('button').tooltip();
$specialCharNode.on('click', function(event) {
event.preventDefault();
deferred.resolve(decodeURIComponent($(event.currentTarget).find('button').attr('data-value')));
ui.hideDialog(self.$dialog);
});
});
ui.onDialogHidden(self.$dialog, function() {
$specialCharNode.off('click');
self.$dialog.find('button').tooltip('destroy');
$(document).off('keydown', keyDownEventHandler);
if (deferred.state() === 'pending') {
deferred.reject();
}
});
ui.showDialog(self.$dialog);
});
};
}
});
}));
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+14 -3
View File
@@ -3,7 +3,6 @@ namespace sammo;
define('ROOT', realpath(__dir__.'/..'));
setlocale(LC_ALL, 'ko_KR.UTF-8');
date_default_timezone_set('Asia/Seoul');
mb_internal_encoding("UTF-8");
mb_http_output('UTF-8');
mb_regex_encoding('UTF-8');
@@ -88,19 +87,28 @@ function getExceptionTraceAsString($exception) {
return $rtn;
}
function logError(string $err, string $errstr, array $trace){
function logError(string $err, string $errstr, string $errpath, array $trace){
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
$date = date("Ymd_His");
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
$trace = array_map(function(string $text){
return str_replace(ROOT, '{ROOT}', $text);
}, $trace);
$owner = Util::get_client_ip();
$session = Session::getInstance();
if($session->isLoggedIn(true)){
$owner .= '('.$session->getUserID().','.$session->userName.')';
}
$fdb->insert('err_log', [
'date'=>$date,
'err'=>$err,
'errstr'=>$errstr,
'trace'=>Json::encode($trace)
'errpath'=>$errpath,
'trace'=>Json::encode($trace),
'webuser'=>$owner
]);
}
@@ -116,6 +124,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
logError(
getFriendlyErrorType($errno),
$errstr,
$errfile.':'.$errline,
getExceptionTraceAsString($e)
);
}
@@ -123,9 +132,11 @@ set_error_handler("\sammo\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e){
logError(
get_class($e),
$e->getMessage(),
$e->getFile().':'.$e->getLine(),
getExceptionTraceAsString($e)
);
+32
View File
@@ -98,6 +98,38 @@ require(__dir__.'/../vendor/autoload.php');
</div>
</div>
<div class="form-group row">
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 </label>
<div class="input-group col-sm-8">
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
value="" />
<div class="input-group-append">
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
</div>
</div>
</div>
<hr style="width:100%; border-top: 1px solid lightgray;">
<div class="form-group row">
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
placeholder="카카오톡 API의 Rest Key"
value="" />
</div>
</div>
<div class="form-group row">
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
placeholder="카카오톡 API의 Admin Key"
value="" />
</div>
</div>
<div class="form-group row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
+1
View File
@@ -52,6 +52,7 @@ $rootDB->insert('member',[
'oauth_type' => 'NONE',
'id' => $username,
'email' => null,
'token_valid_until'=>'2999-01-01 00:00:00',
'pw' => $finalPassword,
'salt' => $userSalt,
'grade'=> 6,
+31 -4
View File
@@ -11,6 +11,11 @@ $dbName = Util::getReq('db_name');
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
$imageRequestKey = Util::getReq('image_request_key');
$kakaoRESTKey = Util::getReq('kakao_rest_key', 'string', '');
$kakaoAdminKey = Util::getReq('kakao_admin_key', 'string', '');
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
Json::die([
@@ -186,6 +191,8 @@ $globalSalt = bin2hex(random_bytes(16));
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$imageRequestPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/git_pull.php', $servHost);
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/InstallKey.php', $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/ServConfig.orig.php',
@@ -193,11 +200,17 @@ $result = Util::generateFileUsingSimpleTemplate(
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'gameImagePath'=>$gameImagePath,
'imageRequestPath'=>$imageRequestPath,
'imageRequestKey'=>$imageRequestKey
],
true
);
if($imageRequestKey){
@file_get_contents($imageKeyInstallPath.'?key='.$imageRequestKey);
}
if ($result !== true) {
Json::die([
'result'=>false,
@@ -217,8 +230,8 @@ $result = Util::generateFileUsingSimpleTemplate(
);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/menu.orig.js',
ROOT.'/d_shared/menu.js',
__dir__.'/templates/menu.orig.json',
ROOT.'/d_shared/menu.json',
[],
true
);
@@ -263,6 +276,19 @@ $result = Util::generateFileUsingSimpleTemplate(
]
);
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost.'/');
Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/KakaoKey.orig.php',
ROOT.'/d_setting/KakaoKey.php',
[
'REST_API_KEY'=>$kakaoRESTKey,
'ADMIN_KEY'=>$kakaoAdminKey,
'REDIRECT_URI'=>$kakaoRedirectURI
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
@@ -272,5 +298,6 @@ if ($result !== true) {
Json::die([
'result'=>true,
'reason'=>'success'
'reason'=>'success',
'globalSalt'=>$globalSalt
]);
+117
View File
@@ -0,0 +1,117 @@
<?php
namespace sammo;
require(__dir__.'/../vendor/autoload.php');
$session = Session::requireLogin([])->setReadOnly();
if($session->userGrade < 6){
Json::die([
'result'=>false,
'reason'=>'관리자 아님'
]);
}
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
if($servHost){
if(!$sharedIconPath || $gameImagePath){
Json::die([
'result'=>false,
'reason'=>'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
]);
}
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
}
else if($sharedIconPath || $gameImagePath){
$servHost = ServConfig::$serverWebPath;
if($sharedIconPath){
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
}
else{
$sharedIconPath = ServConfig::$sharedIconPath;
}
if($gameImagePath){
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
}
else{
$gameImagePath = ServConfig::$gameImagePath;
}
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
}
else{
$servHost = ServConfig::$serverWebPath;
$sharedIconPath = ServConfig::$sharedIconPath;
$gameImagePath = ServConfig::$gameImagePath;
}
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
+5 -2
View File
@@ -20,16 +20,19 @@ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `member` (
`NO` INT(11) NOT NULL AUTO_INCREMENT,
`oauth_id` BIGINT(20) NULL DEFAULT NULL,
`oauth_type` ENUM('NONE','KAKAO') NOT NULL,
`ID` VARCHAR(64) NOT NULL,
`EMAIL` VARCHAR(64) NULL DEFAULT NULL,
`oauth_type` ENUM('NONE','KAKAO') NOT NULL,
`oauth_info` TEXT NOT NULL DEFAULT '{}',
`token_valid_until` DATETIME NULL DEFAULT NULL,
`PW` CHAR(128) NOT NULL,
`salt` CHAR(16) NOT NULL,
`third_use` INT(1) NOT NULL DEFAULT '0',
`NAME` VARCHAR(64) NOT NULL,
`PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg',
`IMGSVR` INT(1) NULL DEFAULT '0',
`acl` text NOT NULL DEFAULT '{}' COMMENT 'json',
`acl` TEXT NOT NULL DEFAULT '{}' COMMENT 'json',
`penalty` TEXT NOT NULL DEFAULT '{}' COMMENT 'json',
`GRADE` INT(1) NULL DEFAULT '1',
`REG_NUM` INT(3) NULL DEFAULT '0',
`REG_DATE` DATETIME NOT NULL,
+3 -1
View File
@@ -3,7 +3,9 @@ CREATE TABLE IF NOT EXISTS `err_log` (
`date` TEXT NOT NULL,
`err` TEXT NOT NULL,
`errstr` TEXT NOT NULL,
`trace` TEXT NOT NULL
`errpath` TEXT NOT NULL,
`trace` TEXT NOT NULL,
`webuser` TEXT NULL
);
CREATE INDEX IF NOT EXISTS `date` ON `err_log` (
`date` DESC
+9
View File
@@ -10,6 +10,8 @@ class ServConfig
public static $serverWebPath = '_tK_serverBasePath_';
public static $sharedIconPath = '_tK_sharedIconPath_';
public static $gameImagePath = "_tK_gameImagePath_";
public static $imageRequestPath = "_tK_imageRequestPath_";
public static $imageRequestKey = '_tK_imageRequestKey_';
public static function getSharedIconPath(string $filepath='') : string
{
@@ -32,6 +34,13 @@ class ServConfig
return static::$gameImagePath;
}
public static function getImagePullURI() : string
{
$now = time();
$req_hash = Util::hashPassword(sprintf("%016x",$now), static::$imageRequestKey);
return static::$imageRequestPath."?req={$req_hash}&time={$now}";
}
/**
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
+41 -21
View File
@@ -88,6 +88,33 @@
background-size: 700px 500px;
}
/*미니체 지도*/
.map_theme_miniche_b.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche_b.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche_b.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche_b.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche_b .map_bgroad{
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
background-size: 700px 500px;
}
/*루드라사움 지도*/
.map_theme_ludo_rathowm .map_bglayer1{
background: url('_tK_gameImagePath_/map/ludo_rathowm/back.jpg') no-repeat;
@@ -99,28 +126,21 @@
background-size: 700px 500px;
}
.map_theme_ludo_rathowm.map_detail.map_spring .map_title_text{
background:
url('_tK_gameImagePath_/spring.gif') no-repeat right;
}
.map_theme_ludo_rathowm.map_detail.map_summer .map_title_text{
background:
url('_tK_gameImagePath_/summer.gif') no-repeat right;
}
.map_theme_ludo_rathowm.map_detail.map_fall .map_title_text{
background:
url('_tK_gameImagePath_/fall.gif') no-repeat right;
}
.map_theme_ludo_rathowm.map_detail.map_winter .map_title_text{
background:
url('_tK_gameImagePath_/winter.gif') no-repeat right;
}
.world_map.map_theme_ludo_rathowm .map_title .map_title_text::before {
color:white;
content:'LP';
margin-right:1ch;
}
}
/*체스판 지도*/
.map_theme_chess .map_bglayer1{
background: url('_tK_gameImagePath_/map/chess/chessboard.png') no-repeat;
background-size: 700px 500px;
}
/*포켓몬 v1 지도*/
.map_theme_pokemon_v1 .map_bglayer1{
background: url('_tK_gameImagePath_/map/pokemon_v1/back_pal8.png') no-repeat;
background-size: 700px 500px;
}
-8
View File
@@ -1,8 +0,0 @@
window.sammo_menu = [
['/bbs/board', '삼모게시판', '_blank'],
['/bbs/tip', '팁/강좌', '_blank'],
['/bbs/news', '삼국 일보', '_blank'],
['/bbs/history2', '개인 열전', '_blank'],
['/bbs/history3', '국가 열전', '_blank'],
['/bbs/patch', '패치 내역', '_blank']
];
+8
View File
@@ -0,0 +1,8 @@
[
["/bbs/board", "삼모게시판", "_blank"],
["/bbs/tip", "팁/강좌", "_blank"],
["/bbs/news", "삼국 일보", "_blank"],
["/bbs/history2", "개인 열전", "_blank"],
["/bbs/history3", "국가 열전", "_blank"],
["/bbs/patch", "패치 내역", "_blank"]
]
+3 -3
View File
@@ -40,10 +40,10 @@ case "분당김":
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$db->update('general', [
'turntime'=>$db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
'turntime'=>$db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
'expire'=>$db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
], true);
break;
case "분지연":
@@ -87,4 +87,4 @@ case "락풀기":
break;
}
header('Location:_119.php');
header('Location:_119.php', true, 303);
+1 -38
View File
@@ -73,7 +73,6 @@ $sel[$type] = "selected";
<td width=130 align=center id=bg1> </td>
<td width=80 align=center id=bg1> </td>
<td width=60 align=center id=bg1> </td>
<td align=center id=bg1> </td>
</tr>
<?php
@@ -95,11 +94,7 @@ for ($i=0; $i < $dipcount; $i++) {
$me = $dip['me'];
$you = $dip['you'];
$query = "select reserved,showing from diplomacy where you='$me' and me='$you'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dip2 = MYDB_fetch_array($result2);
if ($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
if ($dip['state'] == 2) {
continue;
}
@@ -115,37 +110,6 @@ for ($i=0; $i < $dipcount; $i++) {
}
$date = date('Y-m-d H:i:s');
$note = "";
if ($dip['fixed'] != "") {
if ($dip['state'] == 7) {
$note .= $dip['fixed'];
} else {
$note .= "<font color=gray>{$dip['fixed']}</font>";
}
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
$note .= "<br>";
}
}
if ($dip['reserved'] != "") {
if ($dip['showing'] >= $date) {
$note .= "<font color=skyblue>아국측 제의</font>: {$dip['reserved']}";
} else {
$note .= "<font color=gray>아국측 제의: {$dip['reserved']}</font>";
}
if ($dip2['reserved'] != "") {
$note .= "<br>";
}
}
if ($dip2['reserved'] != "") {
if ($dip2['showing'] >= $date) {
$note .= "<font color=limegreen>상대측 제의</font>: {$dip2['reserved']}";
} else {
$note .= "<font color=gray>상대측 제의: {$dip2['reserved']}</font>";
}
}
if ($note == "") {
$note = "&nbsp;";
}
echo "
<tr>
@@ -153,7 +117,6 @@ for ($i=0; $i < $dipcount; $i++) {
<td align=center style=color:".newColor($nationColor[$you]).";background-color:{$nationColor[$you]};>$nationName[$you]</td>
<td align=center>$state</td>
<td align=center>{$dip['term']} 개월</td>
<td align=left style=font-size:7px;>{$note}</td>
</tr>";
}
?>
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
die('권한 부족');
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if(!$gameStor->isunited){
die('아직 천통하지 않았습니다');
}
foreach($db->queryFirstColumn(
'SELECT no FROM general WHERE npc != 0 and age >= %i',
GameConst::$retirementYear
) as $generalNo){
CheckHall($generalNo);
}
-1660
View File
@@ -1,1660 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
//로그인 검사
$isgen = Util::getReq('isgen');
$leader1 = Util::getReq('leader1', 'int', 0);
$power1 = Util::getReq('power1', 'int', 0);
$intel1 = Util::getReq('intel1', 'int', 0);
$type1 = Util::getReq('type1', 'int', 0);
$crew1 = Util::getReq('crew1', 'int', 0);
$train1 = Util::getReq('train1', 'int', 0);
$atmos1 = Util::getReq('atmos1', 'int', 0);
$level1 = Util::getReq('level1', 'int', 0);
$explevel1 = Util::getReq('explevel1', 'int', 0);
$tech1 = Util::getReq('tech1', 'int', 0);
$dex10 = Util::getReq('dex10', 'int', 0);
$dex110 = Util::getReq('dex110', 'int', 0);
$dex120 = Util::getReq('dex120', 'int', 0);
$dex130 = Util::getReq('dex130', 'int', 0);
$dex140 = Util::getReq('dex140', 'int', 0);
$dx10 = array_fill(0, 20, '');
$dx110 = array_fill(0, 20, '');
$dx120 = array_fill(0, 20, '');
$dx130 = array_fill(0, 20, '');
$dx140 = array_fill(0, 20, '');
$leader2 = Util::getReq('leader2', 'int', 0);
$power2 = Util::getReq('power2', 'int', 0);
$intel2 = Util::getReq('intel2', 'int', 0);
$type2 = Util::getReq('type2', 'int', 0);
$crew2 = Util::getReq('crew2', 'int', 0);
$train2 = Util::getReq('train2', 'int', 0);
$atmos2 = Util::getReq('atmos2', 'int', 0);
$level2 = Util::getReq('level2', 'int', 0);
$explevel2 = Util::getReq('explevel2', 'int', 0);
$tech2 = Util::getReq('tech2', 'int', 0);
$dex20 = Util::getReq('dex20', 'int', 0);
$dex210 = Util::getReq('dex210', 'int', 0);
$dex220 = Util::getReq('dex220', 'int', 0);
$dex230 = Util::getReq('dex230', 'int', 0);
$dex240 = Util::getReq('dex240', 'int', 0);
$dx20 = array_fill(0, 20, '');
$dx210 = array_fill(0, 20, '');
$dx220 = array_fill(0, 20, '');
$dx230 = array_fill(0, 20, '');
$dx240 = array_fill(0, 20, '');
$def = Util::getReq('def', 'int', 0);
$wall = Util::getReq('wall', 'int', 0);
$atmos3 = Util::getReq('atmos3', 'int', 0);
$train3 = Util::getReq('train3', 'int', 0);
$sellevel1 = array_fill(0, 13, '');
$sel1 = array_fill(0,44, '');
$tch1 = array_fill(0,11, '');
$sellevel2 = array_fill(0, 13, '');
$sel2 = array_fill(0,44, '');
$tch2 = array_fill(0,11, '');
$dec = 0;
$rice = 0;
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("시뮬", 2);
$query = "select no,tournament,con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$admin = $gameStor->getAll();
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if($session->userGrade < 3) {
echo "특별회원이 아닙니다.";
exit();
}
$mydeathnumSum = 0;
$mykillnumSum = 0;
$expSum = 0;
$ricingSum = 0;
$expSum2 = 0;
$ricingSum2 = 0;
if($isgen == "장수평균" || $isgen == "성벽평균") {
$simulCount = 1000;
} else {
$simulCount = 1;
}
$general = [
'no'=>1
];
$oppose = [
'no'=>2
];
$city = [
'gen1'=>0,
'gen2'=>0,
'gen3'=>0,
];
if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평균" || $isgen == "성벽평균") {
$msg2 = "";
for($i=0; $i < $simulCount; $i++) {
$general['leader'] = $leader1;
$general['power'] = $power1;
$general['intel'] = $intel1;
$general['crewtype'] = $type1;
$general['crew'] = $crew1;
$general['train'] = $train1;
$general['atmos'] = $atmos1;
$general['level'] = $level1;
$general['explevel'] = $explevel1;
$general['dex0'] = $dex10;
$general['dex10'] = $dex110;
$general['dex20'] = $dex120;
$general['dex30'] = $dex130;
$general['dex40'] = $dex140;
$general['injury'] = 0;
$general['horse'] = 0;
$general['weap'] = 0;
$general['book'] = 0;
$oppose['leader'] = $leader2;
$oppose['power'] = $power2;
$oppose['intel'] = $intel2;
$oppose['crewtype'] = $type2;
$oppose['crew'] = $crew2;
$oppose['train'] = $train2;
$oppose['atmos'] = $atmos2;
$oppose['level'] = $level2;
$oppose['explevel'] = $explevel2;
$oppose['dex0'] = $dex20;
$oppose['dex10'] = $dex210;
$oppose['dex20'] = $dex220;
$oppose['dex30'] = $dex230;
$oppose['dex40'] = $dex240;
$oppose['injury'] = 0;
$oppose['horse'] = 0;
$oppose['weap'] = 0;
$oppose['book'] = 0;
$city['def'] = $def;
$city['wall'] = $wall;
$city['agri'] = 0;
$city['comm'] = 0;
$city['secu'] = 0;
if($isgen == "장수공격" || $isgen == "장수평균") {
$opposecount = 1;
} else {
$opposecount = 0;
}
$warphase = getRate($admin, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
// 우선 스케일링
$city['def'] *= 10;
$city['wall'] *= 10;
$msg = "";
$msg .= "<C>●</>1월:공격장수가 <R>공격</>합니다.<br>";
$exp = 0; //병사 소진 시킨 만큼
$opexp = 0;
$exp2 = 1; //능력경험치
$phase = 0;
while($phase < $warphase) {
// 장수가 없어서 도시 공격
if($opposecount == 0) {
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} 성을 <M>공격</>합니다.<br>";
$mykillnum = 0; $mydeathnum = 0;
while($phase < $warphase) {
$phase++;
$myAtt = getAtt($general, $tech1, 0);
$myDef = getDef($general, $tech1);
$cityAtt = getCityAtt($city);
$cityDef = getCityDef($city);
// 감소할 병사 수
$cityCrew = GameConst::$armperphase + $myAtt - $cityDef;
$myCrew = GameConst::$armperphase + $cityAtt - $myDef;
$cityweight = $myAtt - $cityDef;
$myweight = $cityAtt - $myDef;
//훈련 사기따라
$myCrew = getCrew($myCrew, $atmos3, $general['train']);
$cityCrew = getCrew($cityCrew, $general['atmos'], $train3);
//숙련도 따라
$genDexAtt = getGenDex($general, $general['crewtype']);
$genDexDef = getGenDex($general, 40);
$cityCrew *= getDexLog($genDexAtt, ($train3-60)*7200);
$myCrew *= getDexLog(($atmos3-60)*7200, $genDexDef);
$avoid = 1;
// 병종간 특성
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
$int = $general['intel'] + getBookEff($general['book']);
if($general['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($general['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
$ratio = rand() % 100; // 0~99
if($ratio >= 30) {
$type = rand() % 3;
switch($type) {
case 0:
$msg .= "<C>●</><D>급습</>을 <C>성공</>했다!<br>";
$cityCrew *= 1.2;
break;
case 1:
$msg .= "<C>●</><D>위보</>를 <C>성공</>했다!<br>";
$cityCrew *= 1.4;
break;
case 2:
$msg .= "<C>●</><D>혼란</>을 <C>성공</>했다!<br>";
$cityCrew *= 1.6;
break;
}
} else {
$type = rand() % 3;
switch($type) {
case 0:
$msg .= "<C>●</><D>급습</>을 <R>실패</>했다!<br>";
$cityCrew /= 1.2;
$myCrew *= 1.2;
break;
case 1:
$msg .= "<C>●</><D>위보</>를 <R>실패</>했다!<br>";
$cityCrew /= 1.4;
$myCrew *= 1.4;
break;
case 2:
$msg .= "<C>●</><D>혼란</>을 <R>실패</>했다!<br>";
$cityCrew /= 1.6;
$myCrew *= 1.6;
break;
}
}
}
} elseif($general['crewtype'] == 40) { // 정란
$cityCrew = $cityCrew * 1.5;
} elseif($general['crewtype'] == 41) { // 충차
$cityCrew = $cityCrew * 2.0;
} elseif($general['crewtype'] == 42) { // 벽력거
$cityCrew = $cityCrew * 1.5;
}
//군주, 참모, 장군 공격 보정 5%
if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) {
$cityCrew = $cityCrew * 1.05;
}
//레벨 보정
$cityCrew = $cityCrew * (100 + $general['explevel']/6)/100;
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']);
if($ratio >= $rd && $avoid == 1) {
$msg .= "<C>●</><C>필살</>공격!</><br>";
$cityCrew = CriticalScore2($cityCrew);
$avoid = 0;
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $avoid == 1) {
$msg .= "<C>●</><C>회피</>했다!</><br>";
$myCrew /= 10; // 10%만 소모
$avoid = 0;
}
//랜타추가
$cityCrew *= (rand() % 21 + 90)/100; // 90~110%
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
$general['crew'] -= Util::round($myCrew);
$city['def'] -= Util::round($cityCrew);
$city['wall'] -= Util::round($cityCrew);
$tempMyCrew = $myCrew; $tempCityCrew = $cityCrew;
$tempGeneralCrew = $general['crew']; $tempCityDef = $city['def'];
if($city['wall'] <= 0) { $city['wall'] = 0; }
if($city['def'] < 0) {
$offset = Util::round($tempCityDef*$tempMyCrew/$tempCityCrew);
$myCrew += $offset;
$general['crew'] -= $offset;
$cityCrew += $tempCityDef;
$city['def'] = 0;
}
if($general['crew'] < 0) {
$offset = Util::round($tempGeneralCrew*$tempCityCrew/$tempMyCrew);
$cityCrew += $offset;
$city['def'] -= $offset;
$myCrew += $tempGeneralCrew;
$general['crew'] = 0;
}
$exp += $cityCrew;
$opexp += $myCrew;
$general['crew'] = Util::round($general['crew']);
$cityCrew = Util::round($cityCrew);
$myCrew = Util::round($myCrew);
$myAtt = round($myAtt, 2);
$myDef = round($myDef, 2);
$cityAtt = round($cityAtt, 2);
$cityDef = round($cityDef, 2);
$msg .= "<C>●</> $phase : <Y1>【공격장수】</> <C>{$general['crew']} (-$myCrew)</> VS <C>{$city['def']} (-$cityCrew)</> <Y1>【성벽】</><br>";
$mykillnum += $cityCrew; $mydeathnum += $myCrew;
if($city['def'] <= 0) { break; }
if($general['crew'] <= 0) { break; }
}
// 도시쌀 소모 계산
$opexp = Util::round($opexp / 50);
$rice = Util::round($opexp * 4 * getCrewtypeRice(0, 0) * ($train3/100 - 0.2));
//원래대로 스케일링
$city['def'] = Util::round($city['def'] / 10);
$city['wall'] = Util::round($city['wall'] / 10);
//내정 감소
$dec = Util::round($cityCrew / 10);
$city['agri'] -= $dec;
$city['comm'] -= $dec;
$city['secu'] -= $dec;
if($city['agri'] < 0) { $city['agri'] = 0; }
if($city['comm'] < 0) { $city['comm'] = 0; }
if($city['secu'] < 0) { $city['secu'] = 0; }
$msg .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</><br>";
$msg .= "<R>★</>【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice<br>";
// $msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</>   ";
// $msg2 .= "<R>★</>【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice<br>";
if($city['def'] == 0 || $general['crew'] == 0) {
break;
}
// 장수 대결
} else {
$josaUl = JosaUtil::pick(GameUnitConst::byID($oppose['crewtype'])->name, '을');
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} <Y>수비장수</>의 ".GameUnitConst::byID($oppose['crewtype'])->name."{$josaUl} 공격합니다.<br>";
$mykillnum = 0; $mydeathnum = 0;
while($phase < $warphase) {
$phase++;
$myAtt = getAtt($general, $tech1, 0);
$myDef = getDef($general, $tech1);
$opAtt = getAtt($oppose, $tech2, 0);
$opDef = getDef($oppose, $tech2);
// 감소할 병사 수
$myCrew = GameConst::$armperphase + $opAtt - $myDef;
$opCrew = GameConst::$armperphase + $myAtt - $opDef;
//훈련 사기따라
$myCrew = getCrew($myCrew, $oppose['atmos'], $general['train']);
$opCrew = getCrew($opCrew, $general['atmos'], $oppose['train']);
//숙련도 따라
$genDexAtt = getGenDex($general, $general['crewtype']);
$genDexDef = getGenDex($general, $oppose['crewtype']);
$oppDexAtt = getGenDex($oppose, $oppose['crewtype']);
$oppDexDef = getGenDex($oppose, $general['crewtype']);
$opCrew *= getDexLog($genDexAtt, $oppDexDef);
$myCrew *= getDexLog($oppDexAtt, $genDexDef);
$myAvoid = 1;
$opAvoid = 1;
// 병종간 특성
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
$int = $general['intel'] + getBookEff($general['book']);
if($general['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($general['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
$ratio = rand() % 100;
if($ratio >= 30) {
$type = rand() % 5; // 0~4
switch($type) {
case 0:
$msg .= "<C>●</><D>위보</>를 <C>성공</>했다!<br>";
$opCrew *= 1.2;
break;
case 1:
$msg .= "<C>●</><D>매복</>을 <C>성공</>했다!<br>";
$opCrew *= 1.4;
break;
case 2:
$msg .= "<C>●</><D>반목</>을 <C>성공</>했다!<br>";
$opCrew *= 1.6;
break;
case 3:
$msg .= "<C>●</><D>화계</>를 <C>성공</>했다!<br>";
$opCrew *= 1.8;
break;
case 4:
$msg .= "<C>●</><D>혼란</>을 <C>성공</>했다!<br>";
$opCrew *= 2.0;
break;
}
} else {
$type = rand() % 5; // 0~4
switch($type) {
case 0:
$msg .= "<C>●</><D>위보</>를 <R>실패</>했다!<br>";
$opCrew /= 1.1;
$myCrew *= 1.1;
break;
case 1:
$msg .= "<C>●</><D>매복</>을 <R>실패</>했다!<br>";
$opCrew /= 1.2;
$myCrew *= 1.2;
break;
case 2:
$msg .= "<C>●</><D>반목</>을 <R>실패</>했다!<br>";
$opCrew /= 1.3;
$myCrew *= 1.3;
break;
case 3:
$msg .= "<C>●</><D>화계</>를 <R>실패</>했다!<br>";
$opCrew /= 1.4;
$myCrew *= 1.4;
break;
case 4:
$msg .= "<C>●</><D>혼란</>을 <R>실패</>했다!<br>";
$opCrew /= 1.5;
$myCrew *= 1.5;
break;
}
}
}
}
// 상대 장수 병종간 특성
if(intdiv($oppose['crewtype'], 10) == 3) { // 귀병
$int = $oppose['intel'] + getBookEff($oppose['book']);
if($oppose['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($oppose['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($oppose['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($oppose['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
$ratio = rand() % 100;
if($ratio >= 30) {
$type = rand() % 5; // 0~4
switch($type) {
case 0:
$msg .= "<C>●</><D>위보</>에 당했다!<br>";
$myCrew *= 1.2;
break;
case 1:
$msg .= "<C>●</><D>매복</>에 당했다!<br>";
$myCrew *= 1.4;
break;
case 2:
$msg .= "<C>●</><D>반목</>에 당했다!<br>";
$myCrew *= 1.6;
break;
case 3:
$msg .= "<C>●</><D>화계</>에 당했다!<br>";
$myCrew *= 1.8;
break;
case 4:
$msg .= "<C>●</><D>혼란</>에 당했다!<br>";
$myCrew *= 2.0;
break;
}
} else {
$type = rand() % 5; // 0~4
switch($type) {
case 0:
$msg .= "<C>●</><D>위보</>를 간파했다!<br>";
$myCrew /= 1.1;
$opCrew *= 1.1;
break;
case 1:
$msg .= "<C>●</><D>매복</>을 간파했다!<br>";
$myCrew /= 1.2;
$opCrew *= 1.2;
break;
case 2:
$msg .= "<C>●</><D>반목</>을 간파했다!<br>";
$myCrew /= 1.3;
$opCrew *= 1.3;
break;
case 3:
$msg .= "<C>●</><D>화계</>를 간파했다!<br>";
$myCrew /= 1.4;
$opCrew *= 1.4;
break;
case 4:
$msg .= "<C>●</><D>혼란</>을 간파했다!<br>";
$myCrew /= 1.5;
$opCrew *= 1.5;
break;
}
}
}
}
if($oppose['crewtype'] == 43) { // 목우
$r = 0;
$r += $oppose['atmos'];
$r += $oppose['train'];
$ratio = rand() % 400; // 최대 50% 저지
if($ratio < $r && $opAvoid == 1) {
$msg .= "<C>●</><R>저지</>당했다!</><br>";
$opAvoid = 0;
continue;
}
}
// my 입장 상성
// 보병계열 > 궁병계열
if(intdiv($general['crewtype'], 10) == 0 && intdiv($oppose['crewtype'], 10) == 1) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 궁병계열 > 기병계열
if(intdiv($general['crewtype'], 10) == 1 && intdiv($oppose['crewtype'], 10) == 2) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 기병계열 > 보병계열
if(intdiv($general['crewtype'], 10) == 2 && intdiv($oppose['crewtype'], 10) == 0) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 차병계열
if(intdiv($general['crewtype'], 10) == 4) {
$myCrew *= 1.2;
$opCrew *= 0.8;
}
// op 입장 상성
// 보병계열 > 궁병계열
if(intdiv($oppose['crewtype'], 10) == 0 && intdiv($general['crewtype'], 10) == 1) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 궁병계열 > 기병계열
if(intdiv($oppose['crewtype'], 10) == 1 && intdiv($general['crewtype'], 10) == 2) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 기병계열 > 보병계열
if(intdiv($oppose['crewtype'], 10) == 2 && intdiv($general['crewtype'], 10) == 0) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 차병계열
if(intdiv($oppose['crewtype'], 10) == 4) {
$opCrew *= 1.2;
$myCrew *= 0.8;
}
//군주, 참모, 장군 공격 보정 5%
if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) {
$opCrew = $opCrew * 1.05;
}
//상대장수 관직 보정
//군주, 참모, 모사 방어 보정 5%
if($oppose['level'] == 12 || $oppose['level'] == 11 || $oppose['level'] == 9 || $oppose['level'] == 7 || $oppose['level'] == 5) {
$opCrew = $opCrew * 0.95;
} elseif($oppose['level'] == 4 && $oppose['no'] == $city['gen1']) { // 태수 보정
$opCrew = $opCrew * 0.95;
} elseif($oppose['level'] == 3 && $oppose['no'] == $city['gen2']) { // 군사 보정
$opCrew = $opCrew * 0.95;
} elseif($oppose['level'] == 2 && $oppose['no'] == $city['gen3']) { // 시중 보정
$opCrew = $opCrew * 0.95;
}
//레벨 보정
$myCrew = $myCrew * ((100 - $general['explevel']/3)/100);
$opCrew = $opCrew / ((100 - $general['explevel']/3)/100);
$myCrew = $myCrew / ((100 - $oppose['explevel']/3)/100);
$opCrew = $opCrew * ((100 - $oppose['explevel']/3)/100);
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']);
if($ratio >= $rd && $myAvoid == 1) {
$msg .= "<C>●</><C>필살</>공격!</><br>";
$opCrew = CriticalScore2($opCrew);
$myAvoid = 0;
}
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($oppose['leader'], $oppose['power'], $oppose['intel']);
if($ratio >= $rd && $opAvoid == 1) {
$msg .= "<C>●</>상대의 <R>필살</>공격!</><br>";
$myCrew = CriticalScore2($myCrew);
$opAvoid = 0;
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $myAvoid == 1) {
$msg .= "<C>●</><C>회피</>했다!</><br>";
$myCrew /= 10; // 10%만 소모
$myAvoid = 0;
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($admin, $oppose['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $opAvoid == 1) {
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
$opCrew /= 10; // 10%만 소모
$opAvoid = 0;
}
//랜타추가
$opCrew *= (rand() % 21 + 90)/100; // 90~110%
$myCrew *= (rand() % 21 + 90)/100; // 90~110%
$general['crew'] -= Util::round($myCrew);
$oppose['crew'] -= Util::round($opCrew);
$tempMyCrew = $myCrew; $tempOpCrew = $opCrew;
$tempGeneralCrew = $general['crew']; $tempOpposeCrew = $oppose['crew'];
if($general['crew'] <= 0 && $oppose['crew'] <= 0) {
$r1 = $tempGeneralCrew / $tempMyCrew;
$r2 = $tempOpposeCrew / $tempOpCrew;
if($r1 > $r2) {
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
$myCrew += $offset;
$general['crew'] -= $offset;
$opCrew += $tempOpposeCrew;
$oppose['crew'] = 0;
} else {
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
$opCrew += $offset;
$oppose['crew'] -= $offset;
$myCrew += $tempGeneralCrew;
$general['crew'] = 0;
}
} elseif($general['crew'] * $oppose['crew'] <= 0) {
if($oppose['crew'] < 0) {
$offset = Util::round($tempOpposeCrew*$tempMyCrew/$tempOpCrew);
$myCrew += $offset;
$general['crew'] -= $offset;
$opCrew += $tempOpposeCrew;
$oppose['crew'] = 0;
}
if($general['crew'] < 0) {
$offset = Util::round($tempGeneralCrew*$tempOpCrew/$tempMyCrew);
$opCrew += $offset;
$oppose['crew'] -= $offset;
$myCrew += $tempGeneralCrew;
$general['crew'] = 0;
}
}
$exp += $opCrew;
$opexp += $myCrew;
$general['crew'] = Util::round($general['crew']);
$oppose['crew'] = Util::round($oppose['crew']);
$myCrew = Util::round($myCrew);
$opCrew = Util::round($opCrew);
$myAtt = round($myAtt, 2);
$myDef = round($myDef, 2);
$opAtt = round($opAtt, 2);
$opDef = round($opDef, 2);
$msg .= "<C>●</> $phase : <Y1>【공격장수】</> <C>{$general['crew']} (-$myCrew)</> VS <C>{$oppose['crew']} (-$opCrew)</> <Y1>【수비장수】</><br>";
$mykillnum += $opCrew; $mydeathnum += $myCrew;
if($oppose['crew'] <= 0) { break; }
if($general['crew'] <= 0) { break; }
}
$msg .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</><br>";
// $msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnum</> vs <C>-$mykillnum</>   ";
}
}
// 공헌, 명성 상승
$exp = Util::round($exp / 50);
$ricing = ($exp * 5 * getCrewtypeRice($general['crewtype'], $tech1));
$msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricing<br>";
// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricing<br>";
$msg = ConvertLog($msg, 1);
$mydeathnumSum += $mydeathnum;
$mykillnumSum += $mykillnum;
$expSum += $exp;
$ricingSum += $ricing;
$expSum2 += $dec;
$ricingSum2 += $rice;
}
$mydeathnumSum /= $simulCount;
$mykillnumSum /= $simulCount;
$expSum /= $simulCount;
$ricingSum /= $simulCount;
$expSum2 /= $simulCount;
$ricingSum2 /= $simulCount;
if($isgen == "성벽평균") {
$msg2 .= "{$simulCount}회 평균<br>";
$msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnumSum</> vs <C>-$mykillnumSum</>   ";
$msg2 .= "<R>★</>【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2<br>";
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricingSum<br>";
} elseif($isgen == "장수평균") {
$msg2 .= "{$simulCount}회 평균<br>";
$msg2 .= "<S>★</>병사수 변화 : <C>-$mydeathnumSum</> vs <C>-$mykillnumSum</>   ";
$msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($general['crewtype'], $tech1)." = $ricingSum<br>";
}
$msg2 = ConvertLog($msg2, 1);
} else {
$leader1 = 70;
$power1 = 70;
$intel1 = 10;
$type1 = 0;
$crew1 = 7000;
$train1 = 100;
$atmos1 = 100;
$level1 = 1;
$explevel1 = 20;
$leader2 = 70;
$power2 = 70;
$intel2 = 10;
$type2 = 0;
$crew2 = 7000;
$train2 = 100;
$atmos2 = 100;
$level2 = 1;
$explevel2 = 20;
$def = 7000;
$wall = 7000;
$train3 = $admin['city_rate'];
$atmos3 = $admin['city_rate'];
}
switch($level1) {
case 12: $sellevel1[12] = "selected"; break;
case 11: $sellevel1[11] = "selected"; break;
case 10: $sellevel1[10] = "selected"; break;
case 9: $sellevel1[9] = "selected"; break;
case 8: $sellevel1[8] = "selected"; break;
case 7: $sellevel1[7] = "selected"; break;
case 6: $sellevel1[6] = "selected"; break;
case 5: $sellevel1[5] = "selected"; break;
case 1: $sellevel1[1] = "selected"; break;
}
switch($level2) {
case 12: $sellevel2[12] = "selected"; break;
case 11: $sellevel2[11] = "selected"; break;
case 10: $sellevel2[10] = "selected"; break;
case 9: $sellevel2[9] = "selected"; break;
case 8: $sellevel2[8] = "selected"; break;
case 7: $sellevel2[7] = "selected"; break;
case 6: $sellevel2[6] = "selected"; break;
case 5: $sellevel2[5] = "selected"; break;
case 1: $sellevel2[1] = "selected"; break;
}
switch($type1) {
case 0: $sel1[0] = "selected"; break;
case 1: $sel1[1] = "selected"; break;
case 2: $sel1[2] = "selected"; break;
case 3: $sel1[3] = "selected"; break;
case 4: $sel1[4] = "selected"; break;
case 5: $sel1[5] = "selected"; break;
case 10: $sel1[10] = "selected"; break;
case 11: $sel1[11] = "selected"; break;
case 12: $sel1[12] = "selected"; break;
case 13: $sel1[13] = "selected"; break;
case 14: $sel1[14] = "selected"; break;
case 20: $sel1[20] = "selected"; break;
case 21: $sel1[21] = "selected"; break;
case 22: $sel1[22] = "selected"; break;
case 23: $sel1[23] = "selected"; break;
case 24: $sel1[24] = "selected"; break;
case 25: $sel1[25] = "selected"; break;
case 26: $sel1[26] = "selected"; break;
case 27: $sel1[27] = "selected"; break;
case 30: $sel1[30] = "selected"; break;
case 31: $sel1[31] = "selected"; break;
case 32: $sel1[32] = "selected"; break;
case 33: $sel1[33] = "selected"; break;
case 34: $sel1[34] = "selected"; break;
case 35: $sel1[35] = "selected"; break;
case 36: $sel1[36] = "selected"; break;
case 37: $sel1[37] = "selected"; break;
case 38: $sel1[38] = "selected"; break;
case 40: $sel1[40] = "selected"; break;
case 41: $sel1[41] = "selected"; break;
case 42: $sel1[42] = "selected"; break;
case 43: $sel1[43] = "selected"; break;
}
switch($type2) {
case 0: $sel2[0] = "selected"; break;
case 1: $sel2[1] = "selected"; break;
case 2: $sel2[2] = "selected"; break;
case 3: $sel2[3] = "selected"; break;
case 4: $sel2[4] = "selected"; break;
case 5: $sel2[5] = "selected"; break;
case 10: $sel2[10] = "selected"; break;
case 11: $sel2[11] = "selected"; break;
case 12: $sel2[12] = "selected"; break;
case 13: $sel2[13] = "selected"; break;
case 14: $sel2[14] = "selected"; break;
case 20: $sel2[20] = "selected"; break;
case 21: $sel2[21] = "selected"; break;
case 22: $sel2[22] = "selected"; break;
case 23: $sel2[23] = "selected"; break;
case 24: $sel2[24] = "selected"; break;
case 25: $sel2[25] = "selected"; break;
case 26: $sel2[26] = "selected"; break;
case 27: $sel2[27] = "selected"; break;
case 30: $sel2[30] = "selected"; break;
case 31: $sel2[31] = "selected"; break;
case 32: $sel2[32] = "selected"; break;
case 33: $sel2[33] = "selected"; break;
case 34: $sel2[34] = "selected"; break;
case 35: $sel2[35] = "selected"; break;
case 36: $sel2[36] = "selected"; break;
case 37: $sel2[37] = "selected"; break;
case 38: $sel2[38] = "selected"; break;
case 40: $sel2[40] = "selected"; break;
case 41: $sel2[41] = "selected"; break;
case 42: $sel2[42] = "selected"; break;
case 43: $sel2[43] = "selected"; break;
}
switch($tech1) {
case 0: $tch1[0] = "selected"; break;
case 1000: $tch1[1] = "selected"; break;
case 2000: $tch1[2] = "selected"; break;
case 3000: $tch1[3] = "selected"; break;
case 4000: $tch1[4] = "selected"; break;
case 5000: $tch1[5] = "selected"; break;
case 6000: $tch1[6] = "selected"; break;
case 7000: $tch1[7] = "selected"; break;
case 8000: $tch1[8] = "selected"; break;
case 9000: $tch1[9] = "selected"; break;
case 10000: $tch1[10] = "selected"; break;
}
switch($tech2) {
case 0: $tch2[0] = "selected"; break;
case 1000: $tch2[1] = "selected"; break;
case 2000: $tch2[2] = "selected"; break;
case 3000: $tch2[3] = "selected"; break;
case 4000: $tch2[4] = "selected"; break;
case 5000: $tch2[5] = "selected"; break;
case 6000: $tch2[6] = "selected"; break;
case 7000: $tch2[7] = "selected"; break;
case 8000: $tch2[8] = "selected"; break;
case 9000: $tch2[9] = "selected"; break;
case 10000: $tch2[10] = "selected"; break;
}
switch($dex10) {
case 0: $dx10[0] = "selected"; break;
case 2500: $dx10[1] = "selected"; break;
case 7500: $dx10[2] = "selected"; break;
case 15000: $dx10[3] = "selected"; break;
case 25000: $dx10[4] = "selected"; break;
case 37500: $dx10[5] = "selected"; break;
case 52500: $dx10[6] = "selected"; break;
case 70000: $dx10[7] = "selected"; break;
case 90000: $dx10[8] = "selected"; break;
case 112500: $dx10[9] = "selected"; break;
case 137500: $dx10[10] = "selected"; break;
case 165000: $dx10[11] = "selected"; break;
case 195000: $dx10[12] = "selected"; break;
case 227500: $dx10[13] = "selected"; break;
case 262500: $dx10[14] = "selected"; break;
case 300000: $dx10[15] = "selected"; break;
case 340000: $dx10[16] = "selected"; break;
case 382500: $dx10[17] = "selected"; break;
case 427500: $dx10[18] = "selected"; break;
}
switch($dex110) {
case 0: $dx110[0] = "selected"; break;
case 2500: $dx110[1] = "selected"; break;
case 7500: $dx110[2] = "selected"; break;
case 15000: $dx110[3] = "selected"; break;
case 25000: $dx110[4] = "selected"; break;
case 37500: $dx110[5] = "selected"; break;
case 52500: $dx110[6] = "selected"; break;
case 70000: $dx110[7] = "selected"; break;
case 90000: $dx110[8] = "selected"; break;
case 112500: $dx110[9] = "selected"; break;
case 137500: $dx110[10] = "selected"; break;
case 165000: $dx110[11] = "selected"; break;
case 195000: $dx110[12] = "selected"; break;
case 227500: $dx110[13] = "selected"; break;
case 262500: $dx110[14] = "selected"; break;
case 300000: $dx110[15] = "selected"; break;
case 340000: $dx110[16] = "selected"; break;
case 382500: $dx110[17] = "selected"; break;
case 427500: $dx110[18] = "selected"; break;
}
switch($dex120) {
case 0: $dx120[0] = "selected"; break;
case 2500: $dx120[1] = "selected"; break;
case 7500: $dx120[2] = "selected"; break;
case 15000: $dx120[3] = "selected"; break;
case 25000: $dx120[4] = "selected"; break;
case 37500: $dx120[5] = "selected"; break;
case 52500: $dx120[6] = "selected"; break;
case 70000: $dx120[7] = "selected"; break;
case 90000: $dx120[8] = "selected"; break;
case 112500: $dx120[9] = "selected"; break;
case 137500: $dx120[10] = "selected"; break;
case 165000: $dx120[11] = "selected"; break;
case 195000: $dx120[12] = "selected"; break;
case 227500: $dx120[13] = "selected"; break;
case 262500: $dx120[14] = "selected"; break;
case 300000: $dx120[15] = "selected"; break;
case 340000: $dx120[16] = "selected"; break;
case 382500: $dx120[17] = "selected"; break;
case 427500: $dx120[18] = "selected"; break;
}
switch($dex130) {
case 0: $dx130[0] = "selected"; break;
case 2500: $dx130[1] = "selected"; break;
case 7500: $dx130[2] = "selected"; break;
case 15000: $dx130[3] = "selected"; break;
case 25000: $dx130[4] = "selected"; break;
case 37500: $dx130[5] = "selected"; break;
case 52500: $dx130[6] = "selected"; break;
case 70000: $dx130[7] = "selected"; break;
case 90000: $dx130[8] = "selected"; break;
case 112500: $dx130[9] = "selected"; break;
case 137500: $dx130[10] = "selected"; break;
case 165000: $dx130[11] = "selected"; break;
case 195000: $dx130[12] = "selected"; break;
case 227500: $dx130[13] = "selected"; break;
case 262500: $dx130[14] = "selected"; break;
case 300000: $dx130[15] = "selected"; break;
case 340000: $dx130[16] = "selected"; break;
case 382500: $dx130[17] = "selected"; break;
case 427500: $dx130[18] = "selected"; break;
}
switch($dex140) {
case 0: $dx140[0] = "selected"; break;
case 2500: $dx140[1] = "selected"; break;
case 7500: $dx140[2] = "selected"; break;
case 15000: $dx140[3] = "selected"; break;
case 25000: $dx140[4] = "selected"; break;
case 37500: $dx140[5] = "selected"; break;
case 52500: $dx140[6] = "selected"; break;
case 70000: $dx140[7] = "selected"; break;
case 90000: $dx140[8] = "selected"; break;
case 112500: $dx140[9] = "selected"; break;
case 137500: $dx140[10] = "selected"; break;
case 165000: $dx140[11] = "selected"; break;
case 195000: $dx140[12] = "selected"; break;
case 227500: $dx140[13] = "selected"; break;
case 262500: $dx140[14] = "selected"; break;
case 300000: $dx140[15] = "selected"; break;
case 340000: $dx140[16] = "selected"; break;
case 382500: $dx140[17] = "selected"; break;
case 427500: $dx140[18] = "selected"; break;
}
switch($dex20) {
case 0: $dx20[0] = "selected"; break;
case 2500: $dx20[1] = "selected"; break;
case 7500: $dx20[2] = "selected"; break;
case 15000: $dx20[3] = "selected"; break;
case 25000: $dx20[4] = "selected"; break;
case 37500: $dx20[5] = "selected"; break;
case 52500: $dx20[6] = "selected"; break;
case 70000: $dx20[7] = "selected"; break;
case 90000: $dx20[8] = "selected"; break;
case 112500: $dx20[9] = "selected"; break;
case 137500: $dx20[10] = "selected"; break;
case 165000: $dx20[11] = "selected"; break;
case 195000: $dx20[12] = "selected"; break;
case 227500: $dx20[13] = "selected"; break;
case 262500: $dx20[14] = "selected"; break;
case 300000: $dx20[15] = "selected"; break;
case 340000: $dx20[16] = "selected"; break;
case 382500: $dx20[17] = "selected"; break;
case 427500: $dx20[18] = "selected"; break;
}
switch($dex210) {
case 0: $dx210[0] = "selected"; break;
case 2500: $dx210[1] = "selected"; break;
case 7500: $dx210[2] = "selected"; break;
case 15000: $dx210[3] = "selected"; break;
case 25000: $dx210[4] = "selected"; break;
case 37500: $dx210[5] = "selected"; break;
case 52500: $dx210[6] = "selected"; break;
case 70000: $dx210[7] = "selected"; break;
case 90000: $dx210[8] = "selected"; break;
case 112500: $dx210[9] = "selected"; break;
case 137500: $dx210[10] = "selected"; break;
case 165000: $dx210[11] = "selected"; break;
case 195000: $dx210[12] = "selected"; break;
case 227500: $dx210[13] = "selected"; break;
case 262500: $dx210[14] = "selected"; break;
case 300000: $dx210[15] = "selected"; break;
case 340000: $dx210[16] = "selected"; break;
case 382500: $dx210[17] = "selected"; break;
case 427500: $dx210[18] = "selected"; break;
}
switch($dex220) {
case 0: $dx220[0] = "selected"; break;
case 2500: $dx220[1] = "selected"; break;
case 7500: $dx220[2] = "selected"; break;
case 15000: $dx220[3] = "selected"; break;
case 25000: $dx220[4] = "selected"; break;
case 37500: $dx220[5] = "selected"; break;
case 52500: $dx220[6] = "selected"; break;
case 70000: $dx220[7] = "selected"; break;
case 90000: $dx220[8] = "selected"; break;
case 112500: $dx220[9] = "selected"; break;
case 137500: $dx220[10] = "selected"; break;
case 165000: $dx220[11] = "selected"; break;
case 195000: $dx220[12] = "selected"; break;
case 227500: $dx220[13] = "selected"; break;
case 262500: $dx220[14] = "selected"; break;
case 300000: $dx220[15] = "selected"; break;
case 340000: $dx220[16] = "selected"; break;
case 382500: $dx220[17] = "selected"; break;
case 427500: $dx220[18] = "selected"; break;
}
switch($dex230) {
case 0: $dx230[0] = "selected"; break;
case 2500: $dx230[1] = "selected"; break;
case 7500: $dx230[2] = "selected"; break;
case 15000: $dx230[3] = "selected"; break;
case 25000: $dx230[4] = "selected"; break;
case 37500: $dx230[5] = "selected"; break;
case 52500: $dx230[6] = "selected"; break;
case 70000: $dx230[7] = "selected"; break;
case 90000: $dx230[8] = "selected"; break;
case 112500: $dx230[9] = "selected"; break;
case 137500: $dx230[10] = "selected"; break;
case 165000: $dx230[11] = "selected"; break;
case 195000: $dx230[12] = "selected"; break;
case 227500: $dx230[13] = "selected"; break;
case 262500: $dx230[14] = "selected"; break;
case 300000: $dx230[15] = "selected"; break;
case 340000: $dx230[16] = "selected"; break;
case 382500: $dx230[17] = "selected"; break;
case 427500: $dx230[18] = "selected"; break;
}
switch($dex240) {
case 0: $dx240[0] = "selected"; break;
case 2500: $dx240[1] = "selected"; break;
case 7500: $dx240[2] = "selected"; break;
case 15000: $dx240[3] = "selected"; break;
case 25000: $dx240[4] = "selected"; break;
case 37500: $dx240[5] = "selected"; break;
case 52500: $dx240[6] = "selected"; break;
case 70000: $dx240[7] = "selected"; break;
case 90000: $dx240[8] = "selected"; break;
case 112500: $dx240[9] = "selected"; break;
case 137500: $dx240[10] = "selected"; break;
case 165000: $dx240[11] = "selected"; break;
case 195000: $dx240[12] = "selected"; break;
case 227500: $dx240[13] = "selected"; break;
case 262500: $dx240[14] = "selected"; break;
case 300000: $dx240[15] = "selected"; break;
case 340000: $dx240[16] = "selected"; break;
case 382500: $dx240[17] = "selected"; break;
case 427500: $dx240[18] = "selected"; break;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title>전투시뮬레이션</title>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style type="text/css">
select { background-color:black;color:white; }
input { background-color:black;color:white; }
</style>
</head>
<body>
<form method=post action=_simul.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr id=bg1>
<td>공격장수</td>
<td>상대장수</td>
<td>상대성벽</td>
</tr>
<tr>
<td>관직
<select name=level1 size=1>
<option <?=$sellevel1[1]?> value=1>일반</option>
<option <?=$sellevel1[5]?> value=5>제3모사</option>
<option <?=$sellevel1[6]?> value=6>제3장군</option>
<option <?=$sellevel1[7]?> value=7>제2모사</option>
<option <?=$sellevel1[8]?> value=8>제2장군</option>
<option <?=$sellevel1[9]?> value=9>제1모사</option>
<option <?=$sellevel1[10]?> value=10>제1장군</option>
<option <?=$sellevel1[11]?> value=11>참모</option>
<option <?=$sellevel1[12]?> value=12>군주</option>
</select>
</td>
<td>관직
<select name=level2 size=1>
<option <?=$sellevel2[1]?> value=1>일반</option>
<option <?=$sellevel2[5]?> value=5>제3모사</option>
<option <?=$sellevel2[6]?> value=6>제3장군</option>
<option <?=$sellevel2[7]?> value=7>제2모사</option>
<option <?=$sellevel2[8]?> value=8>제2장군</option>
<option <?=$sellevel2[9]?> value=9>제1모사</option>
<option <?=$sellevel2[10]?> value=10>제1장군</option>
<option <?=$sellevel2[11]?> value=11>참모</option>
<option <?=$sellevel2[12]?> value=12>군주</option>
</select>
</td>
<td>-</td>
<tr>
<td>Lv <input size=2 maxlength=2 name=explevel1 value=<?=$explevel1?>></td>
<td>Lv <input size=2 maxlength=2 name=explevel2 value=<?=$explevel2?>></td>
<td>-</td>
</tr>
<tr>
<td>통솔 <input size=3 maxlength=3 name=leader1 value=<?=$leader1?>></td>
<td>통솔 <input size=3 maxlength=3 name=leader2 value=<?=$leader2?>></td>
<td>-</td>
</tr>
<tr>
<td>무력 <input size=3 maxlength=3 name=power1 value=<?=$power1?>></td>
<td>무력 <input size=3 maxlength=3 name=power2 value=<?=$power2?>></td>
<td>-</td>
</tr>
<tr>
<td>지력 <input size=3 maxlength=3 name=intel1 value=<?=$intel1?>></td>
<td>지력 <input size=3 maxlength=3 name=intel2 value=<?=$intel2?>></td>
<td>-</td>
</tr>
<tr>
<td>병종
<select name=type1 size=1>
<option value=0>--------</option>
<option <?=$sel1[0]?> value=0>보병</option>
<option <?=$sel1[1]?> value=1>청주병</option>
<option <?=$sel1[2]?> value=2>수병</option>
<option <?=$sel1[3]?> value=3>자객병</option>
<option <?=$sel1[4]?> value=4>근위병</option>
<option <?=$sel1[5]?> value=5>등갑병</option>
<option value=0>--------</option>
<option <?=$sel1[10]?> value=10>궁병</option>
<option <?=$sel1[11]?> value=11>궁기병</option>
<option <?=$sel1[12]?> value=12>연노병</option>
<option <?=$sel1[13]?> value=13>강궁병</option>
<option <?=$sel1[14]?> value=14>석궁병</option>
<option value=0>--------</option>
<option <?=$sel1[20]?> value=20>기병</option>
<option <?=$sel1[21]?> value=21>백마병</option>
<option <?=$sel1[22]?> value=22>중장기병</option>
<option <?=$sel1[23]?> value=23>돌격기병</option>
<option <?=$sel1[24]?> value=24>철기병</option>
<option <?=$sel1[25]?> value=25>수렵기병</option>
<option <?=$sel1[26]?> value=26>맹수병</option>
<option <?=$sel1[27]?> value=27>호표기병</option>
<option value=0>--------</option>
<option <?=$sel1[30]?> value=30>귀병</option>
<option <?=$sel1[31]?> value=31>신귀병</option>
<option <?=$sel1[32]?> value=32>백귀병</option>
<option <?=$sel1[33]?> value=33>흑귀병</option>
<option <?=$sel1[34]?> value=34>악귀병</option>
<option <?=$sel1[35]?> value=35>남귀병</option>
<option <?=$sel1[36]?> value=36>황귀병</option>
<option <?=$sel1[37]?> value=37>천귀병</option>
<option <?=$sel1[38]?> value=38>마귀병</option>
<option value=0>--------</option>
<option <?=$sel1[40]?> value=40>정란</option>
<option <?=$sel1[41]?> value=41>충차</option>
<option <?=$sel1[42]?> value=42>벽력거</option>
<option <?=$sel1[43]?> value=43>목우</option>
</select>
</td>
<td>병종
<select name=type2 size=1>
<option value=0>--------</option>
<option <?=$sel2[0]?> value=0>보병</option>
<option <?=$sel2[1]?> value=1>청주병</option>
<option <?=$sel2[2]?> value=2>수병</option>
<option <?=$sel2[3]?> value=3>자객병</option>
<option <?=$sel2[4]?> value=4>근위병</option>
<option <?=$sel2[5]?> value=5>등갑병</option>
<option value=0>--------</option>
<option <?=$sel2[10]?> value=10>궁병</option>
<option <?=$sel2[11]?> value=11>궁기병</option>
<option <?=$sel2[12]?> value=12>연노병</option>
<option <?=$sel2[13]?> value=13>강궁병</option>
<option <?=$sel2[14]?> value=14>석궁병</option>
<option value=0>--------</option>
<option <?=$sel2[20]?> value=20>기병</option>
<option <?=$sel2[21]?> value=21>백마병</option>
<option <?=$sel2[22]?> value=22>중장기병</option>
<option <?=$sel2[23]?> value=23>돌격기병</option>
<option <?=$sel2[24]?> value=24>철기병</option>
<option <?=$sel2[25]?> value=25>수렵기병</option>
<option <?=$sel2[26]?> value=26>맹수병</option>
<option <?=$sel2[27]?> value=27>호표기병</option>
<option value=0>--------</option>
<option <?=$sel2[30]?> value=30>귀병</option>
<option <?=$sel2[31]?> value=31>신귀병</option>
<option <?=$sel2[32]?> value=32>백귀병</option>
<option <?=$sel2[33]?> value=33>흑귀병</option>
<option <?=$sel2[34]?> value=34>악귀병</option>
<option <?=$sel2[35]?> value=35>남귀병</option>
<option <?=$sel2[36]?> value=36>황귀병</option>
<option <?=$sel2[37]?> value=37>천귀병</option>
<option <?=$sel2[38]?> value=38>마귀병</option>
<option value=0>--------</option>
<option <?=$sel2[40]?> value=40>정란</option>
<option <?=$sel2[41]?> value=41>충차</option>
<option <?=$sel2[42]?> value=42>벽력거</option>
<option <?=$sel2[43]?> value=43>목우</option>
</select>
</td>
<td>성벽 <input size=4 maxlength=4 name=wall value=<?=$wall?>></td>
</tr>
<tr>
<td>병력 <input size=5 maxlength=5 name=crew1 value=<?=$crew1?>></td>
<td>병력 <input size=5 maxlength=5 name=crew2 value=<?=$crew2?>></td>
<td>수비 <input size=4 maxlength=4 name=def value=<?=$def?>></td>
</tr>
<tr>
<td>훈련 <input size=3 maxlength=3 name=train1 value=<?=$train1?>></td>
<td>훈련 <input size=3 maxlength=3 name=train2 value=<?=$train2?>></td>
<td>훈련 <input size=3 maxlength=3 name=train3 value=<?=$train3?>></td>
</tr>
<tr>
<td>사기 <input size=3 maxlength=3 name=atmos1 value=<?=$atmos1?>></td>
<td>사기 <input size=3 maxlength=3 name=atmos2 value=<?=$atmos2?>></td>
<td>사기 <input size=3 maxlength=3 name=atmos3 value=<?=$atmos3?>></td>
</tr>
<tr>
<td>기술
<select name=tech1 size=1>
<option <?=$tch1[0]?> value=0>0등급</option>
<option <?=$tch1[1]?> value=1000>1등급</option>
<option <?=$tch1[2]?> value=2000>2등급</option>
<option <?=$tch1[3]?> value=3000>3등급</option>
<option <?=$tch1[4]?> value=4000>4등급</option>
<option <?=$tch1[5]?> value=5000>5등급</option>
<option <?=$tch1[6]?> value=6000>6등급</option>
<option <?=$tch1[7]?> value=7000>7등급</option>
<option <?=$tch1[8]?> value=8000>8등급</option>
<option <?=$tch1[9]?> value=9000>9등급</option>
<option <?=$tch1[10]?> value=10000>10등급</option>
</select>
</td>
<td>기술
<select name=tech2 size=1>
<option <?=$tch2[0]?> value=0>0등급</option>
<option <?=$tch2[1]?> value=1000>1등급</option>
<option <?=$tch2[2]?> value=2000>2등급</option>
<option <?=$tch2[3]?> value=3000>3등급</option>
<option <?=$tch2[4]?> value=4000>4등급</option>
<option <?=$tch2[5]?> value=5000>5등급</option>
<option <?=$tch2[6]?> value=6000>6등급</option>
<option <?=$tch2[7]?> value=7000>7등급</option>
<option <?=$tch2[8]?> value=8000>8등급</option>
<option <?=$tch2[9]?> value=9000>9등급</option>
<option <?=$tch2[10]?> value=10000>10등급</option>
</select>
</td>
<td>-</td>
</tr>
<tr>
<td>
<select name=dex10 size=1>
<option <?=$dx10[0]?> value=0>F</option>
<option <?=$dx10[1]?> value=2500>E-</option>
<option <?=$dx10[2]?> value=7500>E</option>
<option <?=$dx10[3]?> value=15000>E+</option>
<option <?=$dx10[4]?> value=25000>D-</option>
<option <?=$dx10[5]?> value=37500>D</option>
<option <?=$dx10[6]?> value=52500>D+</option>
<option <?=$dx10[7]?> value=70000>C-</option>
<option <?=$dx10[8]?> value=90000>C</option>
<option <?=$dx10[9]?> value=112500>C+</option>
<option <?=$dx10[10]?> value=137500>B-</option>
<option <?=$dx10[11]?> value=165000>B</option>
<option <?=$dx10[12]?> value=195000>B+</option>
<option <?=$dx10[13]?> value=227500>A-</option>
<option <?=$dx10[14]?> value=262500>A</option>
<option <?=$dx10[15]?> value=300000>A+</option>
<option <?=$dx10[16]?> value=340000>S</option>
<option <?=$dx10[17]?> value=382500>SS</option>
<option <?=$dx10[18]?> value=427500>SSS</option>
</select>
<select name=dex110 size=1>
<option <?=$dx110[0]?> value=0>F</option>
<option <?=$dx110[1]?> value=2500>E-</option>
<option <?=$dx110[2]?> value=7500>E</option>
<option <?=$dx110[3]?> value=15000>E+</option>
<option <?=$dx110[4]?> value=25000>D-</option>
<option <?=$dx110[5]?> value=37500>D</option>
<option <?=$dx110[6]?> value=52500>D+</option>
<option <?=$dx110[7]?> value=70000>C-</option>
<option <?=$dx110[8]?> value=90000>C</option>
<option <?=$dx110[9]?> value=112500>C+</option>
<option <?=$dx110[10]?> value=137500>B-</option>
<option <?=$dx110[11]?> value=165000>B</option>
<option <?=$dx110[12]?> value=195000>B+</option>
<option <?=$dx110[13]?> value=227500>A-</option>
<option <?=$dx110[14]?> value=262500>A</option>
<option <?=$dx110[15]?> value=300000>A+</option>
<option <?=$dx110[16]?> value=340000>S</option>
<option <?=$dx110[17]?> value=382500>SS</option>
<option <?=$dx110[18]?> value=427500>SSS</option>
</select>
<select name=dex120 size=1>
<option <?=$dx120[0]?> value=0>F</option>
<option <?=$dx120[1]?> value=2500>E-</option>
<option <?=$dx120[2]?> value=7500>E</option>
<option <?=$dx120[3]?> value=15000>E+</option>
<option <?=$dx120[4]?> value=25000>D-</option>
<option <?=$dx120[5]?> value=37500>D</option>
<option <?=$dx120[6]?> value=52500>D+</option>
<option <?=$dx120[7]?> value=70000>C-</option>
<option <?=$dx120[8]?> value=90000>C</option>
<option <?=$dx120[9]?> value=112500>C+</option>
<option <?=$dx120[10]?> value=137500>B-</option>
<option <?=$dx120[11]?> value=165000>B</option>
<option <?=$dx120[12]?> value=195000>B+</option>
<option <?=$dx120[13]?> value=227500>A-</option>
<option <?=$dx120[14]?> value=262500>A</option>
<option <?=$dx120[15]?> value=300000>A+</option>
<option <?=$dx120[16]?> value=340000>S</option>
<option <?=$dx120[17]?> value=382500>SS</option>
<option <?=$dx120[18]?> value=427500>SSS</option>
</select>
<select name=dex130 size=1>
<option <?=$dx130[0]?> value=0>F</option>
<option <?=$dx130[1]?> value=2500>E-</option>
<option <?=$dx130[2]?> value=7500>E</option>
<option <?=$dx130[3]?> value=15000>E+</option>
<option <?=$dx130[4]?> value=25000>D-</option>
<option <?=$dx130[5]?> value=37500>D</option>
<option <?=$dx130[6]?> value=52500>D+</option>
<option <?=$dx130[7]?> value=70000>C-</option>
<option <?=$dx130[8]?> value=90000>C</option>
<option <?=$dx130[9]?> value=112500>C+</option>
<option <?=$dx130[10]?> value=137500>B-</option>
<option <?=$dx130[11]?> value=165000>B</option>
<option <?=$dx130[12]?> value=195000>B+</option>
<option <?=$dx130[13]?> value=227500>A-</option>
<option <?=$dx130[14]?> value=262500>A</option>
<option <?=$dx130[15]?> value=300000>A+</option>
<option <?=$dx130[16]?> value=340000>S</option>
<option <?=$dx130[17]?> value=382500>SS</option>
<option <?=$dx130[18]?> value=427500>SSS</option>
</select>
<select name=dex140 size=1>
<option <?=$dx140[0]?> value=0>F</option>
<option <?=$dx140[1]?> value=2500>E-</option>
<option <?=$dx140[2]?> value=7500>E</option>
<option <?=$dx140[3]?> value=15000>E+</option>
<option <?=$dx140[4]?> value=25000>D-</option>
<option <?=$dx140[5]?> value=37500>D</option>
<option <?=$dx140[6]?> value=52500>D+</option>
<option <?=$dx140[7]?> value=70000>C-</option>
<option <?=$dx140[8]?> value=90000>C</option>
<option <?=$dx140[9]?> value=112500>C+</option>
<option <?=$dx140[10]?> value=137500>B-</option>
<option <?=$dx140[11]?> value=165000>B</option>
<option <?=$dx140[12]?> value=195000>B+</option>
<option <?=$dx140[13]?> value=227500>A-</option>
<option <?=$dx140[14]?> value=262500>A</option>
<option <?=$dx140[15]?> value=300000>A+</option>
<option <?=$dx140[16]?> value=340000>S</option>
<option <?=$dx140[17]?> value=382500>SS</option>
<option <?=$dx140[18]?> value=427500>SSS</option>
</select>
</td>
<td>
<select name=dex20 size=1>
<option <?=$dx20[0]?> value=0>F</option>
<option <?=$dx20[1]?> value=2500>E-</option>
<option <?=$dx20[2]?> value=7500>E</option>
<option <?=$dx20[3]?> value=15000>E+</option>
<option <?=$dx20[4]?> value=25000>D-</option>
<option <?=$dx20[5]?> value=37500>D</option>
<option <?=$dx20[6]?> value=52500>D+</option>
<option <?=$dx20[7]?> value=70000>C-</option>
<option <?=$dx20[8]?> value=90000>C</option>
<option <?=$dx20[9]?> value=112500>C+</option>
<option <?=$dx20[10]?> value=137500>B-</option>
<option <?=$dx20[11]?> value=165000>B</option>
<option <?=$dx20[12]?> value=195000>B+</option>
<option <?=$dx20[13]?> value=227500>A-</option>
<option <?=$dx20[14]?> value=262500>A</option>
<option <?=$dx20[15]?> value=300000>A+</option>
<option <?=$dx20[16]?> value=340000>S</option>
<option <?=$dx20[17]?> value=382500>SS</option>
<option <?=$dx20[18]?> value=427500>SSS</option>
</select>
<select name=dex210 size=1>
<option <?=$dx210[0]?> value=0>F</option>
<option <?=$dx210[1]?> value=2500>E-</option>
<option <?=$dx210[2]?> value=7500>E</option>
<option <?=$dx210[3]?> value=15000>E+</option>
<option <?=$dx210[4]?> value=25000>D-</option>
<option <?=$dx210[5]?> value=37500>D</option>
<option <?=$dx210[6]?> value=52500>D+</option>
<option <?=$dx210[7]?> value=70000>C-</option>
<option <?=$dx210[8]?> value=90000>C</option>
<option <?=$dx210[9]?> value=112500>C+</option>
<option <?=$dx210[10]?> value=137500>B-</option>
<option <?=$dx210[11]?> value=165000>B</option>
<option <?=$dx210[12]?> value=195000>B+</option>
<option <?=$dx210[13]?> value=227500>A-</option>
<option <?=$dx210[14]?> value=262500>A</option>
<option <?=$dx210[15]?> value=300000>A+</option>
<option <?=$dx210[16]?> value=340000>S</option>
<option <?=$dx210[17]?> value=382500>SS</option>
<option <?=$dx210[18]?> value=427500>SSS</option>
</select>
<select name=dex220 size=1>
<option <?=$dx220[0]?> value=0>F</option>
<option <?=$dx220[1]?> value=2500>E-</option>
<option <?=$dx220[2]?> value=7500>E</option>
<option <?=$dx220[3]?> value=15000>E+</option>
<option <?=$dx220[4]?> value=25000>D-</option>
<option <?=$dx220[5]?> value=37500>D</option>
<option <?=$dx220[6]?> value=52500>D+</option>
<option <?=$dx220[7]?> value=70000>C-</option>
<option <?=$dx220[8]?> value=90000>C</option>
<option <?=$dx220[9]?> value=112500>C+</option>
<option <?=$dx220[10]?> value=137500>B-</option>
<option <?=$dx220[11]?> value=165000>B</option>
<option <?=$dx220[12]?> value=195000>B+</option>
<option <?=$dx220[13]?> value=227500>A-</option>
<option <?=$dx220[14]?> value=262500>A</option>
<option <?=$dx220[15]?> value=300000>A+</option>
<option <?=$dx220[16]?> value=340000>S</option>
<option <?=$dx220[17]?> value=382500>SS</option>
<option <?=$dx220[18]?> value=427500>SSS</option>
</select>
<select name=dex230 size=1>
<option <?=$dx230[0]?> value=0>F</option>
<option <?=$dx230[1]?> value=2500>E-</option>
<option <?=$dx230[2]?> value=7500>E</option>
<option <?=$dx230[3]?> value=15000>E+</option>
<option <?=$dx230[4]?> value=25000>D-</option>
<option <?=$dx230[5]?> value=37500>D</option>
<option <?=$dx230[6]?> value=52500>D+</option>
<option <?=$dx230[7]?> value=70000>C-</option>
<option <?=$dx230[8]?> value=90000>C</option>
<option <?=$dx230[9]?> value=112500>C+</option>
<option <?=$dx230[10]?> value=137500>B-</option>
<option <?=$dx230[11]?> value=165000>B</option>
<option <?=$dx230[12]?> value=195000>B+</option>
<option <?=$dx230[13]?> value=227500>A-</option>
<option <?=$dx230[14]?> value=262500>A</option>
<option <?=$dx230[15]?> value=300000>A+</option>
<option <?=$dx230[16]?> value=340000>S</option>
<option <?=$dx230[17]?> value=382500>SS</option>
<option <?=$dx230[18]?> value=427500>SSS</option>
</select>
<select name=dex240 size=1>
<option <?=$dx240[0]?> value=0>F</option>
<option <?=$dx240[1]?> value=2500>E-</option>
<option <?=$dx240[2]?> value=7500>E</option>
<option <?=$dx240[3]?> value=15000>E+</option>
<option <?=$dx240[4]?> value=25000>D-</option>
<option <?=$dx240[5]?> value=37500>D</option>
<option <?=$dx240[6]?> value=52500>D+</option>
<option <?=$dx240[7]?> value=70000>C-</option>
<option <?=$dx240[8]?> value=90000>C</option>
<option <?=$dx240[9]?> value=112500>C+</option>
<option <?=$dx240[10]?> value=137500>B-</option>
<option <?=$dx240[11]?> value=165000>B</option>
<option <?=$dx240[12]?> value=195000>B+</option>
<option <?=$dx240[13]?> value=227500>A-</option>
<option <?=$dx240[14]?> value=262500>A</option>
<option <?=$dx240[15]?> value=300000>A+</option>
<option <?=$dx240[16]?> value=340000>S</option>
<option <?=$dx240[17]?> value=382500>SS</option>
<option <?=$dx240[18]?> value=427500>SSS</option>
</select>
</td>
<td>-</td>
</tr>
<tr>
<td>-</td>
<td>
<input type=submit name=isgen value=장수공격>
<?='<input type=submit name=isgen value=장수평균>'?>
</td>
<td>
<input type=submit name=isgen value=성벽공격>
<?='<input type=submit name=isgen value=성벽평균>'?>
</td>
</tr>
<tr><td colspan=3>
<?php
if($isgen == "장수공격" || $isgen == "성벽공격") {
echo $msg;
} elseif($isgen == "장수평균" || $isgen == "성벽평균") {
echo $msg2;
}
?>
</td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr id=bg1>
<td align=right></td>
<td align=center>공격</td>
<td align=center>방어</td>
<td align=center>기동</td>
<td align=center>회피</td>
<td align=center>가격</td>
<td align=center>군량</td>
<td width=500 align=center>-</td>
</tr>
<?php
for($i=0; $i <= 5; $i++) {
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=10; $i <= 14; $i++) {
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=20; $i <= 27; $i++) {
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=30; $i <= 38; $i++) {
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=40; $i <= 43; $i++) {
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
?>
</table>
</form>
</body>
</html>
<?php
function printSimul($admin, $i) {
$att = $admin["att{$i}"];
$def = $admin["def{$i}"];
$spd = $admin["spd{$i}"];
$avd = $admin["avd{$i}"];
$cst = $admin["cst{$i}"];
$ric = $admin["ric{$i}"];
echo "
<tr>
<td align=right>".GameUnitConst::byId($i)->name."</td>
<td align=center>$att</td>
<td align=center>$def</td>
<td align=center>$spd</td>
<td align=center>$avd</td>
<td align=center>$cst</td>
<td align=center>$ric</td>
<td align=center>-</td>
</tr>";
}
+13 -5
View File
@@ -6,8 +6,6 @@ include "func.php";
$btn = Util::getReq('btn');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -51,6 +49,12 @@ increaseRefresh("명장일람", 1);
<div style="margin:auto;width=1000px;">
<?php
$ownerNameList = [];
if($gameStor->isunited){
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
}
$nationName = [0=>'재야'];
$nationColor = [0=>'#000000'];
@@ -62,8 +66,11 @@ foreach (getAllNationStaticInfo() as $nation) {
$types = [
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
["계 략 성 공", "int", function($v){
["계 략 성 공", "int", function($v) use ($gameStor){
$v['value'] = $v['firenum'];
if($gameStor->isunited){
return $v;
}
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
$v['name'] = '???';
@@ -168,7 +175,7 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
return $general;
}, $db->query(
"SELECT nation,no,name,name2 as owner_name, picture, imgsvr,
"SELECT nation,no,name,name2 as owner_name, owner, picture, imgsvr,
experience, dedication, firenum, warnum, killnum, killcrew, deathcrew,
dex0, dex10, dex20, dex30, dex40,
ttw, ttd, ttl, tlw, tld, tll, tpw, tpd, tpl, tiw, tid, til,
@@ -181,7 +188,8 @@ $templates = new \League\Plates\Engine('templates');
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
$validCnt = 0;
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt){
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt, $ownerNameList){
$general['owner_name'] = $ownerNameList[$general['owner']]??null;
$general = ($typeFunc)($general);
$value = $general['value'];
+15 -4
View File
@@ -16,6 +16,10 @@ increaseRefresh("왕조일람", 1);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -50,9 +54,6 @@ if ($showCurrentNation) {
<tr>
<td style="background-color:#333333;" align=center colspan=8>
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
<a href="a_emperior_detail.php"><button>자세히</button></a>
<a href="a_history.php"><button>역사 보기</button></a>
</td>
</tr>
@@ -97,11 +98,21 @@ foreach($emperiors as $emperior){
<td align=center><?=$emperior['l12name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l11name']?></td>
<td id=bg1 align=center> </td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l10name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l9name']?></td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l8name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l7name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l6name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l5name']?></td>
</tr>
</table>
+4 -2
View File
@@ -6,8 +6,6 @@ include "func.php";
$select = Util::getReq('select', 'int', 0);
extractMissingPostToGlobals();
$db = DB::db();
$connect=$db->get();
@@ -21,6 +19,10 @@ increaseRefresh("왕조일람", 2);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
+7 -3
View File
@@ -26,6 +26,10 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -33,7 +37,7 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<body>
<table align=center width=1000 class="tb_layout bg0">
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
<tr><td> <br>
<button onclick=window.close()> 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
</td></tr>
@@ -156,7 +160,7 @@ if($emperior):
<?php
endif;
$showServers = $serverID || (!$emperior);
$showServers = $emperior;
if(!$serverID){
$serverID = UniqueConst::$serverID;
@@ -175,7 +179,7 @@ if($showServers){
if($nation['generals']){
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']);
if(count($generals) != $nation['generals'] && $serverID == UniqueConst::$serverID){
if(count($generals) != count($nation['generals']) && $serverID == UniqueConst::$serverID){
$liveGenerals = $nation['generals'];
foreach($generals as $general){
if(in_array($general['general_no'], $nation['generals'])){
+35 -25
View File
@@ -6,8 +6,6 @@ include "func.php";
$type = Util::getReq('type', 'int', 9);
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -32,6 +30,13 @@ if ($type <= 0 || $type > 15) {
$type = 9;
}
$ownerNameList = [];
if($gameStor->isunited){
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
}
?>
<!DOCTYPE html>
<html>
@@ -84,26 +89,26 @@ foreach (getAllNationStaticInfo() as $nation) {
$nationlevel[$nation['nation']] = $nation['level'];
}
switch ($type) { //FIXME: $query 처리 조심.
case 1: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by nation"; break;
case 2: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by leader desc"; break;
case 3: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by power desc"; break;
case 4: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by intel desc"; break;
case 5: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 6: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by dedication desc"; break;
case 7: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by level desc"; break;
case 8: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by killturn"; break;
default:
case 9: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by connect desc"; break;
case 10: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 11: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by personal"; break;
case 12: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special desc"; break;
case 13: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special2 desc"; break;
case 14: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by age desc"; break;
case 15: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by npc desc"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
[$orderKey, $orderDesc] = [
1=>['nation', false],
2=>['leader', true],
3=>['power', true],
4=>['intel', true],
5=>['experience', true],
6=>['dedication', true],
7=>['level', true],
8=>['killturn', false],
9=>['connect', true],
10=>['experience', true],
11=>['personal', true],
12=>['special', true],
13=>['special2', true],
14=>['age', true],
15=>['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
echo"
<table align=center width=1000 class='tb_layout bg0'>
@@ -124,8 +129,7 @@ echo"
<td width=45 align=center id=bg1>삭턴</td>
<td width=70 align=center id=bg1>벌점</td>
</tr>";
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
foreach($generalList as $general){
$nation = $nationname[$general['nation']];
if ($general['level'] == 12) {
@@ -154,6 +158,8 @@ for ($j=0; $j < $gencount; $j++) {
$intel = "{$general['intel']}";
}
if ($general['npc'] >= 2) {
$name = "<font color=cyan>{$general['name']}</font>";
} elseif ($general['npc'] == 1) {
@@ -162,6 +168,10 @@ for ($j=0; $j < $gencount; $j++) {
$name = "{$general['name']}";
}
if(key_exists($general['owner'], $ownerNameList)){
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
}
$general['connect'] = Util::round($general['connect'] / 10) * 10;
$imageTemp = GetImageURL($general['imgsvr']);
@@ -174,7 +184,7 @@ for ($j=0; $j < $gencount; $j++) {
data-general-intel='{$general['intel']}'
data-is-npc='".($general['npc']>=2?'true':'false')."'
>
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
<td align=center><img class='generalIcon' width='64' height='64' src='{$imageTemp}/{$general['picture']}'></img></td>
<td align=center>$name</td>
<td align=center>{$general['age']}</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
+41 -17
View File
@@ -5,26 +5,34 @@ include "lib.php";
include "func.php";
$session = Session::getInstance()->setReadOnly();
$seasonIdx = Util::getReq('seasonIdx', 'int', UniqueConst::$seasonIdx);
$scenarioIdx = Util::getReq('scenarioIdx', 'int', null);
$db = DB::db();
increaseRefresh("명예의전당", 1);
$scenarioList= [];
foreach($db->query('SELECT scenario_name as name, count(scenario) as cnt, scenario from ng_games group by scenario order by scenario asc') as $scenarioInfo){
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
}
$scenarioList = (function(){
$db = DB::db();
$scenarioList= [];
foreach($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo){
$seasonIdx = $scenarioInfo['season'];
$scenarioIdx = $scenarioInfo['scenario'];
if(!key_exists($seasonIdx, $scenarioList)){
$scenarioList[$seasonIdx] = [];
}
$scenarioList[$seasonIdx][$scenarioIdx] = $scenarioInfo;
}
return $scenarioList;
})();
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
$searchScenarioName = $scenarioList[$scenarioIdx]['name'];
$searchFilter = $db->sqleval('scenario = %i', $scenarioIdx);
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
}
else{
$searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval(true);
$searchFilter = $db->sqleval('season = %i', $seasonIdx);
}
?>
@@ -53,14 +61,20 @@ else{
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<option value="" <?=$scenarioIdx?"selected='selected'":''?>>* 종합 *</option>
<?php foreach($scenarioList as $info): ?>
<option
value="<?=$info['scenario']?>"
<?=($info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
<option
data-season="<?=$iterSeasonIdx?>"
value=""
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
<?php foreach($subScenarioList as $info): ?>
<option
data-season="<?=$iterSeasonIdx?>"
value="<?=$info['scenario']?>"
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?>
<?php endforeach; ?>
?>
</select>
</td></tr>
</table>
@@ -92,12 +106,22 @@ $types = [
$templates = new \League\Plates\Engine('templates');
$ownerNameList = [];
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
foreach($types as $idx=>[$typeName, $typeValue]) {
$hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
$hallResult = array_map(function($general)use($typeValue){
$hallResult = array_map(function($general)use($typeValue, $ownerNameList){
$aux = Json::decode($general['aux']);
$general += $aux;
if(key_exists($general['owner'], $ownerNameList)){
$general['owner_name'] = $ownerNameList[$general['owner']];
}
if(!key_exists('bgColor', $general)){
if(!key_exists('color', $general)){
$general['bgColor'] = GameConst::$basecolor4;
+14 -20
View File
@@ -7,8 +7,6 @@ $btn = Util::getReq('btn');
$yearmonth = Util::getReq('yearmonth', 'int');
$serverID = Util::getReq('serverID', 'string', null);
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -88,6 +86,8 @@ if ($month <= 0) {
$month += 12;
}
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
?>
<!DOCTYPE html>
<html>
@@ -103,12 +103,19 @@ if ($month <= 0) {
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/history.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<script>
var startYear = <?=$s_year?>;
var startMonth = <?=$s_month?>;
var lastYear = <?=$e_year?>;
var lastMonth = <?=$e_month?>;
var selectYear = <?=$year?>;
var selectMonth = <?=$month?>;
</script>
</head>
<body>
@@ -118,22 +125,9 @@ if ($month <= 0) {
<form name=form1 method=post>
년월 선택 :
<input type=submit name=btn value="◀◀ 이전달">
<select name=yearmonth size=1>
<?php
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC', $serverID);
foreach($dates as [$hYear, $hMonth]){
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
if ($hYear == $year && $hMonth == $month) {
echo "
<option selected value={$value}>{$hYear} {$hMonth}</option>";
} else {
echo "
<option value={$value}>{$hYear} {$hMonth}</option>";
}
}
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
?>
<select id='yearmonth' name=yearmonth size=1>
<option selected='selected'><?=$year?>년 <?=$month?>월</option>
<option><?=$e_year?>년 12월</option>
</select>
<input type=submit name=btn value='조회하기'>
<input type=submit name=btn value="다음달 ▶▶">
+26 -5
View File
@@ -28,10 +28,13 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
</head>
@@ -127,6 +130,19 @@ for($i=1; $i <= $count; $i++) {
elseif($level5['npc'] == 1) { $l5 = "<font color=skyblue>{$level5['name']}</font>"; }
else { $l5 = $level5['name']; }
$generals = $db->query('SELECT no,nation,npc,name,level,penalty,permission FROM general WHERE nation=%i ORDER BY no ASC', $nation['nation']);
$ambassadors = [];
$auditors = [];
foreach($generals as $general){
$generalPermission = checkSecretPermission($general, false);
if($generalPermission == 4){
$ambassadors[] = $general['name'];
}
else if($generalPermission == 3){
$auditors[] = $general['name'];
}
}
echo "
<table align=center width=1000 class='tb_layout bg2'>
<tr>
@@ -140,7 +156,7 @@ for($i=1; $i <= $count; $i++) {
<td width=80 align=center id=bg1> </td>
<td width=170 align=center>{$nation['power']}</td>
<td width=80 align=center id=bg1>장수 / 속령</td>
<td width=170 align=center>{$gencount} / {$citycount}</td>
<td width=170 align=center>".count($generals)." / {$citycount}</td>
</tr>
<tr>
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
@@ -162,6 +178,12 @@ for($i=1; $i <= $count; $i++) {
<td align=center id=bg1>".getLevel( 5, $nation['level'])."</td>
<td align=center>$l5</td>
</tr>
<tr>
<td align=center id=bg1>외교권자</td><td colspan=5>";
echo join(', ', $ambassadors);
echo "</td><td align=center id=bg1>조언자</td><td align=center >";
echo count($auditors).'명';
echo "</td></tr>
<tr>
<td colspan=8>";
if($nation['level'] > 0) {
@@ -187,8 +209,7 @@ for($i=1; $i <= $count; $i++) {
</tr>
<tr>
<td colspan=8> 장수 일람 : ";
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
foreach($generals as $general){
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; }
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; }
else { echo "{$general['name']}, "; }
+3 -6
View File
@@ -6,8 +6,6 @@ include "func.php";
$type = Util::getReq('type', 'int', 1);
extractMissingPostToGlobals();
if($type <= 0 || $type > 8){
$type = 1;
}
@@ -29,13 +27,12 @@ $sel[$type] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
+5 -1
View File
@@ -53,6 +53,10 @@ if ($admin['maxonline'] < $curonline) {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
@@ -166,7 +170,7 @@ $max_refresh['name'] = '접속자 총합';
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
foreach ($refresh_result as $i=>$user) {
$w = round($user['refresh'] / $max_refresh['refresh'] * 100, 1);
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
?>
+4
View File
@@ -31,6 +31,10 @@ $vote = $admin['vote']?:['-'];
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
+4 -2
View File
@@ -7,8 +7,6 @@ include "func.php";
$msg = Util::getReq('msg');
$msg2 = Util::getReq('msg2');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -59,6 +57,10 @@ if ($msg2 == "") {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
+14 -9
View File
@@ -16,8 +16,6 @@ if ($type < 0 || $type > 3) {
$type = 0;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -35,7 +33,7 @@ $query = "select nation from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$general = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
@@ -49,11 +47,14 @@ if ($con >= 2) {
exit();
}
//재야인 경우
$meLevel = $me['level'];
if ($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
//잘못된 접근
@@ -77,6 +78,10 @@ $sel[$type] = "selected";
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -156,7 +161,7 @@ for ($i=0; $i < $gencount; $i++) {
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
<?php if($npc > 1 || $meLevel >= 5): ?>
<?php if($npc > 1 || $permission >= 2): ?>
<tr>
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>&nbsp;</font></td>
+4
View File
@@ -59,6 +59,10 @@ if($str3){
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 베팅장</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
-78
View File
@@ -1,78 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("기밀실", 1);
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
if($me['level'] < 5) {
echo "수뇌부가 아닙니다.";
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 기밀실</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<div style='width:1000px;margin:auto'>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_chiefboard.php>
<tr><td align=center>
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
</td>
</tr>
<tr><td>
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
<input type=submit value=저장하기>
<input type=hidden name=num value=-1>
</td></tr>
</form>
</table>
<br>
<?php
$nation = getNation($me['nation']);
//20개 메세지
$index = $nation['coreindex'];
for($i=0; $i < 20; $i++) {
$who = "coreboard{$index}_who";
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($nation["coreboard{$index}"] != '') { msgprint($nation["coreboard{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["coreboard{$index}_when"], $index, 1); }
$index--;
if($index < 0) { $index = 19; }
}
?>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</div>
</body>
</html>
+13 -8
View File
@@ -13,20 +13,21 @@ $connect=$db->get();
increaseRefresh("사령부", 1);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
if($me['level'] >= 5) { $btn = "submit"; $btn2 = "button"; }
@@ -81,6 +82,10 @@ for($i= $lv - 1; $i>=5; $i--){
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 사령부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
+37 -25
View File
@@ -6,11 +6,10 @@ include "func.php";
$citylist = Util::getReq('citylist', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$userGrade = Session::getUserGrade();
$db = DB::db();
$connect=$db->get();
@@ -34,6 +33,14 @@ $templates = new \League\Plates\Engine('templates');
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/currentCity.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
@@ -60,8 +67,9 @@ $templates = new \League\Plates\Engine('templates');
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=998>
<form name=cityselect method=get>도시선택 :
<select name=citylist size=1 style=color:white;background-color:black;width:798px;>
<form name=cityselect method=get>
<div style='text-align:center;'>도시선택 :
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
<?php
if(!$citylist){
$citylist = $me['city'];
@@ -76,11 +84,11 @@ if($me['level'] == 0) {
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================".StringUtil::padString($city['name'], 4, '_')."";
echo ">【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "타국==";
echo "============================================</option>";
elseif($me['nation'] == $city['nation']) echo "본국";
else echo "타국";
echo "</option>";
} else {
// 아국 도시들 선택
$query = "select city,name,nation from city where nation='{$me['nation']}'";
@@ -92,11 +100,11 @@ if($me['level'] == 0) {
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================".StringUtil::padString($city['name'], 4, '_')."";
echo ">【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "타국==";
echo "============================================</option>";
elseif($me['nation'] == $city['nation']) echo "본국";
else echo "타국";
echo "</option>";
}
// 아국 장수가 있는 타국 도시들 선택
@@ -109,11 +117,11 @@ if($me['level'] == 0) {
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================".StringUtil::padString($city['name'], 4, '_')."";
echo ">【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "타국==";
echo "============================================</option>";
elseif($me['nation'] == $city['nation']) echo "본국";
else echo "타국";
echo "</option>";
}
}
@@ -141,19 +149,18 @@ if($myNation['level'] > 0) {
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
echo "<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================".StringUtil::padString($city['name'], 4, '_')."";
echo ">【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "타국==";
echo "============================================</option>";
elseif($me['nation'] == $city['nation']) echo "본국";
else echo "타국";
echo "</option>";
}
}
}
echo "
</select>
<input type=submit value='도 시 선 택'>
</select></div>
<p align=center>명령 화면에서 도시를 클릭하셔도 됩니다.</p>
</form>
</td>
@@ -164,7 +171,7 @@ echo "
unset($city);
// 첩보된 도시까지만 허용
if($valid == 0 && $session->userGrade < 5) {
if($valid == 0 && $userGrade < 5) {
$citylist = $me['city'];
}
@@ -172,7 +179,7 @@ if($valid == 0 && $session->userGrade < 5) {
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
$cityNation = getNationStaticInfo($city['nation']);
//태수, 군사, 시중
//태수, 군사, 종사
$gen1 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen1']);
$gen2 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen2']);
$gen3 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen3']);
@@ -208,6 +215,10 @@ for($j=0; $j < $gencount; $j++) {
$ourGeneral = false;
}
if($userGrade == 6){
$ourGeneral = true;
}
$isNPC = $general['npc']>1;
$wounded = $general['injury'];
@@ -271,6 +282,7 @@ for($j=0; $j < $gencount; $j++) {
$generalsFormat[] = [
'ourGeneral'=>$ourGeneral,
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
'isNPC'=>$isNPC,
'wounded'=>$wounded,
'name'=>$name,
@@ -404,7 +416,7 @@ foreach($generalsFormat as $general){
<td align=center><?=$gen1['name']??'-'?></td>
<td align=center class=bg1>군사</td>
<td align=center><?=$gen2['name']??'-'?></td>
<td align=center class=bg1>시중</td>
<td align=center class=bg1>종사</td>
<td align=center><?=$gen3['name']??'-'?></td>
</tr>
<tr>
+58 -53
View File
@@ -13,13 +13,9 @@ $connect=$db->get();
increaseRefresh("내무부", 1);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT no, nation, level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$nation = $db->queryFirstRow('SELECT msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -27,9 +23,14 @@ if ($con >= 2) {
exit();
}
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
if ($me['level'] >= 5) {
@@ -48,13 +49,26 @@ if ($me['level'] >= 5) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 내무부</title>
<script>
var editable = <?=(($me['level']>=5||$permission==4)?'true':'false')?>;
var nationMsg = <?=Json::encode($nation['msg']??'')?>;
var scoutmsg = <?=Json::encode($nation['scoutmsg']??'')?>;
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/summernote-bs4.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/lang/summernote-ko-KR.js')?>
<?=WebUtil::printJS('../e_lib/summernote/plugin/image-sammo/summernote-image-flip.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/dipcenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/dipcenter.css')?>
<link href="https://fonts.googleapis.com/css?family=Nanum+Gothic|Nanum+Myeongjo|Nanum+Pen+Script" rel="stylesheet">
</head>
<body>
@@ -71,7 +85,6 @@ if ($me['level'] >= 5) {
<td width=80 align=center class=bg1>상태</td>
<td width=60 align=center class=bg1>기간</td>
<td width=100 align=center class=bg1> </td>
<td align=center class=bg1> </td>
</tr>
<?php
$admin = $gameStor->getValues(['year','month']);
@@ -97,19 +110,15 @@ for ($i=0; $i < $nationcount; $i++) {
<td align=center>-</td>
<td align=center>-</td>
<td align=center>-</td>
<td align=left style=font-size:7px;>-</td>
</tr>";
continue;
}
$query = "select state,term,fixed,reserved,showing from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'";
$query = "select state,term from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dip = MYDB_fetch_array($result2);
$query = "select reserved,showing from diplomacy where you='{$me['nation']}' and me='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dip2 = MYDB_fetch_array($result2);
//속령수
$query = "select city from city where nation='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -135,33 +144,6 @@ for ($i=0; $i < $nationcount; $i++) {
}
$date = date('Y-m-d H:i:s');
$note = "";
if ($dip['fixed'] != "") {
if ($dip['state'] == 7) {
$note .= $dip['fixed'];
} else {
$note .= "<font color=gray>{$dip['fixed']}</font>";
}
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
$note .= "<br>";
}
}
if ($dip['showing'] >= $date) {
if ($dip['reserved'] != "") {
$note .= "<font color=skyblue>아국측 제의</font>: ".$dip['reserved'];
if ($dip2['reserved'] != "") {
$note .= "<br>";
}
}
}
if ($dip2['showing'] >= $date) {
if ($dip2['reserved'] != "") {
$note .= "<font color=limegreen>상대측 제의</font>: ".$dip2['reserved'];
}
}
if ($note == "") {
$note = "&nbsp;";
}
echo "
<tr>
@@ -179,15 +161,13 @@ for ($i=0; $i < $nationcount; $i++) {
<td align=center>-</td>
<td align=center>-</td>";
}
echo "
<td align=left style=font-size:7px;>{$note}</td>
</tr>";
echo "</tr>";
}
echo "
</table>
";
$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='{$me['nation']}'";
$query = "select nation,name,color,type,gold,rice,bill,rate,scout,war,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
@@ -223,10 +203,35 @@ if ($budgetricediff > 0) {
<form name=form1 method=post action=c_dipcenter.php>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=orange> &amp; 임관 권유 메시지</td></tr>
<tr><td colspan=2 class=bg1>국가 방침 <textarea <?=$read?> maxlength=16000 rows="5" style="color:white;background-color:black;width:830px;" name=msg><?=$nation['msg']?></textarea><input type=<?=$btn?> name=btn value=국가방침></td></tr>
<tr><td colspan=2 class=bg1>임관 권유 <input type=text <?=$read?> maxlength=1000 style=color:white;background-color:black;width:830px; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
<tr><td colspan=2>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</td></tr>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan='2'><div id='noticeForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
국가 방침
</div>
<div>
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
<div class='edit_form viewer'></div>
</div></td></tr>
<tr><td colspan='2'><div id='scoutMsgForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
임관 권유
</div>
<div>
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
<input type='hidden' class='input_form' name='scoutmsg' data-global='scoutmsg'>
<div style="width:870px;margin-left:auto;">
<div class='edit_form viewer'></div>
</div>
</div>
</div></td></tr>
<tr><td colspan=2 align=center bgcolor=green> &amp; </td></tr>
<tr>
<td colspan=2>
@@ -268,8 +273,8 @@ if ($budgetricediff > 0) {
<tr>
<td align=right class=bg1>세율 (5 ~ 30%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
<td align=right class=bg1>봉급 지급 (20 ~ 200%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급></td>
<td align=right class=bg1>봉급 지급 (20 ~ 200%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급></td>
</tr>
<tr>
<td align=right class=bg1>기밀 권한 (1 ~ 99)&nbsp;&nbsp;&nbsp;</td>
+1 -1
View File
@@ -177,7 +177,7 @@ for($i=0; $i < $nationcount; $i++) {
";
}
?>
<tr><td colspan=<?=$nationcount+1?> align=center>불가침 : <font color=limegreen>@</font>, 통합 : <font color=cyan>○</font>, 합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
<tr><td colspan=<?=$nationcount+1?> align=center>불가침 : <font color=limegreen>@</font>, <!--통합 : <font color=cyan>○</font>, -->합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
</table>
<?php if ($realConflict) : ?>
+18 -8
View File
@@ -19,11 +19,11 @@ $connect=$db->get();
increaseRefresh("암행부", 1);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select level,secretlimit from nation where nation='{$me['nation']}'";
$query = "select level from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
@@ -33,9 +33,14 @@ if ($con >= 2) {
exit();
}
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
$sel = [];
@@ -99,10 +104,15 @@ switch ($type) {
$generals = $db->query('SELECT npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general WHERE nation = %i %l', $me['nation'], $orderSQL);
$genCntEff = 0;
foreach ($generals as &$general) {
$general['cityText'] = CityConst::byID($general['city'])->name;
$general['troopText'] = $troopName[$general['troop']]??'-';
if($general['npc'] != 5){
$genCntEff += 1;
}
if ($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif ($general['level'] >= 5) {
@@ -220,11 +230,11 @@ foreach($generals as $general){
<tr>
<td class='bg1'>전체 </td><td><?=number_format($totalGold)?></td>
<td class='bg1'>전체 </td><td><?=number_format($totalRice)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalGold/$genCnt, 2)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalRice/$genCnt, 2)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalGold/$genCntEff, 2)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalRice/$genCntEff, 2)?></td>
</tr>
<tr>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCnt)?></td>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td>
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td>
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
+91 -20
View File
@@ -33,6 +33,14 @@ if($meLevel == 0) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 인사부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/bossInfo.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
@@ -41,6 +49,51 @@ function out() {
}
</script>
<?php
$query = "select nation,name,level,color,l12set,l11set,l10set,l9set,l8set,l7set,l6set,l5set from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result); //국가정보
$ambassadors = $db->query('SELECT no, name, level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nation['nation']);
$auditors = $db->query('SELECT no, name, level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nation['nation']);
$candidateAmbassadors = [];
$candidateAuditors = [];
foreach($ambassadors as $ambassador){
$candidateAmbassadors[] = $ambassador;
}
foreach($auditors as $auditor){
$candidateAuditors[] = $auditor;
}
foreach($db->query('SELECT no, name, nation, level, penalty, permission FROM general WHERE nation = %i AND permission = \'normal\' AND level != 12', $nation['nation']) as $candidate){
$maxPermission = checkSecretMaxPermission($candidate);
if($maxPermission == 4){
$candidateAmbassadors[] = $candidate;
}
if($maxPermission >= 3){
$candidateAuditors[] = $candidate;
}
}
?>
<script>
var candidateAmbassadors = <?=Json::encode(array_map(function($value){
return [
'id'=>$value['no'],
'text'=>$value['name'],
"selected"=>($value['permission']!='normal')
];
}, $candidateAmbassadors))?>;
var candidateAuditors = <?=Json::encode(array_map(function($value){
return [
'id'=>$value['no'],
'text'=>$value['name'],
"selected"=>($value['permission']!='normal')
];
}, $candidateAuditors))?>;
</script>
</head>
<body>
@@ -51,10 +104,6 @@ function out() {
<?php
$query = "select nation,name,level,color,l12set,l11set,l10set,l9set,l8set,l7set,l6set,l5set from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result); //국가정보
$lv = getNationChiefLevel($nation['level']);
if($meLevel >= 5) { $btn = "submit"; }
else { $btn = "hidden"; }
@@ -73,6 +122,7 @@ $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connec
$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
echo "
<table align=center width=1000 class='tb_layout bg0'>
<tr>
@@ -88,10 +138,10 @@ for($i=12; $i >= $lv; $i-=2) {
?>
<tr>
<td width=98 align=center id=bg1><font size=4><?=getLevel($i1, $nation['level'])?></font></td>
<td width=64 height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
<td width=98 align=center id=bg1><font size=4><?=getLevel($i2, $nation['level'])?></font></td>
<td width=64 height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
</tr>
<?php
@@ -146,12 +196,15 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) {
echo "
<select name=outlist size=1 style=color:white;background-color:black;>";
$query = "select no,name,level,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
$query = "select no,npc,name,level,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
if($general['npc'] == 5){
continue;
}
echo "
<option value={$general['no']}>{$general['name']} <small>({$general['leader']}/{$general['power']}/{$general['intel']}, {$general['killturn']})</small></option>";
}
@@ -272,9 +325,35 @@ for($i=10; $i >= $lv; $i--) {
echo "
<tr><td colspan=4> <font color=red>빨간색</font> 현재 임명중인 장수, <font color=orange>노란색</font> 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=5 height=5></td></tr>
";
if($meLevel == 12):
?>
<table align='center' width='1000' class='tb_layout bg0'>
<tr><td colspan='4' height='5'></td></tr>
<tr><td colspan='4' align='center' bgcolor='purple'> </td></tr>
<tr>
<td width=98 align=right id=bg1>외교권자</td>
<td width=398>
<select id="selectAmbassador" multiple="multiple">
</select>
<button id='changeAmbassador' type='button'>임명</button>
</td>
<td width=98 align=right id=bg1>조언자</td>
<td width=398>
<select id="selectAuditor" multiple="multiple">
</select>
<button id='changeAuditor' type='button'>임명</button>
</td>
</tr>
</table>
<?php
endif;
?>
<table align=center width=1000 id='officer_list' class='tb_layout bg0'>
<tr><td colspan=5 height=5></td></tr>
<?php
if($meLevel >= 5) {
echo "
<tr><td colspan=5 align=center bgcolor=orange> </td></tr>
@@ -388,7 +467,7 @@ if($meLevel >= 5) {
</form>
<form method=post action=c_myBossInfo.php>
<tr>
<td colspan=3 align=right id=bg2> </td>
<td colspan=3 align=right id=bg2> </td>
<td colspan=2>
<select name=citylist size=1 style=color:white;background-color:black;>
";
@@ -448,19 +527,11 @@ echo "
<td width=158 align=center id=bg1 colspan=2><font size=4> </font></td>
<td width=278 align=center id=bg1><font size=4> (사관) 【현재도시】</font></td>
<td width=278 align=center id=bg1><font size=4> (사관) 【현재도시】</font></td>
<td width=278 align=center id=bg1><font size=4> (사관) 【현재도시】</font></td>
<td width=278 align=center id=bg1><font size=4> (사관) 【현재도시】</font></td>
</tr>
";
$citylevel = [];
$citylevel[1] = "";
$citylevel[2] = "";
$citylevel[3] = "";
$citylevel[4] = "";
$citylevel[5] = "";
$citylevel[6] = "";
$citylevel[7] = "";
$citylevel[8] = "";
$citylevel = getCityLevelList();
$query = "select city,name,gen1,gen2,gen3,level,region,gen1set,gen2set,gen3set from city where nation='{$nation['nation']}' order by region,level desc,binary(name)"; // 도시 이름 목록
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+5 -4
View File
@@ -9,8 +9,6 @@ if ($type <= 0 || $type > 12) {
$type = 10;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -40,11 +38,14 @@ $sel = [$type => "selected"];
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력도시</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.expand_city.js')?>
</head>
@@ -112,7 +113,7 @@ for ($j=0; $j < $citycount; $j++) {
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen2 = MYDB_fetch_array($genresult);
$query = "select name from general where no='{$city['gen3']}'"; // 시중
$query = "select name from general where no='{$city['gen3']}'"; // 종사
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen3 = MYDB_fetch_array($genresult);
@@ -162,7 +163,7 @@ for ($j=0; $j < $citycount; $j++) {
<td align=center>";
echo $gen2['name']==''?"-":"{$gen2['name']}";
echo "</td>
<td align=center id=bg1>시중</td>
<td align=center id=bg1>종사</td>
<td align=center>";
echo $gen3['name']==''?"-":"{$gen3['name']}";
echo "</td>
+35 -47
View File
@@ -9,13 +9,12 @@ if($type <= 0 || $type > 15) {
$type = 1;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력장수", 1);
@@ -31,6 +30,14 @@ if($me['level'] == 0) {
$sel = [$type => "selected"];
$ownerNameList = [];
if($gameStor->isunited){
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
}
?>
<!DOCTYPE html>
<html>
@@ -76,48 +83,26 @@ $sel = [$type => "selected"];
<?php
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
$orderByText = '';//FIXME: 쿼리 재작성
switch($type) {
case 1: $orderByText = " order by level desc"; break;
case 2: $orderByText = " order by dedication desc"; break;
case 3: $orderByText = " order by experience desc"; break;
case 4: $orderByText = " order by leader desc"; break;
case 5: $orderByText = " order by power desc"; break;
case 6: $orderByText = " order by intel desc"; break;
case 7: $orderByText = " order by gold desc"; break;
case 8: $orderByText = " order by rice desc"; break;
case 9: $orderByText = " order by crew desc"; break;
case 10: $orderByText = " order by connect desc"; break;
case 11: $orderByText = " order by personal"; break;
case 12: $orderByText = " order by special desc"; break;
case 13: $orderByText = " order by special2 desc"; break;
case 14: $orderByText = " order by belong desc"; break;
case 15: $orderByText = " order by npc desc"; break;
}
$query =
"select
npc,
special,
special2,
personal,
picture,
imgsvr,
name,
level,
dedication,
experience,
injury,
leader,
power,
intel,
gold,
rice,
belong,
connect,
killturn
from general where nation='{$me['nation']}' ".$orderByText;
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
[$orderKey, $orderDesc] = [
1=>['level', true],
2=>['dedication', true],
3=>['experience', true],
4=>['leader', true],
5=>['power', true],
6=>['intel', true],
7=>['gold', true],
8=>['rice', true],
9=>['crew', true],
10=>['connect', true],
11=>['personal', true],
12=>['special', true],
13=>['special2', true],
14=>['belong', true],
15=>['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect,gold,rice,crew,belong from general where nation = %i order by %b %l', $me['nation'], $orderKey, $orderDesc?'desc':'');
echo"
<table align=center class='tb_layout bg0'>
@@ -138,8 +123,7 @@ echo"
<td width=48 align=center id=bg1> </td>
<td width=70 align=center id=bg1>벌점</td>
</tr>";
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
foreach($generalList as $general){
if($general['level'] == 12) {
$lbonus = $nationLevel * 2;
@@ -171,10 +155,14 @@ for($j=0; $j < $gencount; $j++) {
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
else { $name = "{$general['name']}"; }
if(key_exists($general['owner'], $ownerNameList)){
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
}
$imageTemp = GetImageURL($general['imgsvr']);
echo "
<tr>
<td align=center style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
<td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
<td align=center>$name</td>
<td align=center>"; echo getLevel($general['level'], $nationLevel); echo "</td>
<td align=center>".getDed($general['dedication'])."</td>
+5 -1
View File
@@ -30,6 +30,10 @@ if($me['level'] == 0) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력정보</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
@@ -116,7 +120,7 @@ echo "
<td align=center>+$goldincomeList[0] / +$deadIncome</td>
<td align=center id=bg1>세곡/둔전</td>
<td align=center>+$riceincomeList[0] / +$riceincomeList[1]</td>
<td align=center id=bg1>지급</td>
<td align=center id=bg1>지급</td>
<td align=center colspan=3>"; echo $me['nation']==0?"해당 없음":"{$nation['bill']} %"; echo "</td>
</tr>
<tr>
+66 -10
View File
@@ -10,8 +10,6 @@ $tnmt = Util::getReq('tnmt', 'int', 1);
//$detachNPC = Util::getReq('detachNPC', 'bool');
$detachNPC = false;
extractMissingPostToGlobals();
if($mode < 0 || $mode > 2){
$mode = 2;
}
@@ -20,21 +18,24 @@ if($tnmt < 0 || $tnmt > 1){
$tnmt = 1;
}
$showDieImmediatelyBtn = false;
$availableDieImmediately = false;
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->cacheValues(['turnterm', 'opentime', 'turntime','autorun_user']);
$connect=$db->get();
increaseRefresh("내정보", 1);
$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'";
$query = "select no,npc,mode,tnmt,myset,train,atmos,lastrefresh from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
if ($me['myset'] > 0) {
$submit = 'submit';
} else {
@@ -48,13 +49,33 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
$submit = 'hidden';
}
$me['myset'] -= 1;
if($mode == 0){
$db->update('general', [
'myset'=>$db->sqleval('myset-1'),
'mode'=>$mode,
'train'=>max(0, $me['train'] - 3),
'atmos'=>max(0, $me['atmos'] - 3),
], 'owner=%i AND mode!=%i', $userID, $mode);
}
else{
$db->update('general', [
'myset'=>$db->sqleval('myset-1'),
'mode'=>$mode
], 'owner=%i AND mode!=%i', $userID, $mode);
}
$db->update('general', [
'myset'=>$db->sqleval('myset-1'),
'mode'=>$mode,
'tnmt'=>$tnmt
], 'owner=%i', $userID);
if($db->affectedRows()){
$me['myset'] -= 1;
}
if($me['tnmt'] != $tnmt){
$db->update('general', [
'tnmt'=>$tnmt
], 'owner=%i', $userID);
}
$me['mode'] = $mode;
$me['tnmt'] = $tnmt;
if($me['npc'] == 1 && $detachNPC){
$turnterm = $gameStor->turnterm;
@@ -73,6 +94,16 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
}
}
if($gameStor->turntime <= $gameStor->opentime){
//서버 가오픈시 할 수 있는 행동
if($me['npc'] == 0){
$showDieImmediatelyBtn = true;
if(addTurn($me['lastrefresh'], $gameStor->turnterm, 2) <= TimeUtil::DatetimeNow()){
$availableDieImmediately = true;
}
}
}
?>
<!DOCTYPE html>
<html>
@@ -84,10 +115,25 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/myPage.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script>
var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
jQuery(function($){
$('#die_immediately').click(function(){
if(!availableDieImmediately){
alert('삭제를 위해서는 생성 후 2턴 가량의 시간이 필요합니다.');
location.reload();
return false;
}
return confirm('정말로 삭제하시겠습니까?');
});
});
</script>
</head>
<body>
@@ -115,10 +161,20 @@ if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
</form>
<?php if(!($gameStor->autorun_user['limit_minutes']??false)): ?>
<br>
<a href="c_vacation.php"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button></a><br><br>
<?php endif; ?>
<!--빙의 해제용 삭턴 조절<br>
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>-->
<?php if($showDieImmediatelyBtn): ?>
가오픈 기간 장수 삭제<br>
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br>
<?php endif; ?>
개인용 CSS<br>
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
</td>
</tr>
<tr>
-73
View File
@@ -1,73 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("회의실", 1);
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 회의실</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<div style='width:1000px;margin:auto'>
<table width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_nationboard.php>
<tr><td align=center>
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
</td>
</tr>
<tr><td>
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
<input type=submit value=저장하기>
<input type=hidden name=num value=-1>
</td></tr>
</form>
</table>
<br>
<?php
$nation = getNation($me['nation']);
//20개 메세지
$index = $nation['boardindex'];
for($i=0; $i < 20; $i++) {
$who = "board{$index}_who";
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($nation["board{$index}"] != '') { msgprint($nation["board{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["board{$index}_when"], $index, 0); }
$index--;
if($index < 0) { $index = 19; }
}
?>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</div>
</body>
</html>
-59
View File
@@ -1,59 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("국법", 1);
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 국법</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<tr><td>
<?php
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$query = "select rule from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
if($me['level'] >= 5) {
echo "
<form name=form1 method=post action=c_nationrule.php>
<textarea name=msg style=color:white;background-color:black;width:998px;height:500px;>{$nation['rule']}</textarea><br>
<input type=submit value=저장하기>
</form>";
} else {
echo "
<textarea name=msg style=color:white;background-color:black;width:998px;height:500px; readonly>{$nation['rule']}</textarea><br>";
}
?>
</td></tr>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
+59 -14
View File
@@ -73,11 +73,56 @@ uasort($troops, function($lhs, $rhs){
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 부대편성</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/troops.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
<script>
jQuery(function($){
$('#form1').submit(function(){
return false;
});
$('#leaveTroop').click(function(e){
return confirm("정말 부대를 탈퇴하시겠습니까?");
})
$('.submitBtn').click(function(event){
if(event.isPropagationStopped()){
return false;
}
console.log('b');
var $this=$(this);
$.post({
url:'j_troop.php',
dataType:'json',
data:{
action:$this.val().replace(/\s/g, ''),
troop:$('input.troopId:checked').val(),
name:$('#troopName').val(),
gen:$('#genNo').val()
}
}).then(function(data){
console.log(data);
if(!data.result){
alert(data.reason);
location.reload();
}
location.reload();
}, function(){
alert('알 수 없는 에러가 발생했습니다.');
});
return false;
});
});
</script>
</head>
<body>
@@ -85,7 +130,7 @@ uasort($troops, function($lhs, $rhs){
<table width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=c_troop.php>
<form id=form1 name=form1 method=post>
<table id="troop_list" class='tb_layout bg0'>
<thead>
<tr>
@@ -99,9 +144,9 @@ uasort($troops, function($lhs, $rhs){
<tfoot><tr><td colspan='5'>
<?php if(!$troops): ?>
<?php elseif($me['troop'] == 0): ?>
<input type=submit name=btn value='부 대 가 입'>
<input type=submit class='submitBtn' value='부 대 가 입'>
<?php else: ?>
<input type=submit name=btn value='부 대 탈 퇴' onclick='return confirm(\"정말 부대를 탈퇴하시겠습니까?\")'>
<input type=submit id="leaveTroop" class='submitBtn' value='부 대 탈 퇴'>
<?php endif;?>
</td></tr></tfoot>
<tbody>
@@ -130,9 +175,9 @@ foreach ($troops as $troopNo=>$troop) {
<?php if ($me['troop'] == 0): ?>
<tr>
<td align=center rowspan=2><input type='radio' name='troop' value='<?=$troop['troop']?>'></td>
<td align=center rowspan=2><input type='radio' class='troopId' name='troop' value='<?=$troop['troop']?>'></td>
<td align=center><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
<td height=64 style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'>&nbsp;</td>
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'>&nbsp;</td>
<td rowspan=2 width=62><?=$genlistText?></td>
<td rowspan=2><?=$troopLeader['turnText']?></td>
</tr>
@@ -145,19 +190,19 @@ foreach ($troops as $troopNo=>$troop) {
<tr>
<td align=center rowspan=2>&nbsp;</td>
<td align=center ><?=$troop['name']?><br>【 <?=$cityText?> 】</td>
<td height=64 style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'>&nbsp;</td>
<td height=64 class='generalIcon' style='background:no-repeat center url("<?=$troopLeader['pictureFullPath']?>");background-size:64px;'>&nbsp;</td>
<td rowspan=2 width=62><?=$genlistText?></td>
<td rowspan=2>
<?php if ($me['no'] == $troopLeader['no']): ?>
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>";
<select id='genNo' name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>";
<?php foreach ($troop['users'] as $troopUser): ?>
<?php if ($troopUser['no'] == $me['no']) {
continue;
} ?>
<option value='<?=$troopUser['no']?>'><?=$troopUser['name']?></option>
<option value='<?=$troopUser['no']?>'><?=$troopUser['name']?></option>
<?php endforeach; ?>
</select><br>
<input type=submit name=btn value='부 대 추 방' style=width:130px;height:25px;>
<input type=submit class='submitBtn' value='부 대 추 방' style=width:130px;height:25px;>
<?php else: ?>
<?=$troopLeader['turnText']?>
<?php endif; ?>
@@ -178,11 +223,11 @@ foreach ($troops as $troopNo=>$troop) {
<table width=1000 class='tb_layout bg0'>
<tr>
<td width=80 id=bg1> </td>
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=9 name=name></td>
<td width=130><input id='troopName' type=text style=color:white;background-color:black; size=18 maxlength=9 name=name></td>
<?php if($me['troop'] == 0): ?>
<td><input type=submit name=btn value='부 대 창 설'></td>
<td><input type=submit class='submitBtn' value='부 대 창 설'></td>
<?php else: ?>
<td><input type=submit name=btn value='부 대 변 경'></td>
<td><input type=submit class='submitBtn' value='부 대 변 경'></td>
<?php endif; ?>
</tr>
</table>
+473
View File
@@ -0,0 +1,473 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$session = Session::requireLogin()->setReadOnly();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$startYear = $gameStor->getValue('startyear');
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 전투 시뮬레이터</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1100" />
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/battle_simulator.css')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/moment.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/download2.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/battle_simulator.js')?>
</head>
<body>
<div id="container">
<div class="card mb-3">
<div class="card-header">
전역 설정
</div>
<div class="card-body dragpad_battle">
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control" aria-describedby="text_year" value="<?=$startYear?>" disabled>
<div class="input-group-append">
<span class="input-group-text"> 시작</span>
</div>
<input type="number" class="form-control" id="year" value="<?=$startYear+3?>" min="<?=$startYear?>">
<div class="input-group-append">
<span class="input-group-text"></span>
</div>
<input type="number" class="form-control" id="month" value="1" min="1" max="12">
<div class="input-group-append">
<span class="input-group-text"></span>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="btn-toolbar" role="toolbar">
<div class="input-group mr-2" role="group">
<div class="input-group-prepend">
<span class="input-group-text">반복 횟수</span>
</div>
<select class="custom-select" id="repeat_cnt">
<option value="1">1 (로그 표기)</option>
<option value="1000">1000 (요약 표기)</option>
</select>
</div>
<div class="btn-group mr-2" role="group">
<button type="button" class="btn btn-danger btn-begin_battle">전투</button>
</div>
<div class="btn-group mr-2" role="group">
<button type="button" class="btn btn-info btn-battle-save">모두 저장</button>
<input type="file" class="form_load_battle_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm">
<div class="card mb-2 attacker_nation">
<div class="card-header">
출병국 설정
</div>
<div class="card-body nation_detail dragpad_battle">
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">국가 성향</span>
</div>
<select class="custom-select form_nation_type" style="width:25ch;">
<?php foreach(getNationTypeList() as $typeID => [$name,$pros,$cons]): ?>
<option value="<?=$typeID?>"><?=$name?> (<?=$pros?>, <?=$cons?>)</option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">기술</span>
</div>
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
<div class="input-group-append">
<span class="input-group-text">등급</span>
</div>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">국가 규모</span>
</div>
<select class="custom-select form_nation_level">
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
<option value="<?=$nationLevel?>"><?=$name?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">도시 규모</span>
</div>
<select class="custom-select form_city_level">
<?php foreach(getCityLevelList() as $levelID => $name): ?>
<option value="<?=$levelID?>"><?=$name?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">수도</span>
</div>
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
</label>
<label class="btn btn-secondary active">
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="2" autocomplete="off" checked>N
</label>
</div>
</div>
<div class="input-group mb-1">
</div>
</div>
</div>
<div class="card mb-2 attacker_form general_form" data-general_no='1'>
<div class="card-header">
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group">
<button type="button" class="btn btn-info btn-general-save">저장</button>
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
</div>
</div>
</div>
</div>
</div><!-- <div class="col-sm"> -->
<div class="col-sm defender-column">
<div class="card mb-2 defender_nation">
<div class="card-header">
수비국 설정
</div>
<div class="card-body dragpad_battle">
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">국가 성향</span>
</div>
<select class="custom-select form_nation_type" style="width:25ch;">
<?php foreach(getNationTypeList() as $typeID => [$name,$pros,$cons]): ?>
<option value="<?=$typeID?>"><?=$name?> (<?=$pros?>, <?=$cons?>)</option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">기술</span>
</div>
<input type="number" class="form-control form_tech" value="1" min="0" max="12">
<div class="input-group-append">
<span class="input-group-text">등급</span>
</div>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">국가 규모</span>
</div>
<select class="custom-select form_nation_level">
<?php foreach(getNationLevelList() as $nationLevel => [$name,$chiefCnt,$cityCnt]): ?>
<option value="<?=$nationLevel?>"><?=$name?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">도시 규모</span>
</div>
<select class="custom-select form_city_level">
<?php foreach(getCityLevelList() as $levelID => $name): ?>
<option value="<?=$levelID?>"><?=$name?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">수도</span>
</div>
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
</label>
<label class="btn btn-secondary active">
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off" checked>N
</label>
</div>
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">수비</span>
</div>
<input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10">
<div class="input-group-prepend">
<span class="input-group-text">성벽</span>
</div>
<input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10">
</div>
</div>
</div>
<div class="card mb-2 defender_add_form">
<div class="card-header">
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group">
<button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button>
</div>
<div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-success add-defender">추가</button>
</div>
</div>
</div>
</div>
<div class="card mb-2 form_sample">
<div class="card-header">
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group">
<button type="button" class="btn btn-info btn-general-save">저장</button>
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-general-load">불러오기</button>
</div>
<div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-warning copy-defender">복제</button>
<button type="button" class="btn btn-danger delete-defender">제거</button>
</div>
</div>
</div>
<div class="card-body general_detail">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">이름</span>
</div>
<input type="text" class="form-control form_general_name" value="무명" style="width:15ch;">
<div class="input-group-prepend">
<span class="input-group-text">직위</span>
</div>
<select class="custom-select form_general_level" style="width:8ch;">
<option value="1">일반</option>
<option value="4">태수</option>
<option value="3">군사</option>
<option value="2">종사</option>
<option value="10">무장 수뇌</option>
<option value="9">지장 수뇌</option>
<option value="11">참모</option>
<option value="12">군주</option>
</select>
<div class="input-group-prepend">
<span class="input-group-text">Level</span>
</div>
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">통솔</span>
</div>
<input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1">
<div class="input-group-prepend">
<span class="input-group-text">무력</span>
</div>
<input type="number" class="form-control form_power" value="50" min="1" max="300" step="1">
<div class="input-group-prepend">
<span class="input-group-text">지력</span>
</div>
<input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1">
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">명마</span>
</div>
<select class="custom-select form_general_horse">
<?php foreach(range(0, 26) as $horseID): ?>
<option value="<?=$horseID?>"><?=getHorseName($horseID)?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">무기</span>
</div>
<select class="custom-select form_general_weap">
<?php foreach(range(0, 26) as $weapID): ?>
<option value="<?=$weapID?>"><?=getWeapName($weapID)?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">서적</span>
</div>
<select class="custom-select form_general_book">
<?php foreach(range(0, 26) as $bookID): ?>
<option value="<?=$bookID?>"><?=getBookName($bookID)?></option>
<?php endforeach; ?>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">부상</span>
</div>
<input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1">
<div class="input-group-append">
<span class="input-group-text">%(<span class="injury_helptext">건강</span>)</span>
</div>
<div class="input-group-prepend">
<span class="input-group-text">군량</span>
</div>
<input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50">
<div class="input-group-prepend">
<span class="input-group-text">도구</span>
</div>
<select class="custom-select form_general_item">
<?php foreach(range(0, 26) as $bookID): ?>
<option value="<?=$bookID?>"><?=getItemName($bookID)?></option>
<?php endforeach; ?>
</select>
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">병종</span>
</div>
<select class="custom-select form_crewtype">
<?php foreach(GameUnitConst::all() as $crewTypeID => $crewType): ?>
<?php if($crewTypeID < 0){ continue; } ?>
<option value="<?=$crewTypeID?>"><?=$crewType->name?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">병사</span>
</div>
<input type="number" class="form-control form_crew" value="7000" min="100" step="100">
<div class="input-group-prepend">
<span class="input-group-text">성격</span>
</div>
<select class="custom-select form_general_character">
<?php foreach(getCharacterList() as $characterID => [$name,$info]): ?>
<option value="<?=$characterID?>"><?=$name?></option>
<?php endforeach; ?>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">훈련</span>
</div>
<input type="number" class="form-control form_train" value="100" min="40" max="<?=GameConst::$maxTrainByWar?>" step="1">
<div class="input-group-prepend">
<span class="input-group-text">사기</span>
</div>
<input type="number" class="form-control form_atmos" value="100" min="40" max="<?=GameConst::$maxAtmosByWar?>" step="1">
<div class="input-group-prepend">
<span class="input-group-text">전특</span>
</div>
<select class="custom-select form_general_special_war">
<option value="0">-</option>
<?php foreach(SpecialityConst::WAR as $specialWarID => [$name,$buff,$cond]): ?>
<option value="<?=$specialWarID?>"><?=$name?></option>
<?php endforeach; ?>
</select>
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">보병숙련</span>
</div>
<select class="custom-select form_dex0">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">궁병숙련</span>
</div>
<select class="custom-select form_dex10">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">기병숙련</span>
</div>
<select class="custom-select form_dex20">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
</select>
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">귀병숙련</span>
</div>
<select class="custom-select form_dex30">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text">차병숙련</span>
</div>
<select class="custom-select form_dex40">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend only_defender">
<span class="input-group-text">수비여부</span>
</div>
<select class="custom-select form_defend_mode only_defender">
<option value="2">훈사 80</option>
<option value="3">훈사 60</option>
<option value="0">안함</option>
</select>
</div>
</div>
</div>
</div><!-- <div class="col-sm"> -->
</div>
<div class="card mb-3">
<div class="card-header">
전투 요약
</div>
<table class="table">
<tbody id="battle_result_summary">
<tr><th style='width:18ch;'>전투 일시</th><td id='result_datetime'></td></tr>
<tr><th>전투 횟수</th><td id='result_warcnt'></td></tr>
<tr><th>전투 페이즈</th><td id='result_phase'></td></tr>
<tr><th> 피해</th><td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td></tr>
<tr><th>받은 피해</th><td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td></tr>
<tr><th>출병자 군량 소모</th><td id='result_attackerRice'></td></tr>
<tr><th>수비자 군량 소모</th><td id='result_defenderRice'></td></tr>
<tr><th>공격자 스킬</th><td id='result_attackerSkills'></td></tr>
<tr class='result_defenderSkills'><th>수비자1 스킬</th><td></td></tr>
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm">
<div class="card mb-3">
<div class="card-header">
마지막 전투 로그
</div>
<div class="card-body" id="generalBattleResultLog">
</div>
</div>
</div>
<div class="col-sm">
<div class="card mb-3">
<div class="card-header">
마지막 전투 상세 로그
</div>
<div class="card-body" id="generalBattleDetailLog">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
-1
View File
@@ -27,7 +27,6 @@ $sel = Util::getReq('sel', 'int');
$msg = '';
$msg2 = '';
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
-60
View File
@@ -1,60 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$title = Util::getReq('title');
$msg = Util::getReq('msg');
$num = Util::getReq('num', 'int');
$reply = Util::getReq('reply');
// $title, $msg, $num
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
if (getBlockLevel() == 1 || getBlockLevel() == 3) {
header('location:b_chiefboard.php');
die();
}
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$title = str_replace("|", " ", $title);
$msg = str_replace("|", " ", $msg);
$reply = str_replace("|", " ", $reply);
$title = trim($title);
$msg = trim($msg);
$reply = trim($reply);
$nation = getNation($me['nation']);
//새글 추가시
if($num == -1 && $title != "" && $msg != "") {
$num = $nation['coreindex'] + 1;
if($num >= 20) { $num = 0; }
$msg = $title."|".$msg;
$msg = addslashes(SQ2DQ($msg));
$date = date('Y-m-d H:i:s');
$query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='{$me['no']}',coreboard{$num}_when='$date' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set coreindex='$num' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//$num에 댓글시
} elseif($num >= 0 && $reply != "") {
$newmsg = $nation["coreboard{$num}"]."|".$me['no']."|".$reply;
$newmsg = addslashes(SQ2DQ($newmsg));
$query = "update nation set coreboard{$num}='$newmsg' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
header('location:b_chiefboard.php');
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$availableDieImmediately = false;
//로그인 검사
$session = Session::requireGameLogin();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$general = $db->queryFirstRow('SELECT no,name,name2,npc,lastrefresh FROM general WHERE owner=%i AND npc = 0', $userID);
if(!$general){
header('location:b_myPage.php');
die();
}
increaseRefresh("장수 삭제", 1);
$gameStor->cacheValues(['turnterm', 'opentime', 'turntime', 'year', 'month']);
if($gameStor->turntime <= $gameStor->opentime){
//서버 가오픈시 할 수 있는 행동
if(addTurn($general['lastrefresh'], $gameStor->turnterm, 2) <= TimeUtil::DatetimeNow()){
$availableDieImmediately = true;
}
}
if(!$availableDieImmediately){
header('location:b_myPage.php');
die();
}
if(!$db->query('DELETE FROM general WHERE owner=%i AND npc=0', $userID)){
trigger_error("올바르지 않은 삭제 프로세스 $userID", E_USER_WARNING);
}
$generalName = $general['name'];
$josaYi = JosaUtil::pick($generalName, '이');
pushGeneralPublicRecord(["<C>●</>{$gameStor->month}월:<Y>{$generalName}</>{$josaYi} 이 홀연히 모습을 <R>감추었습니다</>"], $gameStor->year, $gameStor->month);
$session->logoutGame();
header('location:..');
+11 -8
View File
@@ -12,29 +12,32 @@ $rate = Util::getReq('rate', 'int');
$bill = Util::getReq('bill', 'int');
$secretlimit = Util::getReq('secretlimit', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`level` FROM general WHERE `owner`=%i', $userID);
$me = $db->queryFirstRow('SELECT `no`,nation,`level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
//내가 수뇌부이어야함
if($me['level'] < 5) {
header('location:b_myBossInfo.php');
$permission = checkSecretPermission($me);
if($permission < 0){
header('location:b_myBossInfo.php', true, 303);
exit();
}
else if ($me['level'] < 5 && $permission != 4) {
header('location:b_myBossInfo.php', true, 303);
exit();
}
if($btn == "국가방침") {
if($btn == "국가방침 수정") {
$msg = mb_substr($msg, 0, 16384);
//$msg = StringUtil::
$db->update('nation', [
'msg'=>WebUtil::htmlPurify($msg)
], 'nation=%i',$me['nation']);
} elseif($btn == "임관권유") {
} elseif($btn == "임관 권유문 수정") {
$scoutmsg = mb_substr($scoutmsg, 0, 1000);
$db->update('nation', [
'scoutmsg'=>WebUtil::htmlPurify($scoutmsg)
@@ -44,7 +47,7 @@ if($btn == "국가방침") {
$db->update('nation', [
'rate'=>$rate,
], 'nation=%i', $me['nation']);
} elseif($btn == "지급") {
} elseif($btn == "지급") {
$bill = Util::valueFit($bill, 20, 200);
$db->update('nation', [
'bill'=>$bill
+5 -10
View File
@@ -55,7 +55,7 @@ if($command == 46) {
$query['turn'.$turnIdx] = $comStr;
}
$db->update('general', $query, 'owner=%i', $userID);
header('Location:./');
header('Location:./', true, 303);
die();
}
@@ -82,7 +82,7 @@ if($command == 53) {
$query = "update nation set {$str} where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
header('location:b_chiefcenter.php');
header('location:b_chiefcenter.php', true, 303);
die();
}
@@ -93,11 +93,6 @@ if($command == 61) {
$me = MYDB_fetch_array($result);
if($me['level'] >= 5) {
$note = StringUtil::neutralize($note, 90);
$query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = count($turn);
$str = "type=type";
for($i=0; $i < $count; $i++) {
@@ -107,7 +102,7 @@ if($command == 61) {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
header('location:b_chiefcenter.php');
header('location:b_chiefcenter.php', true, 303);
die();
}
@@ -131,7 +126,7 @@ if($command == 23 || $command == 24 || $command == 27 || $command == 51 || $comm
$query = "update nation set {$str} where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
header('location:b_chiefcenter.php');
header('location:b_chiefcenter.php', true, 303);
die();
}
@@ -141,5 +136,5 @@ foreach($turn as $turnIdx){
$query['turn'.$turnIdx] = $comStr;
}
$db->update('general', $query, 'owner=%i', $userID);
header('Location:./');
header('Location:./', true, 303);
+60 -35
View File
@@ -11,8 +11,6 @@ $genlist = Util::getReq('genlist', 'int');
$outlist = Util::getReq('outlist', 'int');
$citylist = Util::getReq('citylist', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -34,7 +32,7 @@ $ruler = MYDB_fetch_array($result);
//수뇌가 아니면 아무것도 할 수 없음
if($meLevel < 5){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
@@ -47,39 +45,52 @@ if($btn == "임명") {
}
if($genlist != 0 && !$general){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
if($meLevel < 5 || ($genlist != 0 && $general['nation'] != $me['nation']) || ($genlist != 0 && $general['level'] == 12)) {
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
} elseif($btn == "추방") {
if(!$outlist){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr from general where no='$outlist'";
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr,permission,penalty,belong from general where no='$outlist'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if(!$general){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
//추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $outlist != 0)) {
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
//추방할사람이 외교권자이면 불가
$permission = checkSecretPermission($general);
if($permission == 4){
header('location:b_myBossInfo.php', true, 303);
exit();
}
//NPC 부대장 추방 불가
if($general['npc'] == 5){
header('location:b_myBossInfo.php', true, 303);
exit();
}
}
//나와 대상 장수는 국가가 같아야 함
if($genlist != 0 && $me['nation'] != $general['nation']){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
exit();
}
@@ -139,18 +150,21 @@ if($btn == "추방") {
'level'=>0,
'nation'=>0,
'belong'=>0,
'permission'=>'normal',
], 'no=%i', $general['no']);
}
else{
$db->update('general', [
'level'=>0,
'permission'=>'normal',
'nation'=>0,
'belong'=>0,
'betray'=>$db->sqleval('betray + 1'),
'makelimit'=>12,
'gold'=>$general['gold'],
'rice'=>$general['rice'],
'experience'=>$db->sqleval('experience * (1 - 0.1*betray)'),
'dedication'=>$db->sqleval('dedication * (1 - 0.1*betray)'),
'betray'=>$db->sqleval('betray + 1'),
], 'no=%i', $general['no']);
}
}
@@ -238,7 +252,7 @@ if($btn == "추방") {
pushGenLog($general, $log);
pushGeneralPublicRecord($alllog, $year, $month);
}
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
die();
}
@@ -289,34 +303,36 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
}
}
}
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
die();
}
if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
switch($level) {
case 4: $lv = 1; break;
case 3: $lv = 2; break;
case 2: $lv = 3; break;
case 4: $genlv = 'gen1'; $genlvset = 'gen1set'; break;
case 3: $genlv = 'gen2'; $genlvset = 'gen2set'; break;
case 2: $genlv = 'gen3'; $genlvset = 'gen3set'; break;
}
$query = "select gen{$lv} from city where nation='{$me['nation']}' and city='$citylist'";
$query = "select {$genlv} from city where nation='{$me['nation']}' and city='$citylist'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($result);
if(!$city){
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
die();
}
$oldlist = $city["gen{$lv}"];
$oldlist = $city[$genlv];
if($oldlist != 0) {
//기존 장수 일반으로
$query = "update general set level=1 where no='$oldlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('general', [
'level'=>1
], 'no=%i', $oldlist);
//기존 자리 공석으로
$query = "update city set gen{$lv}=0 where city='$citylist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('city', [
$genlv=>0
], 'city = %i AND nation = %i', $citylist , $me['nation']);
}
if($genlist != 0) {
$valid = 0;
@@ -328,24 +344,33 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
if($valid == 1) {
// 신임 장수의 원래 자리 해제
$query = "update city set gen1=0 where gen1='$genlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set gen2=0 where gen2='$genlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set gen3=0 where gen3='$genlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('city', [
'gen1'=>0,
], 'gen1=%i', $genlist);
$db->update('city', [
'gen2'=>0,
], 'gen2=%i', $genlist);
$db->update('city', [
'gen3'=>0,
], 'gen3=%i', $genlist);
//신임 장수
$query = "update general set level='$level' where no='$genlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set gen{$lv}='$genlist',gen{$lv}set='1' where city='$citylist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('city', [
$genlv=>$genlist,
$genlvset=>1
], 'city=%i AND nation=%i', $citylist, $general['nation']);
if($db->affectedRows() > 0){
$db->update('general',[
'level'=>$level
], 'no=%i', $genlist);
}
}
}
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
die();
}
header('location:b_myBossInfo.php');
header('location:b_myBossInfo.php', true, 303);
-56
View File
@@ -1,56 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
// $title, $msg, $num
$title = Util::getReq('title');
$msg = Util::getReq('msg');
$num = Util::getReq('num', 'int');
$reply = Util::getReq('reply');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
if(getBlockLevel() != 1 && getBlockLevel() != 3) {
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$title = str_replace("|", " ", $title);
$msg = str_replace("|", " ", $msg);
$reply = str_replace("|", " ", $reply);
$title = trim($title);
$msg = trim($msg);
$reply = trim($reply);
$nation = getNation($me['nation']);
//새글 추가시
if($num == -1 && $title != "" && $msg != "") {
$num = $nation['boardindex'] + 1;
if($num >= 20) { $num = 0; }
$msg = $title."|".$msg;
$msg = addslashes(SQ2DQ($msg));
$date = date('Y-m-d H:i:s');
$query = "update nation set board{$num}='$msg',board{$num}_who='{$me['no']}',board{$num}_when='$date' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set boardindex='$num' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//$num에 댓글시
} elseif($num >= 0 && $reply != "") {
$newmsg = $nation["board{$num}"]."|".$me['no']."|".$reply;
$newmsg = addslashes(SQ2DQ($newmsg));
$query = "update nation set board{$num}='$newmsg' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
}
header('location:b_nationboard.php');
-27
View File
@@ -1,27 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
// $msg
$msg = Util::getReq('msg');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$msg = addslashes(SQ2DQ($msg));
$query = "update nation set rule='$msg' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
header('location:b_nationrule.php');
-2
View File
@@ -14,8 +14,6 @@ $gen = Util::getReq('gen', 'int');
$sel = Util::getReq('sel', 'int');
$trig = Util::getReq('trig', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
-68
View File
@@ -1,68 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
// $btn, $name, $troop
$btn = Util::getReq('btn');
$name = Util::getReq('name');
$gen = Util::getReq('gen', 'int');
$troop = Util::getReq('troop', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = $session::getUserID();
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`, nation, troop FROM general WHERE `owner`=%i', $userID);
$name = trim($name);
if($btn == "부 대 창 설" && $name != "" && $me['troop'] == 0) {
$db->insert('troop',[
'name'=>$name,
'nation'=>$me['nation'],
'no'=>$me['no']
]);
$troopID = $db->insertId();
$db->update('general', [
'troop'=>$troopID
], 'no=%i',$me['no']);
} elseif($btn == "부 대 변 경" && $name != "") {
$db->update('troop', [
'name'=>$name
], 'no=%i',$me['no']);
} elseif($btn == "부 대 추 방" && $gen != 0) {
$db->update('general', [
'troop'=>0
], 'no=%i AND troop=(SELECT troop FROM troop WHERE no = %i)', $gen, $me['no']);
} elseif($btn == "부 대 가 입" && $troop != 0) {
$troopLeader = $db->queryFirstField('SELECT `no` FROM troop WHERE troop=%i', $troop);
$troopLeaderNation = $db->queryFirstField('SELECT `nation` FROM `general` WHERE `no`=%i AND `nation`=%i', $troopLeader, $me['nation']);
if($troopLeaderNation){
$db->update('general', [
'troop'=>$troop
], 'no=%i', $me['no']);
}
} elseif($btn == "부 대 탈 퇴") {
$troopLeader = $db->queryFirstField('SELECT `no` FROM troop WHERE troop=%i', $me['troop']);
//부대장일 경우
if($troopLeader == $me['no']) {
// 모두 탈퇴
$db->update('general', [
'troop'=>0
], 'troop=%i',$me['troop']);
// 부대 삭제
$db->delete('troop', 'troop=%i', $me['troop']);
} else {
$db->update('general', [
'troop'=>0
], 'no=%i', $me['no']);
}
}
header('Location:b_troop.php');
+10 -2
View File
@@ -10,10 +10,18 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$autorun_user = $gameStor->autorun_user;
if($autorun_user['limit_minutes']??false){
//자동 턴인 경우에는 휴가 불가
header('location:b_myPage.php', true, 303);
}
$killturn = $gameStor->killturn;
$db->update('general', ['killturn'=>$killturn*3], 'owner=%i', $userID);
$db->update('general', [
'killturn'=>$killturn*3,
], 'owner=%i', $userID);
header('location:b_myPage.php');
header('location:b_myPage.php', true, 303);
+2 -4
View File
@@ -10,8 +10,6 @@ $comment = Util::getReq('comment');
$title = Util::getReq('title');
$str = Util::getReq('str');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -51,7 +49,7 @@ else if($btn == "댓글" && trim($comment) != "") {
}
if(!$isVoteAdmin){
header('location:a_vote.php');
header('location:a_vote.php', true, 303);
die();
}
@@ -87,4 +85,4 @@ if($btn == "수정") {
$gameStor->voteopen = 2;
}
header('location:a_vote.php');
header('location:a_vote.php', true, 303);
+8 -65
View File
@@ -8,62 +8,10 @@ $session = Session::getInstance()->setReadOnly();
$db = DB::db();
?>
<!DOCTYPE html>
<html>
<head>
<title>커맨드리스트</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
<?php
if(!$session->isGameLoggedIn()){
echo 'window.parent.location.href = "../";';
if (!$session->isGameLoggedIn()) {
die('<script>window.location.href = "../"</script>');
}
?>
function myclock() {
lastday = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
date = document.clock.clock.value;
year = parseInt(date.substr(0, 4), 10);
month = parseInt(date.substr(5,2), 10);
day = parseInt(date.substr(8, 2), 10);
hour = parseInt(date.substr(11, 2), 10);
min = parseInt(date.substr(14, 2), 10);
sec = parseInt(date.substr(17, 2), 10);
//윤년계산
if(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { lastday[1] = 29; }
else { lastday[1] = 28; }
// if(term > 0) term--;
sec++;
if(sec >= 60) { sec = 0; min++; }
if(min >= 60) { min = 0; hour++; }
if(hour >= 24) { hour = 0; day++; }
if(day > lastday[month-1]) { month++; day = 1; }
if(month >= 13) { year++; month = 1; }
if(month < 10) { month = '0' + month; }
if(day < 10) { day = '0' + day; }
if(hour < 10) { hour = '0' + hour; }
if(min < 10) { min = '0' + min; }
if(sec < 10) { sec = '0' + sec; }
date = '' + year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + sec;
document.clock.clock.value = date;
window.setTimeout("myclock();", 1000);
}
</script>
</head>
<body OnLoad='myclock()'>
<?php
myCommandList();
function myCommandList() {
@@ -72,9 +20,10 @@ function myCommandList() {
$userID = Session::getUserID();
$date = date('Y-m-d H:i:s');
$date_precise = (new \DateTime())->format("Y-m-d H:i:s.u");
// 명령 목록
$admin = $gameStor->getValues(['year','month','turnterm']);
$admin = $gameStor->getValues(['year','month','turnterm','turntime','opentime']);
$me = $db->queryFirstRow("SELECT `no`,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 FROM general WHERE `owner`=%s", $userID);
if(!$me){
@@ -84,16 +33,15 @@ function myCommandList() {
$turn = getTurn($me, 2);
echo "<table width=300 height=700 class='tb_layout bg2'>
<form name=clock>
<tr>
<td colspan=4 align=center id=bg0><b>- 명령 목록 - <input value='$date' type=text name=clock size=19 style=background-color:black;color:white;border-style:none;></b></td>
<td colspan=4 align=center id=bg0><b>- 명령 목록 - <input value='$date' type=text id=clock size=19 style=background-color:black;color:white;border-style:none; data-server-time='{$date_precise}'></b></td>
</tr>";
$year = $admin['year'];
$month = $admin['month'];
// 실행된 턴시간이면 +1
$cutTurn = cutTurn($me['turntime'], $admin['turnterm']);
if($date <= $cutTurn) { $month++; }
if($date <= $cutTurn && $date >= $admin['opentime']) { $month++; }
$totaldate = $me['turntime'];
@@ -107,7 +55,7 @@ function myCommandList() {
echo "
<tr height=28>
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
<td width=71 align=center height=24 id=bg1><b>{$year} {$month}</b></td>
<td width=71 align=center height=24 id=bg1 style='max-width:68px;white-space:nowrap;overflow:hidden;'><b>{$year} {$month}</b></td>
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
</tr>";
@@ -116,11 +64,6 @@ function myCommandList() {
}
echo "
</form>
</table>
";
}
?>
</body>
</html>
}
+17
View File
@@ -0,0 +1,17 @@
#container{
width:1024px;
margin:auto;
}
.defender_add_form .general_detail{
display:none;
}
.form_sample{
display:none;
}
input[type=number]{
text-align:right;
}
+56
View File
@@ -0,0 +1,56 @@
#newArticle{
width:1000px;
margin: 0 auto;
}
.titleInput{
width:100%;
color:white;
background-color:transparent;
border:none;
margin:1px 5px;
}
.contentInput{
width:100%;
min-height:3em;
color:white;
background-color:transparent;
border:none;
padding:1px 5px;
}
.articleFrame{
width:1000px;
margin: 20px auto;
}
.commentText{
width:100%;
}
.authorName, .comment .author{
width:110px;
font-size:85%;
}
.date{
width:125px;
font-size:85%;
}
.text{
text-align:left;
padding:1px 5px;
}
.submitComment{
width:100%;
}
.commentText{
color:white;
background-color:transparent;
border:none;
padding:1px 5px;
}
+44 -1
View File
@@ -192,13 +192,56 @@ div.bar_out div.bar_in{
font-family: '맑은 고딕';
}
.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;
}
.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;
}
.trumbowyg-box{
margin:0;
border-left:none;
border-right:none;
}
.edit_form.trumbowyg-editor{
margin:0;
padding:0;
}
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
text-align: center;
}
.select2-dropdown.simple-select2-align-center li.select2-results__option{
text-align: center;
}
.select2-container--bootstrap4 .select2-selection--single.text-secondary .select2-selection__rendered{
color:white;
}
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false]{
color:white;
}

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