Compare commits

..
282 Commits
Author SHA1 Message Date
Hide_D b1b06d9c82 베팅장 수리 2020-05-15 00:23:10 +09:00
Hide_D 6feec9bdbd 헌납 버그 수정 2020-05-14 23:54:02 +09:00
Hide_D d00f4f281c 거래장 버그 수정 2020-05-14 23:47:08 +09:00
Hide_D 15e3ec5263 유니크템 습득 확률 버그 2020-05-14 22:05:47 +09:00
Hide_D d6ddd91fda NPC 정책 설명 추가, 부대구조 추가, 포상/몰수량 조절 2020-05-14 02:04:28 +09:00
Hide_D de79e25510 조언자 포함 2020-05-13 02:28:35 +09:00
Hide_D 08f6b4deed 외교권자만 수정 가능하도록 변경 2020-05-13 02:28:14 +09:00
Hide_D 5cd115b54f 긴천시 쌀이 250만 생기니 500으로 증량 2020-05-13 02:22:58 +09:00
Hide_D 44b6f5890c 버그 수정 2020-05-13 02:13:58 +09:00
Hide_D 5dd5933390 코드 버그 수정 2020-05-13 02:11:25 +09:00
Hide_D d55d3f2fe1 정책 반영 2020-05-13 01:56:08 +09:00
Hide_D 2e9b87f0bc 입력창 준비 2020-05-13 00:45:38 +09:00
Hide_D 800c85dd03 npc_control form 2020-05-12 03:20:20 +09:00
Hide_D 5414f7161f 첩보 버그 수정 2020-05-11 02:23:27 +09:00
Hide_D 98b5825475 응답시 새로고침, 등용수락 안되는 버그 수정 2020-05-11 02:14:33 +09:00
Hide_D bda21c421f 등용장 버그 2020-05-11 01:53:15 +09:00
Hide_D ee27b06822 이동시 사기 하락 2020-05-11 01:38:47 +09:00
Hide_D 7504d62ab1 버그 수정 2020-05-11 01:37:37 +09:00
Hide_D f66b5c91fc 출병 에러 로그 수정 2020-05-11 01:24:34 +09:00
Hide_D bf838cd561 출병 어택땅시 아국 때리는 버그 수정 2020-05-11 01:21:46 +09:00
Hide_D eeb92f5915 금쌀 구매 관련 임시 수정 2020-05-11 01:16:27 +09:00
Hide_D 4524fab6b9 이전 로그 보기 추가 2020-05-11 01:05:55 +09:00
Hide_D d1a9b40ed5 테스트용 치트템 추가 2020-05-10 22:24:20 +09:00
Hide_D 96523408bd history 간소화 2020-05-10 15:06:51 +09:00
Hide_D b5646e0988 보상 기준 변경, 버그 수정 2020-05-10 04:50:10 +09:00
Hide_D 645c5cc6c1 인탐 확률 2020-05-10 04:29:14 +09:00
Hide_D 7323983d11 발령을 위해 수정 2020-05-10 04:18:12 +09:00
Hide_D 8650c9e4b9 $connect 잘 가 2020-05-10 03:39:02 +09:00
Hide_D 7cfdb403b3 같은 장수 같은 관직 임명시 버그 2020-05-10 03:26:25 +09:00
Hide_D af30c69560 약간의 쿼리 최적화 2020-05-10 02:18:44 +09:00
Hide_D b49ecb5802 점령->멸망 순서 정정 2020-05-10 02:15:56 +09:00
Hide_D 9f0dd8358f 중원 정보 재작성 2020-05-10 02:12:25 +09:00
Hide_D 1fff99b5f2 $connect 박멸중. 2020-05-10 01:15:25 +09:00
Hide_D f3ef65ad70 접속자수 계산 코드 수정 2020-05-09 23:46:43 +09:00
Hide_D da9d59443b getVar('npc') -> getNPCType() 2020-05-09 23:18:47 +09:00
Hide_D 2e7a5c6244 장수 수 적용 관련 변경 2020-05-09 23:09:36 +09:00
Hide_D 0b6f04ed26 소소한 설문 결과 수정 2020-05-09 17:55:07 +09:00
Hide_D 4856f6c477 토너먼트 우승 처리 버그 수정 2020-05-09 17:52:06 +09:00
Hide_D 0a0b499716 핵심 디버그 코드 제외 제거 2020-05-09 17:47:51 +09:00
Hide_D 954888a879 pushGlobalHistory 해제 2020-05-09 17:41:24 +09:00
Hide_D f00a01c123 내무부 국력순 정렬 2020-05-09 17:22:35 +09:00
Hide_D 0efb3a6f30 포상 기준 변경 2020-05-09 17:16:21 +09:00
Hide_D d3a9a7b54c 버그 수정 2020-05-09 17:00:36 +09:00
Hide_D 4bbf40c5b8 디버그 코드 추가 2020-05-09 16:50:53 +09:00
Hide_D 01ab59774b 징병 버그 1차 수정 2020-05-09 15:54:02 +09:00
Hide_D 5a6f84d5d2 m장 의병장 스탯 버그 수정 2020-05-09 15:34:32 +09:00
Hide_D eea5135316 관직 임명을 3,6,9,12에 하도록 변경 2020-05-09 15:16:27 +09:00
Hide_D 9f303966eb 자가 발령 포상 몰수 2020-05-09 15:14:24 +09:00
Hide_D a31b5ea29d 특기 초기화 추가 2020-05-09 13:14:11 +09:00
Hide_D b6a6ee31ed 설문조사시 아이템을 안 가진것으로 판정하는 버그 수정 2020-05-09 12:20:52 +09:00
Hide_D 9aa7556e5b 버그 수정 2020-05-08 22:09:56 +09:00
Hide_D 12cc54b0ea 버그 수정 2020-05-08 22:03:12 +09:00
Hide_D f8c4eae715 따라 임관 추가 2020-05-08 21:49:05 +09:00
Hide_D f8d8d2122e 버그 수정 2020-05-08 21:18:58 +09:00
Hide_D 157c8e92d5 즉시 사망 안되는 문제 해결 2020-05-08 21:14:33 +09:00
Hide_D bece81b10e TriggerCaller버그 수정 2020-05-08 20:52:16 +09:00
Hide_D 99755e98ee betray가 없는 버그 수정 2020-05-08 20:18:54 +09:00
Hide_D 541de612b2 예약턴 바로 받아오도록 수정 2020-05-08 20:14:20 +09:00
Hide_D c46d9fd04a 턴 실행 순서 조정 2020-05-08 03:31:17 +09:00
Hide_D a49695ace7 자가 치료 문제 2020-05-08 03:17:30 +09:00
Hide_D b562d45531 버그 수정 2020-05-08 03:13:20 +09:00
Hide_D e9f8db58c0 백동 재수정 2020-05-08 03:11:37 +09:00
Hide_D ed3313b2bc 백동 버그 수정 2020-05-08 03:09:20 +09:00
Hide_D 7bb6a9615c 일부 수치 변경 2020-05-08 03:03:16 +09:00
Hide_D e7333508c4 관직 코드 버그 수정 2020-05-08 01:52:24 +09:00
Hide_D 6e6feb6dc1 장수, 도시가 없을 경우 문제 수정 2020-05-08 01:22:27 +09:00
Hide_D cb37e3e993 장수 출력 일부 수정 2020-05-08 01:14:15 +09:00
Hide_D 13f457eba3 연감 저장방식 수정 2020-05-08 01:09:39 +09:00
Hide_D e7f8900286 통합, 항복 제거 2020-05-07 23:48:08 +09:00
Hide_D 7199a770c0 버그 수정 2020-05-07 23:38:26 +09:00
Hide_D e560bbdeb4 천도시 인구의 비중을 조금 더 높게 2020-05-07 00:59:28 +09:00
Hide_D 6479d39f93 버그 수정 2020-05-07 00:48:13 +09:00
Hide_D 9fc9790e93 버그 수정 2020-05-07 00:43:32 +09:00
Hide_D 5a50476e9d 버그 수정 2020-05-07 00:39:25 +09:00
Hide_D b8a8776c2e run_daemon 버그 수정 2020-05-06 22:58:58 +09:00
Hide_D f155a341cb 버그 수정 2020-05-06 20:58:08 +09:00
Hide_D 253e48694a 버그 수정, 반복 도구 강화 2020-05-06 20:56:13 +09:00
Hide_D 30a090004b 버그 수정 2020-05-06 20:08:00 +09:00
Hide_D fb77443b99 버그 수정 2020-05-06 09:10:24 +09:00
Hide_D 06d88883d8 버그 수정 2020-05-06 09:08:26 +09:00
Hide_D 337c9d3241 버그 수정 2020-05-06 09:06:47 +09:00
Hide_D 1d6378c1fc 버그 수정 2020-05-06 09:01:40 +09:00
Hide_D f13cfd190e 접속장수 수 위치 이동 2020-05-06 02:25:58 +09:00
Hide_D a2823b3c29 버그 수정 2020-05-06 02:13:40 +09:00
Hide_D 169edd4f9c nation_env 수정, $connect 일부 제거 2020-05-06 01:53:00 +09:00
Hide_D d0fa094d04 국방,임관권유문을 KVStorage로 분리 2020-05-05 19:55:59 +09:00
Hide_D 6ac12d42fe json_valid 설정. officer 설정 방식 변경 2020-05-05 19:17:27 +09:00
Hide_D a378ac8738 국기 변경 수정, 아이템 보상 추가 2020-05-05 17:24:03 +09:00
Hide_D 8b8f749006 neutralize 일부 롤백
과거의 나는 다 계획이 있었구나.
2020-05-05 03:57:00 +09:00
Hide_D b004a0609b 국호변경, 국기변경, string neutralize 2020-05-05 03:44:00 +09:00
Hide_D 82d4efcbc2 버그 수정 2020-05-05 00:41:16 +09:00
Hide_D 2476726a6a 빠진 코드 추가 2020-05-05 00:19:13 +09:00
Hide_D 19a84d0cc8 getReq변경, ajax인 경우 ajax요청 2020-05-05 00:19:01 +09:00
Hide_D a688b6fdce 건국시 국가색 2020-05-04 21:02:46 +09:00
Hide_D 73e5f5d6ad testPermissionToReserve 수정 2020-05-04 20:52:33 +09:00
Hide_D 014fb9408e MinCondition 조건 약화 2020-05-04 20:37:23 +09:00
Hide_D 91f2be6759 버그 수정 2020-05-04 20:01:23 +09:00
Hide_D 76ac6cf5b5 커맨드 유효성을 2개에서 3개구성으로 변경 2020-05-04 19:51:11 +09:00
Hide_D dbba6fa942 랜임모드시 임관출력 버그 수정 2020-05-04 07:26:53 +09:00
Hide_D d0771e3392 초토화 스택 버그 2020-05-04 06:25:28 +09:00
Hide_D 6c8eca2f57 버그 수정 2020-05-04 06:24:01 +09:00
Hide_D 3aa9d8ae56 버그 수정 2020-05-04 06:22:34 +09:00
Hide_D 42e1764c44 버그 수정 2020-05-04 06:18:20 +09:00
Hide_D 5abe9bd6d5 초토화 버그 수정 2020-05-04 06:17:13 +09:00
Hide_D d5492eee93 초토화 추가 2020-05-04 06:13:15 +09:00
Hide_D a26a59b193 턴 계산 수정 2020-05-04 02:48:09 +09:00
Hide_D 3d2dbe9199 루드라사움 2020-05-04 02:04:34 +09:00
Hide_D 73749b8d22 update server 반영 2020-05-04 01:42:20 +09:00
Hide_D 50c30b7cd0 전략 구현 2020-05-03 17:30:43 +09:00
Hide_D 44305b9abf 숙련전환 추가 2020-05-03 04:09:44 +09:00
Hide_D c98d8fd199 토너먼트 버그 수정 2020-05-03 03:36:21 +09:00
Hide_D 4adc0b7c24 불가침파기제의 추가 2020-05-03 01:33:52 +09:00
Hide_D 1427ac632f 불가침, 종전 메시지 2020-05-03 00:31:04 +09:00
Hide_D 5e4ae07575 버그 수정 2020-05-02 17:52:08 +09:00
Hide_D 9c7fddfb0d 명전 살상률 수정 2020-05-02 17:29:20 +09:00
Hide_D 8ebe81b89f 토너먼트 나눗셈 버그 수정 2020-05-02 16:20:36 +09:00
Hide_D 016ca770f5 phan 처리 2020-05-02 12:01:54 +09:00
Hide_D c8948953c9 버그 수정 2020-05-02 02:25:45 +09:00
Hide_D 85ebd30c9c 장수 등록 수정 2020-05-02 02:15:59 +09:00
Hide_D 5ea6c4c449 색상 2020-05-02 02:14:48 +09:00
Hide_D bfa31d1c79 강조 수정 2020-05-02 02:13:18 +09:00
Hide_D d4f7ce7560 표시 2020-05-02 02:12:23 +09:00
Hide_D 0ef223d80e raise event 등록 CreateManyNPC 추가 2020-05-02 02:09:21 +09:00
Hide_D eb232f7bb1 버그 수정 2020-05-02 01:16:09 +09:00
Hide_D ce4f44a951 버그 수정 2020-05-02 01:15:52 +09:00
Hide_D f70cfb5d48 버그 수정 2020-05-02 01:09:41 +09:00
Hide_D 7e39be6d20 토너먼트 무명장수 코드 수정 2020-05-02 00:36:14 +09:00
Hide_D 979afdbf7b 토너먼트 롤백 2020-05-01 23:41:41 +09:00
Hide_D e662b5ed23 버그 수정 2020-05-01 21:59:53 +09:00
Hide_D fea7dcb4aa 지급률 수정 2020-05-01 18:26:49 +09:00
Hide_D 2220920afe 코드 수정 2020-05-01 18:24:05 +09:00
Hide_D 180b3c7c5d phan 1차 2020-05-01 17:33:14 +09:00
Hide_D beb7553629 메시지 컬러 수정 2020-05-01 16:09:03 +09:00
Hide_D 75934fc5ae 선양 버그 수정.. 2020-05-01 16:02:36 +09:00
Hide_D 0882e06adc 버그 수정 2020-05-01 15:28:00 +09:00
Hide_D 96bd755660 선양 코드 수정 2020-05-01 15:27:42 +09:00
Hide_D 51c96b4d04 phan 설치 2020-05-01 15:26:54 +09:00
Hide_D a529eba693 버그 수정 2020-05-01 03:36:17 +09:00
Hide_D a00b5a71fc None 처리 2020-05-01 03:27:43 +09:00
Hide_D 7f35dda305 징병 버그 다시 수정 ㅜㅜ 2020-04-30 19:58:17 +09:00
Hide_D fccebb059b 징병 입력 버그 수정 2020-04-30 19:56:38 +09:00
Hide_D cf1dc17298 버그 수정 2020-04-30 19:29:39 +09:00
Hide_D b24eabc82a 저격 설명 수정 2020-04-30 17:08:55 +09:00
Hide_D f3a26116b2 전멸시마다 저격 가능 2020-04-30 17:08:34 +09:00
Hide_D 884c1ea82c 버그 수정 2020-04-30 16:47:11 +09:00
Hide_D c65737f554 저격 버그 수정 2020-04-30 16:02:46 +09:00
Hide_D b77a11bfc2 부대후방발령 버그 수정 2020-04-30 13:44:42 +09:00
Hide_D 58fd8e3c7f 부대유저장 후방발령 버그 2020-04-30 13:40:55 +09:00
Hide_D a8cc2fc671 병종 이미지경로 변경 2020-04-30 06:31:12 +09:00
Hide_D d19ebb6b13 내정을 조금 더 고려함 2020-04-30 05:58:44 +09:00
Hide_D fad02e8736 디버그 코드 제거 2020-04-30 05:42:11 +09:00
Hide_D 11c928bf30 AI 천도 안하는 버그 수정 2020-04-30 05:41:42 +09:00
Hide_D b4262eb34b 저격 버그 수정, 필살 강화 2020-04-30 05:07:52 +09:00
Hide_D 76c4a8a966 살상률 표기 버그 수정 2020-04-30 04:34:51 +09:00
Hide_D 0a212af11e 견고 버그 수정, 저격 상향 2020-04-30 04:32:35 +09:00
Hide_D efffb46281 증축,감축,천도 버그 2020-04-30 04:03:43 +09:00
Hide_D e2ec3ef532 천도 버그 수정 2020-04-30 03:16:16 +09:00
Hide_D d3c4dd59d2 징병 로직 일부 수정 2020-04-29 00:28:27 +09:00
Hide_D dcebb79590 출병 기준 수정 2020-04-28 04:02:14 +09:00
Hide_D 0f0b989963 랜덤 성격 불가 수정 2020-04-28 02:18:02 +09:00
Hide_D 4815f6c79a 방랑군 warning 2020-04-28 02:14:10 +09:00
Hide_D 409063a339 디버그 로그 제거 2020-04-28 02:11:25 +09:00
Hide_D c831d539b6 숙련 버그 수정 2020-04-28 02:02:28 +09:00
Hide_D 7aa826fc80 버그 수정 2020-04-28 01:50:25 +09:00
Hide_D d603557c35 버그 수정 2020-04-28 01:37:52 +09:00
Hide_D c267a5c7e0 버그 수정 2020-04-28 01:09:07 +09:00
Hide_D 46764ff9aa 버그 수정 2020-04-27 14:22:07 +09:00
Hide_D f7a041d9fc 버그 수정 2020-04-27 14:12:51 +09:00
Hide_D 751336e5d1 버그 테스트 2020-04-27 14:09:23 +09:00
Hide_D b2403aedac 선정 열심히 2020-04-27 13:03:12 +09:00
Hide_D d5f9e923c4 기술연구 우선순위 낮춤 2020-04-27 12:54:16 +09:00
Hide_D c3c2022029 내정 시도율 변경 2020-04-27 03:09:05 +09:00
Hide_D fb08e86a4c 재야 부대장 사망 2020-04-27 02:53:13 +09:00
Hide_D 6f4c32c04c 디버그 코드 임시 제거 2020-04-27 02:42:10 +09:00
Hide_D 7c74a40baf 수치 수정 2020-04-27 02:39:26 +09:00
Hide_D 8bf60bb793 버그 수정 2020-04-27 02:37:11 +09:00
Hide_D 005aa959c5 부대장 동작 관련 수정 2020-04-27 02:30:52 +09:00
Hide_D d9818f6960 버그 수정 2020-04-27 02:21:11 +09:00
Hide_D f90ac9dea4 버그 수정 2020-04-27 02:18:42 +09:00
Hide_D e0036ca32b 버그 수정 2020-04-27 02:07:34 +09:00
Hide_D ad8acaf296 버그 수정 2020-04-27 00:30:48 +09:00
Hide_D 34a863a6ea 스킬 안 쓰는 버그 해결 2020-04-26 23:52:17 +09:00
Hide_D 724c7388af 특기 획득 구조 변경 2020-04-26 22:31:49 +09:00
Hide_D 2bb6ef8efb 관직 임명 보정 2020-04-26 04:48:31 +09:00
Hide_D baf4d3aa98 버그 수정 2020-04-26 04:08:47 +09:00
Hide_D f4ca4431da 버그 수정 2020-04-26 04:02:16 +09:00
Hide_D 19446a666e 버그 수정 2020-04-26 04:00:06 +09:00
Hide_D b48b09249e 버그 수정 2020-04-26 03:45:19 +09:00
Hide_D be282db1c2 버그 수정 2020-04-26 03:36:40 +09:00
Hide_D 667cf4062f 버그 수정 2020-04-26 03:23:32 +09:00
Hide_D ba442b1457 선전포고 최종 수정 2020-04-26 00:15:30 +09:00
Hide_D a07622d084 reqGold 수정 2020-04-25 23:57:31 +09:00
Hide_D 8855c92e73 수정 2020-04-25 23:54:40 +09:00
Hide_D 6a67a6a66b 디버그 수정2 2020-04-25 23:53:19 +09:00
Hide_D 6822c8137b 디버그 코드 2020-04-25 23:51:10 +09:00
Hide_D 76505aa4de 버그 수정 2020-04-25 23:39:42 +09:00
Hide_D 40fee137d4 의병모집 버그 수정 2020-04-25 23:22:51 +09:00
Hide_D 1f3259e907 의병 버그? 2020-04-25 23:18:32 +09:00
Hide_D 33b0c19d43 선포 확률 추가 수정 2020-04-25 23:15:26 +09:00
Hide_D 1de59279a6 선포 기준 변경2 2020-04-25 22:56:13 +09:00
Hide_D 184a43ccf5 선포 기준 변경 2020-04-25 22:37:51 +09:00
Hide_D efcb71e866 버그 수정 2020-04-25 21:45:41 +09:00
Hide_D 7bc720be77 버그 수정 2020-04-25 20:59:13 +09:00
Hide_D 9ecf6d3735 버그 수정 2020-04-25 20:47:11 +09:00
Hide_D ba968d6ff7 내정장 포상금 설정 2020-04-25 07:35:04 +09:00
Hide_D 5cd86a2766 선전포고 대상이 이상한 버그 수정 2020-04-25 07:02:13 +09:00
Hide_D 11325e6f07 지급률, 선포기준 수정 2020-04-25 06:43:45 +09:00
Hide_D 5b2b7dc03e 일부 설정값 수정 2020-04-25 06:30:01 +09:00
Hide_D 324a67c7da 버그 수정 2020-04-25 06:10:57 +09:00
Hide_D 6b54797aec 군량매매 버그 수정 2020-04-25 05:28:43 +09:00
Hide_D 4e7529ae44 버그 수정 2020-04-25 05:09:00 +09:00
Hide_D 086e61bb19 버그 수정 2020-04-25 04:55:59 +09:00
Hide_D c6eeeda1c3 버그 수정 2020-04-25 04:47:58 +09:00
Hide_D 6d642c8098 버그 수정 2020-04-25 04:33:53 +09:00
Hide_D 40c89a479f 버그 수정 2020-04-24 03:01:26 +09:00
Hide_D f43c811477 버그 수정 2020-04-24 02:56:09 +09:00
Hide_D 0a3277c6e7 버그 수정 2020-04-24 02:24:15 +09:00
Hide_D 667a8fea31 버그 수정 2020-04-24 02:04:41 +09:00
Hide_D 089bb027ae 버그 수정 2020-04-24 01:51:15 +09:00
Hide_D 6667d85623 버그 수정 2020-04-24 01:32:58 +09:00
Hide_D 2513465c6b 버그 수정 2020-04-24 01:28:41 +09:00
Hide_D 831266fe3c 버그 수정 2020-04-24 01:19:02 +09:00
Hide_D bea5cd1f52 버그 수정 2020-04-24 01:09:49 +09:00
Hide_D 961414559f 버그 수정 2020-04-24 00:44:31 +09:00
Hide_D ffa37160a5 버그 수정 2020-04-23 01:11:40 +09:00
Hide_D d856d12126 디버그 코드 제거 2020-04-23 00:44:57 +09:00
Hide_D 1dc16932b6 버그 수정 2020-04-23 00:36:45 +09:00
Hide_D db603c5ebd 버그 수정 2020-04-23 00:11:39 +09:00
Hide_D f837b71423 버그 수정 2020-04-22 23:55:13 +09:00
Hide_D a5b7259577 버그 수정 2020-04-22 23:36:21 +09:00
Hide_D 3f6eeb2a30 버그 수정 2020-04-22 23:35:06 +09:00
Hide_D f8434d7fe2 버그 수정 2020-04-22 23:26:28 +09:00
Hide_D b5cc8ad820 버그 수정 2020-04-22 23:22:39 +09:00
Hide_D 20c2d96dee 버그 수정 2020-04-22 23:18:50 +09:00
Hide_D c08a669aff 버그 수정 2020-04-22 03:18:01 +09:00
Hide_D c4fe77a5ba 버그 수정 2020-04-22 03:05:05 +09:00
Hide_D 6d6326e415 버그 수정 2020-04-22 02:31:53 +09:00
Hide_D 21a956eca8 버그 수정 2020-04-22 02:01:16 +09:00
Hide_D da1273c135 버그 수정 2020-04-21 02:06:03 +09:00
Hide_D aaf7870d88 range 버그 수정 2020-04-21 01:21:10 +09:00
Hide_D 03dffe1181 버그 수정 2020-04-21 01:19:24 +09:00
Hide_D 146010f3f5 명장일람 버그 수정 2020-04-20 23:04:03 +09:00
Hide_D 6526653540 디버그 코드 추가, 버그 수정 2020-04-20 03:08:08 +09:00
Hide_D 7b46a1b9ff 버그 수정 2020-04-20 00:47:35 +09:00
Hide_D 0608f9b3c7 버그 수정 2020-04-19 18:48:56 +09:00
Hide_D e63b46b004 버그 수정 2020-04-19 06:18:35 +09:00
Hide_D 17d9853e90 버그 수정 2020-04-19 05:38:25 +09:00
Hide_D 4d02639985 버그 수정 2020-04-18 22:49:50 +09:00
Hide_D 9677a55a5a db table 구조 일부 수정 2020-04-18 14:52:16 +09:00
Hide_D 87056a4052 history 관련 처리 변경 2020-04-18 14:36:05 +09:00
Hide_D aba9ee7b33 history column을 테이블로 분리 2020-04-18 14:07:07 +09:00
Hide_D ad2baeda2f 오타 수정 2020-04-18 03:59:16 +09:00
Hide_D eab8a3b94e city의 officer를 general로 이동 2020-04-18 03:57:58 +09:00
Hide_D 5d23032500 $_POST 삭제 2020-04-17 01:30:05 +09:00
Hide_D 5a2b6db3bb 투표 코드 수정 2020-04-17 01:23:52 +09:00
Hide_D 546c6a3227 인사부 일부 코드 수정 2020-04-17 01:15:19 +09:00
Hide_D 674018d2fc 통합 세력장수,암행부 query 2020-04-16 02:37:36 +09:00
Hide_D 39b65284bd experience, dedication 변경
expereince, dedication 변경을 add 함수로 변경
경험치,계급 변경을 '즉시' 하도록 변경(남은 부분 있음)
관직 임명을 c에서 j로 변경
2020-04-15 05:34:27 +09:00
Hide_D c0fee32c4c name2 -> owner_name (or orderName) 2020-04-15 02:44:06 +09:00
Hide_D 8428649377 부대 버그 2020-04-15 02:14:49 +09:00
Hide_D 430c792a9b 부대 편성 버그 수정 2020-04-15 02:13:58 +09:00
Hide_D 1e029ee517 부대 코드 변경 2020-04-15 02:13:16 +09:00
Hide_D dfbc837371 버그 수정 2020-04-14 02:38:39 +09:00
Hide_D 3e1bb44284 커맨드 활성화 2020-04-14 02:38:05 +09:00
Hide_D aacb6adb26 증축, 천도, 감축 2020-04-14 02:36:20 +09:00
Hide_D 95ac7454ae Merge branch 'ng_turn' of ssh://storage.hided.net:2525/devsam/core into ng_turn 2020-04-14 01:49:46 +09:00
Hide_D 85389c4a60 천도 추가 2020-04-14 01:49:40 +09:00
Hide_D 913289e0ef AI 구현 2020-04-13 02:45:24 +09:00
Hide_D 84efd5bfdf AI 구현중 2020-04-12 02:46:51 +09:00
Hide_D 33014dbd7d AI 구현중 2020-04-10 03:19:56 +09:00
Hide_D d0e20eb8d3 AI 커맨드 구현중 2020-04-09 03:13:14 +09:00
Hide_D a386999567 Util::range 추가 2020-04-09 02:07:50 +09:00
Hide_D 8519481f96 AI 구현중 2020-04-08 03:30:40 +09:00
Hide_D 97fdc095a5 AI턴 추가 구현 2020-04-07 02:55:59 +09:00
Hide_D 915243ee4a NPC 자동 턴 추가 구현 2020-04-06 03:01:20 +09:00
Hide_D 727e447899 AI 작업중 2020-04-04 04:52:18 +09:00
Hide_D e6ea5824f0 병종 코드, 숙련 코드 재설정
병종 상성 지정시 병종 단위가 아니라 병종 코드 자체로 지정 가능
2020-04-03 23:54:26 +09:00
Hide_D 8eee11cee9 Merge branch 'ng_turn' of ssh://storage.hided.net:2525/devsam/core into ng_turn 2020-04-01 20:24:51 +09:00
Hide_D 7aca3049d1 join 버그 수정? 2020-04-01 20:24:43 +09:00
Hide_D 03b8d0c388 AI 천도 알고리즘 2020-04-01 03:30:10 +09:00
Hide_D aa7d01f3d6 AI 뼈대 다시 잡는중 2020-03-31 02:50:07 +09:00
Hide_D b397c41c9e 신규 AI 구현 준비 2020-03-31 02:05:04 +09:00
1424 changed files with 273520 additions and 13592 deletions
+113 -13
View File
@@ -2,41 +2,137 @@
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* default configuration. Command-line arguments will be applied
* after this file is read.
*/
return [
// Supported values: '7.0', '7.1', '7.2', null.
// If this is set to null,
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
// `'7.4'`, `null`.
// If this is set to `null`,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute phan.
"target_php_version" => '7.2',
// of the php executable used to execute Phan.
//
// Note that the **only** effect of choosing `'5.6'` is to infer
// that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
"target_php_version" => '7.3',
'backward_compatibility_checks ' => false,
'ignore_undeclared_variables_in_global_scope' => false,
'minimum_severity'=>\Phan\Issue::SEVERITY_LOW,
'minimum_severity'=>\Phan\Issue::SEVERITY_NORMAL,
'file_list' => [
'f_config/config.php',
'hwe/MYDB.php',
'hwe/lib.php',
'hwe/a_bestGeneral.php',
'hwe/a_emperior.php',
'hwe/a_emperior2.php',
'hwe/a_emperior_detail.php',
'hwe/a_genList.php',
'hwe/a_hallOfFame.php',
'hwe/a_history.php',
'hwe/a_kingdomList.php',
'hwe/a_npcList.php',
'hwe/a_status.php',
'hwe/a_traffic.php',
'hwe/a_vote.php',
'hwe/battle_simulator.php',
'hwe/b_auction.php',
'hwe/b_battleCenter.php',
'hwe/b_betting.php',
'hwe/b_chiefcenter.php',
'hwe/b_currentCity.php',
'hwe/b_dipcenter.php',
'hwe/b_diplomacy.php',
'hwe/b_genList.php',
'hwe/b_myBossInfo.php',
'hwe/b_myCityInfo.php',
'hwe/b_myGenInfo.php',
'hwe/b_myKingdomInfo.php',
'hwe/b_myPage.php',
'hwe/b_processing.php',
'hwe/b_tournament.php',
'hwe/b_troop.php',
'hwe/c_auction.php',
'hwe/c_die_immediately.php',
'hwe/c_dipcenter.php',
'hwe/c_tournament.php',
'hwe/c_vacation.php',
'hwe/c_vote.php',
'hwe/func.php',
'hwe/func_auction.php',
'hwe/func_command.php',
'hwe/func_converter.php',
'hwe/func_diplomacy.php',
'hwe/func_gamerule.php',
'hwe/func_history.php',
'hwe/func_legacy.php',
'hwe/func_map.php',
'hwe/func_message.php',
'hwe/func_process_chief.php',
'hwe/func_process.php',
'hwe/func_string.php',
'hwe/func_template.php',
'hwe/func_time_event.php',
'hwe/func_tournament.php',
'hwe/index.php',
'hwe/install.php',
'hwe/install_db.php',
'hwe/join.php',
'hwe/join_post.php',
'hwe/j_adjust_icon.php',
'hwe/j_autoreset.php',
'hwe/j_basic_info.php',
'hwe/j_betting.php',
'hwe/j_board_article_add.php',
'hwe/j_board_comment_add.php',
'hwe/j_board_get_articles.php',
'hwe/j_chief_turn.php',
'hwe/j_diplomacy_destroy_letter.php',
'hwe/j_diplomacy_get_letter.php',
'hwe/j_diplomacy_respond_letter.php',
'hwe/j_diplomacy_rollback_letter.php',
'hwe/j_diplomacy_send_letter.php',
'hwe/j_general_set_permission.php',
'hwe/j_general_turn.php',
'hwe/j_getChiefTurn.php',
'hwe/j_get_city_list.php',
'hwe/j_get_general_list.php',
'hwe/j_get_nation_general_list.php',
'hwe/j_get_reserved_command.php',
'hwe/j_get_select_npc_token.php',
'hwe/j_image_upload.php',
'hwe/j_install.php',
'hwe/j_install_db.php',
'hwe/j_load_scenarios.php',
'hwe/j_map.php',
'hwe/j_map_history.php',
'hwe/j_msg_contact_list.php',
'hwe/j_msg_decide_opt.php',
'hwe/j_msg_delete.php',
'hwe/j_msg_get_old.php',
'hwe/j_msg_get_recent.php',
'hwe/j_msg_submit.php',
'hwe/j_myBossInfo.php',
'hwe/j_select_npc.php',
'hwe/j_server_basic_info.php',
'hwe/j_set_chief_command.php',
'hwe/j_set_general_command.php',
'hwe/j_simulate_battle.php',
'hwe/j_troop.php',
'hwe/lib.php',
'hwe/process_war.php',
'hwe/func.php'
'hwe/select_npc.php',
'hwe/t_board.php',
'hwe/t_diplomacy.php',
'hwe/_119.php',
'hwe/_119_b.php',
'hwe/_admin1.php',
'hwe/_admin1_submit.php',
'hwe/_admin2.php',
'hwe/_admin2_submit.php',
'hwe/_admin4.php',
'hwe/_admin4_submit.php',
'hwe/_admin5.php',
'hwe/_admin5_submit.php',
'hwe/_admin7.php',
'hwe/_admin8.php',
'hwe/_admin_force_rehall.php',
],
// A list of directories that should be parsed for class and
@@ -71,6 +167,10 @@ return [
'vendor/'
],
'suppress_issue_types' => [
'PhanUnreferencedUseNormal',
],
// A list of plugin files to execute.
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
// (Pass these in as relative paths.
+2 -1
View File
@@ -25,7 +25,8 @@
"symfony/lock": "^4.1",
"ezyang/htmlpurifier": "^4.10",
"xemlock/htmlpurifier-html5": "^0.1.7",
"catfan/medoo": "^1.5"
"catfan/medoo": "^1.5",
"phan/phan": "^2.7"
},
"autoload": {
"psr-4": {
Generated
+1055 -2
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "b5b5695ed0b1b04fa672f99972d8caad",
"content-hash": "7343763bee946f23e755edecd14d6b2c",
"packages": [
{
"name": "brandonwamboldt/utilphp",
@@ -112,6 +112,117 @@
],
"time": "2019-12-19T05:04:34+00:00"
},
{
"name": "composer/semver",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"time": "2020-01-13T12:06:48+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
},
"type": "library",
"autoload": {
"psr-4": {
"Composer\\XdebugHandler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Stevenson",
"email": "john-stevenson@blueyonder.co.uk"
}
],
"description": "Restarts a process without Xdebug.",
"keywords": [
"Xdebug",
"performance"
],
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
}
],
"time": "2020-03-01T12:26:26+00:00"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.12.0",
@@ -159,6 +270,47 @@
],
"time": "2019-10-28T03:44:26+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"shasum": ""
},
"require": {
"netresearch/jsonmapper": "^1.0 || ^2.0",
"php": ">=7.0",
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0.0"
},
"type": "library",
"autoload": {
"psr-4": {
"AdvancedJsonRpc\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Felix Becker",
"email": "felix.b@outlook.com"
}
],
"description": "A more advanced JSONRPC implementation",
"time": "2020-03-11T15:21:41+00:00"
},
{
"name": "firephp/firephp-core",
"version": "v0.4.0",
@@ -439,6 +591,47 @@
],
"time": "2016-12-28T00:14:17+00:00"
},
{
"name": "microsoft/tolerant-php-parser",
"version": "v0.0.20",
"source": {
"type": "git",
"url": "https://github.com/microsoft/tolerant-php-parser.git",
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
"shasum": ""
},
"require": {
"php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "library",
"autoload": {
"psr-4": {
"Microsoft\\PhpParser\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Rob Lourens",
"email": "roblou@microsoft.com"
}
],
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
"time": "2020-02-18T02:57:19+00:00"
},
{
"name": "monolog/monolog",
"version": "1.25.3",
@@ -517,6 +710,52 @@
],
"time": "2019-12-20T14:15:16+00:00"
},
{
"name": "netresearch/jsonmapper",
"version": "v2.1.0",
"source": {
"type": "git",
"url": "https://github.com/cweiske/jsonmapper.git",
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
"squizlabs/php_codesniffer": "~3.5"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonMapper": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"OSL-3.0"
],
"authors": [
{
"name": "Christian Weiske",
"email": "cweiske@cweiske.de",
"homepage": "http://github.com/cweiske/jsonmapper/",
"role": "Developer"
}
],
"description": "Map nested JSON structures onto PHP classes",
"time": "2020-04-16T18:48:43+00:00"
},
{
"name": "pguardiario/phpuri",
"version": "1.0",
@@ -541,6 +780,80 @@
"description": "A php library for converting relative urls to absolute.",
"time": "2015-05-24T09:13:17+00:00"
},
{
"name": "phan/phan",
"version": "2.7.1",
"source": {
"type": "git",
"url": "https://github.com/phan/phan.git",
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phan/phan/zipball/67c51bb1593e5c30271fc16d691b82e318b90b77",
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77",
"shasum": ""
},
"require": {
"composer/semver": "^1.4",
"composer/xdebug-handler": "^1.3.2",
"ext-filter": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"felixfbecker/advanced-json-rpc": "^3.0.4",
"microsoft/tolerant-php-parser": "0.0.20",
"netresearch/jsonmapper": "^1.6.0|^2.0",
"php": "^7.1.0",
"sabre/event": "^5.0",
"symfony/console": "^2.3|^3.0|^4.0|^5.0",
"symfony/polyfill-mbstring": "^1.11.0",
"symfony/polyfill-php72": "^1.15"
},
"require-dev": {
"brianium/paratest": "^4.0.0",
"phpunit/phpunit": "^7.5.0"
},
"suggest": {
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.6+ is recommended.",
"ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
"ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",
"ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions."
},
"bin": [
"phan",
"phan_client",
"tocheckstyle"
],
"type": "project",
"autoload": {
"psr-4": {
"Phan\\": "src/Phan"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tyson Andre"
},
{
"name": "Rasmus Lerdorf"
},
{
"name": "Andrew S. Morrison"
}
],
"description": "A static analyzer for PHP",
"keywords": [
"analyzer",
"php",
"static"
],
"time": "2020-04-12T01:25:29+00:00"
},
{
"name": "php-extended/php-system",
"version": "1.4.0",
@@ -625,6 +938,203 @@
],
"time": "2018-06-07T06:04:58+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2020-04-27T09:25:28+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
"shasum": ""
},
"require": {
"ext-filter": "^7.1",
"php": "^7.2",
"phpdocumentor/reflection-common": "^2.0",
"phpdocumentor/type-resolver": "^1.0",
"webmozart/assert": "^1"
},
"require-dev": {
"doctrine/instantiator": "^1",
"mockery/mockery": "^1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
},
{
"name": "Jaap van Otterdijk",
"email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2020-02-22T12:28:44+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
"shasum": ""
},
"require": {
"php": "^7.2",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "^7.2",
"mockery/mockery": "~1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2020-02-18T18:59:58+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
@@ -762,6 +1272,66 @@
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "sabre/event",
"version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d00a17507af0e7544cfe17096372f5d733e3b276",
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276",
"shasum": ""
},
"require": {
"php": "^7.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
"phpunit/phpunit": "^7 || ^8"
},
"type": "library",
"autoload": {
"psr-4": {
"Sabre\\Event\\": "lib/"
},
"files": [
"lib/coroutine.php",
"lib/Loop/functions.php",
"lib/Promise/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "sabre/event is a library for lightweight event-based programming",
"homepage": "http://sabre.io/event/",
"keywords": [
"EventEmitter",
"async",
"coroutine",
"eventloop",
"events",
"hooks",
"plugin",
"promise",
"reactor",
"signal"
],
"time": "2020-01-31T18:52:29+00:00"
},
{
"name": "scssphp/scssphp",
"version": "1.0.6",
@@ -866,6 +1436,96 @@
],
"time": "2014-06-16T22:40:22+00:00"
},
{
"name": "symfony/console",
"version": "v5.0.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
"symfony/dependency-injection": "<4.4",
"symfony/event-dispatcher": "<4.4",
"symfony/lock": "<4.4",
"symfony/process": "<4.4"
},
"provide": {
"psr/log-implementation": "1.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/event-dispatcher": "^4.4|^5.0",
"symfony/lock": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0",
"symfony/var-dumper": "^4.4|^5.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-30T11:42:42+00:00"
},
{
"name": "symfony/lock",
"version": "v4.4.3",
@@ -932,6 +1592,350 @@
],
"time": "2020-01-04T13:00:46+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-02-27T09:26:54+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-09T19:04:49+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-02-27T09:26:54+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php73\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-02-27T09:26:54+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "144c5e51266b281231e947b51223ba14acf1a749"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
"reference": "144c5e51266b281231e947b51223ba14acf1a749",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/container": "^1.0"
},
"suggest": {
"symfony/service-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "vlucas/valitron",
"version": "v1.4.7",
@@ -981,6 +1985,54 @@
],
"time": "2019-08-29T19:49:43+00:00"
},
{
"name": "webmozart/assert",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2020-04-18T12:12:48+00:00"
},
{
"name": "xemlock/htmlpurifier-html5",
"version": "v0.1.11",
@@ -1043,5 +2095,6 @@
"platform-dev": [],
"platform-overrides": {
"php": "7.3"
}
},
"plugin-api-version": "1.1.0"
}
+2
View File
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
File diff suppressed because one or more lines are too long
+6 -6
View File
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

After

Width:  |  Height:  |  Size: 443 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 631 KiB

Binary file not shown.
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 699 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,803 @@
<?xml version="1.0" standalone="no"?>
<!--
Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
-->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020
By Robert Madole
Copyright (c) Font Awesome
</metadata>
<defs>
<font id="FontAwesome5Free-Regular" horiz-adv-x="512" >
<font-face
font-family="Font Awesome 5 Free Regular"
font-weight="400"
font-stretch="normal"
units-per-em="512"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="448"
descent="-64"
bbox="-0.0663408 -64.0662 640.01 448.1"
underline-thickness="25"
underline-position="-50"
unicode-range="U+0020-F5C8"
/>
<missing-glyph />
<glyph glyph-name="heart" unicode="&#xf004;"
d="M458.4 383.7c75.2998 -63.4004 64.0996 -166.601 10.5996 -221.3l-175.4 -178.7c-10 -10.2002 -23.2998 -15.7998 -37.5996 -15.7998c-14.2002 0 -27.5996 5.69922 -37.5996 15.8994l-175.4 178.7c-53.5996 54.7002 -64.5996 157.9 10.5996 221.2
c57.8008 48.7002 147.101 41.2998 202.4 -15c55.2998 56.2998 144.6 63.5996 202.4 15zM434.8 196.2c36.2002 36.8994 43.7998 107.7 -7.2998 150.8c-38.7002 32.5996 -98.7002 27.9004 -136.5 -10.5996l-35 -35.7002l-35 35.7002
c-37.5996 38.2998 -97.5996 43.1992 -136.5 10.5c-51.2002 -43.1006 -43.7998 -113.5 -7.2998 -150.7l175.399 -178.7c2.40039 -2.40039 4.40039 -2.40039 6.80078 0z" />
<glyph glyph-name="star" unicode="&#xf005;" horiz-adv-x="576"
d="M528.1 276.5c26.2002 -3.7998 36.7002 -36.0996 17.7002 -54.5996l-105.7 -103l25 -145.5c4.5 -26.3008 -23.1992 -45.9004 -46.3994 -33.7002l-130.7 68.7002l-130.7 -68.7002c-23.2002 -12.2998 -50.8994 7.39941 -46.3994 33.7002l25 145.5l-105.7 103
c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2998l65.2998 132.4c11.7998 23.8994 45.7002 23.5996 57.4004 0l65.2998 -132.4zM388.6 135.7l100.601 98l-139 20.2002l-62.2002 126l-62.2002 -126l-139 -20.2002l100.601 -98l-23.7002 -138.4l124.3 65.2998
l124.3 -65.2998z" />
<glyph glyph-name="user" unicode="&#xf007;" horiz-adv-x="448"
d="M313.6 144c74.2002 0 134.4 -60.2002 134.4 -134.4v-25.5996c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v25.5996c0 74.2002 60.2002 134.4 134.4 134.4c28.7998 0 42.5 -16 89.5996 -16s60.9004 16 89.5996 16zM400 -16v25.5996
c0 47.6006 -38.7998 86.4004 -86.4004 86.4004c-14.6992 0 -37.8994 -16 -89.5996 -16c-51.2998 0 -75 16 -89.5996 16c-47.6006 0 -86.4004 -38.7998 -86.4004 -86.4004v-25.5996h352zM224 160c-79.5 0 -144 64.5 -144 144s64.5 144 144 144s144 -64.5 144 -144
s-64.5 -144 -144 -144zM224 400c-52.9004 0 -96 -43.0996 -96 -96s43.0996 -96 96 -96s96 43.0996 96 96s-43.0996 96 -96 96z" />
<glyph glyph-name="clock" unicode="&#xf017;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM317.8 96.4004l-84.8994 61.6992
c-3.10059 2.30078 -4.90039 5.90039 -4.90039 9.7002v164.2c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12v-141.7l66.7998 -48.5996c5.40039 -3.90039 6.5 -11.4004 2.60059 -16.7998l-18.8008 -25.9004c-3.89941 -5.2998 -11.3994 -6.5 -16.7998 -2.59961z
" />
<glyph glyph-name="list-alt" unicode="&#xf022;"
d="M464 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h416zM458 16c3.31152 0 6 2.68848 6 6v340c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-340
c0 -3.31152 2.68848 -6 6 -6h404zM416 108v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 204v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12
v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 300v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM164 288c0 -19.8818 -16.1182 -36 -36 -36
s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 192c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 96c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36z" />
<glyph glyph-name="flag" unicode="&#xf024;"
d="M336.174 368c35.4668 0 73.0195 12.6914 108.922 28.1797c31.6406 13.6514 66.9043 -9.65723 66.9043 -44.1162v-239.919c0 -16.1953 -8.1543 -31.3057 -21.7129 -40.1631c-26.5762 -17.3643 -70.0693 -39.9814 -128.548 -39.9814c-68.6084 0 -112.781 32 -161.913 32
c-56.5674 0 -89.957 -11.2803 -127.826 -28.5566v-83.4434c0 -8.83691 -7.16309 -16 -16 -16h-16c-8.83691 0 -16 7.16309 -16 16v406.438c-14.3428 8.2998 -24 23.7979 -24 41.5615c0 27.5693 23.2422 49.71 51.2012 47.8965
c22.9658 -1.49023 41.8662 -19.4717 44.4805 -42.3379c0.177734 -1.52441 0.321289 -4.00781 0.321289 -5.54199c0 -4.30176 -1.10352 -11.1035 -2.46289 -15.1846c22.418 8.68555 49.4199 15.168 80.7207 15.168c68.6084 0 112.781 -32 161.913 -32zM464 112v240
c-31.5059 -14.6338 -84.5547 -32 -127.826 -32c-59.9111 0 -101.968 32 -161.913 32c-41.4365 0 -80.4766 -16.5879 -102.261 -32v-232c31.4473 14.5967 84.4648 24 127.826 24c59.9111 0 101.968 -32 161.913 -32c41.4365 0 80.4775 16.5879 102.261 32z" />
<glyph glyph-name="bookmark" unicode="&#xf02e;" horiz-adv-x="384"
d="M336 448c26.5098 0 48 -21.4902 48 -48v-464l-192 112l-192 -112v464c0 26.5098 21.4902 48 48 48h288zM336 19.5703v374.434c0 3.31348 -2.68555 5.99609 -6 5.99609h-276c-3.31152 0 -6 -2.68848 -6 -6v-374.43l144 84z" />
<glyph glyph-name="image" unicode="&#xf03e;"
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM458 48c3.31152 0 6 2.68848 6 6v276c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-276
c0 -3.31152 2.68848 -6 6 -6h404zM128 296c22.0908 0 40 -17.9092 40 -40s-17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40zM96 96v48l39.5137 39.5146c4.6875 4.68652 12.2852 4.68652 16.9717 0l39.5146 -39.5146l119.514 119.515
c4.6875 4.68652 12.2852 4.68652 16.9717 0l87.5146 -87.5146v-80h-320z" />
<glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="576"
d="M402.3 103.1l32 32c5 5 13.7002 1.5 13.7002 -5.69922v-145.4c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h273.5c7.09961 0 10.7002 -8.59961 5.7002 -13.7002l-32 -32c-1.5 -1.5 -3.5 -2.2998 -5.7002 -2.2998h-241.5v-352h352
v113.5c0 2.09961 0.799805 4.09961 2.2998 5.59961zM558.9 304.9l-262.601 -262.601l-90.3994 -10c-26.2002 -2.89941 -48.5 19.2002 -45.6006 45.6006l10 90.3994l262.601 262.601c22.8994 22.8994 59.8994 22.8994 82.6992 0l43.2002 -43.2002
c22.9004 -22.9004 22.9004 -60 0.100586 -82.7998zM460.1 274l-58.0996 58.0996l-185.8 -185.899l-7.2998 -65.2998l65.2998 7.2998zM524.9 353.7l-43.2002 43.2002c-4.10059 4.09961 -10.7998 4.09961 -14.7998 0l-30.9004 -30.9004l58.0996 -58.0996l30.9004 30.8994
c4 4.2002 4 10.7998 -0.0996094 14.9004z" />
<glyph glyph-name="times-circle" unicode="&#xf057;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM357.8 254.2l-62.2002 -62.2002l62.2002 -62.2002
c4.7002 -4.7002 4.7002 -12.2998 0 -17l-22.5996 -22.5996c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-62.2002 62.2002l-62.2002 -62.2002c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-22.5996 22.5996c-4.7002 4.7002 -4.7002 12.2998 0 17l62.2002 62.2002l-62.2002 62.2002
c-4.7002 4.7002 -4.7002 12.2998 0 17l22.5996 22.5996c4.7002 4.7002 12.2998 4.7002 17 0l62.2002 -62.2002l62.2002 62.2002c4.7002 4.7002 12.2998 4.7002 17 0l22.5996 -22.5996c4.7002 -4.7002 4.7002 -12.2998 0 -17z" />
<glyph glyph-name="check-circle" unicode="&#xf058;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200z
M396.204 261.733c4.66699 -4.70508 4.63672 -12.3037 -0.0673828 -16.9717l-172.589 -171.204c-4.70508 -4.66797 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66797 4.70605 -4.63672 12.3047 0.0683594 16.9717l22.7188 22.5361
c4.70508 4.66699 12.3027 4.63574 16.9697 -0.0693359l59.792 -60.2773l141.353 140.216c4.70508 4.66797 12.3027 4.6377 16.9697 -0.0673828z" />
<glyph glyph-name="question-circle" unicode="&#xf059;"
d="M256 440c136.957 0 248 -111.083 248 -248c0 -136.997 -111.043 -248 -248 -248s-248 111.003 -248 248c0 136.917 111.043 248 248 248zM256 -8c110.569 0 200 89.4697 200 200c0 110.529 -89.5088 200 -200 200c-110.528 0 -200 -89.5049 -200 -200
c0 -110.569 89.4678 -200 200 -200zM363.244 247.2c0 -67.0518 -72.4209 -68.084 -72.4209 -92.8633v-6.33691c0 -6.62695 -5.37305 -12 -12 -12h-45.6475c-6.62695 0 -12 5.37305 -12 12v8.65918c0 35.7451 27.1006 50.0342 47.5791 61.5156
c17.5615 9.84473 28.3242 16.541 28.3242 29.5791c0 17.2461 -21.999 28.6934 -39.7842 28.6934c-23.1885 0 -33.8936 -10.9775 -48.9424 -29.9697c-4.05664 -5.11914 -11.46 -6.07031 -16.666 -2.12402l-27.8232 21.0986
c-5.10742 3.87207 -6.25098 11.0654 -2.64453 16.3633c23.627 34.6934 53.7217 54.1846 100.575 54.1846c49.0713 0 101.45 -38.3037 101.45 -88.7998zM298 80c0 -23.1592 -18.8408 -42 -42 -42s-42 18.8408 -42 42s18.8408 42 42 42s42 -18.8408 42 -42z" />
<glyph glyph-name="eye" unicode="&#xf06e;" horiz-adv-x="576"
d="M288 304c0.0927734 0 0.244141 0.000976562 0.336914 0.000976562c61.6641 0 111.71 -50.0469 111.71 -111.711c0 -61.6631 -50.0459 -111.71 -111.71 -111.71s-111.71 50.0469 -111.71 111.71c0 8.71289 1.95898 22.5781 4.37305 30.9502
c6.93066 -3.94141 19.0273 -7.18457 27 -7.24023c30.9121 0 56 25.0879 56 56c-0.0556641 7.97266 -3.29883 20.0693 -7.24023 27c8.42383 2.62207 22.4189 4.8623 31.2402 5zM572.52 206.6c1.9209 -3.79883 3.47949 -10.3379 3.47949 -14.5947
s-1.55859 -10.7959 -3.47949 -14.5947c-54.1992 -105.771 -161.59 -177.41 -284.52 -177.41s-230.29 71.5898 -284.52 177.4c-1.9209 3.79883 -3.47949 10.3379 -3.47949 14.5947s1.55859 10.7959 3.47949 14.5947c54.1992 105.771 161.59 177.41 284.52 177.41
s230.29 -71.5898 284.52 -177.4zM288 48c98.6602 0 189.1 55 237.93 144c-48.8398 89 -139.27 144 -237.93 144s-189.09 -55 -237.93 -144c48.8398 -89 139.279 -144 237.93 -144z" />
<glyph glyph-name="eye-slash" unicode="&#xf070;" horiz-adv-x="640"
d="M634 -23c3.31738 -2.65137 6.00977 -8.25098 6.00977 -12.498c0 -3.10449 -1.57715 -7.58984 -3.51953 -10.0117l-10 -12.4902c-2.65234 -3.31152 -8.24707 -6 -12.4902 -6c-3.09961 0 -7.58008 1.57227 -10 3.50977l-598 467.49
c-3.31738 2.65137 -6.00977 8.25098 -6.00977 12.498c0 3.10449 1.57715 7.58984 3.51953 10.0117l10 12.4902c2.65234 3.31152 8.24707 6 12.4902 6c3.09961 0 7.58008 -1.57227 10 -3.50977zM296.79 301.53c6.33496 1.35059 16.7324 2.45801 23.21 2.46973
c60.4805 0 109.36 -47.9102 111.58 -107.85zM343.21 82.46c-6.33496 -1.34375 -16.7334 -2.44629 -23.21 -2.45996c-60.4697 0 -109.35 47.9102 -111.58 107.84zM320 336c-19.8799 0 -39.2803 -2.7998 -58.2197 -7.09961l-46.4102 36.29
c32.9199 11.8096 67.9297 18.8096 104.63 18.8096c122.93 0 230.29 -71.5898 284.57 -177.4c1.91992 -3.79883 3.47949 -10.3379 3.47949 -14.5947s-1.55957 -10.7959 -3.47949 -14.5947c-11.7197 -22.7598 -35.4189 -56.4092 -52.9004 -75.1104l-37.7402 29.5
c14.333 15.0156 34.0449 41.9854 44 60.2002c-48.8398 89 -139.279 144 -237.93 144zM320 48c19.8896 0 39.2803 2.7998 58.2197 7.08984l46.4102 -36.2803c-32.9199 -11.7598 -67.9297 -18.8096 -104.63 -18.8096c-122.92 0 -230.28 71.5898 -284.51 177.4
c-1.9209 3.79883 -3.47949 10.3379 -3.47949 14.5947s1.55859 10.7959 3.47949 14.5947c11.7168 22.7568 35.4111 56.4014 52.8896 75.1006l37.7402 -29.5c-14.3467 -15.0107 -34.0811 -41.9756 -44.0498 -60.1904c48.8496 -89 139.279 -144 237.93 -144z" />
<glyph glyph-name="calendar-alt" unicode="&#xf073;" horiz-adv-x="448"
d="M148 160h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM256 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-40zM352 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM256 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM160 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM352 76c0 -6.59961 -5.40039 -12 -12 -12h-40
c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="comment" unicode="&#xf075;"
d="M256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5c-3.80078 8.7998 -2 19 4.59961 26
c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004
l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
<glyph glyph-name="folder" unicode="&#xf07b;"
d="M464 320c26.5098 0 48 -21.4902 48 -48v-224c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h146.74c8.49023 0 16.6299 -3.37012 22.6299 -9.37012l54.6299 -54.6299h192zM464 48v224h-198.62
c-8.49023 0 -16.6299 3.37012 -22.6299 9.37012l-54.6299 54.6299h-140.12v-288h416z" />
<glyph glyph-name="folder-open" unicode="&#xf07c;" horiz-adv-x="576"
d="M527.9 224c37.6992 0 60.6992 -41.5 40.6992 -73.4004l-79.8994 -128c-8.7998 -14.0996 -24.2002 -22.5996 -40.7002 -22.5996h-400c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h160l64 -64h160c26.5 0 48 -21.5 48 -48v-48h47.9004zM48 330v-233.4l62.9004 104.2
c8.69922 14.4004 24.2998 23.2002 41.0996 23.2002h280v42c0 3.2998 -2.7002 6 -6 6h-173.9l-64 64h-134.1c-3.2998 0 -6 -2.7002 -6 -6zM448 48l80 128h-378.8l-77.2002 -128h376z" />
<glyph glyph-name="chart-bar" unicode="&#xf080;"
d="M396.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v230.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-230.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM204.8 96
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v198.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-198.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM300.8 96
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v134.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-134.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM496 48c8.83984 0 16 -7.16016 16 -16v-16
c0 -8.83984 -7.16016 -16 -16 -16h-464c-17.6699 0 -32 14.3301 -32 32v336c0 8.83984 7.16016 16 16 16h16c8.83984 0 16 -7.16016 16 -16v-320h448zM108.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v70.4004c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004
c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-70.4004c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004z" />
<glyph glyph-name="comments" unicode="&#xf086;" horiz-adv-x="576"
d="M532 61.7998c15.2998 -30.7002 37.4004 -54.5 37.7998 -54.7998c6.2998 -6.7002 8 -16.5 4.40039 -25c-3.7002 -8.5 -12 -14 -21.2002 -14c-53.5996 0 -96.7002 20.2998 -125.2 38.7998c-19 -4.39941 -39 -6.7998 -59.7998 -6.7998
c-86.2002 0 -159.9 40.4004 -191.3 97.7998c-9.7002 1.2002 -19.2002 2.7998 -28.4004 4.90039c-28.5 -18.6006 -71.7002 -38.7998 -125.2 -38.7998c-9.19922 0 -17.5996 5.5 -21.1992 14c-3.7002 8.5 -1.90039 18.2998 4.39941 25
c0.400391 0.399414 22.4004 24.1992 37.7002 54.8994c-27.5 27.2002 -44 61.2002 -44 98.2002c0 88.4004 93.0996 160 208 160c86.2998 0 160.3 -40.5 191.8 -98.0996c99.7002 -11.8008 176.2 -77.9004 176.2 -157.9c0 -37.0996 -16.5 -71.0996 -44 -98.2002zM139.2 154.1
l19.7998 -4.5c16 -3.69922 32.5 -5.59961 49 -5.59961c86.7002 0 160 51.2998 160 112s-73.2998 112 -160 112s-160 -51.2998 -160 -112c0 -28.7002 16.2002 -50.5996 29.7002 -64l24.7998 -24.5l-15.5 -31.0996c-2.59961 -5.10059 -5.2998 -10.1006 -8 -14.8008
c14.5996 5.10059 29 12.3008 43.0996 21.4004zM498.3 96c13.5 13.4004 29.7002 35.2998 29.7002 64c0 49.2002 -48.2998 91.5 -112.7 106c0.299805 -3.2998 0.700195 -6.59961 0.700195 -10c0 -80.9004 -78 -147.5 -179.3 -158.3
c29.0996 -29.6006 77.2998 -49.7002 131.3 -49.7002c16.5 0 33 1.90039 49 5.59961l19.9004 4.60059l17.0996 -11.1006c14.0996 -9.09961 28.5 -16.2998 43.0996 -21.3994c-2.69922 4.7002 -5.39941 9.7002 -8 14.7998l-15.5 31.0996z" />
<glyph glyph-name="star-half" unicode="&#xf089;" horiz-adv-x="576"
d="M288 62.7002v-54.2998l-130.7 -68.6006c-23.3994 -12.2998 -50.8994 7.60059 -46.3994 33.7002l25 145.5l-105.7 103c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2002l65.2998 132.4c5.90039 11.8994 17.2998 17.7998 28.7002 17.7998v-68.0996l-62.2002 -126
l-139 -20.2002l100.601 -98l-23.7002 -138.4z" />
<glyph glyph-name="lemon" unicode="&#xf094;"
d="M484.112 420.111c28.1221 -28.123 35.9434 -68.0039 19.0215 -97.0547c-23.0576 -39.584 50.1436 -163.384 -82.3311 -295.86c-132.301 -132.298 -256.435 -59.3594 -295.857 -82.3291c-29.0459 -16.917 -68.9219 -9.11426 -97.0576 19.0205
c-28.1221 28.1221 -35.9434 68.0029 -19.0215 97.0547c23.0566 39.5859 -50.1436 163.386 82.3301 295.86c132.308 132.309 256.407 59.3496 295.862 82.332c29.0498 16.9219 68.9307 9.09863 97.0537 -19.0234zM461.707 347.217
c13.5166 23.2031 -27.7578 63.7314 -50.4883 50.4912c-66.6025 -38.7939 -165.646 45.5898 -286.081 -74.8457c-120.444 -120.445 -36.0449 -219.472 -74.8447 -286.08c-13.542 -23.2471 27.8145 -63.6953 50.4932 -50.4883
c66.6006 38.7949 165.636 -45.5996 286.076 74.8428c120.444 120.445 36.0449 219.472 74.8447 286.08zM291.846 338.481c1.37012 -10.96 -6.40332 -20.957 -17.3643 -22.3271c-54.8467 -6.85547 -135.779 -87.7871 -142.636 -142.636
c-1.37305 -10.9883 -11.3984 -18.7334 -22.3262 -17.3643c-10.9609 1.37012 -18.7344 11.3652 -17.3643 22.3262c9.16211 73.2852 104.167 168.215 177.364 177.364c10.9531 1.36816 20.9561 -6.40234 22.3262 -17.3633z" />
<glyph glyph-name="credit-card" unicode="&#xf09d;" horiz-adv-x="576"
d="M527.9 416c26.5996 0 48.0996 -21.5 48.0996 -48v-352c0 -26.5 -21.5 -48 -48.0996 -48h-479.801c-26.5996 0 -48.0996 21.5 -48.0996 48v352c0 26.5 21.5 48 48.0996 48h479.801zM54.0996 368c-3.2998 0 -6 -2.7002 -6 -6v-42h479.801v42c0 3.2998 -2.7002 6 -6 6
h-467.801zM521.9 16c3.2998 0 6 2.7002 6 6v170h-479.801v-170c0 -3.2998 2.7002 -6 6 -6h467.801zM192 116v-40c0 -6.59961 -5.40039 -12 -12 -12h-72c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h72c6.59961 0 12 -5.40039 12 -12zM384 116v-40
c0 -6.59961 -5.40039 -12 -12 -12h-136c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h136c6.59961 0 12 -5.40039 12 -12z" />
<glyph glyph-name="hdd" unicode="&#xf0a0;" horiz-adv-x="576"
d="M567.403 212.358c5.59668 -8.04688 8.59668 -17.6113 8.59668 -27.4121v-136.946c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v136.946c0 8.30957 3.85156 20.5898 8.59668 27.4121l105.08 151.053
c7.90625 11.3652 25.5596 20.5889 39.4033 20.5889h0.000976562h269.838h0.000976562c13.8438 0 31.4971 -9.22363 39.4033 -20.5889zM153.081 336l-77.9131 -112h425.664l-77.9131 112h-269.838zM528 48v128h-480v-128h480zM496 112c0 -17.6729 -14.3271 -32 -32 -32
s-32 14.3271 -32 32s14.3271 32 32 32s32 -14.3271 32 -32zM400 112c0 -17.6729 -14.3271 -32 -32 -32s-32 14.3271 -32 32s14.3271 32 32 32s32 -14.3271 32 -32z" />
<glyph glyph-name="hand-point-right" unicode="&#xf0a4;"
d="M428.8 310.4c45.0996 0 83.2002 -38.1016 83.2002 -83.2002c0 -45.6162 -37.7646 -83.2002 -83.2002 -83.2002h-35.6475c-1.41602 -6.36719 -4.96875 -16.252 -7.92969 -22.0645c2.50586 -22.0059 -3.50293 -44.9775 -15.9844 -62.791
c-1.14062 -52.4863 -37.3984 -91.1445 -99.9404 -91.1445h-21.2988c-60.0635 0 -98.5117 40 -127.2 40h-2.67871c-5.74707 -4.95215 -13.5361 -8 -22.1201 -8h-64c-17.6729 0 -32 12.8936 -32 28.7998v230.4c0 15.9062 14.3271 28.7998 32 28.7998h64.001
c8.58398 0 16.373 -3.04785 22.1201 -8h2.67871c6.96387 0 14.8623 6.19336 30.1816 23.6689l0.128906 0.148438l0.130859 0.145508c8.85645 9.93652 18.1162 20.8398 25.8506 33.2529c18.7051 30.2471 30.3936 78.7842 75.707 78.7842c56.9277 0 92 -35.2861 92 -83.2002
v-0.0839844c0 -6.21777 -0.974609 -16.2148 -2.17578 -22.3154h86.1768zM428.8 192c18.9756 0 35.2002 16.2246 35.2002 35.2002c0 18.7002 -16.7754 35.2002 -35.2002 35.2002h-158.399c0 17.3242 26.3994 35.1992 26.3994 70.3994c0 26.4004 -20.625 35.2002 -44 35.2002
c-8.79395 0 -20.4443 -32.7119 -34.9258 -56.0996c-9.07422 -14.5752 -19.5244 -27.2256 -30.7988 -39.875c-16.1094 -18.374 -33.8359 -36.6328 -59.0752 -39.5967v-176.753c42.79 -3.7627 74.5088 -39.6758 120 -39.6758h21.2988
c40.5244 0 57.124 22.1973 50.6006 61.3252c14.6113 8.00098 24.1514 33.9785 12.9248 53.625c19.3652 18.2246 17.7871 46.3809 4.9502 61.0498h91.0254zM88 64c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
<glyph glyph-name="hand-point-left" unicode="&#xf0a5;"
d="M0 227.2c0 45.0986 38.1006 83.2002 83.2002 83.2002h86.1758c-1.3623 6.91016 -2.17578 14.374 -2.17578 22.3994c0 47.9141 35.0723 83.2002 92 83.2002c45.3135 0 57.002 -48.5371 75.7061 -78.7852c7.73438 -12.4121 16.9951 -23.3154 25.8506 -33.2529
l0.130859 -0.145508l0.128906 -0.148438c15.3213 -17.4746 23.2197 -23.668 30.1836 -23.668h2.67871c5.74707 4.95215 13.5361 8 22.1201 8h64c17.6729 0 32 -12.8936 32 -28.7998v-230.4c0 -15.9062 -14.3271 -28.7998 -32 -28.7998h-64
c-8.58398 0 -16.373 3.04785 -22.1201 8h-2.67871c-28.6885 0 -67.1367 -40 -127.2 -40h-21.2988c-62.542 0 -98.8008 38.6582 -99.9404 91.1445c-12.4814 17.8135 -18.4922 40.7852 -15.9844 62.791c-2.96094 5.8125 -6.51367 15.6973 -7.92969 22.0645h-35.6465
c-45.4355 0 -83.2002 37.584 -83.2002 83.2002zM48 227.2c0 -18.9756 16.2246 -35.2002 35.2002 -35.2002h91.0244c-12.8369 -14.6689 -14.415 -42.8252 4.9502 -61.0498c-11.2256 -19.6465 -1.68652 -45.624 12.9248 -53.625
c-6.52246 -39.1279 10.0771 -61.3252 50.6016 -61.3252h21.2988c45.4912 0 77.21 35.9131 120 39.6768v176.752c-25.2393 2.96289 -42.9658 21.2227 -59.0752 39.5967c-11.2744 12.6494 -21.7246 25.2998 -30.7988 39.875
c-14.4814 23.3877 -26.1318 56.0996 -34.9258 56.0996c-23.375 0 -44 -8.7998 -44 -35.2002c0 -35.2002 26.3994 -53.0752 26.3994 -70.3994h-158.399c-18.4248 0 -35.2002 -16.5 -35.2002 -35.2002zM448 88c-13.2549 0 -24 -10.7451 -24 -24s10.7451 -24 24 -24
s24 10.7451 24 24s-10.7451 24 -24 24z" />
<glyph glyph-name="hand-point-up" unicode="&#xf0a6;" horiz-adv-x="448"
d="M105.6 364.8c0 45.0996 38.1016 83.2002 83.2002 83.2002c45.6162 0 83.2002 -37.7646 83.2002 -83.2002v-35.6465c6.36719 -1.41602 16.252 -4.96875 22.0645 -7.92969c22.0059 2.50684 44.9775 -3.50293 62.791 -15.9844
c52.4863 -1.14062 91.1445 -37.3984 91.1445 -99.9404v-21.2988c0 -60.0635 -40 -98.5117 -40 -127.2v-2.67871c4.95215 -5.74707 8 -13.5361 8 -22.1201v-64c0 -17.6729 -12.8936 -32 -28.7998 -32h-230.4c-15.9062 0 -28.7998 14.3271 -28.7998 32v64
c0 8.58398 3.04785 16.373 8 22.1201v2.67871c0 6.96387 -6.19336 14.8623 -23.6689 30.1816l-0.148438 0.128906l-0.145508 0.130859c-9.93652 8.85645 -20.8398 18.1162 -33.2529 25.8506c-30.2471 18.7051 -78.7842 30.3936 -78.7842 75.707
c0 56.9277 35.2861 92 83.2002 92h0.0839844c6.21777 0 16.2148 -0.974609 22.3154 -2.17578v86.1768zM224 364.8c0 18.9756 -16.2246 35.2002 -35.2002 35.2002c-18.7002 0 -35.2002 -16.7754 -35.2002 -35.2002v-158.399c-17.3242 0 -35.1992 26.3994 -70.3994 26.3994
c-26.4004 0 -35.2002 -20.625 -35.2002 -44c0 -8.79395 32.7119 -20.4443 56.0996 -34.9258c14.5752 -9.07422 27.2256 -19.5244 39.875 -30.7988c18.374 -16.1094 36.6328 -33.8359 39.5967 -59.0752h176.753c3.7627 42.79 39.6758 74.5088 39.6758 120v21.2988
c0 40.5244 -22.1973 57.124 -61.3252 50.6006c-8.00098 14.6113 -33.9785 24.1514 -53.625 12.9248c-18.2246 19.3652 -46.3809 17.7871 -61.0498 4.9502v91.0254zM352 24c-13.2549 0 -24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24z" />
<glyph glyph-name="hand-point-down" unicode="&#xf0a7;" horiz-adv-x="448"
d="M188.8 -64c-45.0986 0 -83.2002 38.1006 -83.2002 83.2002v86.1758c-6.91016 -1.3623 -14.374 -2.17578 -22.3994 -2.17578c-47.9141 0 -83.2002 35.0723 -83.2002 92c0 45.3135 48.5371 57.002 78.7852 75.707c12.4121 7.73438 23.3154 16.9951 33.2529 25.8506
l0.145508 0.130859l0.148438 0.128906c17.4746 15.3213 23.668 23.2197 23.668 30.1836v2.67871c-4.95215 5.74707 -8 13.5361 -8 22.1201v64c0 17.6729 12.8936 32 28.7998 32h230.4c15.9062 0 28.7998 -14.3271 28.7998 -32v-64.001
c0 -8.58398 -3.04785 -16.373 -8 -22.1201v-2.67871c0 -28.6885 40 -67.1367 40 -127.2v-21.2988c0 -62.542 -38.6582 -98.8008 -91.1445 -99.9404c-17.8135 -12.4814 -40.7852 -18.4922 -62.791 -15.9844c-5.8125 -2.96094 -15.6973 -6.51367 -22.0645 -7.92969v-35.6465
c0 -45.4355 -37.584 -83.2002 -83.2002 -83.2002zM188.8 -16c18.9756 0 35.2002 16.2246 35.2002 35.2002v91.0244c14.6689 -12.8369 42.8252 -14.415 61.0498 4.9502c19.6465 -11.2256 45.624 -1.68652 53.625 12.9248c39.1279 -6.52246 61.3252 10.0771 61.3252 50.6016
v21.2988c0 45.4912 -35.9131 77.21 -39.6768 120h-176.752c-2.96289 -25.2393 -21.2227 -42.9658 -39.5967 -59.0752c-12.6494 -11.2744 -25.2998 -21.7246 -39.875 -30.7988c-23.3877 -14.4814 -56.0996 -26.1318 -56.0996 -34.9258c0 -23.375 8.7998 -44 35.2002 -44
c35.2002 0 53.0752 26.3994 70.3994 26.3994v-158.399c0 -18.4248 16.5 -35.2002 35.2002 -35.2002zM328 384c0 -13.2549 10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24z" />
<glyph glyph-name="copy" unicode="&#xf0c5;" horiz-adv-x="448"
d="M433.941 382.059c7.75977 -7.75977 14.0586 -22.9658 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-80v-48c0 -26.5098 -21.4902 -48 -48 -48h-224c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h80v48c0 26.5098 21.4902 48 48 48
h172.118c10.9746 0 26.1807 -6.29883 33.9404 -14.0586zM266 -16c3.31152 0 6 2.68848 6 6v42h-96c-26.5098 0 -48 21.4902 -48 48v224h-74c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM394 80c3.31152 0 6 2.68848 6 6v202h-88
c-13.2549 0 -24 10.7451 -24 24v88h-106c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM400 336v9.63184v0.000976562c0 1.37207 -0.787109 3.27246 -1.75684 4.24219l-48.3682 48.3682c-1.12598 1.125 -2.65234 1.75684 -4.24316 1.75684h-9.63184
v-64h64z" />
<glyph glyph-name="save" unicode="&#xf0c7;" horiz-adv-x="448"
d="M433.941 318.059c7.75977 -7.75977 14.0586 -22.9658 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h268.118c10.9746 0 26.1807 -6.29883 33.9404 -14.0586zM272 368h-128v-80h128v80
zM394 16c3.31152 0 6 2.68848 6 6v259.632v0.000976562c0 1.37207 -0.787109 3.27246 -1.75684 4.24219l-78.2432 78.2432v-100.118c0 -13.2549 -10.7451 -24 -24 -24h-176c-13.2549 0 -24 10.7451 -24 24v104h-42c-3.31152 0 -6 -2.68848 -6 -6v-340
c0 -3.31152 2.68848 -6 6 -6h340zM224 216c48.5234 0 88 -39.4766 88 -88s-39.4766 -88 -88 -88s-88 39.4766 -88 88s39.4766 88 88 88zM224 88c22.0557 0 40 17.9443 40 40s-17.9443 40 -40 40s-40 -17.9443 -40 -40s17.9443 -40 40 -40z" />
<glyph glyph-name="square" unicode="&#xf0c8;" horiz-adv-x="448"
d="M400 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352zM394 16c3.2998 0 6 2.7002 6 6v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340z" />
<glyph glyph-name="envelope" unicode="&#xf0e0;"
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM464 336h-416v-40.8047c22.4248 -18.2627 58.1797 -46.6602 134.587 -106.49
c16.834 -13.2422 50.2051 -45.0762 73.4131 -44.7012c23.2119 -0.371094 56.5723 31.4541 73.4131 44.7012c76.4189 59.8389 112.165 88.2305 134.587 106.49v40.8047zM48 48h416v185.601c-22.915 -18.252 -55.4189 -43.8691 -104.947 -82.6523
c-22.5439 -17.748 -60.3359 -55.1787 -103.053 -54.9473c-42.9277 -0.231445 -81.2051 37.75 -103.062 54.9551c-49.5293 38.7842 -82.0244 64.3945 -104.938 82.6455v-185.602z" />
<glyph glyph-name="lightbulb" unicode="&#xf0eb;" horiz-adv-x="352"
d="M176 368c8.83984 0 16 -7.16016 16 -16s-7.16016 -16 -16 -16c-35.2803 0 -64 -28.7002 -64 -64c0 -8.83984 -7.16016 -16 -16 -16s-16 7.16016 -16 16c0 52.9404 43.0596 96 96 96zM96.0596 -11.1699l-0.0400391 43.1797h159.961l-0.0507812 -43.1797
c-0.00976562 -3.13965 -0.939453 -6.21973 -2.67969 -8.83984l-24.5098 -36.8398c-2.95996 -4.45996 -7.95996 -7.14062 -13.3203 -7.14062h-78.8496c-5.35059 0 -10.3506 2.68066 -13.3203 7.14062l-24.5098 36.8398c-1.75 2.62012 -2.68066 5.68945 -2.68066 8.83984z
M176 448c97.2002 0 176 -78.7998 176 -176c0 -44.3701 -16.4502 -84.8496 -43.5498 -115.79c-16.6406 -18.9795 -42.7402 -58.79 -52.4199 -92.1602v-0.0498047h-48v0.0996094c0.00390625 4.04199 0.999023 10.4482 2.21973 14.3008
c5.67969 17.9893 22.9902 64.8496 62.0996 109.46c20.4102 23.29 31.6504 53.1699 31.6504 84.1396c0 70.5801 -57.4199 128 -128 128c-68.2803 0 -128.15 -54.3604 -127.95 -128c0.0898438 -30.9902 11.0703 -60.71 31.6104 -84.1396
c39.3496 -44.9004 56.5801 -91.8604 62.1699 -109.67c1.42969 -4.56055 2.13965 -9.30078 2.15039 -14.0703v-0.120117h-48v0.0595703c-9.68066 33.3604 -35.7803 73.1709 -52.4209 92.1602c-27.1094 30.9307 -43.5596 71.4102 -43.5596 115.78
c0 93.0303 73.7197 176 176 176z" />
<glyph glyph-name="bell" unicode="&#xf0f3;" horiz-adv-x="448"
d="M439.39 85.71c6 -6.44043 8.66016 -14.1602 8.61035 -21.71c-0.0996094 -16.4004 -12.9805 -32 -32.0996 -32h-383.801c-19.1191 0 -31.9893 15.5996 -32.0996 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c19.3193 20.7598 55.4697 51.9902 55.4697 154.29
c0 77.7002 54.4795 139.9 127.939 155.16v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -102.3 36.1504 -133.53 55.4697 -154.29zM67.5303 80h312.939
c-21.2197 27.96 -44.4199 74.3203 -44.5293 159.42c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112s-112 -50.1396 -112 -112c0 -0.200195 0.0595703 -0.379883 0.0595703 -0.580078
c-0.109375 -85.0898 -23.3096 -131.45 -44.5293 -159.42zM224 -64c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
<glyph glyph-name="hospital" unicode="&#xf0f8;" horiz-adv-x="448"
d="M128 204v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12zM268 192c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40
c0 -6.62695 -5.37305 -12 -12 -12h-40zM192 108c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40zM268 96c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40
c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.62695 5.37305 12 12 12h19.5v378.965c0 11.6172 10.7451 21.0352 24 21.0352h88.5v40c0 13.2549 10.7451 24 24 24h112c13.2549 0 24 -10.7451 24 -24v-40h88.5
c13.2549 0 24 -9.41797 24 -21.0352v-378.965h19.5c6.62695 0 12 -5.37305 12 -12zM79.5 -15h112.5v67c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-67h112.5v351h-64.5v-24c0 -13.2549 -10.7451 -24 -24 -24h-112c-13.2549 0 -24 10.7451 -24 24v24
h-64.5v-351zM266 384h-26v26c0 3.31152 -2.68848 6 -6 6h-20c-3.31152 0 -6 -2.68848 -6 -6v-26h-26c-3.31152 0 -6 -2.68848 -6 -6v-20c0 -3.31152 2.68848 -6 6 -6h26v-26c0 -3.31152 2.68848 -6 6 -6h20c3.31152 0 6 2.68848 6 6v26h26c3.31152 0 6 2.68848 6 6v20
c0 3.31152 -2.68848 6 -6 6z" />
<glyph glyph-name="plus-square" unicode="&#xf0fe;" horiz-adv-x="448"
d="M352 208v-32c0 -6.59961 -5.40039 -12 -12 -12h-88v-88c0 -6.59961 -5.40039 -12 -12 -12h-32c-6.59961 0 -12 5.40039 -12 12v88h-88c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h88v88c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12
v-88h88c6.59961 0 12 -5.40039 12 -12zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340
c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="circle" unicode="&#xf111;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200z" />
<glyph glyph-name="smile" unicode="&#xf118;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM332 135.4c8.5 10.1992 23.7002 11.5 33.7998 3.09961c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998
c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.0996 8.40039 25.2998 7.09961 33.7998 -3.09961c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004z" />
<glyph glyph-name="frown" unicode="&#xf119;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 144c40.2002 0 78 -17.7002 103.8 -48.5996c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008
c-10.7002 -8.7998 -25.7002 -6.59961 -33.7998 3.10059c-16.6006 20 -41 31.3994 -66.9004 31.3994s-50.2998 -11.5 -66.9004 -31.3994c-8.5 -10.2002 -23.5996 -11.5 -33.7998 -3.10059c-10.2002 8.5 -11.5996 23.6006 -3.09961 33.8008
c25.7998 30.8994 63.5996 48.5996 103.8 48.5996z" />
<glyph glyph-name="meh" unicode="&#xf11a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM336 128c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-176c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h176z
" />
<glyph glyph-name="keyboard" unicode="&#xf11c;" horiz-adv-x="576"
d="M528 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h480zM536 48v288c0 4.41113 -3.58887 8 -8 8h-480c-4.41113 0 -8 -3.58887 -8 -8v-288c0 -4.41113 3.58887 -8 8 -8
h480c4.41113 0 8 3.58887 8 8zM170 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM266 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM362 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM458 178c0 -6.62695 -5.37305 -12 -12 -12h-28
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 96c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 96
c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28
c6.62695 0 12 -5.37305 12 -12v-28zM218 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM314 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM410 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 260c0 -6.62695 -5.37305 -12 -12 -12h-28
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM408 102c0 -6.62695 -5.37305 -12 -12 -12h-216c-6.62695 0 -12 5.37305 -12 12v16c0 6.62695 5.37305 12 12 12h216c6.62695 0 12 -5.37305 12 -12v-16z" />
<glyph glyph-name="calendar" unicode="&#xf133;" horiz-adv-x="448"
d="M400 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12
v-52h48zM394 -16c3.2998 0 6 2.7002 6 6v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340z" />
<glyph glyph-name="play-circle" unicode="&#xf144;"
d="M371.7 210c16.3994 -9.2002 16.3994 -32.9004 0 -42l-176 -101c-15.9004 -8.7998 -35.7002 2.59961 -35.7002 21v208c0 18.5 19.9004 29.7998 35.7002 21zM504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192
c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200z" />
<glyph glyph-name="minus-square" unicode="&#xf146;" horiz-adv-x="448"
d="M108 164c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h232c6.59961 0 12 -5.40039 12 -12v-32c0 -6.59961 -5.40039 -12 -12 -12h-232zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352
c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="check-square" unicode="&#xf14a;" horiz-adv-x="448"
d="M400 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h352zM400 16v352h-352v-352h352zM364.136 257.724l-172.589 -171.204
c-4.70508 -4.66699 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66699 4.70508 -4.63672 12.3037 0.0693359 16.9717l22.7188 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l59.792 -60.2773l141.353 140.217
c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0683594l22.5361 -22.7178c4.66699 -4.70605 4.63672 -12.3047 -0.0683594 -16.9717z" />
<glyph glyph-name="share-square" unicode="&#xf14d;" horiz-adv-x="576"
d="M561.938 289.94c18.75 -18.7402 18.75 -49.1406 0 -67.8809l-143.998 -144c-29.9727 -29.9727 -81.9404 -9.05273 -81.9404 33.9404v53.7998c-101.266 -7.83691 -99.625 -31.6406 -84.1104 -78.7598c14.2285 -43.0889 -33.4736 -79.248 -71.0195 -55.7402
c-51.6924 32.3057 -84.8701 83.0635 -84.8701 144.76c0 39.3408 12.2197 72.7402 36.3301 99.3008c19.8398 21.8398 47.7402 38.4697 82.9102 49.4199c36.7295 11.4395 78.3096 16.1094 120.76 17.9893v57.1982c0 42.9355 51.9258 63.9541 81.9404 33.9404zM384 112l144 144
l-144 144v-104.09c-110.86 -0.90332 -240 -10.5166 -240 -119.851c0 -52.1396 32.79 -85.6094 62.3096 -104.06c-39.8174 120.65 48.999 141.918 177.69 143.84v-103.84zM408.74 27.5068c6.14844 1.75684 15.5449 5.92383 20.9736 9.30273
c7.97656 4.95215 18.2861 -0.825195 18.2861 -10.2139v-42.5957c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h132c6.62695 0 12 -5.37305 12 -12v-4.48633c0 -4.91699 -2.9873 -9.36914 -7.56934 -11.1514
c-13.7021 -5.33105 -26.3955 -11.5371 -38.0498 -18.585c-1.59668 -0.974609 -4.41016 -1.77051 -6.28027 -1.77734h-86.1006c-3.31152 0 -6 -2.68848 -6 -6v-340c0 -3.31152 2.68848 -6 6 -6h340c3.31152 0 6 2.68848 6 6v25.9658c0 5.37012 3.5791 10.0596 8.74023 11.541
z" />
<glyph glyph-name="compass" unicode="&#xf14e;" horiz-adv-x="496"
d="M347.94 318.14c16.6592 7.61035 33.8096 -9.54004 26.1992 -26.1992l-65.9697 -144.341c-2.73047 -5.97363 -9.7959 -13.0391 -15.7695 -15.7695l-144.341 -65.9697c-16.6592 -7.61035 -33.8096 9.5498 -26.1992 26.1992l65.9697 144.341
c2.73047 5.97363 9.7959 13.0391 15.7695 15.7695zM270.58 169.42c12.4697 12.4697 12.4697 32.6904 0 45.1602s-32.6904 12.4697 -45.1602 0s-12.4697 -32.6904 0 -45.1602s32.6904 -12.4697 45.1602 0zM248 440c136.97 0 248 -111.03 248 -248s-111.03 -248 -248 -248
s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
<glyph glyph-name="caret-square-down" unicode="&#xf150;" horiz-adv-x="448"
d="M125.1 240h197.801c10.6992 0 16.0996 -13 8.5 -20.5l-98.9004 -98.2998c-4.7002 -4.7002 -12.2002 -4.7002 -16.9004 0l-98.8994 98.2998c-7.7002 7.5 -2.2998 20.5 8.39941 20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="caret-square-up" unicode="&#xf151;" horiz-adv-x="448"
d="M322.9 144h-197.801c-10.6992 0 -16.0996 13 -8.5 20.5l98.9004 98.2998c4.7002 4.7002 12.2002 4.7002 16.9004 0l98.8994 -98.2998c7.7002 -7.5 2.2998 -20.5 -8.39941 -20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="caret-square-right" unicode="&#xf152;" horiz-adv-x="448"
d="M176 93.0996v197.801c0 10.6992 13 16.0996 20.5 8.5l98.2998 -98.9004c4.7002 -4.7002 4.7002 -12.2002 0 -16.9004l-98.2998 -98.8994c-7.5 -7.7002 -20.5 -2.2998 -20.5 8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="file" unicode="&#xf15b;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416z" />
<glyph glyph-name="file-alt" unicode="&#xf15c;" horiz-adv-x="384"
d="M288 200v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v28c0 6.59961 5.40039 12 12 12h168c6.59961 0 12 -5.40039 12 -12zM276 128c6.59961 0 12 -5.40039 12 -12v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12
v28c0 6.59961 5.40039 12 12 12h168zM384 316.1v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996l83.9004 -83.9004c9 -8.90039 14.0996 -21.2002 14.0996 -33.9004z
M256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288z" />
<glyph glyph-name="thumbs-up" unicode="&#xf164;"
d="M466.27 161.31c4.6748 -22.6465 0.864258 -44.5371 -8.98926 -62.9893c2.95898 -23.8682 -4.02148 -48.5654 -17.3398 -66.9902c-0.954102 -55.9072 -35.8232 -95.3301 -112.94 -95.3301c-7 0 -15 0.00976562 -22.2197 0.00976562
c-102.742 0 -133.293 38.9395 -177.803 39.9404c-3.56934 -13.7764 -16.085 -23.9502 -30.9775 -23.9502h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h98.7598c19.1455 16.9531 46.0137 60.6533 68.7598 83.4004
c13.667 13.667 10.1533 108.6 71.7607 108.6c57.5801 0 95.2695 -31.9355 95.2695 -104.73c0 -18.4092 -3.92969 -33.7295 -8.84961 -46.5391h36.4795c48.6025 0 85.8203 -41.5654 85.8203 -85.5801c0 -19.1504 -4.95996 -34.9902 -13.7305 -49.8408zM404.52 107.48
c21.5811 20.3838 18.6992 51.0645 5.21094 65.6191c9.44922 0 22.3594 18.9102 22.2695 37.8105c-0.0898438 18.9102 -16.71 37.8203 -37.8203 37.8203h-103.989c0 37.8193 28.3594 55.3691 28.3594 94.5391c0 23.75 0 56.7305 -47.2695 56.7305
c-18.9102 -18.9102 -9.45996 -66.1797 -37.8203 -94.54c-26.5596 -26.5703 -66.1797 -97.46 -94.54 -97.46h-10.9199v-186.17c53.6113 0 100.001 -37.8203 171.64 -37.8203h37.8203c35.5117 0 60.8203 17.1201 53.1201 65.9004
c15.2002 8.16016 26.5 36.4395 13.9395 57.5703zM88 16c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
<glyph glyph-name="thumbs-down" unicode="&#xf165;"
d="M466.27 222.69c8.77051 -14.8506 13.7305 -30.6904 13.7305 -49.8408c0 -44.0146 -37.2178 -85.5801 -85.8203 -85.5801h-36.4795c4.91992 -12.8096 8.84961 -28.1299 8.84961 -46.5391c0 -72.7949 -37.6895 -104.73 -95.2695 -104.73
c-61.6074 0 -58.0938 94.9326 -71.7607 108.6c-22.7461 22.7471 -49.6133 66.4473 -68.7598 83.4004h-7.05176c-5.5332 -9.56152 -15.8662 -16 -27.708 -16h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h64c8.11328 0 15.5146 -3.02539 21.1553 -8
h10.8447c40.9971 0 73.1953 39.9902 176.78 39.9902c7.21973 0 15.2197 0.00976562 22.2197 0.00976562c77.1172 0 111.986 -39.4229 112.94 -95.3301c13.3184 -18.4248 20.2979 -43.1221 17.3398 -66.9902c9.85352 -18.4521 13.6641 -40.3428 8.98926 -62.9893zM64 152
c13.2549 0 24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24zM394.18 135.27c21.1104 0 37.7305 18.9102 37.8203 37.8203c0.0898438 18.9004 -12.8203 37.8105 -22.2695 37.8105c13.4883 14.5547 16.3701 45.2354 -5.21094 65.6191
c12.5605 21.1309 1.26074 49.4102 -13.9395 57.5703c7.7002 48.7803 -17.6084 65.9004 -53.1201 65.9004h-37.8203c-71.6387 0 -118.028 -37.8203 -171.64 -37.8203v-186.17h10.9199c28.3604 0 67.9805 -70.8896 94.54 -97.46
c28.3604 -28.3604 18.9102 -75.6299 37.8203 -94.54c47.2695 0 47.2695 32.9805 47.2695 56.7305c0 39.1699 -28.3594 56.7197 -28.3594 94.5391h103.989z" />
<glyph glyph-name="sun" unicode="&#xf185;"
d="M494.2 226.1c11.2002 -7.59961 17.7998 -20.0996 17.8994 -33.6992c0 -13.4004 -6.69922 -26 -17.7998 -33.5l-59.7998 -40.5l13.7002 -71c2.5 -13.2002 -1.60059 -26.8008 -11.1006 -36.3008s-22.8994 -13.7998 -36.2998 -11.0996l-70.8994 13.7002l-40.4004 -59.9004
c-7.5 -11.0996 -20.0996 -17.7998 -33.5 -17.7998s-26 6.7002 -33.5 17.9004l-40.4004 59.8994l-70.7998 -13.7002c-13.3994 -2.59961 -26.7998 1.60059 -36.2998 11.1006s-13.7002 23.0996 -11.0996 36.2998l13.6992 71l-59.7998 40.5
c-11.0996 7.5 -17.7998 20 -17.7998 33.5s6.59961 26 17.7998 33.5996l59.7998 40.5l-13.6992 71c-2.60059 13.2002 1.59961 26.7002 11.0996 36.3008c9.5 9.59961 23 13.6992 36.2998 11.1992l70.7998 -13.6992l40.4004 59.8994c15.0996 22.2998 51.9004 22.2998 67 0
l40.4004 -59.8994l70.8994 13.6992c13 2.60059 26.6006 -1.59961 36.2002 -11.0996c9.5 -9.59961 13.7002 -23.2002 11.0996 -36.4004l-13.6992 -71zM381.3 140.5l76.7998 52.0996l-76.7998 52l17.6006 91.1006l-91 -17.6006l-51.9004 76.9004l-51.7998 -76.7998
l-91 17.5996l17.5996 -91.2002l-76.7998 -52l76.7998 -52l-17.5996 -91.1992l90.8994 17.5996l51.9004 -77l51.9004 76.9004l91 -17.6006zM256 296c57.2998 0 104 -46.7002 104 -104s-46.7002 -104 -104 -104s-104 46.7002 -104 104s46.7002 104 104 104zM256 136
c30.9004 0 56 25.0996 56 56s-25.0996 56 -56 56s-56 -25.0996 -56 -56s25.0996 -56 56 -56z" />
<glyph glyph-name="moon" unicode="&#xf186;"
d="M279.135 -64c-141.424 0 -256 114.64 -256 256c0 141.425 114.641 256 256 256c13.0068 -0.00195312 33.9443 -1.91797 46.7354 -4.27734c44.0205 -8.13086 53.7666 -66.8691 15.0215 -88.9189c-41.374 -23.5439 -67.4336 -67.4121 -67.4336 -115.836
c0 -83.5234 75.9238 -146.475 158.272 -130.792c43.6904 8.32129 74.5186 -42.5693 46.248 -77.4004c-47.8613 -58.9717 -120.088 -94.7754 -198.844 -94.7754zM279.135 400c-114.875 0 -208 -93.125 -208 -208s93.125 -208 208 -208
c65.2314 0 123.439 30.0361 161.575 77.0244c-111.611 -21.2568 -215.252 64.0957 -215.252 177.943c0 67.5127 36.9326 126.392 91.6934 157.555c-12.3271 2.27637 -25.0312 3.47754 -38.0166 3.47754z" />
<glyph glyph-name="caret-square-left" unicode="&#xf191;" horiz-adv-x="448"
d="M272 290.9v-197.801c0 -10.6992 -13 -16.0996 -20.5 -8.5l-98.2998 98.9004c-4.7002 4.7002 -4.7002 12.2002 0 16.9004l98.2998 98.8994c7.5 7.7002 20.5 2.2998 20.5 -8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="dot-circle" unicode="&#xf192;"
d="M256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200zM256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248z
M256 272c44.1826 0 80 -35.8174 80 -80s-35.8174 -80 -80 -80s-80 35.8174 -80 80s35.8174 80 80 80z" />
<glyph glyph-name="building" unicode="&#xf1ad;" horiz-adv-x="448"
d="M128 300v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12zM268 288c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40
c0 -6.59961 -5.40039 -12 -12 -12h-40zM140 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM268 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM192 108c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM268 96c-6.59961 0 -12 5.40039 -12 12v40
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.59961 5.40039 12 12 12h19.5v440c0 13.2998 10.7002 24 24 24h337c13.2998 0 24 -10.7002 24 -24v-440h19.5
c6.59961 0 12 -5.40039 12 -12zM79.5 -15h112.5v67c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-67h112.5v414l-288.5 1z" />
<glyph glyph-name="file-pdf" unicode="&#xf1c1;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM298.2 127.7c10.5 -10.5 8 -38.7002 -17.5 -38.7002c-14.7998 0 -36.9004 6.7998 -55.7998 17c-21.6006 -3.59961 -46 -12.7002 -68.4004 -20.0996c-50.0996 -86.4004 -79.4004 -47 -76.0996 -31.2002
c4 20 31 35.8994 51 46.2002c10.5 18.3994 25.3994 50.5 35.3994 74.3994c-7.39941 28.6006 -11.3994 51 -7 67.1006c4.7998 17.6992 38.4004 20.2998 42.6006 -5.90039c4.69922 -15.4004 -1.5 -39.9004 -5.40039 -56c8.09961 -21.2998 19.5996 -35.7998 36.7998 -46.2998
c17.4004 2.2002 52.2002 5.5 64.4004 -6.5zM100.1 49.9004c0 -0.700195 11.4004 4.69922 30.4004 35c-5.90039 -5.5 -25.2998 -21.3008 -30.4004 -35zM181.7 240.5c-2.5 0 -2.60059 -26.9004 1.7998 -40.7998c4.90039 8.7002 5.59961 40.7998 -1.7998 40.7998zM157.3 103.9
c15.9004 6.09961 34 14.8994 54.7998 19.1992c-11.1992 8.30078 -21.7998 20.4004 -30.0996 35.5c-6.7002 -17.6992 -15 -37.7998 -24.7002 -54.6992zM288.9 108.9c3.59961 2.39941 -2.2002 10.3994 -37.3008 7.7998c32.3008 -13.7998 37.3008 -7.7998 37.3008 -7.7998z" />
<glyph glyph-name="file-word" unicode="&#xf1c2;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM268.1 192v0.200195h15.8008c7.7998 0 13.5 -7.2998 11.5996 -14.9004c-4.2998 -17 -13.7002 -54.0996 -34.5 -136c-1.2998 -5.39941 -6.09961 -9.09961 -11.5996 -9.09961h-24.7002
c-5.5 0 -10.2998 3.7998 -11.6006 9.09961c-5.2998 20.9004 -17.7998 71 -17.8994 71.4004l-2.90039 17.2998c-0.5 -5.2998 -1.5 -11.0996 -3 -17.2998l-17.8994 -71.4004c-1.30078 -5.39941 -6.10059 -9.09961 -11.6006 -9.09961h-25.2002
c-5.59961 0 -10.3994 3.7002 -11.6992 9.09961c-6.5 26.5 -25.2002 103.4 -33.2002 136c-1.7998 7.5 3.89941 14.7998 11.7002 14.7998h16.7998c5.7998 0 10.7002 -4.09961 11.7998 -9.69922c5 -25.7002 18.4004 -93.8008 19.0996 -99
c0.300781 -1.7002 0.400391 -3.10059 0.5 -4.2002c0.800781 7.5 0.400391 4.7002 24.8008 103.7c1.39941 5.2998 6.19922 9.09961 11.6992 9.09961h13.3008c5.59961 0 10.3994 -3.7998 11.6992 -9.2002c23.9004 -99.7002 22.8008 -94.3994 23.6006 -99.5
c0.299805 -1.7002 0.5 -3.09961 0.700195 -4.2998c0.599609 8.09961 0.399414 5.7998 21 103.5c1.09961 5.5 6 9.5 11.6992 9.5z" />
<glyph glyph-name="file-excel" unicode="&#xf1c3;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM260 224c9.2002 0 15 -10 10.2998 -18c-16 -27.5 -45.5996 -76.9004 -46.2998 -78l46.4004 -78c4.59961 -8 -1.10059 -18 -10.4004 -18h-28.7998c-4.40039 0 -8.5 2.40039 -10.6006 6.2998
c-22.6992 41.7998 -13.6992 27.5 -28.5996 57.7002c-5.59961 -12.7002 -6.90039 -17.7002 -28.5996 -57.7002c-2.10059 -3.89941 -6.10059 -6.2998 -10.5 -6.2998h-28.9004c-9.2998 0 -15.0996 10 -10.4004 18l46.3008 78l-46.3008 78c-4.59961 8 1.10059 18 10.4004 18
h28.9004c4.39941 0 8.5 -2.40039 10.5996 -6.2998c21.7002 -40.4004 14.7002 -28.6006 28.5996 -57.7002c6.40039 15.2998 10.6006 24.5996 28.6006 57.7002c2.09961 3.89941 6.09961 6.2998 10.5 6.2998h28.7998z" />
<glyph glyph-name="file-powerpoint" unicode="&#xf1c4;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM120 44v168c0 6.59961 5.40039 12 12 12h69.2002c36.7002 0 62.7998 -27 62.7998 -66.2998c0 -74.2998 -68.7002 -66.5 -95.5 -66.5v-47.2002c0 -6.59961 -5.40039 -12 -12 -12h-24.5c-6.59961 0 -12 5.40039 -12 12z
M168.5 131.4h23c7.90039 0 13.9004 2.39941 18.0996 7.19922c8.5 9.80078 8.40039 28.5 0.100586 37.8008c-4.10059 4.59961 -9.90039 7 -17.4004 7h-23.8994v-52h0.0996094z" />
<glyph glyph-name="file-image" unicode="&#xf1c5;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM80 32v64l39.5 39.5c4.7002 4.7002 12.2998 4.7002 17 0l39.5 -39.5l87.5 87.5c4.7002 4.7002 12.2998 4.7002 17 0l23.5 -23.5v-128h-224zM128 272c26.5 0 48 -21.5 48 -48s-21.5 -48 -48 -48s-48 21.5 -48 48
s21.5 48 48 48z" />
<glyph glyph-name="file-archive" unicode="&#xf1c6;" horiz-adv-x="384"
d="M128.3 288h32v-32h-32v32zM192.3 384v-32h-32v32h32zM128.3 352h32v-32h-32v32zM192.3 320v-32h-32v32h32zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1
c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-48.2998v-16h-32v16h-79.7002v-416h288zM194.2 182.3l17.2998 -87.7002c6.40039 -32.3994 -18.4004 -62.5996 -51.5 -62.5996
c-33.2002 0 -58 30.4004 -51.4004 62.9004l19.7002 97.0996v32h32v-32h22.1006c5.7998 0 10.6992 -4.09961 11.7998 -9.7002zM160.3 57.9004c17.9004 0 32.4004 12.0996 32.4004 27c0 14.8994 -14.5 27 -32.4004 27c-17.8994 0 -32.3994 -12.1006 -32.3994 -27
c0 -14.9004 14.5 -27 32.3994 -27zM192.3 256v-32h-32v32h32z" />
<glyph glyph-name="file-audio" unicode="&#xf1c7;" horiz-adv-x="384"
d="M369.941 350.059c7.75977 -7.75977 14.0586 -22.9658 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c10.9746 0 26.1807 -6.29883 33.9404 -14.0586zM332.118 320
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM192 60.0244c0 -10.6914 -12.9258 -16.0459 -20.4854 -8.48535l-35.5146 35.9746h-28c-6.62695 0 -12 5.37305 -12 12v56c0 6.62695 5.37305 12 12 12h28
l35.5146 36.9473c7.56055 7.56055 20.4854 2.20605 20.4854 -8.48535v-135.951zM233.201 107.154c9.05078 9.29688 9.05957 24.1328 0.000976562 33.4385c-22.1494 22.752 12.2344 56.2461 34.3945 33.4814c27.1982 -27.9404 27.2119 -72.4443 0.000976562 -100.401
c-21.793 -22.3857 -56.9463 10.3154 -34.3965 33.4814z" />
<glyph glyph-name="file-video" unicode="&#xf1c8;" horiz-adv-x="384"
d="M369.941 350.059c7.75977 -7.75977 14.0586 -22.9658 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c10.9746 0 26.1807 -6.29883 33.9404 -14.0586zM332.118 320
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM276.687 195.303c10.0049 10.0049 27.3135 2.99707 27.3135 -11.3135v-111.976c0 -14.2939 -17.2959 -21.332 -27.3135 -11.3135l-52.6865 52.6738v-37.374
c0 -11.0459 -8.9541 -20 -20 -20h-104c-11.0459 0 -20 8.9541 -20 20v104c0 11.0459 8.9541 20 20 20h104c11.0459 0 20 -8.9541 20 -20v-37.374z" />
<glyph glyph-name="file-code" unicode="&#xf1c9;" horiz-adv-x="384"
d="M149.9 98.9004c3.5 -3.30078 3.69922 -8.90039 0.399414 -12.4004l-17.3994 -18.5996c-1.60059 -1.80078 -4 -2.80078 -6.40039 -2.80078c-2.2002 0 -4.40039 0.900391 -6 2.40039l-57.7002 54.0996c-3.7002 3.40039 -3.7002 9.30078 0 12.8008l57.7002 54.0996
c3.40039 3.2998 9 3.2002 12.4004 -0.400391l17.3994 -18.5996l0.200195 -0.200195c3.2002 -3.59961 2.7998 -9.2002 -0.799805 -12.3994l-32.7998 -28.9004l32.7998 -28.9004zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288
c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288zM209.6 234l24.4004 -7
c4.7002 -1.2998 7.40039 -6.2002 6 -10.9004l-54.7002 -188.199c-1.2998 -4.60059 -6.2002 -7.40039 -10.8994 -6l-24.4004 7.09961c-4.7002 1.2998 -7.40039 6.2002 -6 10.9004l54.7002 188.1c1.39941 4.7002 6.2002 7.40039 10.8994 6zM234.1 157.1
c-3.5 3.30078 -3.69922 8.90039 -0.399414 12.4004l17.3994 18.5996c3.30078 3.60059 8.90039 3.7002 12.4004 0.400391l57.7002 -54.0996c3.7002 -3.40039 3.7002 -9.30078 0 -12.8008l-57.7002 -54.0996c-3.5 -3.2998 -9.09961 -3.09961 -12.4004 0.400391
l-17.3994 18.5996l-0.200195 0.200195c-3.2002 3.59961 -2.7998 9.2002 0.799805 12.3994l32.7998 28.9004l-32.7998 28.9004z" />
<glyph glyph-name="life-ring" unicode="&#xf1cd;"
d="M256 -56c-136.967 0 -248 111.033 -248 248s111.033 248 248 248s248 -111.033 248 -248s-111.033 -248 -248 -248zM152.602 20.7197c63.2178 -38.3184 143.579 -38.3184 206.797 0l-53.4111 53.4111c-31.8467 -13.5215 -68.168 -13.5059 -99.9746 0zM336 192
c0 44.1123 -35.8877 80 -80 80s-80 -35.8877 -80 -80s35.8877 -80 80 -80s80 35.8877 80 80zM427.28 88.6016c38.3184 63.2178 38.3184 143.579 0 206.797l-53.4111 -53.4111c13.5215 -31.8467 13.5049 -68.168 0 -99.9746zM359.397 363.28
c-63.2168 38.3184 -143.578 38.3184 -206.796 0l53.4111 -53.4111c31.8457 13.5215 68.167 13.5049 99.9736 0zM84.7197 295.398c-38.3184 -63.2178 -38.3184 -143.579 0 -206.797l53.4111 53.4111c-13.5215 31.8467 -13.5059 68.168 0 99.9746z" />
<glyph glyph-name="paper-plane" unicode="&#xf1d8;"
d="M440 441.5c34.5996 19.9004 77.5996 -8.7998 71.5 -48.9004l-59.4004 -387.199c-2.2998 -14.5 -11.0996 -27.3008 -23.8994 -34.5c-7.2998 -4.10059 -15.4004 -6.2002 -23.6006 -6.2002c-6.19922 0 -12.3994 1.2002 -18.2998 3.59961l-111.899 46.2002l-43.8008 -59.0996
c-27.3994 -36.9004 -86.5996 -17.8008 -86.5996 28.5996v84.4004l-114.3 47.2998c-36.7998 15.0996 -40.1006 66 -5.7002 85.8994zM192 -16l36.5996 49.5l-36.5996 15.0996v-64.5996zM404.6 12.7002l59.4004 387.3l-416 -240l107.8 -44.5996l211.5 184.3
c14.2002 12.2998 34.4004 -5.7002 23.7002 -21.2002l-140.2 -202.3z" />
<glyph glyph-name="futbol" unicode="&#xf1e3;" horiz-adv-x="496"
d="M483.8 268.6c42.2998 -130.199 -29 -270.1 -159.2 -312.399c-25.5 -8.2998 -51.2998 -12.2002 -76.6992 -12.2002c-104.5 0 -201.7 66.5996 -235.7 171.4c-42.2998 130.199 29 270.1 159.2 312.399c25.5 8.2998 51.2998 12.2002 76.6992 12.2002
c104.5 0 201.7 -66.5996 235.7 -171.4zM409.3 74.9004c6.10059 8.39941 12.1006 16.8994 16.7998 26.1992c14.3008 28.1006 21.5 58.5 21.7002 89.2002l-38.8994 36.4004l-71.1006 -22.1006l-24.3994 -75.1992l43.6992 -60.9004zM409.3 310.3
c-24.5 33.4004 -58.7002 58.4004 -97.8994 71.4004l-47.4004 -26.2002v-73.7998l64.2002 -46.5l70.7002 22zM184.9 381.6c-39.9004 -13.2998 -73.5 -38.5 -97.8008 -71.8994l10.1006 -52.5l70.5996 -22l64.2002 46.5v73.7998zM139 68.5l43.5 61.7002l-24.2998 74.2998
l-71.1006 22.2002l-39 -36.4004c0.5 -55.7002 23.4004 -95.2002 37.8008 -115.3zM187.2 1.5c64.0996 -20.4004 115.5 -1.7998 121.7 0l22.3994 48.0996l-44.2998 61.7002h-78.5996l-43.6006 -61.7002z" />
<glyph glyph-name="newspaper" unicode="&#xf1ea;" horiz-adv-x="576"
d="M552 384c13.2549 0 24 -10.7451 24 -24v-336c0 -13.2549 -10.7451 -24 -24 -24h-496c-30.9277 0 -56 25.0723 -56 56v272c0 13.2549 10.7451 24 24 24h42.752c6.60547 18.623 24.3896 32 45.248 32h440zM48 56c0 -4.41113 3.58887 -8 8 -8s8 3.58887 8 8v248h-16v-248z
M528 48v288h-416v-280c0 -2.7168 -0.204102 -5.38574 -0.578125 -8h416.578zM172 168c-6.62695 0 -12 5.37305 -12 12v96c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-96c0 -6.62695 -5.37305 -12 -12 -12h-136zM200 248v-40h80v40h-80zM160 108v24
c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-136c-6.62695 0 -12 5.37305 -12 12zM352 108v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104
c-6.62695 0 -12 5.37305 -12 12zM352 252v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12zM352 180v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24
c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12z" />
<glyph glyph-name="bell-slash" unicode="&#xf1f6;" horiz-adv-x="640"
d="M633.99 -23.0195c6.91016 -5.52051 8.01953 -15.5908 2.5 -22.4902l-10 -12.4902c-5.53027 -6.88965 -15.5898 -8.00977 -22.4902 -2.49023l-598 467.51c-6.90039 5.52051 -8.01953 15.5908 -2.49023 22.4902l10 12.4902
c5.52051 6.90039 15.5898 8.00977 22.4902 2.49023zM163.53 80h182.84l61.3994 -48h-279.659c-19.1201 0 -31.9902 15.5996 -32.1006 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c18.3701 19.7402 51.5703 49.6904 54.8398 140.42l45.4697 -35.5498
c-6.91992 -54.7803 -24.6895 -88.5498 -41.3994 -110.58zM320 352c-23.3496 0 -45 -7.17969 -62.9404 -19.4004l-38.1699 29.8408c19.6807 15.7793 43.1104 27.3096 69.1299 32.7197v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398
c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -41.3604 6.03027 -70.7197 14.3398 -92.8496l-59.5293 46.54c-1.63086 13.96 -2.77051 28.8896 -2.79004 45.7295c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112zM320 -64
c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
<glyph glyph-name="copyright" unicode="&#xf1f9;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
M363.351 93.0645c-9.61328 -9.71289 -45.5293 -41.3965 -104.064 -41.3965c-82.4297 0 -140.484 61.4248 -140.484 141.567c0 79.1514 60.2754 139.4 139.763 139.4c55.5303 0 88.7373 -26.6201 97.5928 -34.7783c2.13379 -1.96289 3.86523 -5.9082 3.86523 -8.80762
c0 -1.95508 -0.864258 -4.87402 -1.92969 -6.51465l-18.1543 -28.1133c-3.8418 -5.9502 -11.9668 -7.28223 -17.499 -2.9209c-8.5957 6.77637 -31.8145 22.5381 -61.708 22.5381c-48.3037 0 -77.916 -35.3301 -77.916 -80.082c0 -41.5889 26.8877 -83.6924 78.2764 -83.6924
c32.6572 0 56.8428 19.0391 65.7266 27.2256c5.26953 4.85645 13.5957 4.03906 17.8193 -1.73828l19.8652 -27.1699c1.28613 -1.74512 2.33008 -4.91992 2.33008 -7.08789c0 -2.72363 -1.56055 -6.5 -3.48242 -8.42969z" />
<glyph glyph-name="closed-captioning" unicode="&#xf20a;"
d="M464 384c26.5 0 48 -21.5 48 -48v-288c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h416zM458 48c3.2998 0 6 2.7002 6 6v276c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-276c0 -3.2998 2.7002 -6 6 -6h404z
M246.9 133.7c1.69922 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.6006 -56.7998 -172.801 -32.0996 -172.801 67.9004c0 97.2998 121.7 119.5 172.5 70.0996c2.10059 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.89941 -3.09961 -6.19922 -4 -9.09961 -1.7002
c-40.7998 32 -94.5996 14.9004 -94.5996 -31.1992c0 -48 51 -70.5 92.1992 -32.6006c2.80078 2.5 7.10059 2.10059 9.2002 -0.899414zM437.3 133.7c1.7002 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.5996 -56.9004 -172.8 -32.0996 -172.8 67.9004
c0 97.2998 121.7 119.5 172.5 70.0996c2.09961 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.90039 -3.09961 -6.2002 -4 -9.09961 -1.7002c-40.8008 32 -94.6006 14.9004 -94.6006 -31.1992c0 -48 51 -70.5 92.2002 -32.6006c2.7998 2.5 7.09961 2.10059 9.2002 -0.899414z
" />
<glyph glyph-name="object-group" unicode="&#xf247;"
d="M500 320h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v256h-12
c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM448 384v-32h32v32h-32zM32 384v-32h32v32h-32zM64 0v32
h-32v-32h32zM480 0v32h-32v-32h32zM440 64v256h-12c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h12zM404 256c6.62695 0 12 -5.37207 12 -12v-168
c0 -6.62793 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37207 -12 12v52h-84c-6.62695 0 -12 5.37207 -12 12v168c0 6.62793 5.37305 12 12 12h200c6.62695 0 12 -5.37207 12 -12v-52h84zM136 280v-112h144v112h-144zM376 104v112h-56v-76
c0 -6.62793 -5.37305 -12 -12 -12h-76v-24h144z" />
<glyph glyph-name="object-ungroup" unicode="&#xf248;" horiz-adv-x="576"
d="M564 224h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v24h-88v-12
c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h72
c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-12v-24h88v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM352 384v-32h32v32h-32zM352 128v-32h32v32h-32zM64 96v32h-32v-32h32zM64 352v32
h-32v-32h32zM96 136h224v12c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-12zM224 0v32h-32v-32h32zM504 64v160h-12c-6.62695 0 -12 5.37305 -12 12v12
h-88v-88h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-88v-24h12c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h12zM544 0v32h-32v-32h32zM544 256v32h-32v-32h32z" />
<glyph glyph-name="sticky-note" unicode="&#xf249;" horiz-adv-x="448"
d="M448 99.8936c0 -10.9746 -6.29883 -26.1797 -14.0586 -33.9404l-83.8828 -83.8818c-7.75977 -7.76074 -22.9658 -14.0596 -33.9404 -14.0596h-268.118c-26.5098 0 -48 21.4902 -48 48v351.988c0 26.5098 21.4902 48 48 48h352c26.5098 0 48 -21.4902 48 -48v-268.106z
M320 19.8936l76.1182 76.1182h-76.1182v-76.1182zM400 368h-352v-351.988h224v104c0 13.2549 10.7451 24 24 24h104v223.988z" />
<glyph glyph-name="clone" unicode="&#xf24d;"
d="M464 448c26.5098 0 48 -21.4902 48 -48v-320c0 -26.5098 -21.4902 -48 -48 -48h-48v-48c0 -26.5098 -21.4902 -48 -48 -48h-320c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h48v48c0 26.5098 21.4902 48 48 48h320zM362 -16c3.31152 0 6 2.68848 6 6
v42h-224c-26.5098 0 -48 21.4902 -48 48v224h-42c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308zM458 80c3.31152 0 6 2.68848 6 6v308c0 3.31152 -2.68848 6 -6 6h-308c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308z" />
<glyph glyph-name="hourglass" unicode="&#xf254;" horiz-adv-x="384"
d="M368 400c0 -80.0996 -31.8984 -165.619 -97.1797 -208c64.9912 -42.1934 97.1797 -127.436 97.1797 -208h4c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-360c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h4
c0 80.0996 31.8994 165.619 97.1797 208c-64.9912 42.1934 -97.1797 127.436 -97.1797 208h-4c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h360c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-4zM64 400
c0 -101.621 57.3066 -184 128 -184s128 82.3799 128 184h-256zM320 -16c0 101.62 -57.3076 184 -128 184s-128 -82.3799 -128 -184h256z" />
<glyph glyph-name="hand-rock" unicode="&#xf255;"
d="M408.864 368.948c48.8213 20.751 103.136 -15.0723 103.136 -67.9111v-114.443c0 -15.3955 -3.08887 -30.3906 -9.18262 -44.5674l-42.835 -99.6562c-4.99707 -11.625 -3.98242 -18.8574 -3.98242 -42.3701c0 -17.6729 -14.3271 -32 -32 -32h-252
c-17.6729 0 -32 14.3271 -32 32c0 27.3301 1.1416 29.2012 -3.11035 32.9033l-97.71 85.0811c-24.8994 21.6797 -39.1797 52.8926 -39.1797 85.6338v56.9531c0 47.4277 44.8457 82.0215 91.0459 71.1807c1.96094 55.751 63.5107 87.8262 110.671 60.8057
c29.1895 31.0713 78.8604 31.4473 108.334 -0.0214844c32.7051 18.6846 76.4121 10.3096 98.8135 -23.5879zM464 186.594v114.445c0 34.29 -52 33.8232 -52 0.676758c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v26.751
c0 34.457 -52 33.707 -52 0.676758v-27.4287c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v40.4658c0 34.3525 -52 33.8115 -52 0.677734v-41.1436c0 -8.83594 -7.16406 -16 -16 -16h-7c-8.83594 0 -16 7.16406 -16 16v26.751
c0 34.4023 -52 33.7744 -52 0.676758v-116.571c0 -8.83203 -7.16797 -16 -16 -16c-3.30664 0 -8.01367 1.7627 -10.5068 3.93359l-7 6.09473c-3.03223 2.64062 -5.49316 8.04688 -5.49316 12.0674v0v41.2275c0 34.2148 -52 33.8857 -52 0.677734v-56.9531
c0 -18.8555 8.27441 -36.874 22.7002 -49.4365l97.71 -85.0801c12.4502 -10.8398 19.5898 -26.4463 19.5898 -42.8164v-10.2861h220v7.07617c0 13.21 2.65332 26.0791 7.88281 38.25l42.835 99.6553c2.91602 6.75391 5.28223 18.207 5.28223 25.5635v0.0488281z" />
<glyph glyph-name="hand-paper" unicode="&#xf256;" horiz-adv-x="448"
d="M372.57 335.359c39.9062 5.63281 75.4297 -25.7393 75.4297 -66.3594v-131.564c-0.00195312 -12.7666 -2.33008 -33.2246 -5.19531 -45.666l-30.1836 -130.958c-3.34668 -14.5234 -16.2783 -24.8125 -31.1816 -24.8125h-222.897
c-9.10352 0 -20.7793 6.01758 -26.0615 13.4316l-119.97 168.415c-21.2441 29.8203 -14.8047 71.3574 14.5498 93.1533c18.7754 13.9395 42.1309 16.2979 62.083 8.87109v126.13c0 44.0547 41.125 75.5439 82.4053 64.9834c23.8926 48.1963 92.3535 50.2471 117.982 0.74707
c42.5186 11.1445 83.0391 -21.9346 83.0391 -65.5469v-10.8242zM399.997 137.437l-0.00195312 131.563c0 24.9492 -36.5703 25.5508 -36.5703 -0.691406v-76.3086c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v154.184
c0 25.501 -36.5703 26.3633 -36.5703 0.691406v-154.875c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v188.309c0 25.501 -36.5703 26.3545 -36.5703 0.691406v-189c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16
v153.309c0 25.501 -36.5713 26.3359 -36.5713 0.691406v-206.494c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832l-27.1279 38.0791c-14.3711 20.1709 -43.833 -2.33496 -29.3945 -22.6045l115.196 -161.697h201.92l27.3252 118.551
c2.63086 11.417 3.96484 23.1553 3.96484 34.8857z" />
<glyph glyph-name="hand-scissors" unicode="&#xf257;"
d="M256 -32c-44.9561 0 -77.3428 43.2627 -64.0244 85.8535c-21.6484 13.71 -34.0156 38.7617 -30.3408 65.0068h-87.6348c-40.8037 0 -74 32.8105 -74 73.1406c0 40.3291 33.1963 73.1396 74 73.1396l94 -9.14062l-78.8496 18.6787
c-38.3076 14.7422 -57.04 57.4707 -41.9424 95.1123c15.0303 37.4736 57.7549 55.7803 95.6416 41.2012l144.929 -55.7568c24.9551 30.5566 57.8086 43.9932 92.2178 24.7324l97.999 -54.8525c20.9746 -11.7393 34.0049 -33.8457 34.0049 -57.6904v-205.702
c0 -30.7422 -21.4404 -57.5576 -51.7979 -64.5537l-118.999 -27.4268c-4.97168 -1.14648 -10.0889 -1.72949 -15.2031 -1.72949zM256 16.0127l70 -0.000976562c1.23633 0 3.21777 0.225586 4.42285 0.501953l119.001 27.4277
c8.58203 1.97754 14.5762 9.29102 14.5762 17.7812v205.701c0 6.4873 -3.62109 12.542 -9.44922 15.8047l-98 54.8545c-8.13965 4.55566 -18.668 2.61914 -24.4873 -4.50781l-21.7646 -26.6475c-2.65039 -3.24512 -8.20215 -5.87891 -12.3926 -5.87891
c-1.64062 0 -4.21484 0.477539 -5.74609 1.06738l-166.549 64.0908c-32.6543 12.5664 -50.7744 -34.5771 -19.2227 -46.7168l155.357 -59.7852c5.66016 -2.17773 10.2539 -8.86816 10.2539 -14.9326v0v-11.6328c0 -8.83691 -7.16309 -16 -16 -16h-182
c-34.375 0 -34.4297 -50.2803 0 -50.2803h182c8.83691 0 16 -7.16309 16 -16v-6.85645c0 -8.83691 -7.16309 -16 -16 -16h-28c-25.1221 0 -25.1592 -36.5674 0 -36.5674h28c8.83691 0 16 -7.16211 16 -16v-6.85547c0 -8.83691 -7.16309 -16 -16 -16
c-25.1201 0 -25.1602 -36.5674 0 -36.5674z" />
<glyph glyph-name="hand-lizard" unicode="&#xf258;" horiz-adv-x="576"
d="M556.686 157.458c12.6357 -19.4863 19.3145 -42.0615 19.3145 -65.2871v-124.171h-224v71.582l-99.751 38.7871c-2.7832 1.08203 -5.70996 1.63086 -8.69727 1.63086h-131.552c-30.8789 0 -56 25.1211 -56 56c0 48.5234 39.4766 88 88 88h113.709l18.333 48h-196.042
c-44.1123 0 -80 35.8877 -80 80v8c0 30.8779 25.1211 56 56 56h293.917c24.5 0 47.084 -12.2725 60.4111 -32.8291zM528 16v76.1709v0.0478516c0 11.7461 -5.19141 29.2734 -11.5879 39.124l-146.358 225.715c-4.44336 6.85254 -11.9707 10.9424 -20.1367 10.9424h-293.917
c-4.41113 0 -8 -3.58887 -8 -8v-8c0 -17.6445 14.3555 -32 32 -32h213.471c25.2021 0 42.626 -25.293 33.6299 -48.8457l-24.5518 -64.2812c-7.05371 -18.4658 -25.0732 -30.873 -44.8398 -30.873h-113.709c-22.0557 0 -40 -17.9443 -40 -40c0 -4.41113 3.58887 -8 8 -8
h131.552h0.0517578c7.44141 0 19.1074 -2.19238 26.041 -4.89355l99.752 -38.7881c18.5898 -7.22852 30.6035 -24.7881 30.6035 -44.7363v-23.582h128z" />
<glyph glyph-name="hand-spock" unicode="&#xf259;"
d="M501.03 331.824c6.05762 -9.77832 10.9746 -27.0498 10.9746 -38.5518c0 -4.80664 -0.915039 -12.499 -2.04297 -17.1709l-57.623 -241.963c-12.748 -54.1729 -68.2627 -98.1387 -123.915 -98.1387h-0.345703h-107.455h-0.224609
c-33.8135 0 -81.2148 18.834 -105.807 42.041l-91.3652 85.9766c-12.8213 12.0469 -23.2266 36.1016 -23.2266 53.6943c0 16.1299 8.97266 38.7529 20.0273 50.499c5.31836 5.66406 29.875 29.3926 68.1152 21.8477l-24.3594 82.1973
c-1.68164 5.66406 -3.0459 15.0576 -3.0459 20.9668c0 37.5938 30.417 70.502 67.8955 73.4551c-0.204102 2.03125 -0.369141 5.33691 -0.369141 7.37891c0 31.627 24.8594 63.6895 55.4902 71.5684c43.248 10.9785 80.5645 -17.7012 89.6602 -53.0723l13.6836 -53.207
l4.64648 22.6602c6.76074 32.417 39.123 58.8115 72.2373 58.916c8.73438 0 56.625 -3.26953 70.7383 -54.0801c15.0664 0.710938 46.9199 -3.50977 66.3105 -35.0176zM463.271 287.219c7.86914 32.9844 -42.1211 45.2695 -50.0859 11.9219l-24.8008 -104.146
c-4.38867 -18.4141 -31.7783 -11.8926 -28.0557 6.2168l28.5479 139.166c7.39844 36.0703 -43.3076 45.0703 -50.1182 11.9629l-31.791 -154.971c-3.54883 -17.3086 -28.2832 -18.0469 -32.7109 -0.804688l-47.3262 184.035
c-8.43359 32.8105 -58.3691 20.2676 -49.8652 -12.8359l42.4414 -165.039c4.81641 -18.7207 -23.3711 -26.9121 -28.9648 -8.00781l-31.3438 105.779c-9.6875 32.6465 -59.1191 18.2578 -49.3867 -14.625l36.0137 -121.539
c5.61816 -18.9521 10.1777 -50.377 10.1777 -70.1436v-0.00878906c0 -6.54297 -8.05664 -10.9355 -13.4824 -5.82617l-51.123 48.1074c-24.7852 23.4082 -60.0527 -14.1875 -35.2793 -37.4902l91.3691 -85.9805c16.9629 -16.0068 49.6592 -28.998 72.9824 -28.998h0.154297
h107.455h0.216797c34.7402 0 69.3936 27.4443 77.3525 61.2598z" />
<glyph glyph-name="hand-pointer" unicode="&#xf25a;" horiz-adv-x="448"
d="M358.182 268.639c43.1934 16.6348 89.8184 -15.7949 89.8184 -62.6387v-84c-0.000976562 -4.25 -0.775391 -11.0615 -1.72754 -15.2041l-27.4297 -118.999c-6.98242 -30.2969 -33.7549 -51.7969 -64.5566 -51.7969h-178.286c-21.2588 0 -41.3682 10.4102 -53.791 27.8457
l-109.699 154.001c-21.2432 29.8193 -14.8047 71.3574 14.5498 93.1523c18.8115 13.9658 42.1748 16.2822 62.083 8.87207v161.129c0 36.9443 29.7363 67 66.2861 67s66.2861 -30.0557 66.2861 -67v-73.6338c20.4131 2.85742 41.4678 -3.94238 56.5947 -19.6289
c27.1934 12.8467 60.3799 5.66992 79.8721 -19.0986zM80.9854 168.303c-14.4004 20.2119 -43.8008 -2.38281 -29.3945 -22.6055l109.712 -154c3.43457 -4.81934 8.92871 -7.69727 14.6973 -7.69727h178.285c8.49219 0 15.8037 5.99414 17.7822 14.5762l27.4297 119.001
c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285v84c0 25.1602 -36.5713 25.1211 -36.5713 0c0 -8.83594 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16406 -16 16v21c0 25.1602 -36.5713 25.1201 -36.5713 0v-21c0 -8.83594 -7.16309 -16 -16 -16h-6.85938
c-8.83691 0 -16 7.16406 -16 16v35c0 25.1602 -36.5703 25.1201 -36.5703 0v-35c0 -8.83594 -7.16309 -16 -16 -16h-6.85742c-8.83691 0 -16 7.16406 -16 16v175c0 25.1602 -36.5713 25.1201 -36.5713 0v-241.493c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832z
M176.143 48v96c0 8.83691 6.26855 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16zM251.571 48v96c0 8.83691 6.26758 16 14 16h6c7.73145 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26855 -16 -14 -16h-6
c-7.73242 0 -14 7.16309 -14 16zM327 48v96c0 8.83691 6.26758 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16z" />
<glyph glyph-name="hand-peace" unicode="&#xf25b;" horiz-adv-x="448"
d="M362.146 256.024c42.5908 13.3184 85.8535 -19.0684 85.8535 -64.0244l-0.0117188 -70.001c-0.000976562 -4.25 -0.775391 -11.0615 -1.72949 -15.2031l-27.4268 -118.999c-6.99707 -30.3564 -33.8105 -51.7969 -64.5547 -51.7969h-205.702
c-23.8447 0 -45.9502 13.0303 -57.6904 34.0059l-54.8525 97.999c-19.2607 34.4092 -5.82422 67.2617 24.7324 92.2178l-55.7568 144.928c-14.5791 37.8867 3.72754 80.6113 41.2012 95.6416c37.6406 15.0977 80.3691 -3.63477 95.1123 -41.9424l18.6787 -78.8496
l-9.14062 94c0 40.8037 32.8096 74 73.1396 74s73.1406 -33.1963 73.1406 -74v-87.6348c26.2451 3.6748 51.2959 -8.69238 65.0068 -30.3408zM399.987 122l-0.000976562 70c0 25.1602 -36.5674 25.1201 -36.5674 0c0 -8.83691 -7.16309 -16 -16 -16h-6.85547
c-8.83789 0 -16 7.16309 -16 16v28c0 25.1592 -36.5674 25.1221 -36.5674 0v-28c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v182c0 34.4297 -50.2803 34.375 -50.2803 0v-182c0 -8.83691 -7.16309 -16 -16 -16h-11.6328v0
c-6.06445 0 -12.7549 4.59375 -14.9326 10.2539l-59.7842 155.357c-12.1396 31.5518 -59.2842 13.4326 -46.7168 -19.2227l64.0898 -166.549c0.589844 -1.53125 1.06738 -4.10547 1.06738 -5.74609c0 -4.19043 -2.63379 -9.74219 -5.87891 -12.3926l-26.6475 -21.7646
c-7.12695 -5.81934 -9.06445 -16.3467 -4.50781 -24.4873l54.8535 -98c3.26367 -5.82812 9.31934 -9.44922 15.8057 -9.44922h205.701c8.49121 0 15.8037 5.99414 17.7812 14.5762l27.4277 119.001c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285z" />
<glyph glyph-name="registered" unicode="&#xf25d;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
M366.442 73.791c4.40332 -7.99219 -1.37012 -17.791 -10.5107 -17.791h-42.8096h-0.0126953c-3.97559 0 -8.71582 2.84961 -10.5801 6.36035l-47.5156 89.3027h-31.958v-83.6631c0 -6.61719 -5.38281 -12 -12 -12h-38.5674c-6.61719 0 -12 5.38281 -12 12v248.304
c0 6.61719 5.38281 12 12 12h78.667c71.251 0 101.498 -32.749 101.498 -85.252c0 -31.6123 -15.2148 -59.2969 -39.4824 -73.1758c3.02148 -4.61719 0.225586 0.199219 53.2715 -96.085zM256.933 208.094c20.9131 0 32.4307 11.5186 32.4316 32.4316
c0 19.5752 -6.5127 31.709 -38.9297 31.709h-27.377v-64.1406h33.875z" />
<glyph glyph-name="calendar-plus" unicode="&#xf271;" horiz-adv-x="448"
d="M336 156v-24c0 -6.59961 -5.40039 -12 -12 -12h-76v-76c0 -6.59961 -5.40039 -12 -12 -12h-24c-6.59961 0 -12 5.40039 -12 12v76h-76c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h76v76c0 6.59961 5.40039 12 12 12h24c6.59961 0 12 -5.40039 12 -12
v-76h76c6.59961 0 12 -5.40039 12 -12zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-minus" unicode="&#xf272;" horiz-adv-x="448"
d="M124 120c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h200c6.59961 0 12 -5.40039 12 -12v-24c0 -6.59961 -5.40039 -12 -12 -12h-200zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-times" unicode="&#xf273;" horiz-adv-x="448"
d="M311.7 73.2998l-17 -17c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-53.7002 53.7998l-53.7002 -53.6992c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-17 17c-4.7002 4.69922 -4.7002 12.2998 0 17l53.7002 53.6992l-53.7002 53.7002c-4.7002 4.7002 -4.7002 12.2998 0 17
l17 17c4.7002 4.7002 12.2998 4.7002 17 0l53.7002 -53.7002l53.7002 53.7002c4.7002 4.7002 12.2998 4.7002 17 0l17 -17c4.7002 -4.7002 4.7002 -12.2998 0 -17l-53.7998 -53.7998l53.6992 -53.7002c4.80078 -4.7002 4.80078 -12.2998 0.100586 -17zM448 336v-352
c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10
v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-check" unicode="&#xf274;" horiz-adv-x="448"
d="M400 384c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h48v52c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-52h128v52c0 6.62695 5.37305 12 12 12h40
c6.62695 0 12 -5.37305 12 -12v-52h48zM394 -16c3.31152 0 6 2.68848 6 6v298h-352v-298c0 -3.31152 2.68848 -6 6 -6h340zM341.151 184.65l-142.31 -141.169c-4.70508 -4.66699 -12.3027 -4.6377 -16.9707 0.0673828l-75.0908 75.6992
c-4.66699 4.70508 -4.6377 12.3027 0.0673828 16.9707l22.7197 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l44.1035 -44.4609l111.072 110.182c4.70508 4.66699 12.3027 4.63672 16.9707 -0.0683594l22.5361 -22.7178
c4.66699 -4.70508 4.63672 -12.3027 -0.0683594 -16.9697z" />
<glyph glyph-name="map" unicode="&#xf279;" horiz-adv-x="576"
d="M560.02 416c8.4502 0 15.9805 -6.83008 15.9805 -16.0195v-346.32c0 -11.9609 -9.01367 -25.2705 -20.1201 -29.71l-151.83 -52.8105c-5.32617 -1.7334 -14.1953 -3.13965 -19.7969 -3.13965c-5.7373 0 -14.8105 1.47363 -20.2529 3.29004l-172 60.71l-170.05 -62.8398
c-1.99023 -0.790039 -4 -1.16016 -5.95996 -1.16016c-8.45996 0 -15.9902 6.83008 -15.9902 16.0195v346.32c0.00292969 11.959 9.0166 25.2686 20.1201 29.71l151.83 52.8105c6.43945 2.08984 13.1201 3.13965 19.8096 3.13965
c5.73242 -0.00195312 14.8008 -1.47168 20.2402 -3.28027l172 -60.7197h0.00976562l170.05 62.8398c1.98047 0.790039 4 1.16016 5.95996 1.16016zM224 357.58v-285.97l128 -45.1904v285.97zM48 29.9502l127.36 47.0801l0.639648 0.229492v286.2l-128 -44.5303v-288.979z
M528 65.0801v288.97l-127.36 -47.0693l-0.639648 -0.240234v-286.19z" />
<glyph glyph-name="comment-alt" unicode="&#xf27a;"
d="M448 448c35.2998 0 64 -28.7002 64 -64v-288c0 -35.2998 -28.7002 -64 -64 -64h-144l-124.9 -93.5996c-2.19922 -1.7002 -4.69922 -2.40039 -7.09961 -2.40039c-6.2002 0 -12 4.90039 -12 12v84h-96c-35.2998 0 -64 28.7002 -64 64v288c0 35.2998 28.7002 64 64 64h384z
M464 96v288c0 8.7998 -7.2002 16 -16 16h-384c-8.7998 0 -16 -7.2002 -16 -16v-288c0 -8.7998 7.2002 -16 16 -16h144v-60l67.2002 50.4004l12.7998 9.59961h160c8.7998 0 16 7.2002 16 16z" />
<glyph glyph-name="pause-circle" unicode="&#xf28b;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16zM240 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16z" />
<glyph glyph-name="stop-circle" unicode="&#xf28d;"
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-160
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h160c8.7998 0 16 -7.2002 16 -16z" />
<glyph glyph-name="handshake" unicode="&#xf2b5;" horiz-adv-x="640"
d="M519.2 320.1h120.8v-255.699h-64c-17.5 0 -31.7998 14.1992 -31.9004 31.6992h-57.8994c-1.7998 -8.19922 -5.2998 -16.0996 -10.9004 -23l-26.2002 -32.2998c-15.7998 -19.3994 -41.8994 -25.5 -64 -16.7998c-13.5 -16.5996 -30.5996 -24 -48.7998 -24
c-15.0996 0 -28.5996 5.09961 -41.0996 15.9004c-31.7998 -21.9004 -74.7002 -21.3008 -105.601 3.7998l-84.5996 76.3994h-9.09961c-0.100586 -17.5 -14.3008 -31.6992 -31.9004 -31.6992h-64v255.699h118l47.5996 47.6006c10.5 10.3994 24.8008 16.2998 39.6006 16.2998
h226.8v0c12.7812 0 30.5225 -7.30273 39.5996 -16.2998zM48 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16zM438 103.3c2.7002 3.40039 2.2002 8.5 -1.2002 11.2998l-108.2 87.8008l-8.19922 -7.5
c-40.3008 -36.8008 -86.7002 -11.8008 -101.5 4.39941c-26.7002 29 -25 74.4004 4.39941 101.3l38.7002 35.5h-56.7002c-2 -0.799805 -3.7002 -1.5 -5.7002 -2.2998l-61.6992 -61.5996h-41.9004v-128.101h27.7002l97.2998 -88
c16.0996 -13.0996 41.4004 -10.5 55.2998 6.60059l15.6006 19.2002l36.7998 -31.5c3 -2.40039 12 -4.90039 18 2.39941l30 36.5l23.8994 -19.3994c3.5 -2.80078 8.5 -2.2002 11.3008 1.19922zM544 144.1v128h-44.7002l-61.7002 61.6006
c-1.39941 1.5 -3.39941 2.2998 -5.5 2.2998l-83.6992 -0.200195c-10 0 -19.6006 -3.7002 -27 -10.5l-65.6006 -60.0996c-9.7002 -8.7998 -10.5 -24 -1.2002 -33.9004c8.90039 -9.39941 25.1006 -8.7002 34.6006 0l55.2002 50.6006c6.5 5.89941 16.5996 5.5 22.5996 -1
l10.9004 -11.7002c6 -6.5 5.5 -16.6006 -1 -22.6006l-12.5 -11.3994l102.699 -83.4004c2.80078 -2.2998 5.40039 -4.89941 7.7002 -7.7002h69.2002zM592 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16z
" />
<glyph glyph-name="envelope-open" unicode="&#xf2b6;"
d="M494.586 283.484c9.6123 -7.94824 17.4141 -24.5205 17.4141 -36.9932v-262.491c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v262.515c0 12.5166 7.84668 29.1279 17.5146 37.0771c4.08008 3.35449 110.688 89.0996 135.15 108.549
c22.6992 18.1426 60.1299 55.8594 103.335 55.8594c43.4365 0 81.2314 -38.1914 103.335 -55.8594c23.5283 -18.707 130.554 -104.773 135.251 -108.656zM464 -10v253.632v0.00488281c0 1.5791 -0.996094 3.66602 -2.22363 4.6582
c-15.8633 12.8232 -108.793 87.5752 -132.366 106.316c-17.5527 14.0195 -49.7168 45.3887 -73.4102 45.3887c-23.6016 0 -55.2451 -30.8799 -73.4102 -45.3887c-23.5713 -18.7393 -116.494 -93.4795 -132.364 -106.293
c-1.40918 -1.13965 -2.22559 -2.85254 -2.22559 -4.66504v-253.653c0 -3.31152 2.68848 -6 6 -6h404c3.31152 0 6 2.68848 6 6zM432.009 177.704c4.24902 -5.15918 3.46484 -12.7949 -1.74512 -16.9814c-28.9746 -23.2822 -59.2734 -47.5967 -70.9287 -56.8623
c-22.6992 -18.1436 -60.1299 -55.8604 -103.335 -55.8604c-43.4521 0 -81.2871 38.2373 -103.335 55.8604c-11.2793 8.9668 -41.7441 33.4131 -70.9268 56.8643c-5.20996 4.1875 -5.99316 11.8223 -1.74512 16.9814l15.2578 18.5283
c4.17773 5.07227 11.6572 5.84277 16.7793 1.72559c28.6182 -23.001 58.5654 -47.0352 70.5596 -56.5713c17.5527 -14.0195 49.7168 -45.3887 73.4102 -45.3887c23.6016 0 55.2461 30.8799 73.4102 45.3887c11.9941 9.53516 41.9434 33.5703 70.5625 56.5684
c5.12207 4.11621 12.6016 3.3457 16.7783 -1.72656z" />
<glyph glyph-name="address-book" unicode="&#xf2b9;" horiz-adv-x="448"
d="M436 288h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48
h320c26.5 0 48 -21.5 48 -48v-48h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM368 -16v416h-320v-416h320zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM118.4 64
c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002
h-179.199z" />
<glyph glyph-name="address-card" unicode="&#xf2bb;" horiz-adv-x="576"
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v352h-480v-352h480zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z
M118.4 64c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002
c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199zM360 128c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 192c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 256c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112z" />
<glyph glyph-name="user-circle" unicode="&#xf2bd;" horiz-adv-x="496"
d="M248 344c53 0 96 -43 96 -96s-43 -96 -96 -96s-96 43 -96 96s43 96 96 96zM248 200c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
c49.7002 0 95.0996 18.2998 130.1 48.4004c-14.8994 23 -40.3994 38.5 -69.5996 39.5c-20.7998 -6.5 -40.5996 -9.60059 -60.5 -9.60059s-39.7002 3.2002 -60.5 9.60059c-29.2002 -0.900391 -54.7002 -16.5 -69.5996 -39.5c35 -30.1006 80.3994 -48.4004 130.1 -48.4004z
M410.7 76.0996c23.3994 32.7002 37.2998 72.7002 37.2998 115.9c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -43.2002 13.9004 -83.2002 37.2998 -115.9c24.5 31.4004 62.2002 51.9004 105.101 51.9004c10.1992 0 26.0996 -9.59961 57.5996 -9.59961
c31.5996 0 47.4004 9.59961 57.5996 9.59961c43 0 80.7002 -20.5 105.101 -51.9004z" />
<glyph glyph-name="id-badge" unicode="&#xf2c1;" horiz-adv-x="384"
d="M336 448c26.5 0 48 -21.5 48 -48v-416c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h288zM336 -16v416h-288v-416h288zM144 336c-8.7998 0 -16 7.2002 -16 16s7.2002 16 16 16h96c8.7998 0 16 -7.2002 16 -16s-7.2002 -16 -16 -16
h-96zM192 160c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM102.4 32c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8
c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199z" />
<glyph glyph-name="id-card" unicode="&#xf2c2;" horiz-adv-x="576"
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v288h-480v-288h32.7998c-1 4.5 -0.799805 -3.59961 -0.799805 22.4004c0 31.7998 30.0996 57.5996 67.2002 57.5996
c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996c0 -26 0.0996094 -17.9004 -0.799805 -22.4004h224.8zM360 96c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16
c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 160c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 224c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM192 128c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z" />
<glyph glyph-name="window-maximize" unicode="&#xf2d0;"
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v234h-416v-234c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="window-minimize" unicode="&#xf2d1;"
d="M480 -32h-448c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32h448c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
<glyph glyph-name="window-restore" unicode="&#xf2d2;"
d="M464 448c26.5 0 48 -21.5 48 -48v-320c0 -26.5 -21.5 -48 -48 -48h-48v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v320c0 26.5 21.5 48 48 48h48v48c0 26.5 21.5 48 48 48h320zM368 -16v208h-320v-208h320zM464 80v320h-320v-48h224
c26.5 0 48 -21.5 48 -48v-224h48z" />
<glyph glyph-name="snowflake" unicode="&#xf2dc;" horiz-adv-x="448"
d="M440.1 92.7998c7.60059 -4.39941 10.1006 -14.2002 5.5 -21.7002l-7.89941 -13.8994c-4.40039 -7.7002 -14 -10.2998 -21.5 -5.90039l-39.2002 23l9.09961 -34.7002c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.5996l-15.2002 -4.09961
c-8.39941 -2.30078 -17.0996 2.7998 -19.2998 11.2998l-21.2998 81l-71.9004 42.2002v-84.5l58.2998 -59.3008c6.10059 -6.19922 6.10059 -16.3994 0 -22.5996l-11.0996 -11.2998c-6.09961 -6.2002 -16.0996 -6.2002 -22.2002 0l-24.8994 25.3994v-46.0996
c0 -8.7998 -7 -16 -15.7002 -16h-15.7002c-8.7002 0 -15.7002 7.2002 -15.7002 16v45.9004l-24.8994 -25.4004c-6.10059 -6.2002 -16.1006 -6.2002 -22.2002 0l-11.1006 11.2998c-6.09961 6.2002 -6.09961 16.4004 0 22.6006l58.3008 59.2998v84.5l-71.9004 -42.2002
l-21.2998 -81c-2.2998 -8.5 -10.9004 -13.5996 -19.2998 -11.2998l-15.2002 4.09961c-8.40039 2.2998 -13.2998 11.1006 -11.1006 19.6006l9.10059 34.6992l-39.2002 -23c-7.5 -4.39941 -17.2002 -1.7998 -21.5 5.90039l-7.90039 13.9004
c-4.2998 7.69922 -1.69922 17.5 5.80078 21.8994l39.1992 23l-34.0996 9.2998c-8.40039 2.30078 -13.2998 11.1006 -11.0996 19.6006l4.09961 15.5c2.2998 8.5 10.9004 13.5996 19.2998 11.2998l79.7002 -21.7002l71.9004 42.2002l-71.9004 42.2002l-79.7002 -21.7002
c-8.39941 -2.2998 -17.0996 2.7998 -19.2998 11.2998l-4.09961 15.5c-2.30078 8.5 2.69922 17.2998 11.0996 19.6006l34.0996 9.09961l-39.1992 23c-7.60059 4.5 -10.1006 14.2002 -5.80078 21.9004l7.90039 13.8994c4.40039 7.7002 14 10.2998 21.5 5.90039l39.2002 -23
l-9.10059 34.7002c-2.2998 8.5 2.7002 17.2998 11.1006 19.5996l15.2002 4.09961c8.39941 2.30078 17.0996 -2.7998 19.2998 -11.2998l21.2998 -81l71.9004 -42.2002v84.5l-58.3008 59.3008c-6.09961 6.19922 -6.09961 16.3994 0 22.5996l11.5 11.2998
c6.10059 6.2002 16.1006 6.2002 22.2002 0l24.9004 -25.3994v46.0996c0 8.7998 7 16 15.7002 16h15.6992c8.7002 0 15.7002 -7.2002 15.7002 -16v-45.9004l24.9004 25.4004c6.09961 6.2002 16.0996 6.2002 22.2002 0l11.0996 -11.2998
c6.09961 -6.2002 6.09961 -16.4004 0 -22.6006l-58.2998 -59.2998v-84.5l71.8994 42.2002l21.3008 81c2.2998 8.5 10.8994 13.5996 19.2998 11.2998l15.2002 -4.09961c8.39941 -2.2998 13.2998 -11.1006 11.0996 -19.6006l-9.09961 -34.6992l39.1992 23
c7.5 4.39941 17.2002 1.7998 21.5 -5.90039l7.90039 -13.9004c4.2998 -7.69922 1.7002 -17.5 -5.7998 -21.8994l-39.2002 -23l34.0996 -9.2998c8.40039 -2.30078 13.3008 -11.1006 11.1006 -19.6006l-4.10059 -15.5c-2.2998 -8.5 -10.8994 -13.5996 -19.2998 -11.2998
l-79.7002 21.7002l-71.8994 -42.2002l71.7998 -42.2002l79.7002 21.7002c8.39941 2.2998 17.0996 -2.7998 19.2998 -11.2998l4.09961 -15.5c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.6006l-34.0996 -9.2998z" />
<glyph glyph-name="trash-alt" unicode="&#xf2ed;" horiz-adv-x="448"
d="M268 32c-6.62402 0 -12 5.37598 -12 12v216c0 6.62402 5.37598 12 12 12h24c6.62402 0 12 -5.37598 12 -12v-216c0 -6.62402 -5.37598 -12 -12 -12h-24zM432 368c8.83203 0 16 -7.16797 16 -16v-16c0 -8.83203 -7.16797 -16 -16 -16h-16v-336
c0 -26.4961 -21.5039 -48 -48 -48h-288c-26.4961 0 -48 21.5039 -48 48v336h-16c-8.83203 0 -16 7.16797 -16 16v16c0 8.83203 7.16797 16 16 16h82.4102l34.0195 56.7002c7.71875 12.8613 26.1572 23.2998 41.1572 23.2998h0.00292969h100.82h0.0224609
c15 0 33.4385 -10.4385 41.1572 -23.2998l34 -56.7002h82.4102zM171.84 397.09l-17.4502 -29.0898h139.221l-17.46 29.0898c-0.96582 1.60645 -3.26953 2.91016 -5.14355 2.91016h-0.00683594h-94h-0.0166016c-1.87402 0 -4.17871 -1.30371 -5.14355 -2.91016zM368 -16v336
h-288v-336h288zM156 32c-6.62402 0 -12 5.37598 -12 12v216c0 6.62402 5.37598 12 12 12h24c6.62402 0 12 -5.37598 12 -12v-216c0 -6.62402 -5.37598 -12 -12 -12h-24z" />
<glyph glyph-name="images" unicode="&#xf302;" horiz-adv-x="576"
d="M480 32v-16c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256c0 26.5098 21.4902 48 48 48h16v-48h-10c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v10h48zM522 368h-372
c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v244c0 3.31152 -2.68848 6 -6 6zM528 416c26.5098 0 48 -21.4902 48 -48v-256c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256
c0 26.5098 21.4902 48 48 48h384zM264 304c0 -22.0908 -17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40s40 -17.9092 40 -40zM192 208l39.5146 39.5146c4.68652 4.68652 12.2842 4.68652 16.9717 0l39.5137 -39.5146l103.515 103.515
c4.68652 4.68652 12.2842 4.68652 16.9717 0l71.5137 -71.5146v-80h-288v48z" />
<glyph glyph-name="clipboard" unicode="&#xf328;" horiz-adv-x="384"
d="M336 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h80c0 35.2998 28.7002 64 64 64s64 -28.7002 64 -64h80zM192 408c-13.2998 0 -24 -10.7002 -24 -24s10.7002 -24 24 -24s24 10.7002 24 24
s-10.7002 24 -24 24zM336 -10v340c0 3.2998 -2.7002 6 -6 6h-42v-36c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v36h-42c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h276c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="arrow-alt-circle-down" unicode="&#xf358;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM224 308c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-116
h67c10.7002 0 16.0996 -12.9004 8.5 -20.5l-99 -99c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-99 99c-7.5 7.59961 -2.2002 20.5 8.5 20.5h67v116z" />
<glyph glyph-name="arrow-alt-circle-left" unicode="&#xf359;"
d="M8 192c0 137 111 248 248 248s248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248zM456 192c0 110.5 -89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200zM384 212v-40c0 -6.59961 -5.40039 -12 -12 -12h-116v-67
c0 -10.7002 -12.9004 -16 -20.5 -8.5l-99 99c-4.7002 4.7002 -4.7002 12.2998 0 17l99 99c7.59961 7.59961 20.5 2.2002 20.5 -8.5v-67h116c6.59961 0 12 -5.40039 12 -12z" />
<glyph glyph-name="arrow-alt-circle-right" unicode="&#xf35a;"
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM128 172v40c0 6.59961 5.40039 12 12 12h116v67
c0 10.7002 12.9004 16 20.5 8.5l99 -99c4.7002 -4.7002 4.7002 -12.2998 0 -17l-99 -99c-7.59961 -7.59961 -20.5 -2.2002 -20.5 8.5v67h-116c-6.59961 0 -12 5.40039 -12 12z" />
<glyph glyph-name="arrow-alt-circle-up" unicode="&#xf35b;"
d="M256 -56c-137 0 -248 111 -248 248s111 248 248 248s248 -111 248 -248s-111 -248 -248 -248zM256 392c-110.5 0 -200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200zM276 64h-40c-6.59961 0 -12 5.40039 -12 12v116h-67
c-10.7002 0 -16 12.9004 -8.5 20.5l99 99c4.7002 4.7002 12.2998 4.7002 17 0l99 -99c7.59961 -7.59961 2.2002 -20.5 -8.5 -20.5h-67v-116c0 -6.59961 -5.40039 -12 -12 -12z" />
<glyph glyph-name="gem" unicode="&#xf3a5;" horiz-adv-x="576"
d="M464 448c4.09961 0 7.7998 -2 10.0996 -5.40039l99.9004 -147.199c2.90039 -4.40039 2.59961 -10.1006 -0.700195 -14.2002l-276 -340.8c-4.7998 -5.90039 -13.7998 -5.90039 -18.5996 0l-276 340.8c-3.2998 4 -3.60059 9.7998 -0.700195 14.2002l100 147.199
c2.2002 3.40039 6 5.40039 10 5.40039h352zM444.7 400h-56.7998l51.6992 -96h68.4004zM242.6 400l-51.5996 -96h194l-51.7002 96h-90.7002zM131.3 400l-63.2998 -96h68.4004l51.6992 96h-56.7998zM88.2998 256l119.7 -160l-68.2998 160h-51.4004zM191.2 256l96.7998 -243.3
l96.7998 243.3h-193.6zM368 96l119.6 160h-51.3994z" />
<glyph glyph-name="money-bill-alt" unicode="&#xf3d1;" horiz-adv-x="640"
d="M320 304c53.0195 0 96 -50.1396 96 -112c0 -61.8701 -43 -112 -96 -112c-53.0195 0 -96 50.1504 -96 112c0 61.8604 42.9805 112 96 112zM360 136v16c0 4.41992 -3.58008 8 -8 8h-16v88c0 4.41992 -3.58008 8 -8 8h-13.5801h-0.000976562
c-4.01074 0 -9.97266 -1.80566 -13.3086 -4.03027l-15.3301 -10.2197c-1.96777 -1.30957 -3.56445 -4.29004 -3.56445 -6.65332c0 -1.33691 0.601562 -3.32422 1.34375 -4.43652l8.88086 -13.3105c1.30859 -1.9668 4.29004 -3.56445 6.65332 -3.56445
c1.33691 0 3.32422 0.602539 4.43652 1.34473l0.469727 0.310547v-55.4404h-16c-4.41992 0 -8 -3.58008 -8 -8v-16c0 -4.41992 3.58008 -8 8 -8h64c4.41992 0 8 3.58008 8 8zM608 384c17.6699 0 32 -14.3301 32 -32v-320c0 -17.6699 -14.3301 -32 -32 -32h-576
c-17.6699 0 -32 14.3301 -32 32v320c0 17.6699 14.3301 32 32 32h576zM592 112v160c-35.3496 0 -64 28.6504 -64 64h-416c0 -35.3496 -28.6504 -64 -64 -64v-160c35.3496 0 64 -28.6504 64 -64h416c0 35.3496 28.6504 64 64 64z" />
<glyph glyph-name="window-close" unicode="&#xf410;"
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v340c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z
M356.5 253.4l-61.4004 -61.4004l61.4004 -61.4004c4.59961 -4.59961 4.59961 -12.0996 0 -16.7998l-22.2998 -22.2998c-4.60059 -4.59961 -12.1006 -4.59961 -16.7998 0l-61.4004 61.4004l-61.4004 -61.4004c-4.59961 -4.59961 -12.0996 -4.59961 -16.7998 0
l-22.2998 22.2998c-4.59961 4.60059 -4.59961 12.1006 0 16.7998l61.4004 61.4004l-61.4004 61.4004c-4.59961 4.59961 -4.59961 12.0996 0 16.7998l22.2998 22.2998c4.60059 4.59961 12.1006 4.59961 16.7998 0l61.4004 -61.4004l61.4004 61.4004
c4.59961 4.59961 12.0996 4.59961 16.7998 0l22.2998 -22.2998c4.7002 -4.60059 4.7002 -12.1006 0 -16.7998z" />
<glyph glyph-name="comment-dots" unicode="&#xf4ad;"
d="M144 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM256 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM368 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32s14.2998 32 32 32zM256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5
c-3.80078 8.7998 -2 19 4.59961 26c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160
c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
<glyph glyph-name="smile-wink" unicode="&#xf4da;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM365.8 138.4c10.2002 -8.5 11.6006 -23.6006 3.10059 -33.8008
c-30 -36 -74.1006 -56.5996 -120.9 -56.5996s-90.9004 20.5996 -120.9 56.5996c-8.39941 10.2002 -7.09961 25.3008 3.10059 33.8008c10.0996 8.39941 25.2998 7.09961 33.7998 -3.10059c20.7998 -25.0996 51.5 -39.3994 84 -39.3994s63.2002 14.3994 84 39.3994
c8.5 10.2002 23.5996 11.6006 33.7998 3.10059zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 268c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008l-9.5 8.5
c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996z" />
<glyph glyph-name="angry" unicode="&#xf556;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 136c33.5996 0 65.2002 -14.7998 86.7998 -40.5996
c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008c-10.6006 -8.89941 -25.7002 -6.69922 -33.7998 3c-24.8008 29.7002 -75 29.7002 -99.8008 0c-8.5 -10.1992 -23.5996 -11.5 -33.7998 -3s-11.5996 23.6006 -3.09961 33.8008
c21.5996 25.7998 53.2002 40.5996 86.7998 40.5996zM200 208c0 -17.7002 -14.2998 -32.0996 -32 -32.0996s-32 14.2998 -32 32c0 6.19922 2.2002 11.6992 5.2998 16.5996l-28.2002 8.5c-12.6992 3.7998 -19.8994 17.2002 -16.0996 29.9004
c3.7998 12.6992 17.0996 20 29.9004 16.0996l80 -24c12.6992 -3.7998 19.8994 -17.2002 16.0996 -29.9004c-3.09961 -10.3994 -12.7002 -17.0996 -23 -17.0996zM399 262.9c3.7998 -12.7002 -3.40039 -26.1006 -16.0996 -29.8008l-28.2002 -8.5
c3.09961 -4.89941 5.2998 -10.3994 5.2998 -16.5996c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32c-10.2998 0 -19.9004 6.7002 -23 17.0996c-3.7998 12.7002 3.40039 26.1006 16.0996 29.9004l80 24c12.8008 3.7998 26.1006 -3.40039 29.9004 -16.0996z" />
<glyph glyph-name="dizzy" unicode="&#xf567;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM214.2 209.9
c-7.90039 -7.90039 -20.5 -7.90039 -28.4004 -0.200195l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998
c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.9004c7.7998 7.7998 20.5 7.7998 28.2998 0s7.7998 -20.5 0 -28.2998l-17.9004 -17.9004l17.9004 -17.7998c7.7998 -7.7998 7.7998 -20.5 0 -28.2998zM374.2 302.1
c7.7002 -7.7998 7.7002 -20.3994 0 -28.1992l-17.9004 -17.9004l17.7998 -18c7.80078 -7.7998 7.80078 -20.5 0 -28.2998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0
c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.7998c7.7998 7.80078 20.5 7.80078 28.2998 0zM248 176
c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64s-64 28.7002 -64 64s28.7002 64 64 64z" />
<glyph glyph-name="flushed" unicode="&#xf579;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM344 304c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80
s-80 35.7998 -80 80s35.7998 80 80 80zM344 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM344 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM232 224c0 -44.2002 -35.7998 -80 -80 -80
s-80 35.7998 -80 80s35.7998 80 80 80s80 -35.7998 80 -80zM152 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM152 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM312 104
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
<glyph glyph-name="frown-open" unicode="&#xf57a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32
s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 160c35.5996 0 88.7998 -21.2998 95.7998 -61.2002c2 -11.7998 -9.09961 -21.5996 -20.5 -18.0996
c-31.2002 9.59961 -59.3994 15.2998 -75.2998 15.2998s-44.0996 -5.7002 -75.2998 -15.2998c-11.5 -3.40039 -22.5 6.2998 -20.5 18.0996c7 39.9004 60.2002 61.2002 95.7998 61.2002z" />
<glyph glyph-name="grimace" unicode="&#xf57f;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM344 192c26.5 0 48 -21.5 48 -48v-32c0 -26.5 -21.5 -48 -48 -48h-192c-26.5 0 -48 21.5 -48 48v32c0 26.5 21.5 48 48 48
h192zM176 96v24h-40v-8c0 -8.7998 7.2002 -16 16 -16h24zM176 136v24h-24c-8.7998 0 -16 -7.2002 -16 -16v-8h40zM240 96v24h-48v-24h48zM240 136v24h-48v-24h48zM304 96v24h-48v-24h48zM304 136v24h-48v-24h48zM360 112v8h-40v-24h24c8.7998 0 16 7.2002 16 16zM360 136v8
c0 8.7998 -7.2002 16 -16 16h-24v-24h40z" />
<glyph glyph-name="grin" unicode="&#xf580;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
<glyph glyph-name="grin-alt" unicode="&#xf581;" horiz-adv-x="496"
d="M200.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56
c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM328.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0
c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200
s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006
s79.7002 4.7998 105.6 13.1006z" />
<glyph glyph-name="grin-beam" unicode="&#xf582;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM117.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996
l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002zM277.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998
c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002z" />
<glyph glyph-name="grin-beam-sweat" unicode="&#xf583;" horiz-adv-x="496"
d="M440 288c-29.5 0 -53.2998 26.2998 -53.2998 58.7002c0 25 31.7002 75.5 46.2002 97.2998c3.5 5.2998 10.5996 5.2998 14.1992 0c14.5 -21.7998 46.2002 -72.2998 46.2002 -97.2998c0 -32.4004 -23.7998 -58.7002 -53.2998 -58.7002zM248 48
c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM378.3 216.3
c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM483.6 269.2c8 -24.2998 12.4004 -50.2002 12.4004 -77.2002c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248
c45.7002 0 88.4004 -12.5996 125.2 -34.2002c-10.9004 -21.5996 -15.5 -36.2002 -17.2002 -45.7002c-31.2002 20.1006 -68.2002 31.9004 -108 31.9004c-110.3 0 -200 -89.7002 -200 -200s89.7002 -200 200 -200s200 89.7002 200 200
c0 22.5 -3.90039 44.0996 -10.7998 64.2998c0.399414 0 21.7998 -2.7998 46.3994 12.9004zM168 258.6c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
<glyph glyph-name="grin-hearts" unicode="&#xf584;" horiz-adv-x="496"
d="M353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM200.8 192.3
l-70.2002 18.1006c-20.3994 5.2998 -31.8994 27 -24.1992 47.1992c6.69922 17.7002 26.6992 26.7002 44.8994 22l7.10059 -1.89941l2 7.09961c5.09961 18.1006 22.8994 30.9004 41.5 27.9004c21.3994 -3.40039 34.3994 -24.2002 28.7998 -44.5l-19.4004 -69.9004
c-1.2998 -4.5 -6 -7.2002 -10.5 -6zM389.6 257.6c7.7002 -20.1992 -3.7998 -41.7998 -24.1992 -47.0996l-70.2002 -18.2002c-4.60059 -1.2002 -9.2998 1.5 -10.5 6l-19.4004 69.9004c-5.59961 20.2998 7.40039 41.0996 28.7998 44.5c18.7002 3 36.5 -9.7998 41.5 -27.9004
l2 -7.09961l7.10059 1.89941c18.2002 4.7002 38.2002 -4.39941 44.8994 -22zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200
s89.7002 -200 200 -200z" />
<glyph glyph-name="grin-squint" unicode="&#xf585;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM118.9 184.2c-3.80078 4.39941 -3.90039 11 -0.100586 15.5l33.6006 40.2998
l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5c3.89941 4.40039 10.1992 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5zM361.8 181.7
l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5.10059 2.90039 11.5 1.90039 15.2998 -2.5c3.80078 -4.5 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5
c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5z" />
<glyph glyph-name="grin-squint-tears" unicode="&#xf586;"
d="M117.1 63.9004c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998
c16.8994 16.9004 75.0996 26.9004 100.899 30.6006zM75.9004 105.6c-19.6006 -3.89941 -35.1006 -8.09961 -47.3008 -12.1992c-39.2998 90.5996 -22.0996 199.899 52 274c48.5 48.3994 111.9 72.5996 175.4 72.5996c38.9004 0 77.7998 -9.2002 113.2 -27.4004
c-4 -12.1992 -8.2002 -28 -12 -48.2998c-30.4004 17.9004 -65 27.7002 -101.2 27.7002c-53.4004 0 -103.6 -20.7998 -141.4 -58.5996c-61.5996 -61.5 -74.2998 -153.4 -38.6992 -227.801zM428.2 293.2c20.2998 3.89941 36.2002 8 48.5 12
c47.8994 -93.2002 32.8994 -210.5 -45.2002 -288.601c-48.5 -48.3994 -111.9 -72.5996 -175.4 -72.5996c-33.6992 0 -67.2998 7 -98.6992 20.5996c4.19922 12.2002 8.2998 27.7002 12.1992 47.2002c26.6006 -12.7998 55.9004 -19.7998 86.4004 -19.7998
c53.4004 0 103.6 20.7998 141.4 58.5996c65.6992 65.7002 75.7998 166 30.7998 242.601zM394.9 320.1c-6.30078 -0.899414 -11.7002 4.5 -10.9004 10.9004c3.7002 25.7998 13.7002 84 30.5996 100.9c22 21.8994 57.9004 21.5 80.3008 -0.900391
c22.3994 -22.4004 22.7998 -58.4004 0.899414 -80.2998c-16.8994 -16.9004 -75.0996 -26.9004 -100.899 -30.6006zM207.9 211.8c3 -3 4.19922 -7.2998 3.19922 -11.5l-22.5996 -90.5c-1.40039 -5.39941 -6.2002 -9.09961 -11.7002 -9.09961h-0.899414
c-5.80078 0.5 -10.5 5.09961 -11 10.8994l-4.80078 52.3008l-52.2998 4.7998c-5.7998 0.5 -10.3994 5.2002 -10.8994 11c-0.400391 5.89941 3.39941 11.2002 9.09961 12.5996l90.5 22.7002c4.2002 1 8.40039 -0.200195 11.4004 -3.2002zM247.6 236.9
c-0.0996094 0 -6.39941 -1.80078 -11.3994 3.19922c-3 3 -4.2002 7.30078 -3.2002 11.4004l22.5996 90.5c1.40039 5.7002 7 9.2002 12.6006 9.09961c5.7998 -0.5 10.5 -5.09961 11 -10.8994l4.7998 -52.2998l52.2998 -4.80078c5.7998 -0.5 10.4004 -5.19922 10.9004 -11
c0.399414 -5.89941 -3.40039 -11.1992 -9.10059 -12.5996zM299.6 148.4c29.1006 29.0996 53 59.5996 65.3008 83.7998c4.89941 9.2998 17.5996 9.89941 23.3994 1.7002c27.7002 -38.9004 6.10059 -106.9 -30.5996 -143.7s-104.8 -58.2998 -143.7 -30.6006
c-8.2998 5.90039 -7.5 18.6006 1.7002 23.4004c24.2002 12.5 54.7998 36.2998 83.8994 65.4004z" />
<glyph glyph-name="grin-stars" unicode="&#xf587;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM125.7 200.9l6.09961 34.8994l-25.3994 24.6006
c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006l34.9004 -5c6.19922 -1 8.7998 -8.69922 4.2998 -13.1992l-25.4004 -24.6006l6 -34.8994c1 -6.2002 -5.39941 -11 -11 -7.90039
l-31.2998 16.2998l-31.2998 -16.2998c-5.60059 -3.09961 -12 1.7002 -11 7.90039zM385.4 273.6c6.19922 -1 8.89941 -8.59961 4.39941 -13.1992l-25.3994 -24.6006l6 -34.8994c1 -6.2002 -5.40039 -11 -11 -7.90039l-31.3008 16.2998l-31.2998 -16.2998
c-5.59961 -3.09961 -12 1.7002 -11 7.90039l6 34.8994l-25.3994 24.6006c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006z" />
<glyph glyph-name="grin-tears" unicode="&#xf588;" horiz-adv-x="640"
d="M117.1 191.9c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998c16.8994 16.9004 75.0996 26.9004 100.899 30.6006
zM623.8 161.3c21.9004 -21.8994 21.5 -57.8994 -0.799805 -80.2002c-22.4004 -22.3994 -58.4004 -22.7998 -80.2998 -0.899414c-16.9004 16.8994 -26.9004 75.0996 -30.6006 100.899c-0.899414 6.30078 4.5 11.7002 10.8008 10.8008
c25.7998 -3.7002 84 -13.7002 100.899 -30.6006zM497.2 99.5996c12.3994 -37.2998 25.0996 -43.7998 28.2998 -46.5c-44.5996 -65.7998 -120 -109.1 -205.5 -109.1s-160.9 43.2998 -205.5 109.1c3.09961 2.60059 15.7998 9.10059 28.2998 46.5
c33.4004 -63.8994 100.3 -107.6 177.2 -107.6s143.8 43.7002 177.2 107.6zM122.7 223.5c-2.40039 0.299805 -5 2.5 -49.5 -6.90039c12.3994 125.4 118.1 223.4 246.8 223.4s234.4 -98 246.8 -223.5c-44.2998 9.40039 -47.3994 7.2002 -49.5 7
c-15.2002 95.2998 -97.7998 168.5 -197.3 168.5s-182.1 -73.2002 -197.3 -168.5zM320 48c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996
c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM450.3 216.3c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM240 258.6
c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
<glyph glyph-name="grin-tongue" unicode="&#xf589;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32
s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="grin-tongue-squint" unicode="&#xf58a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998
l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 3 11.5 1.90039 15.2998 -2.5zM214.2 250.3
c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5
c3.89941 4.5 10.2998 5.5 15.2998 2.5z" />
<glyph glyph-name="grin-tongue-wink" unicode="&#xf58b;" horiz-adv-x="496"
d="M152 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
c-3.7998 -3.39941 -9.2998 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM328 320c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80s-80 35.7998 -80 80s35.7998 80 80 80zM328 192
c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM328 264c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248z
M312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998
c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3
c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998
c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998z" />
<glyph glyph-name="grin-wink" unicode="&#xf58c;" horiz-adv-x="496"
d="M328 268c25.6904 0 55.8799 -16.9199 59.8701 -42.1201c1.72949 -11.0898 -11.3506 -18.2695 -19.8301 -10.8398l-9.5498 8.47949c-14.8105 13.1904 -46.1602 13.1904 -60.9707 0l-9.5498 -8.47949c-8.33008 -7.40039 -21.5801 -0.379883 -19.8301 10.8398
c3.98047 25.2002 34.1699 42.1201 59.8604 42.1201zM168 208c-17.6699 0 -32 14.3301 -32 32s14.3301 32 32 32s32 -14.3301 32 -32s-14.3301 -32 -32 -32zM353.55 143.36c10.04 3.13965 19.3906 -5.4502 17.71 -15.3408
c-7.92969 -47.1494 -71.3193 -80.0195 -123.26 -80.0195s-115.33 32.8701 -123.26 80.0195c-1.69043 9.9707 7.76953 18.4707 17.71 15.3408c25.9297 -8.31055 64.3994 -13.0605 105.55 -13.0605s79.6201 4.75977 105.55 13.0605zM248 440c136.97 0 248 -111.03 248 -248
s-111.03 -248 -248 -248s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
<glyph glyph-name="kiss" unicode="&#xf596;" horiz-adv-x="496"
d="M168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM248 440c137 0 248 -111 248 -248
s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z
" />
<glyph glyph-name="kiss-beam" unicode="&#xf597;" horiz-adv-x="496"
d="M168 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM328 296
c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
<glyph glyph-name="kiss-wink-heart" unicode="&#xf598;" horiz-adv-x="504"
d="M304 139.5c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002
c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM374.5 223c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-2.5 -2.2998 -7.90039 -4.7002 -13.7002 -1.59961c-4.39941 2.39941 -6.89941 7.39941 -6.09961 12.3994
c3.89941 25.2002 34.2002 42.1006 59.7998 42.1006s55.7998 -16.9004 59.7998 -42.1006c0.799805 -5 -1.7002 -10 -6.09961 -12.3994c-4.40039 -2.40039 -9.90039 -1.7002 -13.7002 1.59961zM136 239.5c0 17.7002 14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32zM501.1 45.5c9.2002 -23.9004 -4.39941 -49.4004 -28.5 -55.7002l-83 -21.5c-5.39941 -1.39941 -10.8994 1.7998 -12.3994 7.10059l-22.9004 82.5996c-6.59961 24 8.7998 48.5996 34 52.5996c22 3.5 43.1006 -11.5996 49 -33l2.2998 -8.39941
l8.40039 2.2002c21.5996 5.59961 45.0996 -5.10059 53.0996 -25.9004zM334 11.7002c17.7002 -64 10.9004 -39.5 13.4004 -46.7998c-30.5 -13.4004 -64 -20.9004 -99.4004 -20.9004c-137 0 -248 111 -248 248s111 248 248 248s248 -111 247.9 -248
c0 -31.7998 -6.2002 -62.0996 -17.1006 -90c-6 1.5 -12.2002 2.7998 -18.5996 2.90039c-5.60059 9.69922 -13.6006 17.5 -22.6006 23.8994c6.7002 19.9004 10.4004 41.1006 10.4004 63.2002c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200
c30.7998 0 59.9004 7.2002 86 19.7002z" />
<glyph glyph-name="laugh" unicode="&#xf599;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM168 224
c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-beam" unicode="&#xf59a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.700195 -8.5 -10.7998 -11.8994 -14.8994 -4.5
l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006c-12.3008 0 -23.8008 -7.90039 -31.5 -21.6006l-9.5 -17c-4.10059 -7.39941 -15.6006 -4.09961 -14.9004 4.5c3.2998 42.1006 32.2002 71.4004 56 71.4004zM127 220.1c-4.2002 -7.39941 -15.7002 -4 -15.0996 4.5
c3.2998 42.1006 32.1992 71.4004 56 71.4004c23.7998 0 52.6992 -29.2998 56 -71.4004c0.699219 -8.5 -10.8008 -11.8994 -14.9004 -4.5l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006s-23.7998 -7.90039 -31.5 -21.6006zM362.4 160c8.19922 0 14.5 -7 13.5 -15
c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-squint" unicode="&#xf59b;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM343.6 252l33.6006 -40.2998c8.59961 -10.4004 -3.90039 -24.7998 -15.4004 -18l-80 48
c-7.7998 4.7002 -7.7998 15.8994 0 20.5996l80 48c11.6006 6.7998 24 -7.7002 15.4004 -18zM134.2 193.7c-11.6006 -6.7998 -24.1006 7.59961 -15.4004 18l33.6006 40.2998l-33.6006 40.2998c-8.59961 10.2998 3.7998 24.9004 15.4004 18l80 -48
c7.7998 -4.7002 7.7998 -15.8994 0 -20.5996zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-wink" unicode="&#xf59c;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 284c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008
l-9.5 8.5c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996zM168 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z
M362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="meh-blank" unicode="&#xf5a4;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="meh-rolling-eyes" unicode="&#xf5a5;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM336 296c39.7998 0 72 -32.2002 72 -72s-32.2002 -72 -72 -72
s-72 32.2002 -72 72s32.2002 72 72 72zM336 184c22.0996 0 40 17.9004 40 40c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998
c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998c0 -22.0996 17.9004 -40 40 -40zM232 224c0 -39.7998 -32.2002 -72 -72 -72s-72 32.2002 -72 72s32.2002 72 72 72s72 -32.2002 72 -72zM120 224c0 -22.0996 17.9004 -40 40 -40s40 17.9004 40 40
c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998zM312 96
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
<glyph glyph-name="sad-cry" unicode="&#xf5b3;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM392 53.5996c34.5996 35.9004 56 84.7002 56 138.4c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -53.7002 21.4004 -102.4 56 -138.4v114.4
c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-151.4c28.5 -15.5996 61.2002 -24.5996 96 -24.5996s67.5 9 96 24.5996v151.4c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-114.4zM205.8 213.5c-5.7998 -3.2002 -11.2002 -0.700195 -13.7002 1.59961l-9.5 8.5
c-14.7998 13.2002 -46.1992 13.2002 -61 0l-9.5 -8.5c-3.7998 -3.39941 -9.2998 -4 -13.6992 -1.59961c-4.40039 2.40039 -6.90039 7.40039 -6.10059 12.4004c3.90039 25.1992 34.2002 42.0996 59.7998 42.0996c25.6006 0 55.8008 -16.9004 59.8008 -42.0996
c0.799805 -5 -1.7002 -10 -6.10059 -12.4004zM344 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
c-3.7998 -3.39941 -9.2002 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM248 176c30.9004 0 56 -28.7002 56 -64s-25.0996 -64 -56 -64s-56 28.7002 -56 64s25.0996 64 56 64z" />
<glyph glyph-name="sad-tear" unicode="&#xf5b4;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM256 144c38.0996 0 74 -16.7998 98.5 -46.0996
c8.5 -10.2002 7.09961 -25.3008 -3.09961 -33.8008c-10.6006 -8.7998 -25.7002 -6.69922 -33.8008 3.10059c-15.2998 18.2998 -37.7998 28.7998 -61.5996 28.7998c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM162.4 173.2c2.7998 3.7002 8.39941 3.7002 11.1992 0c11.4004 -15.2998 36.4004 -50.6006 36.4004 -68.1006
c0 -22.6992 -18.7998 -41.0996 -42 -41.0996s-42 18.4004 -42 41.0996c0 17.5 25 52.8008 36.4004 68.1006z" />
<glyph glyph-name="smile-beam" unicode="&#xf5b8;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM332 135.4c8.5 10.1992 23.5996 11.5 33.7998 3.09961
c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.2002 8.40039 25.2998 7.09961 33.7998 -3.09961
c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004zM136.5 237l-9.5 -17c-1.90039 -3.2002 -5.90039 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996zM328 296c23.7998 0 52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002
c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
<glyph glyph-name="surprise" unicode="&#xf5c2;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 168c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64
s-64 28.7002 -64 64s28.7002 64 64 64zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="tired" unicode="&#xf5c8;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5
l-33.6006 -40.2998l33.6006 -40.2998c3.7998 -4.5 3.7002 -11 -0.100586 -15.5c-3.5 -4.10059 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 2.90039 11.5 1.90039 15.2998 -2.5z
M220 240c0 -4.2002 -2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7998 -1.60059 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7998 4.5 -3.7002 11 0.100586 15.5
c3.7998 4.40039 10.2998 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998zM248 176c45.4004 0 100.9 -38.2998 107.8 -93.2998c1.5 -11.9004 -7 -21.6006 -15.5 -17.9004c-22.7002 9.7002 -56.2998 15.2002 -92.2998 15.2002
s-69.5996 -5.5 -92.2998 -15.2002c-8.60059 -3.7002 -17 6.10059 -15.5 17.9004c6.89941 55 62.3994 93.2998 107.8 93.2998z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
+76
View File
@@ -0,0 +1,76 @@
(function (factory) {
"use strict";
var sortable,
jq,
_this = this
;
if (typeof define === "function" && define.amd) {
try {
define(["sortablejs", "jquery"], function(Sortable, $) {
sortable = Sortable;
jq = $;
checkErrors();
factory(Sortable, $);
});
} catch(err) {
checkErrors();
}
return;
} else if (typeof exports === 'object') {
try {
sortable = require('sortablejs');
jq = require('jquery');
} catch(err) { }
}
if (typeof jQuery === 'function' || typeof $ === 'function') {
jq = jQuery || $;
}
if (typeof Sortable !== 'undefined') {
sortable = Sortable;
}
function checkErrors() {
if (!jq) {
throw new Error('jQuery is required for jquery-sortablejs');
}
if (!sortable) {
throw new Error('SortableJS is required for jquery-sortablejs (https://github.com/SortableJS/Sortable)');
}
}
checkErrors();
factory(sortable, jq);
})(function (Sortable, $) {
"use strict";
$.fn.sortable = function (options) {
var retVal,
args = arguments;
this.each(function () {
var $el = $(this),
sortable = $el.data('sortable');
if (!sortable && (options instanceof Object || !options)) {
sortable = new Sortable(this, options);
$el.data('sortable', sortable);
} else if (sortable) {
if (options === 'destroy') {
sortable.destroy();
$el.removeData('sortable');
} else if (options === 'widget') {
retVal = sortable;
} else if (typeof sortable[options] === 'function') {
retVal = sortable[options].apply(sortable, [].slice.call(args, 1));
} else if (options in sortable.options) {
retVal = sortable.option.apply(sortable, args);
}
}
});
return (retVal === void 0) ? this : retVal;
};
});
+28
View File
@@ -0,0 +1,28 @@
/**
* @author Script47 (https://github.com/Script47/Toast)
* @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component
* @version 0.7.1
**/
.toast-container {
position: sticky;
z-index: 1055;
top: 0
}
.toast-wrapper {
position: absolute;
z-index: 1055;
top: 0;
right: 0;
margin: 5px
}
.toast-container>.toast-wrapper>.toast {
min-width: 150px;
background-color: rgb(50, 50, 50);
border-top: none;
}
.toast-container>.toast-wrapper>.toast>.toast-header strong {
padding-right: 20px;
}
+136
View File
@@ -0,0 +1,136 @@
/**
* @author Script47 (https://github.com/Script47/Toast)
* @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component
* @version 0.7.1
**/
(function ($) {
var TOAST_CONTAINER_HTML = '<div class="toast-container" aria-live="polite" aria-atomic="true"></div>';
var TOAST_WRAPPER_HTML = '<div class="toast-wrapper"></div>';
$.toast = function (opts) {
// If container is not set in opts use body
var general_container = $('body');
if (opts.container && opts.container.length === 1)
general_container = opts.container;
// if toast container and wrapper are not present in container create them
if (!general_container.children('.toast-container').length) {
general_container.prepend(TOAST_CONTAINER_HTML);
general_container.children('.toast-container').append(TOAST_WRAPPER_HTML);
general_container.on('hidden.bs.toast', '.toast', function () {
$(this).remove();
});
}
var toast_wrapper = general_container.children('.toast-container').children('.toast-wrapper');
var id = 'toast-' + ($('.toast').length + 1),
html = '',
bg_header_class = '',
fg_header_class = '',
fg_subtitle_class = 'text-muted',
fg_dismiss_class = '',
title = opts.title || 'Notice!',
subtitle = opts.subtitle || '',
content = opts.content || '',
type = opts.type || 'info',
delay = opts.delay || -1,
img = opts.img,
pause_on_hover = opts.pause_on_hover || false,
pause = false,
delay_or_autohide = '';
switch (type) {
case 'info':
bg_header_class = 'bg-info';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'success':
bg_header_class = 'bg-success';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'warning':
case 'warn':
bg_header_class = 'bg-warning';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'error':
case 'danger':
bg_header_class = 'bg-danger';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
}
if (pause_on_hover !== false) {
var hide_timestamp = Math.floor(Date.now() / 1000) + (delay / 1000);
delay_or_autohide = 'data-autohide="false"';
pause_on_hover = 'data-hide-timestamp="' + hide_timestamp + '"';
} else {
if (delay === -1) {
delay_or_autohide = 'data-autohide="false"';
} else {
delay_or_autohide = 'data-delay="' + delay + '"';
}
}
html = '<div id="' + id + '" class="toast" role="alert" aria-live="assertive" aria-atomic="true" ' + delay_or_autohide + ' ' + pause_on_hover + '>';
html += '<div class="toast-header ' + bg_header_class + ' ' + fg_header_class + '">';
if (typeof img !== 'undefined') {
html += '<img src="' + img.src + '" class="' + (img.class || '') + ' mr-2" alt="' + (img.alt || 'Image') + '" ' + (typeof img.title !== 'undefined' ? 'data-toggle="tooltip" title="' + img.title + '"' : '') + '>';
}
html += '<strong class="mr-auto">' + title + '</strong>';
html += '<small class="' + fg_subtitle_class + '">' + subtitle + '</small>';
html += '<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">';
html += '<span aria-hidden="true" class="' + fg_dismiss_class + '">&times;</span>';
html += '</button>';
html += '</div>';
if (content !== '') {
html += '<div class="toast-body">'
html += content
html += '</div>';
}
html += '</div>';
toast_wrapper.append(html);
toast_wrapper.find('.toast:last').toast('show');
if (pause_on_hover !== false) {
setTimeout(function () {
if (!pause) {
$('#' + id).toast('hide');
}
}, delay);
$(document).on('mouseover', '#' + id, function () {
pause = true;
});
$(document).on('mouseleave', '#' + id, function () {
var current = Math.floor(Date.now() / 1000),
future = parseInt($(this).data('hide-timestamp'));
pause = false;
if (current >= future) {
$(this).toast('hide');
}
});
}
}
}(jQuery));
+59 -53
View File
@@ -1,55 +1,56 @@
<?php
namespace sammo;
define('ROOT', realpath(__DIR__.'/..'));
define('ROOT', realpath(__DIR__ . '/..'));
setlocale(LC_ALL, 'ko_KR.UTF-8');
date_default_timezone_set('Asia/Seoul');
mb_internal_encoding("UTF-8");
mb_http_output('UTF-8');
mb_regex_encoding('UTF-8');
mb_regex_encoding('UTF-8');
ini_set("session.cache_expire", 10080); // minutes
ini_set("session.gc_maxlifetime", 604800); // seconds
ini_set("session.cache_expire", '10080'); // minutes
ini_set("session.gc_maxlifetime", '604800'); // seconds
function getFriendlyErrorType($type)
{
switch($type)
{
function getFriendlyErrorType($type)
{
switch ($type) {
case E_ERROR: // 1 //
return 'E_ERROR';
return 'E_ERROR';
case E_WARNING: // 2 //
return 'E_WARNING';
return 'E_WARNING';
case E_PARSE: // 4 //
return 'E_PARSE';
return 'E_PARSE';
case E_NOTICE: // 8 //
return 'E_NOTICE';
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
return 'E_STRICT';
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "{$type}";
return 'E_USER_DEPRECATED';
}
return "{$type}";
}
function getExceptionTraceAsString($exception) {
function getExceptionTraceAsString($exception)
{
//https://gist.github.com/abtris/1437966
$rtn = "";
$count = 0;
@@ -73,75 +74,80 @@ function getExceptionTraceAsString($exception) {
$args[] = get_resource_type($arg);
} else {
$args[] = $arg;
}
}
}
}
$args = join(", ", $args);
}
$rtn[] = sprintf( "#%s %s:%s %s(%s)",
$count,
isset($frame['file']) ? $frame['file'] : 'unknown file',
isset($frame['line']) ? $frame['line'] : 'unknown line',
(isset($frame['class'])) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'],
$args );
$rtn[] = sprintf(
"#%s %s:%s %s(%s)",
$count,
isset($frame['file']) ? $frame['file'] : 'unknown file',
isset($frame['line']) ? $frame['line'] : 'unknown line',
(isset($frame['class'])) ? $frame['class'] . $frame['type'] . $frame['function'] : $frame['function'],
$args
);
$count++;
}
return $rtn;
}
function logError(string $err, string $errstr, string $errpath, array $trace){
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
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){
$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.')';
if ($session->isLoggedIn(true)) {
$owner .= '(' . $session->getUserID() . ',' . $session->userName . ')';
}
$fdb->insert('err_log', [
'date'=>$date,
'err'=>$err,
'errstr'=>$errstr,
'errpath'=>$errpath,
'trace'=>Json::encode($trace),
'webuser'=>$owner
'date' => $date,
'err' => $err,
'errstr' => $errstr,
'errpath' => $errpath,
'trace' => Json::encode($trace),
'webuser' => $owner
]);
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
{
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
// through to the standard PHP error handler
return false;
}
$e = new \Exception();
logError(
getFriendlyErrorType($errno),
$errstr,
$errfile.':'.$errline,
$errfile . ':' . $errline,
getExceptionTraceAsString($e)
);
}
set_error_handler("\sammo\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e){
function logExceptionByCustomHandler(\Throwable $e)
{
logError(
get_class($e),
$e->getMessage(),
$e->getFile().':'.$e->getLine(),
$e->getFile() . ':' . $e->getLine(),
getExceptionTraceAsString($e)
);
echo $e->getTraceAsString();
throw $e;
}
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
+33 -32
View File
@@ -1,33 +1,34 @@
<?php
namespace sammo;
require(__DIR__.'/../vendor/autoload.php');
require(__DIR__ . '/../vendor/autoload.php');
session_start();
session_destroy();
$username = mb_strtolower(Util::getReq('username'), 'utf-8');
$password = Util::getReq('password', 'string');
$nickname = Util::getReq('nickname');
$username = mb_strtolower(Util::getPost('username'), 'utf-8');
$password = Util::getPost('password', 'string');
$nickname = Util::getPost('nickname');
if(!$username || !$password || !$nickname){
if (!$username || !$password || !$nickname) {
Json::die([
'result'=>false,
'reason'=>'입력값이 설정되지 않았습니다.'
'result' => false,
'reason' => '입력값이 설정되지 않았습니다.'
]);
}
if(strlen((string)$password)!=128){
if (strlen((string) $password) != 128) {
Json::die([
'result'=>false,
'reason'=>'올바르지 않은 비밀번호 해시 포맷입니다.'
'result' => false,
'reason' => '올바르지 않은 비밀번호 해시 포맷입니다.'
]);
}
if(!class_exists('\\sammo\\RootDB')){
if (!class_exists('\\sammo\\RootDB')) {
Json::die([
'result'=>false,
'reason'=>'DB 설정이 완료되지 않았습니다.'
'result' => false,
'reason' => 'DB 설정이 완료되지 않았습니다.'
]);
}
@@ -37,10 +38,10 @@ $rootDB = RootDB::db();
$rootDB->query('LOCK TABLES member WRITE, member_log WRITE');
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
if($memberCnt > 0){
if ($memberCnt > 0) {
Json::die([
'result'=>'false',
'reason'=>'이미 계정이 생성되어 있습니다'
'result' => 'false',
'reason' => '이미 계정이 생성되어 있습니다'
]);
}
@@ -48,32 +49,32 @@ $userSalt = bin2hex(random_bytes(8));
$finalPassword = Util::hashPassword($userSalt, $password);
$nowDate = TimeUtil::now();
$rootDB->insert('member',[
$rootDB->insert('member', [
'oauth_type' => 'NONE',
'id' => $username,
'email' => null,
'token_valid_until'=>'2999-01-01 00:00:00',
'token_valid_until' => '2999-01-01 00:00:00',
'pw' => $finalPassword,
'salt' => $userSalt,
'grade'=> 6,
'name'=>$nickname,
'reg_date'=>$nowDate
'grade' => 6,
'name' => $nickname,
'reg_date' => $nowDate
]);
$userID = $rootDB->insertId();
$rootDB->insert('member_log', [
'member_no'=>$userID,
'date'=>$nowDate,
'action_type'=>'reg',
'action'=>Json::encode([
'type'=>'none',
'aux'=>'admin',
'id'=>$username,
'name'=>$nickname
'member_no' => $userID,
'date' => $nowDate,
'action_type' => 'reg',
'action' => Json::encode([
'type' => 'none',
'aux' => 'admin',
'id' => $username,
'name' => $nickname
])
]);
Json::die([
'result'=>true,
'reason'=>'success'
]);
'result' => true,
'reason' => 'success'
]);
+13 -12
View File
@@ -1,38 +1,39 @@
<?php
namespace sammo;
require(__DIR__.'/../vendor/autoload.php');
require(__DIR__ . '/../vendor/autoload.php');
if(!class_exists('\\sammo\\RootDB')){
if (!class_exists('\\sammo\\RootDB')) {
Json::die([
'step'=>'config'
'step' => 'config'
]);
}
$rootDB = RootDB::db();
$rootDB->throw_exception_on_nonsql_error = false;
$rootDB->nonsql_error_handler = function($params){
$rootDB->nonsql_error_handler = function ($params) {
Json::die([
'step'=>'conn_fail'
'step' => 'conn_fail'
]);
};
$rootDB->error_handler = function($params){
$rootDB->error_handler = function ($params) {
Json::die([
'step'=>'sql_fail'
'step' => 'sql_fail'
]);
};
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
if($memberCnt == 0){
if ($memberCnt == 0) {
Json::die([
'step'=>'admin',
'globalSalt'=>RootDB::getGlobalSalt()
'step' => 'admin',
'globalSalt' => RootDB::getGlobalSalt()
]);
}
Json::die([
'step'=>'done'
]);
'step' => 'done'
]);
+113 -111
View File
@@ -1,88 +1,90 @@
<?php
namespace sammo;
require(__DIR__.'/../vendor/autoload.php');
require(__DIR__ . '/../vendor/autoload.php');
$host = Util::getReq('db_host');
$port = Util::getReq('db_port', 'int');
$username = Util::getReq('db_id');
$password = Util::getReq('db_pw');
$dbName = Util::getReq('db_name');
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
$imageRequestKey = Util::getReq('image_request_key');
$host = Util::getPost('db_host');
$port = Util::getPost('db_port', 'int');
$username = Util::getPost('db_id');
$password = Util::getPost('db_pw');
$dbName = Util::getPost('db_name');
$servHost = Util::getPost('serv_host');
$sharedIconPath = Util::getPost('shared_icon_path');
$gameImagePath = Util::getPost('game_image_path');
$imageRequestKey = Util::getPost('image_request_key');
$kakaoRESTKey = Util::getReq('kakao_rest_key', 'string', '');
$kakaoAdminKey = Util::getReq('kakao_admin_key', 'string', '');
$kakaoRESTKey = Util::getPost('kakao_rest_key', 'string', '');
$kakaoAdminKey = Util::getPost('kakao_admin_key', 'string', '');
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
Json::die([
'result'=>false,
'reason'=>'입력 값이 올바르지 않습니다'
'result' => false,
'reason' => '입력 값이 올바르지 않습니다'
]);
}
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
Json::die([
'result'=>false,
'reason'=>'접속 경로가 올바르지 않습니다.'
'result' => false,
'reason' => '접속 경로가 올바르지 않습니다.'
]);
}
if (file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')) {
if (file_exists(ROOT . '/d_setting/RootDB.php') && is_dir(ROOT . '/d_setting/RootDB.php')) {
Json::die([
'result'=>false,
'reason'=>'d_setting/RootDB.php 가 디렉토리입니다'
'result' => false,
'reason' => 'd_setting/RootDB.php 가 디렉토리입니다'
]);
}
if (class_exists('\\sammo\\RootDB')) {
Json::die([
'result'=>false,
'reason'=>'이미 RootDB.php 파일이 있습니다'
'result' => false,
'reason' => '이미 RootDB.php 파일이 있습니다'
]);
}
//파일 권한 검사
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
Json::die([
'result'=>false,
'reason'=>AppConf::$userIconPath.' 이 디렉토리가 아닙니다'
'result' => false,
'reason' => AppConf::$userIconPath . ' 이 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')) {
if (file_exists(ROOT . '/d_log') && !is_dir(ROOT . '/d_log')) {
Json::die([
'result'=>false,
'reason'=>'d_log 가 디렉토리가 아닙니다'
'result' => false,
'reason' => 'd_log 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')) {
if (file_exists(ROOT . '/d_shared') && !is_dir(ROOT . '/d_shared')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 가 디렉토리가 아닙니다'
'result' => false,
'reason' => 'd_shared 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_setting') && !is_dir(ROOT.'/d_setting')) {
if (file_exists(ROOT . '/d_setting') && !is_dir(ROOT . '/d_setting')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 가 디렉토리가 아닙니다'
'result' => false,
'reason' => 'd_shared 가 디렉토리가 아닙니다'
]);
}
if (!file_exists(ROOT.'/d_log')
|| !file_exists(ROOT.'/d_shared')
|| !file_exists(ROOT.'/d_setting')
if (
!file_exists(ROOT . '/d_log')
|| !file_exists(ROOT . '/d_shared')
|| !file_exists(ROOT . '/d_setting')
|| !file_exists(AppConf::getUserIconPathFS())
) {
if (!is_writable(ROOT)) {
Json::die([
'result'=>false,
'reason'=>'하위 디렉토리 생성 권한이 없습니다'
'result' => false,
'reason' => '하위 디렉토리 생성 권한이 없습니다'
]);
}
@@ -91,56 +93,56 @@ if (!file_exists(ROOT.'/d_log')
mkdir(AppConf::getUserIconPathFS());
}
if (!file_exists(ROOT.'/d_log')) {
mkdir(ROOT.'/d_log');
if (!file_exists(ROOT . '/d_log')) {
mkdir(ROOT . '/d_log');
}
if (!file_exists(ROOT.'/d_setting')) {
mkdir(ROOT.'/d_setting');
if (!file_exists(ROOT . '/d_setting')) {
mkdir(ROOT . '/d_setting');
}
if (!file_exists(ROOT.'/d_shared')) {
mkdir(ROOT.'/d_shared');
if (!file_exists(ROOT . '/d_shared')) {
mkdir(ROOT . '/d_shared');
}
}
if (!is_writable(AppConf::getUserIconPathFS())) {
Json::die([
'result'=>false,
'reason'=>AppConf::$userIconPath.' 디렉토리의 쓰기 권한이 없습니다'
'result' => false,
'reason' => AppConf::$userIconPath . ' 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_log')) {
if (!is_writable(ROOT . '/d_log')) {
Json::die([
'result'=>false,
'reason'=>'d_log 디렉토리의 쓰기 권한이 없습니다'
'result' => false,
'reason' => 'd_log 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_shared')) {
if (!is_writable(ROOT . '/d_shared')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 디렉토리의 쓰기 권한이 없습니다'
'result' => false,
'reason' => 'd_shared 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_setting')) {
if (!is_writable(ROOT . '/d_setting')) {
Json::die([
'result'=>false,
'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다.'
'result' => false,
'reason' => 'd_setting 디렉토리의 쓰기 권한이 없습니다.'
]);
}
if (!file_exists(ROOT.'/d_log/.htaccess')) {
@file_put_contents(ROOT.'/d_log/.htaccess', 'Deny from all');
if (!file_exists(ROOT . '/d_log/.htaccess')) {
@file_put_contents(ROOT . '/d_log/.htaccess', 'Deny from all');
}
if (!file_exists(ROOT.'/d_setting/.htaccess')) {
@file_put_contents(ROOT.'/d_setting/.htaccess', 'Deny from all');
if (!file_exists(ROOT . '/d_setting/.htaccess')) {
@file_put_contents(ROOT . '/d_setting/.htaccess', 'Deny from all');
}
//DB 접근 권한 검사
@@ -151,21 +153,21 @@ $rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
$rootDB->throw_exception_on_nonsql_error = false;
$rootDB->nonsql_error_handler = function ($params) {
Json::die([
'result'=>false,
'reason'=>'DB 접속에 실패했습니다.'
'result' => false,
'reason' => 'DB 접속에 실패했습니다.'
]);
};
$rootDB->error_handler = function ($params) {
Json::die([
'result'=>false,
'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
'result' => false,
'reason' => 'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
]);
};
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
if ($mysqli_obj->multi_query(file_get_contents(__DIR__.'/sql/common_schema.sql'))) {
if ($mysqli_obj->multi_query(file_get_contents(__DIR__ . '/sql/common_schema.sql'))) {
while (true) {
if (!$mysqli_obj->more_results()) {
break;
@@ -191,113 +193,113 @@ $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);
$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',
ROOT.'/d_setting/ServConfig.php',
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath,
'imageRequestPath'=>$imageRequestPath,
'imageRequestKey'=>$imageRequestKey
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath,
'imageRequestPath' => $imageRequestPath,
'imageRequestKey' => $imageRequestKey
],
true
);
if($imageRequestKey){
@file_get_contents($imageKeyInstallPath.'?key='.$imageRequestKey);
if ($imageRequestKey) {
@file_get_contents($imageKeyInstallPath . '?key=' . $imageRequestKey);
}
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
__DIR__ . '/templates/common_path.orig.js',
ROOT . '/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/menu.orig.json',
ROOT.'/d_shared/menu.json',
__DIR__ . '/templates/menu.orig.json',
ROOT . '/d_shared/menu.json',
[],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
__DIR__ . '/templates/common.orig.css',
ROOT . '/d_shared/common.css',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/RootDB.orig.php',
ROOT.'/d_setting/RootDB.php',
__DIR__ . '/templates/RootDB.orig.php',
ROOT . '/d_setting/RootDB.php',
[
'host'=>$host,
'user'=>$username,
'password'=>$password,
'dbName'=>$dbName,
'port'=>$port,
'globalSalt'=>$globalSalt,
'host' => $host,
'user' => $username,
'password' => $password,
'dbName' => $dbName,
'port' => $port,
'globalSalt' => $globalSalt,
]
);
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost.'/');
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost . '/');
Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/KakaoKey.orig.php',
ROOT.'/d_setting/KakaoKey.php',
__DIR__ . '/templates/KakaoKey.orig.php',
ROOT . '/d_setting/KakaoKey.php',
[
'REST_API_KEY'=>$kakaoRESTKey,
'ADMIN_KEY'=>$kakaoAdminKey,
'REDIRECT_URI'=>$kakaoRedirectURI
'REST_API_KEY' => $kakaoRESTKey,
'ADMIN_KEY' => $kakaoAdminKey,
'REDIRECT_URI' => $kakaoRedirectURI
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
Json::die([
'result'=>true,
'reason'=>'success',
'globalSalt'=>$globalSalt
'result' => true,
'reason' => 'success',
'globalSalt' => $globalSalt
]);
+44 -47
View File
@@ -1,25 +1,26 @@
<?php
namespace sammo;
require(__DIR__.'/../vendor/autoload.php');
require(__DIR__ . '/../vendor/autoload.php');
$session = Session::requireLogin([])->setReadOnly();
if($session->userGrade < 6){
if ($session->userGrade < 6) {
Json::die([
'result'=>false,
'reason'=>'관리자 아님'
'result' => false,
'reason' => '관리자 아님'
]);
}
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
$servHost = Util::getPost('serv_host');
$sharedIconPath = Util::getPost('shared_icon_path');
$gameImagePath = Util::getPost('game_image_path');
if($servHost){
if(!$sharedIconPath || $gameImagePath){
if ($servHost) {
if (!$sharedIconPath || $gameImagePath) {
Json::die([
'result'=>false,
'reason'=>'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
'result' => false,
'reason' => 'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
]);
}
@@ -27,58 +28,54 @@ if($servHost){
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
}
else if($sharedIconPath || $gameImagePath){
} else if ($sharedIconPath || $gameImagePath) {
$servHost = ServConfig::$serverWebPath;
if($sharedIconPath){
if ($sharedIconPath) {
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
}
else{
} else {
$sharedIconPath = ServConfig::$sharedIconPath;
}
if($gameImagePath){
if ($gameImagePath) {
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
}
else{
} else {
$gameImagePath = ServConfig::$gameImagePath;
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
}
else{
} else {
$servHost = ServConfig::$serverWebPath;
$sharedIconPath = ServConfig::$sharedIconPath;
$gameImagePath = ServConfig::$gameImagePath;
@@ -87,31 +84,31 @@ else{
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
__DIR__ . '/templates/common_path.orig.js',
ROOT . '/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
__DIR__ . '/templates/common.orig.css',
ROOT . '/d_shared/common.css',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
'result' => false,
'reason' => $result
]);
}
+3 -1
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
class RootDB
@@ -30,7 +31,8 @@ class RootDB
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
self::$uDB->error_handler= function(){};
self::$uDB->error_handler = function () {
};
self::$uDB->throw_exception_on_error = true;
self::$uDB->throw_exception_on_nonsql_error = true;
}
+14 -13
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
class ServConfig
@@ -13,32 +14,32 @@ class ServConfig
public static $imageRequestPath = "_tK_imageRequestPath_";
public static $imageRequestKey = '_tK_imageRequestKey_';
public static function getSharedIconPath(string $filepath='') : string
public static function getSharedIconPath(string $filepath = ''): string
{
if($filepath){
return static::$sharedIconPath."/{$filepath}";
if ($filepath) {
return static::$sharedIconPath . "/{$filepath}";
}
return static::$sharedIconPath;
}
public static function getUserIconPath(string $filepath='') : string
public static function getUserIconPath(string $filepath = ''): string
{
return AppConf::getUserIconPathWeb($filepath);
}
public static function getGameImagePath(string $filepath='') : string
public static function getGameImagePath(string $filepath = ''): string
{
if($filepath){
return static::$gameImagePath."/{$filepath}";
if ($filepath) {
return static::$gameImagePath . "/{$filepath}";
}
return static::$gameImagePath;
}
public static function getImagePullURI() : string
public static function getImagePullURI(): string
{
$now = time();
$req_hash = Util::hashPassword(sprintf("%016x",$now), static::$imageRequestKey);
return static::$imageRequestPath."?req={$req_hash}&time={$now}";
$req_hash = Util::hashPassword(sprintf("%016x", $now), static::$imageRequestKey);
return static::$imageRequestPath . "?req={$req_hash}&time={$now}";
}
@@ -47,8 +48,8 @@ class ServConfig
*
* @return string
*/
public static function getServerBasepath() : string
public static function getServerBasepath(): string
{
return self::$serverWebPath;
}
}
}
-30
View File
@@ -1,30 +0,0 @@
<?php
namespace sammo;
function MYDB_query($query, $connect)
{
return mysqli_query($connect, $query);
}
function MYDB_num_rows(\mysqli_result $result) : int
{
return mysqli_num_rows($result);
}
/**
* @return mixed[]
*/
function MYDB_fetch_array(\mysqli_result $result)
{
return mysqli_fetch_array($result);
}
function MYDB_fetch_row(\mysqli_result $result)
{
return mysqli_fetch_row($result);
}
function MYDB_error($connect)
{
return mysqli_error($connect);
}
+1 -18
View File
@@ -6,24 +6,7 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 4) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
die(requireAdminPermissionHTML());
}
$db = DB::db();
+86 -84
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
include "lib.php";
@@ -6,7 +7,7 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 4){
if ($session->userGrade < 4) {
header('location:_119.php');
die();
}
@@ -16,101 +17,102 @@ $v->rule('integer', [
'minute',
'minutes2'
]);
if(!$v->validate()){
if (!$v->validate()) {
Error($v->errorStr());
}
$btn = Util::getReq('btn');
$minute = Util::getReq('minute', 'int');
$minute2 = Util::getReq('minute2', 'int');
$btn = Util::getPost('btn');
$minute = Util::getPost('minute', 'int');
$minute2 = Util::getPost('minute2', 'int');
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
switch($btn) {
case "분당김":
$locked = false;
for($i = 0; $i < 10; $i++){
if(tryLock()){
$locked = true;
break;
switch ($btn) {
case "분당김":
$locked = false;
for ($i = 0; $i < 10; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
usleep(500000);
}
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
$db->update('general', [
'turntime'=>$db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire'=>$db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
], true);
if($locked){
unlock();
}
break;
case "분지연":
$locked = false;
for($i = 0; $i < 5; $i++){
if(tryLock()){
$locked = true;
break;
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$db->update('general', [
'turntime' => $db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire' => $db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
], true);
if ($locked) {
unlock();
}
sleep(0.5);
}
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
break;
case "분지연":
$locked = false;
for ($i = 0; $i < 5; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$db->update('general', [
'turntime'=>$db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
], true);
if($locked){
$db->update('general', [
'turntime' => $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire' => $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
], true);
if ($locked) {
unlock();
}
break;
case "토너분당김":
$tnmt_time = new \DateTime($gameStor->tnmt_time);
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "토너분지연":
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "금지급":
processGoldIncome();
break;
case "쌀지급":
processRiceIncome();
break;
case "락걸기":
for ($i = 0; $i < 10; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
break;
case "락풀기":
unlock();
}
break;
case "토너분당김":
$tnmt_time = new \DateTime($gameStor->tnmt_time);
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "토너분지연":
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "금지급":
processGoldIncome();
break;
case "쌀지급":
processRiceIncome();
break;
case "락걸기":
$db->update('plock', [
'plock'=>1,
'locktime'=>TimeUtil::now(true)
], true);
break;
case "락풀기":
$db->update('plock', [
'plock'=>0
], true);
break;
break;
}
header('Location:_119.php', true, 303);
header('Location:_119.php', true, 303);
+1 -18
View File
@@ -7,24 +7,7 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
die(requireAdminPermissionHTML());
}
$db = DB::db();
+9 -9
View File
@@ -22,13 +22,13 @@ if (!$v->validate()) {
Error($v->errorStr());
}
$msg = Util::getReq('msg');
$btn = Util::getReq('btn');
$log = Util::getReq('log');
$starttime = Util::getReq('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
$maxgeneral = Util::getReq('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
$maxnation = Util::getReq('maxnation', 'int', GameConst::$defaultMaxNation);
$startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
$msg = Util::getPost('msg');
$btn = Util::getPost('btn');
$log = Util::getPost('log');
$starttime = Util::getPost('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
$maxgeneral = Util::getPost('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
$maxnation = Util::getPost('maxnation', 'int', GameConst::$defaultMaxNation);
$startyear = Util::getPost('startyear', 'int', GameConst::$defaultStartYear);
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -40,7 +40,7 @@ switch ($btn) {
$gameStor->msg = $msg;
break;
case "로그쓰기":
pushWorldHistory(["<R>★</><S>{$log}</>"]);
pushGlobalHistoryLog(["<R>★</><S>{$log}</>"]);
break;
case "변경1":
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
@@ -94,7 +94,7 @@ switch ($btn) {
$starttime = cutTurn($starttime, $turnterm, false);
$gameStor->turnterm = $turnterm;
$gameStor->starttime = $starttime;
pushWorldHistory(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
pushGlobalHistoryLog(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
break;
}
+116 -115
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
include "lib.php";
@@ -6,25 +7,8 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
}
$db = DB::db();
@@ -32,115 +16,132 @@ $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')?>
<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') ?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=_admin2_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center>접속제한</td>
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=12>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
<td width=105 rowspan=12>
<?php
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<form name=form1 method=post action=_admin2_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center>접속제한</td>
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=12>회원선택<br><br>
<font color=cyan>NPC</font><br>
<font color=skyblue>NPC유저</font><br>
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
</td>
<td width=105 rowspan=12>
<?php
echo "
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
foreach($generalList as $general){
$style = "style=;";
if($general['block'] > 0) { $style .= "background-color:red;"; }
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
foreach ($generalList as $general) {
$style = "style=;";
if ($general['block'] > 0) {
$style .= "background-color:red;";
}
if ($general['npc'] >= 2) {
$style .= "color:cyan;";
} elseif ($general['npc'] == 1) {
$style .= "color:skyblue;";
}
echo "
echo "
<option value={$general['no']} $style>{$general['name']}</option>";
}
}
echo "
echo "
</select>
</td>
<td width=100 align=center>아이템 지급</td>
<td width=504>
<select name=weapon size=1 style='color:white;background-color:black;font-size:13px'>";
foreach(GameConst::$allItems as $itemCategories){
foreach($itemCategories as $item=>$cnt){
if($cnt == 0){
continue;
}
$itemObj = buildItemClass($item);
if($itemObj->isBuyable()){
continue;
}
}
}
for($i=0; $i < 27; $i++) {
echo "
foreach (GameConst::$allItems as $itemCategories) {
foreach ($itemCategories as $item => $cnt) {
if ($cnt == 0) {
continue;
}
$itemObj = buildItemClass($item);
if ($itemObj->isBuyable()) {
continue;
}
}
}
for ($i = 0; $i < 27; $i++) {
echo "
<option value={$i}>{$i}</option>";
}
?>
</select>
<input type=submit name=btn value='무기지급'>
<input type=submit name=btn value='책지급'>
<input type=submit name=btn value='말지급'>
<input type=submit name=btn value='도구지급'>
</td>
</tr>
<tr>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>이벤트</td>
<td><input type=submit name=btn value='특기 부여'><input type=submit name=btn value='공헌치1000'><input type=submit name=btn value='경험치1000'></td>
</tr>
<tr>
<td align=center>이벤트2</td>
<td><input type=submit name=btn value='보숙10000'><input type=submit name=btn value='궁숙10000'><input type=submit name=btn value='기숙10000'><input type=submit name=btn value='귀숙10000'><input type=submit name=btn value='차숙10000'></td>
</tr>
<tr>
<td align=center>접속제한</td>
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
</tr>
<tr>
<td align=center> 시각 설정</td>
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
</tr>
<tr>
<td align=center>명령 설정</td>
<td><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
}
?>
</select>
<input type=submit name=btn value='무기지급'>
<input type=submit name=btn value='책지급'>
<input type=submit name=btn value='말지급'>
<input type=submit name=btn value='도구지급'>
</td>
</tr>
<tr>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>이벤트</td>
<td><input type=submit name=btn value='특기 부여'><input type=submit name=btn value='공헌치1000'><input type=submit name=btn value='경험치1000'></td>
</tr>
<tr>
<td align=center>이벤트2</td>
<td><input type=submit name=btn value='보숙10000'><input type=submit name=btn value='궁숙10000'><input type=submit name=btn value='기숙10000'><input type=submit name=btn value='귀숙10000'><input type=submit name=btn value='차숙10000'></td>
</tr>
<tr>
<td align=center>접속제한</td>
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
</tr>
<tr>
<td align=center> 시각 설정</td>
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
</tr>
<tr>
<td align=center>명령 설정</td>
<td><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
</html>
+122 -127
View File
@@ -1,23 +1,24 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$item = Util::getReq('item', 'string');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg', 'string');
$btn = Util::getPost('btn');
$item = Util::getPost('item', 'string');
$genlist = Util::getPost('genlist', 'array_int');
$msg = Util::getPost('msg', 'string');
//로그인 검사
$session = Session::requireLogin()->loginGame()->setReadOnly();
if($session->userGrade < 5) {
if ($session->userGrade < 5) {
header('location:_admin2.php');
}
$generalID = $session->generalID;
if(!$generalID){
if (!$generalID) {
header('location:_admin2.php');
die();
}
@@ -29,331 +30,325 @@ $src = MessageTarget::buildQuick($session->generalID);
$genObjList = [];
$env = [];
if($genlist){
if ($genlist) {
$genObjList = General::createGeneralObjListFromDB($genlist);
$env = $gameStor->cacheAll();
}
switch($btn) {
switch ($btn) {
case "전체 접속허용":
$db->update('general', [
'con'=>0
'con' => 0
], true);
break;
case "전체 접속제한":
$db->update('general', [
'con'=>1000
'con' => 1000
], true);
break;
case "블럭 해제":
$db->update('general', [
'block'=>0
'block' => 0
], '`no` IN %li', $genlist);
DB::db()->query('update general set block=0 where no IN %li', $genlist);
break;
case "1단계 블럭":
$date = TimeUtil::now();
$db->update('general', [
'block'=>1,
'killturn'=>24
'block' => 1,
'killturn' => 24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('SELECT `owner` FROM general WHERE `no` IN %li', $genlist);
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
], 'id IN %li', $uid);
break;
case "2단계 블럭":
$date = TimeUtil::now();
$db->update('general', [
'gold'=>0,
'rice'=>0,
'block'=>2,
'killturn'=>24
'gold' => 0,
'rice' => 0,
'block' => 2,
'killturn' => 24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
], 'id IN %li', $uid);
break;
case "3단계 블럭":
$date = TimeUtil::now();
$db->update('general', [
'gold'=>0,
'rice'=>0,
'block'=>3,
'killturn'=>24
'gold' => 0,
'rice' => 0,
'block' => 3,
'killturn' => 24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('SELECT `owner` from general where no IN %li', $genlist);
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
], 'id IN %li', $uid);
break;
case "무한삭턴":
$db->update('general', [
'killturn'=>8000
'killturn' => 8000
], '`no` IN %li', $genlist);
break;
case "강제 사망":
$date = TimeUtil::now(true);
$db->update('general', [
'killturn'=>0,
'turntime'=>$date,
'killturn' => 0,
'turntime' => $date,
], '`no` IN %li', $genlist);
$db->update('general_turn', [
'action'=>'휴식',
'arg'=>'{}',
'brief'=>'휴식',
'action' => '휴식',
'arg' => '{}',
'brief' => '휴식',
], 'general_id IN %li AND turn_idx = 0', $genlist);
break;
case "특기 부여":
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$text = "특기 부여!";
foreach($db->query("SELECT `no`,leadership,strength,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
foreach ($db->query("SELECT `no`,leadership,strength,intel,dex1,dex2,dex3,dex4,dex5 FROM general WHERE `no` IN %li", $genlist) as $general) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
$specialWar = SpecialityConst::pickSpecialWar($general);
$specialWar = SpecialityHelper::pickSpecialWar($general);
$db->update('general', [
'specage2'=>$db->sqleval('age'),
'special2'=>$specialWar
'specage2' => $db->sqleval('age'),
'special2' => $specialWar
], 'no=%i', $general['no']);
$specialWarName = SpecialityConst::WAR[$specialWar][0];
$specialWarName = buildGeneralSpecialWarClass($specialWar)->getName();
$josaUl = JosaUtil::pick($specialWarName, '을');
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
$logger = new ActionLogger($general['no'], 0, $year, $month);
$logger->pushGeneralHistoryLog("특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
$logger->pushGeneralActionLog("특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!",ActionLogger::PLAIN);
$logger->flush();
}
break;
case "경험치1000":
$text = $btn." 지급!";
foreach($genlist as $generalID){
$text = $btn . " 지급!";
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'experience'=>$db->sqleval('experience+1000')
$db->update('general', [
'experience' => $db->sqleval('experience+1000')
], '`no` IN %li', $genlist);
break;
case "공헌치1000":
$text = $btn." 지급!";
foreach($genlist as $generalID){
$text = $btn . " 지급!";
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dedication'=>$db->sqleval('dedication+1000')
$db->update('general', [
'dedication' => $db->sqleval('dedication+1000')
], '`no` IN %li', $genlist);
break;
case "보숙10000":
$text = "보병숙련도+10000 지급!";
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dex0'=>$db->sqleval('dex0+10000')
$db->update('general', [
'dex1' => $db->sqleval('dex1+10000')
], '`no` IN %li', $genlist);
break;
case "궁숙10000":
$text = "궁병숙련도+10000 지급!";
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dex10'=>$db->sqleval('dex10+10000')
$db->update('general', [
'dex2' => $db->sqleval('dex2+10000')
], '`no` IN %li', $genlist);
break;
case "기숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "기병숙련도+10000 지급!";
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dex20'=>$db->sqleval('dex20+10000')
$db->update('general', [
'dex3' => $db->sqleval('dex3+10000')
], '`no` IN %li', $genlist);
break;
case "귀숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "귀병숙련도+10000 지급!";
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dex30'=>$db->sqleval('dex30+10000')
$db->update('general', [
'dex4' => $db->sqleval('dex4+10000')
], '`no` IN %li', $genlist);
break;
case "차숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "차병숙련도+10000 지급!";
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general',[
'dex40'=>$db->sqleval('dex40+10000')
$db->update('general', [
'dex5' => $db->sqleval('dex5+10000')
], '`no` IN %li', $genlist);
break;
case "접속 허용":
$db->update('general',[
'con'=>0
$db->update('general', [
'con' => 0
], '`no` IN %li', $genlist);
break;
case "접속 제한":
$db->update('general',[
'con'=>1000
$db->update('general', [
'con' => 1000
], '`no` IN %li', $genlist);
break;
case "메세지 전달":
$text = $msg??'';
foreach($genlist as $generalID){
$text = $msg ?? '';
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
break;
case "무기지급":
if($item == 'None') {
if ($item == 'None') {
$text = "무기 회수!";
}
else {
$text = getItemName($item)." 지급!";
} else {
$text = getItemName($item) . " 지급!";
}
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if($item === 'None'){
if ($item === 'None') {
$db->update('general', [
'weapon'=>'None'
'weapon' => 'None'
], '`no` IN %li', $genlist);
}
else{
} else {
$db->update('general', [
'weapon'=>$item
'weapon' => $item
], '`no` IN %li', $genlist, $item);
}
break;
case "책지급":
if($item == 'None') {
if ($item == 'None') {
$text = "책 회수!";
}
else {
$text = getItemName($item)." 지급!";
} else {
$text = getItemName($item) . " 지급!";
}
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if($item == 'None'){
if ($item == 'None') {
$db->update('general', [
'book'=>'None'
'book' => 'None'
], '`no` IN %li', $genlist);
}
else{
} else {
$db->update('general', [
'book'=>$item
'book' => $item
], '`no` IN %li', $genlist);
}
break;
case "말지급":
if($item == 'None') {
if ($item == 'None') {
$text = "말 회수!";
}
else {
$text = getItemName($item)." 지급!";
} else {
$text = getItemName($item) . " 지급!";
}
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if($item == 'None'){
if ($item == 'None') {
$db->update('general', [
'horse'=>'None'
'horse' => 'None'
], '`no` IN %li', $genlist);
}
else{
} else {
$db->update('general', [
'horse'=>$item
'horse' => $item
], '`no` IN %li', $genlist);
}
break;
case "도구지급":
if($item == 'None') {
if ($item == 'None') {
$text = "특수도구 회수!";
}
else {
$text = getItemName($item)." 지급!";
} else {
$text = getItemName($item) . " 지급!";
}
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if($item == 'None'){
if ($item == 'None') {
$db->update('general', [
'item'=>'None'
'item' => 'None'
], '`no` IN %li', $genlist);
}
else{
} else {
$db->update('general', [
'item'=>$item
'item' => $item
], '`no` IN %li AND item < %i', $genlist, $item);
}
break;
case "하야입력":
$db->update('general_turn', [
'action'=>'che_하야',
'arg'=>'{}',
'brief'=>'하야',
'action' => 'che_하야',
'arg' => '{}',
'brief' => '하야',
], 'general_id IN %li AND turn_idx = 0', $genlist);
break;
case "방랑해산":
$db->update('general_turn', [
'action'=>'che_방랑',
'arg'=>'{}',
'brief'=>'방랑',
'action' => 'che_방랑',
'arg' => '{}',
'brief' => '방랑',
], 'general_id IN %li AND turn_idx = 0', $genlist);
$db->update('general_turn', [
'action'=>'che_해산',
'arg'=>'{}',
'brief'=>'해산',
'action' => 'che_해산',
'arg' => '{}',
'brief' => '해산',
], 'general_id IN %li AND turn_idx = 1', $genlist);
break;
case "00턴":
$turnterm = $gameStor->turnterm;
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$turntime = getRandTurn($turnterm);
$cutTurn = cutTurn($turntime, $turnterm);
$db->update('general', [
'turntime'=>$curTurn
'turntime' => $cutTurn
], '`no` IN %li', $genlist);
}
break;
case "랜덤턴":
foreach($genlist as $generalID){
foreach ($genlist as $generalID) {
$turntime = getRandTurn($turnterm);
$db->update('general', [
'turntime'=>$turntime
'turntime' => $turntime
], '`no` IN %li', $genlist);
}
break;
}
header('location:_admin2.php');
header('location:_admin2.php');
+106 -115
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
include "lib.php";
@@ -6,137 +7,127 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$conlimit = $gameStor->conlimit;
$ipGroupList = Util::arrayGroupBy(
$db->query(
'SELECT name,ip,lastconnect,owner,block,substring_index(ip,".",3) as ip_c from general WHERE ip!="" and npc<2'
),
'ip_c'
);
function colorBlockedName($general){
if(!$general['blocked']){
return $general['name'];
}
return "<span style='color:magenta;'>{$general['name']}</span>";
}
?>
<!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')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=_admin4_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
<td width=105 rowspan=3>
<?php
echo "
<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') ?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<form name=form1 method=post action=_admin4_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=3>회원선택<br><br>
<font color=cyan>NPC</font><br>
<font color=skyblue>NPC유저</font><br>
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
</td>
<td width=105 rowspan=3>
<?php
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
$style = "style=;";
if($general['block'] > 0) { $style .= "background-color:red;"; }
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
if($general['con'] > $conlimit) { $style .= "color:red;"; }
foreach ($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general) {
$style = "style=;";
if ($general['block'] > 0) {
$style .= "background-color:red;";
}
if ($general['npc'] >= 2) {
$style .= "color:cyan;";
} elseif ($general['npc'] == 1) {
$style .= "color:skyblue;";
}
if ($general['con'] > $conlimit) {
$style .= "color:red;";
}
echo "
echo "
<option value={$general['no']} $style>{$general['name']}</option>";
}
}
echo "
echo "
</select>";
?>
</td>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
?>
</td>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center width=100>장수명</td>
<td align=center width=180>최근로그인</td>
<td align=center width=129>IP</td>
<td align=center width=100>ID</td>
</tr>
<?php foreach($ipGroupList as $ipGroupC=>$users): ?>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
<td><?=join('<br>',array_map('\sammo\colorBlockedName', $users))?></td>
<td><?=join('<br>',array_column($users, 'lastconnect'))?></td>
<td><?=join('<br>',array_column($users, 'ip'))?></td>
<td><?=join('<br>',array_column($users, 'owner'))?></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center width=100>장수명</td>
<td align=center width=180>최근로그인</td>
<td align=center width=129>IP</td>
<td align=center width=100>ID</td>
</tr>
<tr>
<?php
$query = "select substring_index(ip,'.',3) as ip2 from general where ip!='' and npc<2 group by ip2 having count(*)>1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$ipCount = MYDB_num_rows($result);
$genName = "";
$genDate = "";
$genIP = "";
$genID = "";
for($i=0; $i < $ipCount; $i++) {
$ip = MYDB_fetch_array($result);
$query = "select name,ip,lastconnect,owner,block from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genResult);
for($k=0; $k < $genCount; $k++) {
$gen = MYDB_fetch_array($genResult);
if($gen['block'] > 0) $genName .= "<font color=magenta>{$gen['name']}</font><br>";
else $genName .= $gen['name']."<br>";
$genDate .= $gen['lastconnect']."<br>";
$genIP .= $gen['ip']."<br>";
$genID .= $gen['owner']."<br>";
}
$genName .= "<br>";
$genDate .= "<br>";
$genIP .= "<br>";
$genID .= "<br>";
}
echo "
<td align=right>$genName</td>
<td>$genDate</td>
<td>$genIP</td>
<td>$genID</td>";
?>
</tr>
</table>
<?php
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
?>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
<?php endforeach; ?>
</table>
<?php
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
?>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
</html>
+18 -18
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
include "lib.php";
@@ -6,27 +7,27 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
if ($session->userGrade < 5) {
header('location:_admin4.php');
die();
}
$btn = Util::getReq('btn');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg','string', '메시지');
$btn = Util::getPost('btn');
$genlist = Util::getPost('genlist', 'array_int');
$msg = Util::getPost('msg', 'string', '메시지');
$db = DB::db();
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
switch($btn) {
switch ($btn) {
case "블럭 해제":
DB::db()->query('update general set block=0 where no IN %li', $genlist);
break;
case "1단계 블럭":
$date = TimeUtil::now();
$db = DB::db();
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
$db->query('update general set block=1,killturn=24 where no IN %li', $genlist);
//FIXME: subquery로 하는게 더 빠를 듯.
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
@@ -34,46 +35,46 @@ switch($btn) {
case "2단계 블럭":
$date = TimeUtil::now();
$db = DB::db();
$db->query('update general set block=2,killturn=24 where no IN %li',$genlist);
$db->query('update general set block=2,killturn=24 where no IN %li', $genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
break;
case "3단계 블럭":
$date = TimeUtil::now();
$db = DB::db();
$db->query('update general set block=3,killturn=24 where no IN %li',$genlist);
$db->query('update general set block=3,killturn=24 where no IN %li', $genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
break;
case "무한삭턴":
DB::db()->query('update general set killturn=8000 where no IN %li',$genlist);
DB::db()->query('update general set killturn=8000 where no IN %li', $genlist);
break;
case "강제 사망":
$date = TimeUtil::now(true);
$db->update('general', [
'killturn'=>0,
'turntime'=>$date,
'killturn' => 0,
'turntime' => $date,
], '`no` IN %li', $genlist);
$db->update('general_turn', [
'action'=>'휴식',
'arg'=>'{}',
'brief'=>'휴식'
'action' => '휴식',
'arg' => '{}',
'brief' => '휴식'
], 'general_id IN %li AND turn_idx = 0', $genlist);
break;
case "메세지 전달":
$date = TimeUtil::now();
$src = MessageTarget::buildQuick($session->generalID);
for($i=0; $i < count($genlist); $i++) {
foreach($genlist as $generalID){
$msgObj = new Message(
Message::MSGTYPE_PRIVATE,
$src,
MessageTarget::buildQuick($genlist[$i]),
MessageTarget::buildQuick($generalID),
$msg,
new \DateTime(),
new \DateTime('9999-12-31'),
[]
);
if($msgObj){
if ($msgObj) {
$msgObj->send(true);
}
}
@@ -81,4 +82,3 @@ switch($btn) {
}
header('location:_admin4.php');
+276 -233
View File
@@ -1,45 +1,28 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getReq('type', 'int', 0);
$type2 = Util::getReq('type2', 'int', 0);
$type = Util::getPost('type', 'int', 0);
$type2 = Util::getPost('type2', 'int', 0);
if($type < 0 || $type > 17){
if ($type < 0 || $type > 17) {
$type = 0;
}
if($type2 < 0 || $type2 > 6){
if ($type2 < 0 || $type2 > 6) {
$type2 = 0;
}
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
}
$db = DB::db();
$connect=$db->get();
$sel = [];
$sel2 = [];
@@ -49,105 +32,107 @@ $sel2[$type2] = "selected";
?>
<!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')?>
<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') ?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>국력</option>
<option <?=$sel[1]??''?> value=1>장수</option>
<option <?=$sel[2]??''?> value=2>기술</option>
<option <?=$sel[3]??''?> value=3>국</option>
<option <?=$sel[4]??''?> value=4>병량</option>
<option <?=$sel[5]??''?> value=5>평금</option>
<option <?=$sel[6]??''?> value=6>평쌀</option>
<option <?=$sel[7]??''?> value=7>평통</option>
<option <?=$sel[8]??''?> value=8>평</option>
<option <?=$sel[9]??''?> value=9>평</option>
<option <?=$sel[10]??''?> value=10>평Lv</option>
<option <?=$sel[11]??''?> value=11>접속률</option>
<option <?=$sel[12]??''?> value=12>단기접</option>
<option <?=$sel[13]??''?> value=13>보숙</option>
<option <?=$sel[14]??''?> value=14>궁숙</option>
<option <?=$sel[15]??''?> value=15>기숙</option>
<option <?=$sel[16]??''?> value=16>귀숙</option>
<option <?=$sel[17]??''?> value=17>차숙</option>
</select>
<select name=type2 size=1>
<option <?=$sel2[0]??''?> value=0>국력</option>
<option <?=$sel2[1]??''?> value=1>국가별성향</option>
<option <?=$sel2[2]??''?> value=2>국가성향</option>
<option <?=$sel2[3]??''?> value=3>장수성격</option>
<option <?=$sel2[4]??''?> value=4>장수특기</option>
<option <?=$sel2[5]??''?> value=5>병종수</option>
<option <?=$sel2[6]??''?> value=6>기타</option>
</select>
<input type=submit value='정렬하기'>
</form>
<form name=form2 method=post action=_admin5_submit.php>
<select name=nation size=1 style=color:white;background-color:black>";
<option value=0>재야</option>";
<?php
$query = "select nation,name,color,scout,scoutmsg,gennum from nation order by power";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=1; $i <= $count; $i++) {
$nation = MYDB_fetch_array($result);
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?= $sel[0] ?? '' ?> value=0>국</option>
<option <?= $sel[1] ?? '' ?> value=1>장수</option>
<option <?= $sel[2] ?? '' ?> value=2>기술</option>
<option <?= $sel[3] ?? '' ?> value=3>국고</option>
<option <?= $sel[4] ?? '' ?> value=4>병량</option>
<option <?= $sel[5] ?? '' ?> value=5>평</option>
<option <?= $sel[6] ?? '' ?> value=6>평</option>
<option <?= $sel[7] ?? '' ?> value=7>평통</option>
<option <?= $sel[8] ?? '' ?> value=8>평무</option>
<option <?= $sel[9] ?? '' ?> value=9>평지</option>
<option <?= $sel[10] ?? '' ?> value=10>평Lv</option>
<option <?= $sel[11] ?? '' ?> value=11>접속률</option>
<option <?= $sel[12] ?? '' ?> value=12>단기접</option>
<option <?= $sel[13] ?? '' ?> value=13>보숙</option>
<option <?= $sel[14] ?? '' ?> value=14>궁숙</option>
<option <?= $sel[15] ?? '' ?> value=15>기숙</option>
<option <?= $sel[16] ?? '' ?> value=16>귀숙</option>
<option <?= $sel[17] ?? '' ?> value=17>차숙</option>
</select>
<select name=type2 size=1>
<option <?= $sel2[0] ?? '' ?> value=0>국력</option>
<option <?= $sel2[1] ?? '' ?> value=1>국가별성향</option>
<option <?= $sel2[2] ?? '' ?> value=2>국가성향</option>
<option <?= $sel2[3] ?? '' ?> value=3>장수성격</option>
<option <?= $sel2[4] ?? '' ?> value=4>장수특기</option>
<option <?= $sel2[5] ?? '' ?> value=5>병종수</option>
<option <?= $sel2[6] ?? '' ?> value=6>기타</option>
</select>
<input type=submit value='정렬하기'>
</form>
<form name=form2 method=post action=_admin5_submit.php>
<select name=nation size=1 style=color:white;background-color:black>";
<option value=0>재야</option>";
<?php
foreach ($db->query('SELECT nation,name,color,scout,gennum from nation order by power DESC') as $nation) {
echo "
echo "
<option value={$nation['nation']}>{$nation['name']}</option>";
}
?>
</select>
<input type=submit name=btn value='국가변경'>
</form>
</td></tr>
</table>
}
?>
</select>
<input type=submit name=btn value='국가변경'>
</form>
</td>
</tr>
</table>
<table align=center width=1600 class="tb_layout bg0">
<tr id=bg1>
<td align=center>국명</td>
<td align=center>접률</td>
<td align=center>단접</td>
<td align=center>국력</td>
<td align=center>장수</td>
<td align=center>속령</td>
<td align=center>기술</td>
<td align=center>전략</td>
<td align=center>국고</td>
<td align=center>병량</td>
<td align=center>평금</td>
<td align=center>평쌀</td>
<td align=center>평통</td>
<td align=center>평무</td>
<td align=center>평지</td>
<td align=center>평Lv</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 align=center>인구</td>
<td align=center>인구율</td>
<td align=center>농업</td>
<td align=center>상업</td>
<td align=center>치안</td>
<td align=center>성벽</td>
<td align=center>수비</td>
<td align=center>국명</td>
</tr>
<?php
$query = "
<table align=center width=1600 class="tb_layout bg0">
<tr id=bg1>
<td align=center>국명</td>
<td align=center>접률</td>
<td align=center>단접</td>
<td align=center>국력</td>
<td align=center>장수</td>
<td align=center>속령</td>
<td align=center>기술</td>
<td align=center>전략</td>
<td align=center>국고</td>
<td align=center>병량</td>
<td align=center>평금</td>
<td align=center>평쌀</td>
<td align=center>평통</td>
<td align=center>평무</td>
<td align=center>평지</td>
<td align=center>평Lv</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 align=center>인구</td>
<td align=center>인구율</td>
<td align=center>농업</td>
<td align=center>상업</td>
<td align=center>치안</td>
<td align=center>성벽</td>
<td align=center>수비</td>
<td align=center>국명</td>
</tr>
<?php
$query = "
SELECT
A.nation,
A.name,
@@ -160,75 +145,103 @@ SELECT
COUNT(B.nation) AS gennum,
ROUND(AVG(B.connect), 1) AS connect,
ROUND(AVG(B.con), 1) AS con,
ROUND(AVG(B.dex0)) AS dex0,
ROUND(AVG(B.dex10)) AS dex10,
ROUND(AVG(B.dex20)) AS dex20,
ROUND(AVG(B.dex30)) AS dex30,
ROUND(AVG(B.dex40)) AS dex40
ROUND(AVG(B.dex1)) AS dex1,
ROUND(AVG(B.dex2)) AS dex2,
ROUND(AVG(B.dex3)) AS dex3,
ROUND(AVG(B.dex4)) AS dex4,
ROUND(AVG(B.dex5)) AS dex5
FROM nation A, general B
WHERE A.nation=B.nation
GROUP BY B.nation
";
switch($type) {
case 0: $query .= " order by power desc"; break;
case 1: $query .= " order by gennum desc"; break;
case 2: $query .= " order by A.tech desc"; break;
case 3: $query .= " order by A.gold desc"; break;
case 4: $query .= " order by A.rice desc"; break;
case 5: $query .= " order by avg(B.gold) desc"; break;
case 6: $query .= " order by avg(B.rice) desc"; break;
case 7: $query .= " order by avg(B.leadership) desc"; break;
case 8: $query .= " order by avg(B.strength) desc"; break;
case 9: $query .= " order by avg(B.intel) desc"; break;
case 10: $query .= " order by avg(B.explevel) desc"; break;
case 11: $query .= " order by avg(B.connect) desc"; break;
case 12: $query .= " order by avg(B.con) desc"; break;
case 13: $query .= " order by avg(B.dex0) desc"; break;
case 14: $query .= " order by avg(B.dex10) desc"; break;
case 15: $query .= " order by avg(B.dex20) desc"; break;
case 16: $query .= " order by avg(B.dex30) desc"; break;
case 17: $query .= " order by avg(B.dex40) desc"; break;
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationCount = MYDB_num_rows($result);
for($i=0; $i < $nationCount; $i++) {
$nation = MYDB_fetch_array($result);
switch ($type) {
case 0:
$query .= " order by power desc";
break;
case 1:
$query .= " order by gennum desc";
break;
case 2:
$query .= " order by A.tech desc";
break;
case 3:
$query .= " order by A.gold desc";
break;
case 4:
$query .= " order by A.rice desc";
break;
case 5:
$query .= " order by avg(B.gold) desc";
break;
case 6:
$query .= " order by avg(B.rice) desc";
break;
case 7:
$query .= " order by avg(B.leadership) desc";
break;
case 8:
$query .= " order by avg(B.strength) desc";
break;
case 9:
$query .= " order by avg(B.intel) desc";
break;
case 10:
$query .= " order by avg(B.explevel) desc";
break;
case 11:
$query .= " order by avg(B.connect) desc";
break;
case 12:
$query .= " order by avg(B.con) desc";
break;
case 13:
$query .= " order by avg(B.dex1) desc";
break;
case 14:
$query .= " order by avg(B.dex2) desc";
break;
case 15:
$query .= " order by avg(B.dex3) desc";
break;
case 16:
$query .= " order by avg(B.dex4) desc";
break;
case 17:
$query .= " order by avg(B.dex5) desc";
break;
}
foreach($db->query($query) as $nation){
$gen = $db->queryFirstRow('SELECT COUNT(*) as cnt,
ROUND(AVG(gold)) as avgg,
ROUND(AVG(rice)) as avgr,
SUM(leadership) as leadership, ROUND(AVG(leadership), 1) as avgl,
ROUND(AVG(strength), 1) as avgs,
ROUND(AVG(intel), 1) as avgi,
ROUND(AVG(explevel), 1) as avge,
SUM(crew) as crew
from general where nation=%i',$nation['nation']);
$query = "select COUNT(*) as cnt,
ROUND(AVG(gold)) as avgg,
ROUND(AVG(rice)) as avgr,
SUM(leadership) as leadership, ROUND(AVG(leadership), 1) as avgl,
ROUND(AVG(strength), 1) as avgs,
ROUND(AVG(intel), 1) as avgi,
ROUND(AVG(explevel), 1) as avge,
SUM(crew) as crew
from general where nation='{$nation['nation']}'";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gen = MYDB_fetch_array($genResult);
$city = $db->queryFirstRow('SELECT COUNT(*) as cnt,
SUM(pop) as pop, SUM(pop_max) as pop_max,
ROUND(SUM(pop)/SUM(pop_max)*100, 2) as rate,
trust,
ROUND(SUM(agri)/SUM(agri_max)*100, 2) as agri,
ROUND(SUM(comm)/SUM(comm_max)*100, 2) as comm,
ROUND(SUM(secu)/SUM(secu_max)*100, 2) as secu,
ROUND(SUM(wall)/SUM(wall_max)*100, 2) as wall,
ROUND(SUM(def)/SUM(def_max)*100, 2) as def
from city where nation=%i', $nation['nation']);
$query = "select COUNT(*) as cnt,
SUM(pop) as pop, SUM(pop_max) as pop_max,
ROUND(SUM(pop)/SUM(pop_max)*100, 2) as rate,
trust,
ROUND(SUM(agri)/SUM(agri_max)*100, 2) as agri,
ROUND(SUM(comm)/SUM(comm_max)*100, 2) as comm,
ROUND(SUM(secu)/SUM(secu_max)*100, 2) as secu,
ROUND(SUM(wall)/SUM(wall_max)*100, 2) as wall,
ROUND(SUM(def)/SUM(def_max)*100, 2) as def
from city where nation='{$nation['nation']}'";
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityResult);
echo "
echo "
<tr>
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
<td align=center>&nbsp;{$nation['connect']}&nbsp;</td>
<td align=center>&nbsp;{$nation['con']}&nbsp;</td>
<td align=center>&nbsp;{$nation['power']}&nbsp;</td>
<td align=center>&nbsp;{$gen['cnt']}&nbsp;</td>
<td align=center>&nbsp;{$city['cnt']}&nbsp;</td>
<td align=right>&nbsp;".sprintf('%.1f',$nation['tech'])."&nbsp;</td>
<td align=right>&nbsp;" . sprintf('%.1f', $nation['tech']) . "&nbsp;</td>
<td align=center>&nbsp;{$nation['strategic_cmd_limit']}&nbsp;</td>
<td align=center>&nbsp;{$nation['gold']}&nbsp;</td>
<td align=center>&nbsp;{$nation['rice']}&nbsp;</td>
@@ -238,84 +251,114 @@ for($i=0; $i < $nationCount; $i++) {
<td align=right>&nbsp;{$gen['avgs']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgi']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avge']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex0']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex10']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex20']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex30']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex40']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex1']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex2']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex3']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex4']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex5']}&nbsp;</td>
<td align=right>&nbsp;{$gen['crew']}/{$gen['leadership']}00&nbsp;</td>
<td align=center>&nbsp;{$city['pop']}/{$city['pop_max']}&nbsp;</td>
<td align=center>&nbsp;".sprintf('%.1f',$city['pop']/$city['pop_max']*100)."%&nbsp;</td>
<td align=center>&nbsp;" . sprintf('%.1f', $city['pop'] / Util::valueFit($city['pop_max'], 1) * 100) . "%&nbsp;</td>
<td align=center>&nbsp;{$city['agri']}%&nbsp;</td>
<td align=center>&nbsp;{$city['comm']}%&nbsp;</td>
<td align=center>&nbsp;{$city['secu']}%&nbsp;</td>
<td align=center>&nbsp;{$city['wall']}%&nbsp;</td>
<td align=center>&nbsp;{$city['def']}%&nbsp;</td>
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
</tr>
";
}
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
</table>
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= getSabotageLogRecent(20) ?></td>
</tr>
</table>
<table align=center width=1760 class="tb_layout bg0">
<tr id=bg1>
<td width=30 align=center></td>
<td width=30 align=center></td>
<td width=50 align=center>국가수</td>
<td width=50 align=center>장수수</td>
<?php
switch($type2) {
default:
case 0: echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>"; break;
case 1: echo "<td width=1600>국가별성향</td>"; break;
case 2: echo "<td width=1600>국가성향</td>"; break;
case 3: echo "<td width=1600>장수성격</td>"; break;
case 4: echo "<td width=1600>장수특기</td>"; break;
case 5: echo "<td width=1600>병종수</td>"; break;
case 6: echo "<td width=1600>기타</td>"; break;
}
?>
</tr>
<?php
$query = "select * from statistic where month=1 or no=1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=0; $i < $count; $i++) {
$stat = MYDB_fetch_array($result);
echo "
<table align=center width=1760 class="tb_layout bg0">
<tr id=bg1>
<td width=30 align=center></td>
<td width=30 align=center></td>
<td width=50 align=center>국가수</td>
<td width=50 align=center>장수수</td>
<?php
switch ($type2) {
default:
case 0:
echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>";
break;
case 1:
echo "<td width=1600>국가별성향</td>";
break;
case 2:
echo "<td width=1600>국가성향</td>";
break;
case 3:
echo "<td width=1600>장수성격</td>";
break;
case 4:
echo "<td width=1600>장수특기</td>";
break;
case 5:
echo "<td width=1600>병종수</td>";
break;
case 6:
echo "<td width=1600>기타</td>";
break;
}
?>
</tr>
<?php
foreach($db->query('SELECT * from statistic where month=1 or no=1') as $stat){
echo "
<tr>
<td align=center>{$stat['year']}</td>
<td align=center>{$stat['month']}</td>
<td align=center>{$stat['nation_count']}</td>
<td align=center>{$stat['gen_count']}</td>
";
switch($type2) {
default:
case 0: echo "<td>{$stat['power_hist']}</td>"; break;
case 1: echo "<td>{$stat['nation_name']}</td>"; break;
case 2: echo "<td>{$stat['nation_hist']}</td>"; break;
case 3: echo "<td>{$stat['personal_hist']}</td>"; break;
case 4: echo "<td>{$stat['special_hist']}</td>"; break;
case 5: echo "<td>{$stat['crewtype']}</td>"; break;
case 6: echo "<td>{$stat['etc']}</td>"; break;
}
echo "
switch ($type2) {
default:
case 0:
echo "<td>{$stat['power_hist']}</td>";
break;
case 1:
echo "<td>{$stat['nation_name']}</td>";
break;
case 2:
echo "<td>{$stat['nation_hist']}</td>";
break;
case 3:
echo "<td>{$stat['personal_hist']}</td>";
break;
case 4:
echo "<td>{$stat['special_hist']}</td>";
break;
case 5:
echo "<td>{$stat['crewtype']}</td>";
break;
case 6:
echo "<td>{$stat['etc']}</td>";
break;
}
echo "
</tr>
";
}
?>
</table>
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
</html>
+15 -14
View File
@@ -1,48 +1,49 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$nation = Util::getReq('nation', 'int');
$btn = Util::getPost('btn');
$nation = Util::getPost('nation', 'int');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
if($session->userGrade < 5) {
if ($session->userGrade < 5) {
header('location:_admin5.php');
die();
}
$db = DB::db();
switch($btn) {
switch ($btn) {
case "국가변경":
$oldNation = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
if($nation == 0) {
if ($nation == 0) {
$db->update('general', [
'nation'=>0,
'level'=>0,
'nation' => 0,
'officer_level' => 0,
'officer_city' => 0
], 'owner=%i', $userID);
} else {
$db->update('general', [
'nation'=>$nation,
'level'=>1,
'nation' => $nation,
'officer_level' => 1,
'officer_city' => 0
], 'owner=%i', $userID);
$db->update('nation', [
'gennum'=>$db->sqleval('gennum + 1')
'gennum' => $db->sqleval('gennum + 1')
], 'nation=%i', $oldNation);
}
if($oldNation != 0){
if ($oldNation != 0) {
$db->update('nation', [
'gennum'=>$db->sqleval('gennum - 1')
'gennum' => $db->sqleval('gennum - 1')
], 'nation=%i', $oldNation);
}
break;
}
header('location:_admin5.php');
-110
View File
@@ -1,110 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getReq('type', 'int', 0);
if($type < 0 || $type > 4){
$type = 0;
}
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
$sel[$type] = "selected";
?>
<!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')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>접속률</option>
<option <?=$sel[1]??''?> value=1>총갱신</option>
<option <?=$sel[2]??''?> value=2>갱신/턴</option>
<option <?=$sel[3]??''?> value=3>총로그인</option>
<option <?=$sel[4]??''?> value=4>갱신/로그인</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<table align=center class='tb_layout bg0'>
<tr id=bg1>
<td align=center width=120>장수명</td>
<td align=center width=50>접속률</td>
<td align=center width=40>시작연령</td>
<td align=center width=40>연령</td>
<td align=center width=80>총갱신</td>
<td align=center width=80>갱신/</td>
<td align=center width=80>총로그인</td>
<td align=center width=100>갱신/로그인</td>
</tr>
<?php
switch($type) {
case 0: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by connect desc limit 0,30"; break;
case 1: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by refcnt desc limit 0,30"; break;
case 2: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by ref desc limit 0,30"; break;
case 3: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by logcnt desc limit 0,30"; break;
case 4: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by log desc limit 0,30"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($genresult);
echo "
<tr>
<td align=center>{$gen['name']}</td>
<td align=center>{$gen['connect']}</td>
<td align=center>{$gen['startage']}</td>
<td align=center>{$gen['age']}</td>
<td align=center>".round($gen['refcnt']/2, 1)."</td>
<td align=center>".round($gen['ref']/2,1)."</td>
<td align=center>{$gen['logcnt']}</td>
<td align=center>".round($gen['log']/2,1)."</td>
</tr>";
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
+123 -118
View File
@@ -1,95 +1,76 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$gen = Util::getReq('gen', 'int', 0);
$reqQueryType = Util::getReq('query_type', 'string', null);
$btn = Util::getPost('btn');
$gen = Util::getPost('gen', 'int', 0);
$reqQueryType = Util::getPost('query_type', 'string', null);
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
$queryMap = [
'turntime' => ['최근턴', 0, function($lhs, $rhs){
return -($lhs['turntime']<=>$rhs['turntime']);
'turntime' => ['최근턴', 0, function ($lhs, $rhs) {
return - ($lhs['turntime'] <=> $rhs['turntime']);
}],
'recwar' => ['최근전투', 1, function($lhs, $rhs){
return -($lhs['recwar']<=>$rhs['recwar']);
'recent_war' => ['최근전투', 1, function ($lhs, $rhs) {
return - ($lhs['recent_war'] <=> $rhs['recent_war']);
}],
'name' => ['장수명', 0, function($lhs, $rhs){
if($lhs['npc'] !== $rhs['npc']){
return $lhs['npc']<=>$rhs['npc'];
'name' => ['장수명', 0, function ($lhs, $rhs) {
if ($lhs['npc'] !== $rhs['npc']) {
return $lhs['npc'] <=> $rhs['npc'];
}
return $lhs['name']<=>$rhs['name'];
return $lhs['name'] <=> $rhs['name'];
}],
'warnum' => ['전투수', 1, function($lhs, $rhs){
return -($lhs['warnum']<=>$rhs['warnum']);
'warnum' => ['전투수', 2, function ($lhs, $rhs) {
return - ($lhs['warnum'] <=> $rhs['warnum']);
}]
];
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
$reqQueryType = Util::array_first_key($queryMap);
}
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
}
$db = DB::db();
$connect=$db->get();
if($btn == '정렬하기') {
if ($btn == '정렬하기') {
$gen = 0;
}
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if($reqArgType===0){
if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime FROM general');
}
else if($reqArgType===1){
} else if ($reqArgType === 1) {
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
}
else if($reqArgType===2){
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, value as %b
} else if ($reqArgType === 2) {
$generalBasicList = $db->query(
'SELECT no, name, nation, npc, turntime, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %b',
$reqQueryType, $reqQueryType
WHERE rank_data.type = %s',
$reqQueryType,
$reqQueryType
);
}
else if($reqArgType===3){
$generalBasicList = array_map(function($arr){
} else if ($reqArgType === 3) {
$generalBasicList = array_map(function ($arr) {
$arr['aux'] = Json::decode($arr['aux']);
return $arr;
}, $db->query('SELECT no, name, nation, npc, turntime, aux FROM general'));
}
else{
} else {
throw new \sammo\MustNotBeReachedException();
}
usort($generalBasicList, $comp);
if(!$gen){
if (!$gen) {
$gen = $generalBasicList[0]['no'];
}
@@ -98,76 +79,100 @@ $generalObj = General::createGeneralObjFromDB($gen);
?>
<!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')?>
<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') ?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<?php foreach($queryMap as $queryType => [$queryTypeText,]): ?>
<option <?=$queryKey==$reqQueryType?'selected':''?> value='<?=$queryKey?>'><?=$queryTypeText?></option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php foreach($generalBasicList as $general): ?>
<option <?=$gen==$general['no']?'selected':''?>><?=getNationStaticInfo($general['nation'])['name']?> - <?=$general['name']?> (<?=$general['turntime']?>)</option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td></tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1><font color=skyblue size=3> </font></td>
<td width=50% align=center id=bg1><font color=orange size=3>-</font></td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($generalObj); generalInfo2($generalObj); ?>
</td>
<td valign=top>&nbsp;
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
</tr>
<tr>
<td valign=top>
<?=getGenLogRecent($gen, 24)?>
</td>
<td valign=top>
<?=getBatLogRecent($gen, 24)?>
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>장수 열전</font></td>
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
</tr>
<tr>
<td valign=top>
<?=getGeneralHistoryAll($gen)?>
</td>
<td valign=top>
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>
정렬순서 :
<select name='query_type' size=1>
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
<option <?= $queryType == $reqQueryType ? 'selected' : '' ?> value='<?= $queryType ?>'><?= $queryTypeText ?></option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php foreach ($generalBasicList as $general) : ?>
<option <?= $gen == $general['no'] ? 'selected' : '' ?> value='<?= $general['no'] ?>'><?= $general['name'] ?> (<?= substr($general['turntime'], 14, 5) ?>)</option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td>
</tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1>
<font color=skyblue size=3> </font>
</td>
<td width=50% align=center id=bg1>
<font color=orange size=3>-</font>
</td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($generalObj);
generalInfo2($generalObj); ?>
</td>
<td valign=top>&nbsp;
</td>
</tr>
<tr>
<td align=center id=bg1>
<font color=skyblue size=3>개인 기록</font>
</td>
<td align=center id=bg1>
<font color=orange size=3>전투 기록</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getGeneralActionLogRecent($gen, 24)) ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getBattleDetailLogRecent($gen, 24)) ?>
</td>
</tr>
<tr>
<td align=center id=bg1>
<font color=skyblue size=3>장수 열전</font>
</td>
<td align=center id=bg1>
<font color=orange size=3>전투 결과</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getBattleResultRecent($gen, 24)) ?>
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
</html>
+4 -32
View File
@@ -4,36 +4,18 @@ namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$gen = Util::getReq('gen', 'int', 0);
$btn = Util::getPost('btn');
$gen = Util::getPost('gen', 'int', 0);
$type = 0;
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
?>
<!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')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
die(requireAdminPermissionHTML());
}
$db = DB::db();
$connect=$db->get();
if ($btn == '정렬하기') {
$gen = 0;
@@ -82,13 +64,7 @@ foreach (getAllNationStaticInfo() as $nation) {
}
$query = "select * from diplomacy where me < you order by state desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dipcount = MYDB_num_rows($result);
for ($i=0; $i < $dipcount; $i++) {
$dip = MYDB_fetch_array($result);
foreach($db->query('SELECT * from diplomacy where me < you order by state desc') as $dip){
$me = $dip['me'];
$you = $dip['you'];
@@ -100,10 +76,6 @@ for ($i=0; $i < $dipcount; $i++) {
case 0: $state = "<font color=red>교 전</font>"; break;
case 1: $state = "<font color=magenta>선포중</font>"; break;
case 2: $state = "통 상"; break;
case 3: $state = "<font color=cyan>통합수락중</font>"; break;
case 4: $state = "<font color=cyan>통합제의중</font>"; break;
case 5: $state = "<font color=cyan>합병수락중</font>"; break;
case 6: $state = "<font color=cyan>합병제의중</font>"; break;
case 7: $state = "<font color=green>불가침</font>"; break;
}
+8 -7
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
include "lib.php";
@@ -6,20 +7,20 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
if ($session->userGrade < 5) {
die('권한 부족');
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if(!$gameStor->isunited){
if (!$gameStor->isunited) {
die('아직 천통하지 않았습니다');
}
foreach($db->queryFirstColumn(
'SELECT no FROM general WHERE npc != 0 and age >= %i',
GameConst::$retirementYear
) as $generalNo){
foreach ($db->queryFirstColumn(
'SELECT no FROM general WHERE npc < 2 and age >= %i',
40
) as $generalNo) {
CheckHall($generalNo);
}
}
+71 -39
View File
@@ -47,7 +47,7 @@ $templates = new \League\Plates\Engine(__DIR__.'/templates');
</td></tr>
</form>
</table>
<div style="margin:auto;width:1000px;">
<div style="margin:auto;width:1100px;">
<?php
$ownerNameList = [];
@@ -75,7 +75,7 @@ $types = [
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
$v['name'] = '???';
$v['owner_name'] = null;
$v['ownerName'] = null;
$v['bgColor'] = GameConst::$basecolor4;
$v['fgColor'] = newColor($v['bgColor']);
return $v;
@@ -101,11 +101,11 @@ $types = [
}
return $v;
}],
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex0']; return $v; }],
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex10']; return $v; }],
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex20']; return $v; }],
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex30']; return $v; }],
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex40']; return $v; }],
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex1']; return $v; }],
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex2']; return $v; }],
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex3']; return $v; }],
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex4']; return $v; }],
["차 병 숙 련 도", "int", function($v){$v['value'] = $v['dex5']; return $v; }],
["전 력 전 승 률", "percent", function($v){
$totalCnt = $v['ttw']+$v['ttd']+$v['ttl'];
if($totalCnt < 50){
@@ -163,9 +163,9 @@ $types = [
$generals = [];
foreach($db->query(
"SELECT nation,no,name,name2 as owner_name, owner, picture, imgsvr,
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
experience, dedication,
dex0, dex10, dex20, dex30, dex40,
dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general
){
@@ -186,6 +186,9 @@ foreach($db->query(
}
foreach($db->queryAllLists('SELECT general_id, `type`, `value` FROM rank_data') as [$generalID, $typeKey, $value]){
if(!key_exists($generalID, $generals)){
continue;
}
$generals[$generalID][$typeKey] = $value;
}
@@ -194,7 +197,7 @@ $templates = new \League\Plates\Engine('templates');
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
$validCnt = 0;
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt, $ownerNameList){
$general['owner_name'] = $ownerNameList[$general['owner']]??null;
$general['ownerName'] = $ownerNameList[$general['owner']]??null;
$general = ($typeFunc)($general);
$value = $general['value'];
@@ -224,7 +227,7 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
}
?>
</div>
<div style="margin:auto;width:1000px;margin-top:5px;">
<div style="margin:auto;width:1100px;margin-top:5px;">
<?php
//유니크 아이템 소유자
$itemTypes = [
@@ -235,52 +238,81 @@ $itemTypes = [
];
$simpleItemTypes = array_keys($itemTypes); array_map(function($itemType){return $itemType[1];}, $itemTypes);
$itemOwners = [];
foreach($generals as $general){
foreach($itemTypes as $itemIdx=>[,$itemType, $itemFunc,,,]){
$itemCode = $general[$itemType];
$itemClass = buildItemClass($itemCode);
if(!$itemClass->isBuyable()){
foreach($itemTypes as $itemType=>$itemTypeName){
$itemClassName = $general[$itemType];
$itemClass = buildItemClass($itemClassName);
if($itemClass->isBuyable()){
continue;
}
if(key_exists($itemClassName, $itemOwners)){
$itemOwners[$itemClassName][] = $general;
}
else{
$itemOwners[$itemClassName] = [$general];
}
}
}
foreach(GameConst::$allItems as $itemType=>$itemList){
$itemNameType = $itemTypes[$itemType];
$itemList = array_reverse($itemList, true);
$itemRanker = [];
foreach($itemList as $itemClassName=>$itemCnt){
if($itemCnt==0){
continue;
}
$itemClass = buildItemClass($itemClassName);
if($itemClass->isBuyable()){
continue;
}
$info = $itemClass->getInfo();
$name = $itemClass->getName();
if($info){
$name = $templates->render('tooltip', [
'text'=>$text,
'text'=>$name,
'info'=>$info,
]);
}
foreach(Util::range($itemCnt) as $itemIdx){
if(($itemOwners[$itemClassName][$itemIdx]??null) === null){
$emptyCard = [
'rankName' => $name,
'pictureFullPath' => GetImageURL(0)."/default.jpg",
'value'=>$itemClassName,
'name'=>'미발견',
'bgColor'=>GameConst::$basecolor4,
'fgColor'=>newColor(GameConst::$basecolor4),
];
$itemRanker[] = $emptyCard;
continue;
}
$general['rankName'] = $name;
$general['value'] = $itemCode;
$itemTypes[$itemIdx][5][$itemCode] = $general;
}
}
$general = $itemOwners[$itemClassName][$itemIdx];
foreach($itemTypes as [$itemNameType, $itemType, $itemFunc, $itemMinCode, $itemMaxCode, $itemOwners]){
$itemRanker = [];
for($itemCode = $itemMaxCode; $itemCode >= $itemMinCode; $itemCode--){
if(!key_exists($itemCode, $itemOwners)){
$emptyCard = [
'rankName' => ($itemFunc)($itemCode),
'pictureFullPath' => GetImageURL(0)."/default.jpg",
'value'=>$itemCode,
'name'=>'미발견',
'bgColor'=>GameConst::$basecolor4,
'fgColor'=>newColor(GameConst::$basecolor4),
$card = [
'rankName' => $name,
'pictureFullPath' => $general['pictureFullPath'],
'value'=>$itemClassName,
'nationName'=>$general['nationName'],
'name'=>$general['name'],
'bgColor'=>$general['bgColor'],
'fgColor'=>$general['fgColor'],
];
$itemRanker[$itemCode] = $emptyCard;
continue;
$itemRanker[] = $card;
}
$general = $itemOwners[$itemCode];
$itemRanker[$itemCode] = $general;
}
echo $templates->render('hallOfFrame', [
'typeName'=>$itemNameType,
'generals'=>$itemRanker
+1 -1
View File
@@ -79,7 +79,7 @@ foreach($emperiors as $emperior){
</td>
</tr>
<tr>
<td align=center style=color:".newColor($emperior['color'])."; bgcolor=<?=$emperior['color']?> colspan=8>
<td align=center style='color:<?=newColor($emperior['color'])?>;background-color:<?=$emperior['color']?>' colspan=8>
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
</td>
</tr>
-211
View File
@@ -1,211 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$select = Util::getReq('select', 'int', 0);
$db = DB::db();
$connect=$db->get();
increaseRefresh("왕조일람", 2);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::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>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br>
<input type=button value='창 닫기' onclick=window.close()><br>
</td></tr>
</table>
<?php
if ($select == 0) {
$query = "select * from emperior_table order by no desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$empcount = MYDB_num_rows($result);
for ($i=0; $i < $empcount; $i++) {
$emperior = MYDB_fetch_array($result);
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=8>
<font size=5>{$emperior['phase']}</font>
<input type=submit value='자세히'>
<input type=hidden name=select value='{$emperior['no']}'>
</td>
</tr>
<tr>
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=8>
<font size=5>{$emperior['name']} ({$emperior['year']} {$emperior['month']})</font>
</td>
</tr>
<tr>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['power']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['gennum']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['citynum']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['type']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l12name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l11name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l10name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l9name']}</td>
</tr>
</table>
</form>";
}
} else {
$query = "select * from emperior_table where no='$select'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$emperior = MYDB_fetch_array($result);
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=6>
<font size=5>{$emperior['phase']}</font>
<input type=submit value='전체보기'>
<input type=hidden name=select value='0'>
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2>{$emperior['nation_count']}</td>
<td id=bg1 width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2>{$emperior['gen_count']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['nation_name']}</td>
</tr>
<tr>
<td id=bg1 align=center>국가별 성향</td>
<td colspan=5>{$emperior['nation_hist']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['personal_hist']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['special_hist']}</td>
</tr>
<tr>
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=6>
<font size=5>{$emperior['name']} ({$emperior['year']} {$emperior['month']})</font>
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['power']}</td>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['type']}</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['gennum']}</td>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['citynum']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['pop']}</td>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['poprate']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['gold']}</td>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['rice']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l12name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l11name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l10name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l9name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l8name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l7name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l6name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l5name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['tiger']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['eagle']}</td>
</tr>
<tr>
<td id=bg1 align=center> <br>(공헌도 순서)</td>
<td colspan=5>{$emperior['gen']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>".ConvertLog($emperior['history'], 1)."</td>
</tr>
</table>
</form>";
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
+10 -7
View File
@@ -153,7 +153,7 @@ if($emperior):
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5><?=ConvertLog($emperior['history'], 1)?></td>
<td colspan=5><?=formatHistoryToHTML(Json::decode($emperior['history']))?></td>
</tr>
</table>
@@ -176,14 +176,17 @@ if($showServers){
$nation['typeName'] = getNationType($nation['type']);
$nation['levelName'] = getNationLevel($nation['level']);
if($nation['generals']){
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nation['generals']);
/** @var int[]|null $nationGenerals */
$nationGenerals = $nation['generals'];
if($nationGenerals){
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
if(count($generals) != count($nation['generals']) && $serverID == UniqueConst::$serverID){
$liveGenerals = $nation['generals'];
if(count($generals) != count($nationGenerals) && $serverID == UniqueConst::$serverID){
$liveGenerals = $nationGenerals;
foreach($generals as $general){
if(in_array($general['general_no'], $nation['generals'])){
unset($nation['generals'][$general['general_no']]);
if(in_array($general['general_no'], $nationGenerals)){
unset($nationGenerals[$general['general_no']]);
}
}
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
+4 -4
View File
@@ -94,7 +94,7 @@ foreach (getAllNationStaticInfo() as $nation) {
4=>['intel', true],
5=>['experience', true],
6=>['dedication', true],
7=>['level', true],
7=>['officer_level', true],
8=>['killturn', false],
9=>['connect', true],
10=>['experience', true],
@@ -105,7 +105,7 @@ foreach (getAllNationStaticInfo() as $nation) {
15=>['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
echo"
<table align=center width=1000 class='tb_layout bg0'>
@@ -129,7 +129,7 @@ echo"
foreach($generalList as $general){
$nation = $nationname[$general['nation']];
$lbonus = calcLeadershipBonus($general['level'], $nationlevel[$general['nation']]??0);
$lbonus = calcLeadershipBonus($general['officer_level'], $nationlevel[$general['nation']]??0);
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
@@ -185,7 +185,7 @@ foreach($generalList as $general){
<td align=center>".getHonor($general['experience'])."</td>
<td align=center>".getDed($general['dedication'])."</td>
<td align=center>";
echo getLevelText($general['level']);
echo getOfficerLevelText($general['officer_level']);
echo "</td>
<td align=center>$leadership</td>
<td align=center>$strength</td>
+26 -26
View File
@@ -81,30 +81,30 @@ else{
</select>
</td></tr>
</table>
<div style="margin:auto;width=1100px;">
<div style="margin:auto;width:1100px;">
<?php
$types = [
["명 성", 'int'],
["계 급", 'int'],
["계 략 성 공", 'int'],
["전 투 횟 수", 'int'],
["승 리", 'int'],
["승 률", 'percent'],
["사 살", 'int'],
["살 상 률", 'percent'],
["보 병 숙 련 도", 'int'],
["궁 병 숙 련 도", 'int'],
["기 병 숙 련 도", 'int'],
["귀 병 숙 련 도", 'int'],
["차 병 숙 련 도", 'int'],
["전 력 전 승 률", 'percent'],
["통 솔 전 승 률", 'percent'],
["일 기 토 승 률", 'percent'],
["설 전 승 률", 'percent'],
["베 팅 투 자 액", 'int'],
["베 팅 당 첨", 'int'],
["베 팅 수 익 금", 'int'],
["베 팅 수 익 률", 'percent'],
'experience'=>['명 성', 'int'],
'dedication'=>['계 급', 'int'],
'firenum'=>['계 략 성 공', 'int'],
'warnum'=>['전 투 횟 수', 'int'],
'killnum'=>['승 리', 'int'],
'winrate'=>['승 률', 'percent'],
'killcrew'=>['사 살', 'int'],
'killrate'=>['살 상 률', 'percent'],
'dex1'=>['보 병 숙 련 도', 'int'],
'dex2'=>['궁 병 숙 련 도', 'int'],
'dex3'=>['기 병 숙 련 도', 'int'],
'dex4'=>['귀 병 숙 련 도', 'int'],
'dex5'=>['차 병 숙 련 도', 'int'],
'ttrate'=>['전 력 전 승 률', 'percent'],
'tlrate'=>['통 솔 전 승 률', 'percent'],
'tsrate'=>['일 기 토 승 률', 'percent'],
'tirate'=>['설 전 승 률', 'percent'],
'betgold'=>['베 팅 투 자 액', 'int'],
'betwin'=>['베 팅 당 첨', 'int'],
'betwingold'=>['베 팅 수 익 금', 'int'],
'betrate'=>['베 팅 수 익 률', 'percent'],
];
$templates = new \League\Plates\Engine('templates');
@@ -114,15 +114,15 @@ foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID,
$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);
foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
$hallResult = $db->query('SELECT * FROM hall WHERE `type`=%s AND %? ORDER BY `value` DESC LIMIT 10', $typeName, $searchFilter);
$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']];
$general['ownerName'] = $ownerNameList[$general['owner']];
}
if(!key_exists('bgColor', $general)){
@@ -160,7 +160,7 @@ foreach($types as $idx=>[$typeName, $typeValue]) {
}, $hallResult);
echo $templates->render('hallOfFrame', [
'typeName'=>$typeName,
'typeName'=>$typeDescribe,
'generals'=>$hallResult
]);
}
+43 -18
View File
@@ -34,7 +34,7 @@ if ($con >= 2) {
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
$s = $s_year * 12 + $s_month;
if($s_year === null){
@@ -42,7 +42,7 @@ if($s_year === null){
exit();
}
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
$e = $e_year * 12 + $e_month;
if($serverID !== UniqueConst::$serverID){
@@ -86,8 +86,10 @@ 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);
$history = $db->queryFirstRow('SELECT * FROM ng_history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
$nations = Json::decode($history['nations']);
?>
<!DOCTYPE html>
<html>
@@ -108,6 +110,7 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<?=WebUtil::printCSS('css/history.css')?>
<script>
var startYear = <?=$s_year?>;
var startMonth = <?=$s_month?>;
@@ -115,6 +118,7 @@ var lastYear = <?=$e_year?>;
var lastMonth = <?=$e_month?>;
var selectYear = <?=$year?>;
var selectMonth = <?=$month?>;
var nations = <?=$nations?$history['nations']:'{}'?>;
</script>
</head>
@@ -123,7 +127,7 @@ var selectMonth = <?=$month?>;
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
선택 :
선택 :
<input type=submit name=btn value="◀◀ 이전달">
<select id='yearmonth' name=yearmonth size=1>
<option selected='selected'><?=$year?>년 <?=$month?>월</option>
@@ -135,28 +139,49 @@ var selectMonth = <?=$month?>;
</td></tr>
</table>
<table align=center width=1000 height=520 class='tb_layout bg0'>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<thead><tr><th colspan=5 align=center id=bg1> </th></tr></thead>
<tbody>
<tr height=520>
<td width=698>
<?=getMapHtml($mapTheme);?>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$history['nation']?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$history['power']?></td>
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$history['gen']?></td>
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$history['city']?></td>
</tr>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<tr>
<td colspan=5 valign=top>
<?=$history['log']?>
<?=getMapHtml($mapTheme)?>
</td>
<td id='nation_list_frame'>
<table id='nation_list'>
<thead>
<tr>
<th width=130>국명</th>
<th width=70>국력</th>
<th width=45>장수</th>
<th width=45>속령</th>
</tr>
</thead>
<tbody>
<?php foreach($nations as $nation): ?>
<tr>
<td><span style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'><?=$nation['name']?></td>
<td style='text-align:right'><?=number_format($nation['power'])?></td>
<td style='text-align:right'><?=number_format($nation['gennum'])?></td>
<td style='text-align:right'><?=number_format(count($nation['cities']??[]))?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot></tfoot>
</table>
</td>
</tr>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<tr><th colspan=5 align=center id=bg1> </th></tr>
<tr>
<td colspan=5 valign=top>
<?=$history['genlog']?>
<?=formatHistoryToHTML(Json::decode($history['global_history']))?>
</td>
</tr>
<tr><th colspan=5 align=center id=bg1> </th></tr>
<tr>
<td colspan=5 valign=top>
<?=formatHistoryToHTML(Json::decode($history['global_action']))?>
</td>
</tr>
</tbody>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
+8 -8
View File
@@ -46,7 +46,7 @@ uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];});
$nations[0] = getNationStaticInfo(0);
foreach($db->query('SELECT npc,name,city,nation,level,penalty,permission FROM general ORDER BY dedication DESC') as $general){
foreach($db->query('SELECT npc,name,city,nation,officer_level,penalty,permission FROM general ORDER BY dedication DESC') as $general){
$nationID = $general['nation'];
if(!key_exists('generals', $nations[$nationID])){
@@ -73,9 +73,9 @@ foreach ($nations as $nation) {
$ambassadors = [];
$auditors = [];
foreach($generals as $general){
$generalLevel = $general['level'];
if($generalLevel >= 5){
$chiefs[$generalLevel] = $general;
$officerLevel = $general['officer_level'];
if($officerLevel >= 5){
$chiefs[$officerLevel] = $general;
}
$generalPermission = checkSecretPermission($general, false);
if($generalPermission == 4){
@@ -99,16 +99,16 @@ foreach ($nations as $nation) {
<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>".count($generals)." / ".count($nation['cities'])."</td>
<td width=170 align=center>{$nation['gennum']} / ".count($nation['cities']??[])."</td>
";
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
if($chiefLevel % 4 == 0){
echo '</tr><tr>';
}
$chief = $chiefs[$chiefLevel]??['name'=>'-','npc'=>0];
$levelText = getLevelText($chiefLevel, $nation['level']);
$officerLevelText = getOfficerLevelText($chiefLevel, $nation['level']);
$chiefText = getColoredName($chief['name'], $chief['npc']);
echo "<td class='center bg1'>{$levelText}</td>
echo "<td class='center bg1'>{$officerLevelText}</td>
<td class='center'>{$chiefText}</td>";
}
echo "</tr>
@@ -161,7 +161,7 @@ echo "
<tr>
<td width=498 align=center>&nbsp;</td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>".count($nations[0]['generals'])."</td>
<td width=123 align=center>{$nations[0]['gennum']}</td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>".count($nations[0]['cities']??[])."</td>
</tr>
+45 -51
View File
@@ -11,7 +11,6 @@ if($type <= 0 || $type > 8){
}
$db = DB::db();
$connect=$db->get();
increaseRefresh("빙의일람", 2);
@@ -54,27 +53,39 @@ $sel[$type] = "selected";
</td></tr>
</table>
<?php
$nationname = [];
$nationname[0] = "-";
$nationName = [];
$nationName[0] = "-";
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
$nationName[$nation['nation']] = $nation['name'];
}
switch ($type) {//FIXME: $query 처리 부실
default:
case 1: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by binary(name)"; break;
case 2: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by nation"; break;
case 3: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by sum desc"; break;
case 4: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by leadership"; break;
case 5: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by strength"; break;
case 6: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by intel"; break;
case 7: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by experience"; break;
case 8: $query = "select npc,nation,name,name2,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1 order by dedication"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
echo"
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
$sortType = [
1 => ['name', true],
2 => ['nation', true],
3 => ['sum', false],
4 => ['leadership', false],
5 => ['strength', false],
6 => ['intel', false],
7 => ['experience', false],
8 => ['dedication', false],
];
[$sortKey, $isAsc] = $sortType[$type];
if($isAsc){
usort($generalList, function($lhs, $rhs)use($sortKey){
return $lhs[$sortKey] <=> $rhs[$sortKey];
});
}
else{
usort($generalList, function($lhs, $rhs)use($sortKey){
return $rhs[$sortKey] <=> $lhs[$sortKey];
});
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=102 align=center id=bg1>희생된 장수</td>
@@ -89,41 +100,24 @@ echo"
<td width=68 align=center id=bg1>지력</td>
<td width=78 align=center id=bg1>명성</td>
<td width=78 align=center id=bg1>계급</td>
</tr>";
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
$nation = $nationname[$general['nation']];
if ($general['npc'] >= 2) {
$name = "<font color=cyan>{$general['name']}</font>";
} elseif ($general['npc'] == 1) {
$name = "<font color=skyblue>{$general['name']}</font>";
} else {
$name = "{$general['name']}";
}
echo "
</tr>
<?php foreach($generalList as $general): ?>
<tr>
<td align=center>{$name}</td>
<td align=center>{$general['name2']}</td>
<td align=center>Lv {$general['explevel']}</td>
<td align=center>{$nation}</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialDomesticInfo($general['special'])." / ".displaySpecialWarInfo($general['special2'])."</td>
<td align=center>{$general['sum']}</td>
<td align=center>{$general['leadership']}</td>
<td align=center>{$general['strength']}</td>
<td align=center>{$general['intel']}</td>
<td align=center>{$general['experience']}</td>
<td align=center>{$general['dedication']}</td>
</tr>";
}
echo "
<td align=center><?=getColoredName($general['name'], $general['npc'])?></td>
<td align=center><?=$general['owner_name']?></td>
<td align=center>Lv <?=$general['explevel']?></td>
<td align=center><?=$nationName[$general['nation']]?></td>
<td align=center><?=displayCharInfo($general['personal'])?></td>
<td align=center><?=displaySpecialDomesticInfo($general['special'])?> / <?=displaySpecialWarInfo($general['special2'])?></td>
<td align=center><?=$general['sum']?></td>
<td align=center><?=$general['leadership']?></td>
<td align=center><?=$general['strength']?></td>
<td align=center><?=$general['intel']?></td>
<td align=center><?=$general['experience']?></td>
<td align=center><?=$general['dedication']?></td>
</tr>
<?php endforeach; ?>
</table>
";
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
+3 -6
View File
@@ -9,16 +9,13 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력도", 2);
TurnExecutionHelper::executeAllCommand();
$mapTheme = $gameStor->map_theme??'che';
$query = "select con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
@@ -64,7 +61,7 @@ $(function(){
<table align=center width=1200 height=520 class='tb_layout bg0'>
<tr height=520>
<td width=498 valign=top>
<?=getGeneralPublicRecordRecent(34)?>
<?=formatHistoryToHTML(getGlobalActionLogRecent(34))?>
</td>
<td width=698>
<?=getMapHtml($mapTheme)?>
@@ -72,7 +69,7 @@ $(function(){
</tr>
<tr>
<td colspan=2 valign=top>
<?=getWorldHistoryRecent(34)?>
<?=formatHistoryToHTML(getGlobalHistoryLogRecent(34))?>
</td>
</tr>
</table>
+1 -1
View File
@@ -328,7 +328,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
continue;
}
$per = round($nationVote[$nation['nation']][$k]??0 / $memCount * 100, 1);
$per = round(($nationVote[$nation['nation']][$k]??0) / $memCount * 100, 1);
if($i == $voteTypeCount-1){
$per = 100-$totalPer;
+5 -18
View File
@@ -13,13 +13,10 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("거래장", 2);
$query = "select no,special,con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT no,special,con,turntime from general where owner=%i', $userID);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -32,7 +29,7 @@ $bidCount = $db->queryFirstField('SELECT count(no) FROM auction where no2=%i', $
$btCount = $tradeCount + $bidCount;
if ($session->userGrade >= 5) {
if ($session->userGrade >= 5 || $btCount < 1) {
$btn = "submit";
} else {
$btn = "hidden";
@@ -62,7 +59,7 @@ if ($msg2 == "") {
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td align=center id=bg2><font color=orange size=6><b> </b></font><input type=button value='갱신' onclick=location.replace('b_auction.php')></td></tr>
<tr><td align=center id=bg2><font color=orange size=6><b> </b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
@@ -81,13 +78,8 @@ if ($msg2 == "") {
<td width=148>거래종료</td>
</tr>
<?php
$query = "select * from auction where type=0 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
$chk = 0;
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
foreach($db->query('SELECT * from auction where type=0 order by expire') as $auction){
$radio = "";
$alert = "";
$alert2 = "";
@@ -174,13 +166,8 @@ for ($i=0; $i < $count; $i++) {
<td width=148>거래종료</td>
</tr>
<?php
$query = "select * from auction where type=1 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
$chk = 0;
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
foreach($db->query('SELECT * from auction where type=1 order by expire') as $auction){
$radio = "";
$alert = "";
$alert2 = "";
+21 -34
View File
@@ -17,8 +17,8 @@ $queryMap = [
'turntime' => ['최근턴', 0, function($lhs, $rhs){
return -($lhs['turntime']<=>$rhs['turntime']);
}],
'recwar' => ['최근전투', 1, function($lhs, $rhs){
return -($lhs['recwar']<=>$rhs['recwar']);
'recent_war' => ['최근전투', 1, function($lhs, $rhs){
return -($lhs['recent_war']<=>$rhs['recent_war']);
}],
'name' => ['장수명', 0, function($lhs, $rhs){
if($lhs['npc'] !== $rhs['npc']){
@@ -26,7 +26,7 @@ $queryMap = [
}
return $lhs['name']<=>$rhs['name'];
}],
'warnum' => ['전투수', 1, function($lhs, $rhs){
'warnum' => ['전투수', 2, function($lhs, $rhs){
return -($lhs['warnum']<=>$rhs['warnum']);
}]
];
@@ -36,35 +36,22 @@ if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
}
if($reqQueryType === null || !key_exists($reqQueryType, $queryMap)){
$reqQueryType = Util::array_first_key($queryMap);
}
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("감찰부", 2);
//전투 추진을 위해 갱신
TurnExecutionHelper::executeAllCommand();
$gameStor->resetCache();
$query = "select nation from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$general = MYDB_fetch_array($result);
$testGeneralNationID = $db->queryFirstField('SELECT nation FROM general WHERE no = %i', $gen);
$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);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,permission,penalty from general where owner=%i', $userID);
$nationID = $me['nation'];
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -83,7 +70,7 @@ else if ($permission < 1) {
}
//잘못된 접근
if ($general['nation'] != $me['nation']) {
if ($testGeneralNationID != $nationID) {
$gen = 0;
}
@@ -94,24 +81,24 @@ if ($btn == '정렬하기') {
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if($reqArgType===0){
$generalBasicList = $db->query('SELECT no, name, npc, turntime FROM general');
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID);
}
else if($reqArgType===1){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, %b FROM general', $reqQueryType);
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
}
else if($reqArgType===2){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, value as %b
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %b',
$reqQueryType, $reqQueryType
WHERE rank_data.type = %s AND general.nation = %i',
$reqQueryType, $reqQueryType, $nationID
);
}
else if($reqArgType===3){
$generalBasicList = array_map(function($arr){
$arr['aux'] = Json::decode($arr['aux']);
return $arr;
}, $db->query('SELECT no, name, npc, turntime, aux FROM general'));
}, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID));
}
else{
throw new \sammo\MustNotBeReachedException();
@@ -148,16 +135,16 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<tr><td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<select name='query_type' size=1>
<?php foreach($queryMap as $queryType => [$queryTypeText,]): ?>
<option <?=$queryKey==$reqQueryType?'selected':''?> value='<?=$queryKey?>'><?=$queryTypeText?></option>
<option <?=$queryType==$reqQueryType?'selected':''?> value='<?=$queryType?>'><?=$queryTypeText?></option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php foreach($generalBasicList as $general): ?>
<option <?=$gen==$general['no']?'selected':''?>><?=$general['name']?> (<?=$general['turntime']?>)</option>
<option <?=$gen==$general['no']?'selected':''?> value='<?=$general['no']?>'><?=$general['officer_level']>4?"*{$general['name']}*":$general['name']?> (<?=substr($general['turntime'], 14, 5)?>)</option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='조회하기'>
@@ -174,7 +161,7 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<?php generalInfo($showGeneral); generalInfo2($showGeneral); ?>
</td>
<td valign=top>
<?=getGeneralHistoryAll($gen)?>
<?=formatHistoryToHTML(getGeneralHistoryLogAll($gen))?>
</td>
</tr>
<tr>
@@ -183,20 +170,20 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</tr>
<tr>
<td valign=top>
<?=getBatLogRecent($gen, 24)?>
<?=formatHistoryToHTML(getBattleDetailLogRecent($gen, 24))?>
</td>
<td valign=top>
<?=getBatResRecent($gen, 24)?>
<?=formatHistoryToHTML(getBattleResultRecent($gen, 24))?>
</td>
</tr>
<?php if($npc > 1 || $permission >= 2): ?>
<?php if($showGeneral->getNPCType() > 1 || $permission >= 2): ?>
<tr>
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>&nbsp;</font></td>
</tr>
<tr>
<td valign=top>
<?=getGenLogRecent($gen, 24)?>
<?=formatHistoryToHTML(getGeneralActionLogRecent($gen, 24))?>
</td>
<td valign=top>
</td>
+104 -46
View File
@@ -9,7 +9,6 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("베팅장", 1);
TurnExecutionHelper::executeAllCommand();
@@ -17,8 +16,10 @@ TurnExecutionHelper::executeAllCommand();
$generalID = $session->generalID;
//NOTE: general_id만 빼기 귀찮음.
$myBet = array_splice($db->queryFirstList('SELECT * FROM betting WHERE general_id = %i', $generalID), -16);
$globalBet = array_splice($db->queryFirstList('SELECT * FROM betting WHERE general_id = 0'), -16);
$myBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = %i', $generalID);
$myBet = array_splice($myBet, -16);
$globalBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = 0');
$globalBet = array_splice($globalBet, -16);
$me = $db->queryFirstRow('SELECT no,tournament,con,turntime from general where owner=%i', $userID);
@@ -34,7 +35,7 @@ if ($con >= 2) {
}
switch ($admin['tnmt_type']) {
default: throw new \RuntimeException('Invalid tnmt_type');break;
default: throw new \RuntimeException('Invalid tnmt_type');
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break;
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break;
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break;
@@ -84,14 +85,15 @@ if($str3){
<tr align=center><td height=10 colspan=16></td></tr>
<tr align=center>
<?php
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$general = MYDB_fetch_array($result)??[
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
while(count($generalList) < 1){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'name'=>'',
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -107,20 +109,21 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$cent = [];
$line = [];
$gen = [];
for ($i=0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 2; $i++) {
$general = MYDB_fetch_array($result)??[
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
while(count($generalList) < 2){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'name'=>'',
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -155,17 +158,18 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 4; $i++) {
$general = MYDB_fetch_array($result)??[
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
while(count($generalList) < 4){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'name'=>'',
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -200,17 +204,18 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 8; $i++) {
$general = MYDB_fetch_array($result)??[
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
while(count($generalList) < 8){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'name'=>'',
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -245,17 +250,18 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 16; $i++) {
$general = MYDB_fetch_array($result)??[
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
while(count($generalList) < 16){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'name'=>'',
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -286,7 +292,6 @@ for ($i=0; $i < 16; $i++) {
echo "<td width=70>{$gen[$i]}</td>";
}
$myBet = [];
$bet = [];
$gold = [];
@@ -393,31 +398,84 @@ if ($admin['tournament'] == 6) {
<tr align=center>
<?php
$tournamentType = [
'전 력 전'=>[
'종합',
function(General $general){return $general->getVar('leadership')+$general->getVar('strength')+$general->getVar('intel');},
'tt',
],
'통 솔 전'=>[
'통솔',
function(General $general){return $general->getVar('leadership');},
'tl',
],
'일 기 토'=>[
'무력',
function(General $general){return $general->getVar('strength');},
'ts',
],
'설 전'=>[
'지력',
function(General $general){return $general->getVar('intel');},
'ti',
],
];
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
$type2 = array("종합", "통솔", "무력", "지력");
$type3 = array("tt", "tl", "ts", "ti");
$type4 = array("total", "leadership", "strength", "intel");
for ($i=0; $i < 4; $i++) {
$grp = $i;
echo "
foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankColumn]): ?>
<td>
<table align=center width=280 class='tb_layout bg0'>
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4>{$type1[$i]}</font></td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$type2[$i]}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
$query = "select npc,name,leadership,strength,intel,leadership+strength+intel as total,{$type3[$i]}p as prize,{$type3[$i]}w+{$type3[$i]}d+{$type3[$i]}l as game,{$type3[$i]}w as win,{$type3[$i]}d as draw,{$type3[$i]}l as lose,{$type3[$i]}g as gl from general order by gl desc, game desc, win desc, draw desc, lose, no limit 0,30";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 30; $k++) {
$general = MYDB_fetch_array($result);
printRow($k, $general['npc'], $general['name'], $general[$type4[$i]], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gl'], $general['prize'], 0);
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4><?=$tournamentTypeText?></font></td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center><?=$statTypeText?></td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr>
<?php
$prizeColumn = "{$rankColumn}p";
$gameColumn = "{$rankColumn}g";
$winColumn = "{$rankColumn}w";
$drawColumn = "{$rankColumn}d";
$loseColumn = "{$rankColumn}l";
$tournamentRankerList = General::createGeneralObjListFromDB(
$db->queryFirstColumn('SELECT general_id FROM rank_data WHERE `type`= %s ORDER BY value DESC LIMIT 40', $gameColumn),
[$prizeColumn, $gameColumn, $winColumn, $drawColumn, $loseColumn,'leadership', 'strength', 'intel', 'no', 'npc', 'name'],
0
);
usort($tournamentRankerList, function(General $lhs, General $rhs) use($gameColumn, $winColumn, $drawColumn, $loseColumn){
$result = -($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
if($result !== 0) return $result;
$result = -(
($lhs->getRankVar($winColumn)+$lhs->getRankVar($drawColumn)+$lhs->getRankVar($loseColumn))
<=>
($rhs->getRankVar($winColumn)+$rhs->getRankVar($drawColumn)+$rhs->getRankVar($loseColumn))
);
if($result !== 0) return $result;
$result = -($lhs->getRankVar($winColumn) <=> $rhs->getRankVar($winColumn));
if($result !== 0) return $result;
$result = -($lhs->getRankVar($drawColumn) <=> $rhs->getRankVar($drawColumn));
if($result !== 0) return $result;
return $lhs->getRankVar($loseColumn) <=> $rhs->getRankVar($loseColumn);
});
$tournamentRankerList = array_splice($tournamentRankerList, 0, 30);
foreach($tournamentRankerList as $rank=>$ranker){
printRow(
$rank,
$ranker->getNPCType(),
$ranker->getName(),
($statFunc)($ranker),
$ranker->getRankVar($winColumn)+$ranker->getRankVar($drawColumn)+$ranker->getRankVar($loseColumn),
$ranker->getRankVar($winColumn),
$ranker->getRankVar($drawColumn),
$ranker->getRankVar($loseColumn),
$ranker->getRankVar($gameColumn),
$ranker->getRankVar($prizeColumn),
0
);
}
echo "
</table>
</td>";
}
?>
</table></td>
<?php endforeach; ?>
</tr>
<tr>
<td colspan=16>
+10 -10
View File
@@ -39,14 +39,14 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
<div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
><div class='chiefTurnIdxPanel'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(range(1, 12) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx?></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div
<?php foreach(range(1, GameConst::$maxChiefTurn) as $turnIdx): ?>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
><div class='chiefTurnBox turn<?=$turnIdx?>'
><div class='chiefTurnTime'>&nbsp;</div
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div
@@ -56,8 +56,8 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
<?php endforeach; ?>
><div class='chiefTurnIdxPanel tail'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(range(1, GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx?></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
></div
@@ -79,14 +79,14 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
><div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;'
><div class='chiefTurnIdxPanel'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(range(1, GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx?></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div
<?php foreach(range(1, GameConst::$maxChiefTurn) as $turnIdx): ?>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
><div class='chiefTurnBox turn<?=$turnIdx?>'
><div class='chiefTurnTime'>&nbsp;</div
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div
@@ -96,8 +96,8 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
<?php endforeach; ?>
><div class='chiefTurnIdxPanel tail'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(range(1, 12) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx?></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
></div
+30 -58
View File
@@ -12,14 +12,10 @@ $userID = Session::getUserID();
$userGrade = Session::getUserGrade();
$db = DB::db();
$connect=$db->get();
increaseRefresh("현재도시", 1);
$query = "select no,nation,level,city from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
$templates = new \League\Plates\Engine('templates');
@@ -77,10 +73,8 @@ if(!$citylist){
// 재야일때는 현재 도시만
$valid = 0;
if($me['level'] == 0) {
$query = "select city,name,nation from city where city='{$me['city']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityresult);
if($me['officer_level'] == 0) {
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
@@ -91,12 +85,7 @@ if($me['level'] == 0) {
echo "</option>";
} else {
// 아국 도시들 선택
$query = "select city,name,nation from city where nation='{$me['nation']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($cityresult);
foreach($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city){
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
@@ -108,12 +97,7 @@ if($me['level'] == 0) {
}
// 아국 장수가 있는 타국 도시들 선택
$query = "select distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation='{$me['nation']}' and B.nation!='{$me['nation']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($cityresult);
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city){
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
@@ -178,42 +162,38 @@ $officer = [
3=>['name'=>'-', 'npc'=>0],
2=>['name'=>'-', 'npc'=>0]
];
$officerQuery = [];
if($city['officer4']){ $officerQuery[] = $city['officer4']; }
if($city['officer3']){ $officerQuery[] = $city['officer3']; }
if($city['officer2']){ $officerQuery[] = $city['officer2']; }
if($officerQuery){
foreach($db->query('SELECT `name`, npc, `level` FROM general WHERE `no` IN %li', $city['officer4']) as $officerInfo){
$officer[$officerInfo['level']] = $officerInfo;
}
foreach($db->query('SELECT `name`, npc, `officer_level` FROM general WHERE `officer_city` = %i', $city['city']) as $officerInfo){
$officer[$officerInfo['officer_level']] = $officerInfo;
}
if($city['trade'] === null) {
$city['trade'] = "- ";
}
$query = "select npc,defence_train,no,picture,imgsvr,name,injury,leadership,strength,intel,level,nation,crewtype,crew,train,atmos from general where city='{$city['city']}' order by dedication desc"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
$generals = $db->query(
'SELECT npc,defence_train,no,picture,imgsvr,name,injury,leadership,strength,intel,level,nation,crewtype,crew,train,atmos from general where city=%i order by name',
'SELECT %l from general where city=%i order by name',
Util::formatListOfBackticks($dbColumns),
$city['city']
);
$generalTurnList = [];
foreach($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]
){
if(!key_exists($generalID, $generalTurnList)){
$generalTurnList[$generalID] = [];
if($generals){
foreach($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]
){
if(!key_exists($generalID, $generalTurnList)){
$generalTurnList[$generalID] = [];
}
$generalTurnList[$generalID][$turnIdx] = $brief;
}
$generalTurnList[$generalID][$turnIdx] = $brief;
}
$nationname = [];
$nationlevel = [];
foreach(getAllNationStaticInfo() as $nation){
@@ -225,9 +205,7 @@ foreach(getAllNationStaticInfo() as $nation){
$generalsFormat = [];
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
foreach($generals as $general){
$nationInfo = getNationStaticInfo($general['nation']);
if($general['nation'] != 0 && $general['nation'] == $myNation['nation']){
@@ -256,16 +234,10 @@ for($j=0; $j < $gencount; $j++) {
$strengthText = formatWounded($strength, $general['injury']);
$intelText = formatWounded($intel, $general['injury']);
$level = $general['level'];
$levelText = getLevelText($general['level']);
$officerLevel = $general['officer_level'];
$officerLevelText = getOfficerLevelText($officerLevel);
if($general['level'] == 12) {
$leadershipBonus = $nationInfo['level'] * 2;
} elseif($general['level'] >= 5) {
$leadershipBonus = $nationInfo['level'];
} else {
$leadershipBonus = 0;
}
$leadershipBonus = calcLeadershipBonus($officerLevel, $nationInfo['level']);
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
if($ourGeneral){
@@ -292,7 +264,7 @@ for($j=0; $j < $gencount; $j++) {
if($ourGeneral && !$isNPC){
$turnText = [];
$generalObj = new General($general, null, null, null, false);
$generalObj = new General($general, null, null, null, null, null, false);
foreach($generalTurnList[$generalObj->getID()] as $turnRawIdx=>$turn){
$turnIdx = $turnRawIdx+1;
$turnText[] = "{$turnIdx} : $turn";
@@ -314,8 +286,8 @@ for($j=0; $j < $gencount; $j++) {
'leadershipText'=>$leadershipText,
'leadershipBonus'=>$leadershipBonus,
'leadershipBonusText'=>$leadershipBonusText,
'level'=>$level,
'levelText'=>$levelText,
'officerLevel'=>$officerLevel,
'officerLevelText'=>$officerLevelText,
'strength'=>$strength,
'strengthText'=>$strengthText,
'intel'=>$intel,
@@ -333,7 +305,7 @@ for($j=0; $j < $gencount; $j++) {
];
}
$generalsName = array_map(function($gen){return $gen['name'];}, $generalsFormat);
$generalsName = array_map(function($gen){return getColoredName($gen['name'], $gen['npc']);}, $generals);
$enemyCrew = 0;
$enemyCnt = 0;
+16 -13
View File
@@ -9,14 +9,15 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("내무부", 1);
$me = $db->queryFirstRow('SELECT no, nation, level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$me = $db->queryFirstRow('SELECT no, nation, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$nationID = $me['nation'];
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,msg,scoutmsg,capital FROM nation WHERE nation = %i', $nationID);
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -34,7 +35,7 @@ else if ($permission < 1) {
die();
}
if ($me['level'] >= 5) {
if ($me['officer_level'] >= 5) {
$btn = "submit";
$read = "";
} else {
@@ -42,6 +43,8 @@ if ($me['level'] >= 5) {
$read = "readonly";
}
$nationStor->cacheValues(['notice', 'scout_msg']);
?>
<!DOCTYPE html>
<html>
@@ -51,9 +54,9 @@ if ($me['level'] >= 5) {
<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']??'')?>;
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>;
var nationMsg = <?=Json::encode($nationStor->notice??'')?>;
var scoutmsg = <?=Json::encode($nationStor->scout_msg??'')?>;
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
@@ -93,11 +96,15 @@ $admin = $gameStor->getValues(['year','month']);
$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
$nationsList = getAllNationStaticInfo();
uasort($nationsList, function(array $lhs, array $rhs){
return -($lhs['power']<=>$rhs['power']);
});
foreach(getAllNationStaticInfo() as $staticNation):
foreach($nationsList as $staticNation):
//속령수
$staticNationID = $staticNation['nation'];
$cityCnt = $cityCntList[$staticNation['nation']];
$cityCnt = $cityCntList[$staticNation['nation']]??0;
$dipStateText = '-';
$dipTermText = '-';
@@ -109,10 +116,6 @@ foreach(getAllNationStaticInfo() as $staticNation):
0 => "<font color=red>교 전</font>",
1 => "<font color=magenta>선포중</font>",
2 => "통 상",
3 => "<font color=cyan>통합수락중</font>",
4 => "<font color=cyan>통합제의중</font>",
5 => "<font color=cyan>합병수락중</font>",
6 => "<font color=cyan>합병제의중</font>",
7 => "<font color=green>불가침</font>",
][$diplomacyState['state']];
+93 -101
View File
@@ -9,39 +9,24 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("중원정보", 1);
$mapTheme = $gameStor->map_theme??'che';
$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);
$me = $db->queryFirstRow('SELECT no,nation FROM general WHERE owner=%i', $userID);
$myNationID = $me['nation'];
$query = "select nation,color,name,power,gennum from nation where level>0 order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationcount = MYDB_num_rows($result);
$nationnum = [];
$nationname = [];
$nations = array_filter(getAllNationStaticInfo(), function(array $nation){
return $nation['level'];
});
uasort($nations, function(array $lhs, array $rhs){
return -($lhs['power']<=>$rhs['power']);
});
$nationCnt = count($nations);
$nationStr = "";
$powerStr = "";
$genStr = "";
$cityStr = "";
for($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($result);
$citycount = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nation['nation']);
$nationnum[] = $nation['nation'];
$nationname[$nation['nation']] = $nation['name'];
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
$powerStr .= "{$nation['power']}<br>";
$genStr .= "{$nation['gennum']}<br>";
$cityStr .= "$citycount<br>";
foreach($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation != 0 GROUP BY nation') as [$nationID, $cityCnt]){
$nations[$nationID]['city_cnt'] = $cityCnt;
}
$realConflict = [];
@@ -51,23 +36,51 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
$rawConflict
])
{
$conflict = Json::decode($rawConflict);
if (count($conflict)<2) {
$rawConflict = Json::decode($rawConflict);
if (count($rawConflict)<2) {
continue;
}
$sum = array_sum($conflict);
$sum = array_sum($rawConflict);
foreach ($conflict as $nationID=>$killnum) {
$conflict[$nationID] = ['killnum'=>$killnum];
$conflict[$nationID]['percent'] = round(100*$killnum / $sum, 1);
$conflict[$nationID]['name'] = $nationname[$nationID];
$conflict[$nationID]['color'] = getNationStaticInfo($nationID)['color'];
$conflict = [];
foreach ($rawConflict as $nationID=>$killnum) {
$conflict[$nationID] = [
'killnum'=>$killnum,
'percent'=>round(100*$killnum / $sum, 1),
'name'=>$nations[$nationID]['name'],
'color'=>$nations[$nationID]['color']
];
}
$realConflict[] = [$cityID, $cityName, $conflict];
};
$diplomacyList = [];
foreach($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you, $state]){
if(!key_exists($me, $diplomacyList)){
$diplomacyList[$me] = [];
}
$diplomacyList[$me][$you] = $state;
}
$cellWidth = intdiv(888, max(1, $nationCnt));
$defaultStateChar = '?';
$sameNationStateChar = '';
$infomativeStateCharMap = [
0=>'<span style="color:red;">★</span>',
1=>'<span style="color:magenta;">▲</span>',
2=>'ㆍ',
7=>'<span style="color:green;">@</span>'
];
$neutralStateCharMap = [
0=>'<span style="color:red;">★</span>',
1=>'<span style="color:magenta;">▲</span>'
];
?>
<!DOCTYPE html>
@@ -100,6 +113,7 @@ $(function(){
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<?=WebUtil::printCSS('css/history.css')?>
</head>
@@ -109,73 +123,32 @@ $(function(){
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
<?php
echo "
<tr><td colspan=<?=$nationCnt+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
<tr>
<td align=center width=130 style=background-color:".GameConst::$basecolor2.";>&nbsp;</td>";
if($nationcount != 0) {
$width = intdiv(888, $nationcount);
<td align=center width=130 style=background-color:<?=GameConst::$basecolor2?>;>&nbsp;</td>
<?php foreach($nations as $nation): ?>
<td align=center width=<?=$cellWidth?> style='background-color:<?=$nation['color']?>;color:<?=newColor($nation['color'])?>'><?=$nation['name']?></td>
<?php endforeach; ?>
</tr>
<?php foreach($nations as $me=>$meNation): ?>
<tr style='text-align:center;'>
<td align=center style='background-color:<?=$meNation['color']?>;color:<?=newColor($meNation['color'])?>'><?=$meNation['name']?></td>
<?php foreach(array_keys($nations) as $you): ?>
<td <?=($me==$myNationID||$you==$myNationID)?'style="background-color:'.GameConst::$basecolor3.'"':''?>><?php
if($me==$you){
echo $sameNationStateChar;
}
for($i=0; $i < $nationcount; $i++) {
echo "
<td align=center width={$width} style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
else if($me==$myNationID || $you==$myNationID || $session->userGrade >= 5){
echo $infomativeStateCharMap[$diplomacyList[$me][$you]]??$defaultStateChar;
}
echo "
</tr>";
$state = [];
for($i=0; $i < $nationcount; $i++) {
$query = "select you,state from diplomacy where me='$nationnum[$i]'";
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationcount2 = MYDB_num_rows($dipresult);
for($k=0; $k < $nationcount2; $k++) {
$dip = MYDB_fetch_array($dipresult);
$state[$dip['you']] = $dip['state'];
}
echo "
<tr>
<td align=center style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
for($k=0; $k < $nationcount; $k++) {
if($i == $k) {
$str = "";
} else {
switch($state[$nationnum[$k]]) {
case 0: $str = "<font color=red>★</font>"; break;
case 1: $str = "<font color=magenta>▲</font>"; break;
case 2:
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = ""; }
else { $str = "?"; }
// $str = "ㆍ";
break;
case 3: $str = "<font color=cyan>○</font>"; break;
case 4: $str = "<font color=cyan>○</font>"; break;
case 5: $str = "<font color=cyan>◎</font>"; break;
case 6: $str = "<font color=cyan>◎</font>"; break;
case 7:
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = "<font color=green>@</font>"; }
else { $str = "?"; }
// $str = "<font color=limegreen>@</font>";
break;
}
}
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation']) { $backcolor = "style=background-color:".GameConst::$basecolor3.";"; }
else { $backcolor = ""; }
echo "
<td align=center $backcolor>$str</td>";
}
echo "
</tr>
";
else{
echo $neutralStateCharMap[$diplomacyList[$me][$you]]??$defaultStateChar;
}
?>
<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>
?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<tr><td colspan=<?=$nationCnt+1?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
</table>
<?php if ($realConflict) : ?>
@@ -220,10 +193,29 @@ for($i=0; $i < $nationcount; $i++) {
<td width=698 height=420>
<?=getMapHtml($mapTheme)?>
</td>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$nationStr?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$powerStr?></td>
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$genStr?></td>
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$cityStr?></td>
<td id='nation_list_frame'>
<table id='nation_list'>
<thead>
<tr>
<th width=130>국명</th>
<th width=70>국력</th>
<th width=45>장수</th>
<th width=45>속령</th>
</tr>
</thead>
<tbody>
<?php foreach($nations as $nation): ?>
<tr>
<td><span style='color:<?=newColor($nation['color'])?>;background-color:<?=$nation['color']?>'><?=$nation['name']?></td>
<td style='text-align:right'><?=number_format($nation['power'])?></td>
<td style='text-align:right'><?=number_format($nation['gennum'])?></td>
<td style='text-align:right'><?=number_format($nation['city_cnt'])?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot></tfoot>
</table>
</td>
</tr>
</table>
<br>
+8 -7
View File
@@ -15,13 +15,10 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("암행부", 1);
$query = "select no,nation,level,con,turntime,belong,permission,penalty 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,officer_level,con,turntime,belong,permission,penalty from general where owner=%i', $userID);
$nationLevel = $db->queryFirstField('SELECT level FROM nation WHERE nation=%i', $me['nation']);
@@ -100,7 +97,7 @@ switch ($type) {
}
$generals = $db->query(
'SELECT npc,defence_train,no,level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
'SELECT npc,defence_train,no,officer_level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
$me['nation'],
$orderSQL
);
@@ -127,7 +124,7 @@ foreach ($generals as &$general) {
$genCntEff += 1;
}
$lbonus = calcLeadershipBonus($general['level'], $nationLevel);
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
@@ -162,6 +159,7 @@ foreach ($generals as &$general) {
if ($general['npc'] < 2) {
$turntext = [];
foreach($generalTurnList[$general['no']] as $turnRawIdx=>$turn){
$turn = StringUtil::subStringForWidth($turn, 0, 41);
$turnIdx = $turnRawIdx+1;
@@ -172,7 +170,7 @@ foreach ($generals as &$general) {
}
unset($general);
$genCnt = count($generals);
$genCnt = countPureGeneralFromRawList($generals);
$totalGold = 0;
$totalRice = 0;
$crew90 = 0;
@@ -184,6 +182,9 @@ $gen60 = 0;
$crewTotal = 0;
//$genTotal = 0;
foreach($generals as $general){
if($general['npc']==5){
continue;
}
$totalGold += $general['gold'];
$totalRice += $general['rice'];
+168 -215
View File
@@ -8,22 +8,22 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("인사부", 1);
//훼섭 추방을 위해 갱신
TurnExecutionHelper::executeAllCommand();
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT no,nation,officer_level from general where owner=%i', $userID);
$nationID = $me['nation'];
$meLevel = $me['level'];
$meLevel = $me['officer_level'];
if($meLevel == 0) {
echo "재야입니다.";
exit();
}
$nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nation where nation=%i', $nationID); //국가정보
?>
<!DOCTYPE html>
<html>
@@ -44,19 +44,14 @@ if($meLevel == 0) {
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
function out() {
return confirm('정말 추방하시겠습니까?');
}
var chiefStatMin = <?=GameConst::$chiefStatMin?>;
var myLevel = <?=$meLevel?>;
</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']);
$ambassadors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'ambassador\' AND nation = %i', $nationID);
$auditors = $db->query('SELECT no, name, officer_level, penalty, permission FROM general WHERE permission = \'auditor\' AND nation = %i', $nationID);
$candidateAmbassadors = [];
$candidateAuditors = [];
foreach($ambassadors as $ambassador){
@@ -65,7 +60,7 @@ foreach($ambassadors as $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){
foreach($db->query('SELECT no, name, nation, officer_level, penalty, permission FROM general WHERE nation = %i AND permission = \'normal\' AND officer_level != 12', $nationID) as $candidate){
$maxPermission = checkSecretMaxPermission($candidate);
if($maxPermission == 4){
$candidateAmbassadors[] = $candidate;
@@ -105,22 +100,22 @@ var candidateAuditors = <?=Json::encode(array_map(function($value){
<?php
$lv = getNationChiefLevel($nation['level']);
if($meLevel >= 5) { $btn = "submit"; }
if($meLevel >= 5) { $btn = "button"; }
else { $btn = "hidden"; }
$query = "select name,level,picture,imgsvr,belong from general where nation='{$nation['nation']}' and level>={$lv} order by level desc";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level = [];
for($i=12; $i >= $lv; $i--) {
$levels = MYDB_fetch_array($genresult);
$level[$levels['level']] = $levels;
}
$level = Util::convertArrayToDict(
$db->query(
'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc',
$nationID, $lv
),
'officer_level'
);
$tigers = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "warnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nation['nation']
$nationID
);// 오호장군
$tigerstr = join(', ', array_map(function($arr){
$number = number_format($arr['value']);
@@ -130,31 +125,31 @@ $tigerstr = join(', ', array_map(function($arr){
$eagles = $db->query('SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nation['nation']
$nationID
);// 건안칠자
$eaglestr = join(', ', array_map(function($arr){
$number = number_format($arr['value']);
return "{$arr['name']}{$number}";
}, $eagles));
echo "
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']} colspan=6>
<font size=5> {$nation['name']} </font>
<td align=center style='color:<?=newColor($nation['color'])?>; background-color:<?=$nation['color']?>' colspan=6>
<font size=5> <?=$nation['name']?> 】</font>
</td>
</tr>
";
<?php
for($i=12; $i >= $lv; $i-=2) {
$i1 = $i; $i2 = $i - 1;
$imageTemp1 = GetImageURL($level[$i1]['imgsvr']??0);
$imageTemp2 = GetImageURL($level[$i2]['imgsvr']??0);
?>
<tr>
<td width=98 align=center id=bg1><font size=4><?=getLevelText($i1, $nation['level'])?></font></td>
<td width=98 align=center id=bg1><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp1?>/<?=$level[$i1]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td>
<td width=98 align=center id=bg1><font size=4><?=getLevelText($i2, $nation['level'])?></font></td>
<td width=98 align=center id=bg1><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?=$imageTemp2?>/<?=$level[$i2]['picture']??'default.jpg'?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td>
</tr>
@@ -172,7 +167,6 @@ for($i=12; $i >= $lv; $i-=2) {
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_myBossInfo.php>
<tr><td colspan=6 height=5></td></tr>
<tr><td colspan=2 align=center bgcolor=red> </td></tr>
<tr>
@@ -180,134 +174,113 @@ for($i=12; $i >= $lv; $i-=2) {
<td width=498>
<?php
if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) {
if($meLevel >= 5){
$candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김
}
else{
$candidateStrength = [];
$candidateIntel = [];
$candidateAny = [];
}
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $meLevel)) {
echo "
<select name=outlist size=1 style=color:white;background-color:black;>";
<select id='genlist_kick' size=1 style=color:white;background-color:black;>";
$query = "select no,npc,name,level,leadership,strength,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
if($general['npc'] == 5){
foreach($candidateAny as $general) {
if($general['no'] === $me['no']){
continue;
}
echo "
<option value={$general['no']}>{$general['name']} <small>({$general['leadership']}/{$general['strength']}/{$general['intel']}, {$general['killturn']})</small></option>";
<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']} <small>({$general['leadership']}/{$general['strength']}/{$general['intel']}, {$general['killturn']})</small></option>";
}
echo "
</select>
<input type=$btn name=btn value=추방 onclick='return out()'>";
<input type=$btn id='btn_kick' value=추방>";
}
$query = "select name,city from general where nation='{$me['nation']}' and level=12";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$officerLevelText = getOfficerLevelText(11, $nation['level']);
echo "
</td>
</tr>
</form>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=4 height=5></td></tr>
<tr><td colspan=4 align=center bgcolor=blue> </td></tr>
<tr>
<td width=98 align=right id=bg1>".getLevelText(12, $nation['level'])."</td>
<td width=398>{$general['name']} ".CityConst::byID($general['city'])->name."</td>
<td width=98 align=right id=bg1>".getLevelText(11, $nation['level'])."</td>
<form method=post action=c_myBossInfo.php>
<td width=98 align=right id=bg1>".getOfficerLevelText(12, $nation['level'])."</td>
<td width=398>{$level[12]['name']} ".CityConst::byID($level[12]['city'])->name."</td>
<td width=98 align=right id=bg1>{$officerLevelText}</td>
<td width=398>
";
if($meLevel >= 5 && $nation['l11set'] == 0) {
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
echo "
<select name=genlist size=1 maxlength=15 style=color:white;background-color:black;>
<option value=0>____공석____</option>";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
<select id='genlist_11' size=1 maxlength=15 style=color:white;background-color:black;>
<option value=0 data-officer_level='0' data-name=''>____공석____</option>";
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
if($general['level'] == 11) {
echo "<option style=color:red; selected value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['level'] > 1) {
echo "<option style=color:orange; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
foreach($candidateAny as $general) {
if($general['officer_level'] == 11) {
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['officer_level'] > 1) {
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} else {
echo "<option value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
}
}
echo "
</select>
<input type=hidden name=level value=11>
<input type=$btn name=btn value=임명>";
<input class='btn_appoint' type=$btn data-officer_level='11' data-officer_level_text='{$officerLevelText}' value=임명>";
} else {
$query = "select name,city from general where nation='{$me['nation']}' and level='11'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($general){
echo "{$general['name']}".CityConst::byID($general['city'])->name."";
if(key_exists(11, $level)){
echo "{$level[11]['name']}".CityConst::byID($level[11]['city'])->name."";
}
}
echo "
</td>
</form>
</tr>
";
$queries = [];
$queries[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[5] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
for($i=10; $i >= $lv; $i--) {
if($i % 2 == 0) { echo "<tr>"; }
$officerLevelText = getOfficerLevelText($i, $nation['level']);
echo "
<td width=98 align=right id=bg1>".getLevelText($i, $nation['level'])."</td>
<form method=post action=c_myBossInfo.php>
<td width=98 align=right id=bg1>{$officerLevelText}</td>
<td width=398>
";
if($meLevel >= 5 && $nation["l{$i}set"] == 0) {
if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], $i)) {
echo "
<select name=genlist size=1 style=color:white;background-color:black;>
<option value=0>____공석____</option>";
<select id='genlist_{$i}' size=1 style=color:white;background-color:black;>
<option value=0 data-officer_level='0' data-name=''>____공석____</option>";
$query = $queries[$i];
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
for($k=0; $k < $gencount; $k++) {
$general = MYDB_fetch_array($result);
if($general['level'] == $i) {
echo "<option style=color:red; selected value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['level'] > 1) {
echo "<option style=color:orange; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
foreach(($i%2==0?$candidateStrength:$candidateIntel) as $general) {
if($general['officer_level'] == $i) {
echo "<option style=color:red; selected data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['officer_level'] > 1) {
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} else {
echo "<option value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
}
}
echo "
</select>
<input type=hidden name=level value={$i}>
<input type=$btn name=btn value=임명>";
<input class='btn_appoint' type=$btn data-officer_level='{$i}' data-officer_level_text='$officerLevelText' value=임명>";
} else {
$query = "select name,city from general where nation='{$me['nation']}' and level={$i}";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general = $level[$i]??null;
if($general){
echo "{$general['name']}".CityConst::byID($general['city'])->name."";
}
}
echo "</td></form>";
echo "</td>";
if($i % 2 == 1) { echo "</tr>"; }
}
echo "
@@ -343,22 +316,21 @@ endif;
<tr><td colspan=5 height=5></td></tr>
<?php
if($meLevel >= 5) {
$officerLevelText = getOfficerLevelText(4, $nation['level']);
echo "
<tr><td colspan=5 align=center bgcolor=orange> </td></tr>
<form method=post action=c_myBossInfo.php>
<tr>
<td colspan=3 align=right id=bg2> </td>
<td colspan=3 align=right id=bg2>{$officerLevelText} </td>
<td colspan=2>
<select name=citylist size=1 style=color:white;background-color:black;>
<select id='citylist_4' size=1 style=color:white;background-color:black;>
";
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer4set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($result);
$cityList = $db->query('SELECT city,name,region,officer_set FROM city WHERE nation=%i ORDER BY region,level DESC,binary(name)', $nationID);
$region = 0;
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($result);
foreach($cityList as $city){
if(isOfficerSet($city['officer_set'], 4)){
continue;
}
if($region != $city['region']) {
if($region != 0) {
@@ -368,51 +340,43 @@ if($meLevel >= 5) {
$region = $city['region'];
}
echo "<option value='{$city['city']}' style=color:white;>{$city['name']}</option>";
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
}
echo "</optgroup>";
echo "
</select>
<select name=genlist size=1 style=color:white;background-color:black;>
<option value=0>____공석____</option>
<select id='genlist_4' size=1 style=color:white;background-color:black;>
<option value=0 data-officer_level='0' data-name=''>____공석____</option>
";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and strength>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=0; $i < $count; $i++) {
$general = MYDB_fetch_array($result);
if($general['level'] == 4) {
echo "<option style=color:red; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['level'] > 1) {
echo "<option style=color:orange; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
foreach($candidateStrength as $general) {
if($general['officer_level'] == 4) {
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['officer_level'] > 1) {
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} else {
echo "<option value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
}
}
echo "
</select>
<input type=hidden name=level value=4>
<input type=$btn name=btn value=임명>
<input class='btn_appoint' type=$btn data-officer_level='4' data-officer_level_text='{$officerLevelText}' value=임명>
</td>
</tr>
</form>
<form method=post action=c_myBossInfo.php>
<tr>
<td colspan=3 align=right id=bg2> </td>
</tr>";
$officerLevelText = getOfficerLevelText(3, $nation['level']);
echo "<tr>
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
<td colspan=2>
<select name=citylist size=1 style=color:white;background-color:black;>
<select id='citylist_3' size=1 style=color:white;background-color:black;>
";
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer3set=0 order by region,level desc,binary(name)"; // 도시 이름 목록
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($result);
$region = 0;
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($result);
foreach($cityList as $city){
if(isOfficerSet($city['officer_set'], 3)){
continue;
}
if($region != $city['region']) {
if($region != 0) {
@@ -422,51 +386,43 @@ if($meLevel >= 5) {
$region = $city['region'];
}
echo "<option value='{$city['city']}' style=color:white;>{$city['name']}</option>";
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
}
echo "</optgroup>";
echo "
</select>
<select name=genlist size=1 style=color:white;background-color:black;>
<option value=0>____공석____</option>
<select id='genlist_3' size=1 style=color:white;background-color:black;>
<option value=0 data-officer_level='0' data-name=''>____공석____</option>
";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=0; $i < $count; $i++) {
$general = MYDB_fetch_array($result);
if($general['level'] == 3) {
echo "<option style=color:red; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['level'] > 1) {
echo "<option style=color:orange; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
foreach($candidateIntel as $general) {
if($general['officer_level'] == 3) {
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['officer_level'] > 1) {
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} else {
echo "<option value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
}
}
echo "
</select>
<input type=hidden name=level value=3>
<input type=$btn name=btn value=임명>
<input class='btn_appoint' type=$btn data-officer_level='3' data-officer_level_text='{$officerLevelText}' value=임명>
</td>
</tr>
</form>
<form method=post action=c_myBossInfo.php>
<tr>
<td colspan=3 align=right id=bg2> </td>
</tr>";
$officerLevelText = getOfficerLevelText(2, $nation['level']);
echo "<tr>
<td colspan=3 align=right id=bg2>{$officerLevelText} 임명</td>
<td colspan=2>
<select name=citylist size=1 style=color:white;background-color:black;>
<select id='citylist_2' size=1 style=color:white;background-color:black;>
";
$query = "select city,name,region from city where nation='{$nation['nation']}' and officer2set=0 order by region, level desc,binary(name)"; // 도시 이름 목록
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($result);
$region = 0;
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($result);
foreach($cityList as $city){
if(isOfficerSet($city['officer_set'], 2)){
continue;
}
if($region != $city['region']) {
if($region != 0) {
@@ -476,38 +432,32 @@ if($meLevel >= 5) {
$region = $city['region'];
}
echo "<option value='{$city['city']}' style=color:white;>{$city['name']}</option>";
echo "<option value='{$city['city']}' style=color:white;><span class='name_field'>{$city['name']}</span></option>";
}
echo "</optgroup>";
echo "
</select>
<select name=genlist size=1 style=color:white;background-color:black;>
<option value=0>____공석____</option>
<select id='genlist_2' size=1 style=color:white;background-color:black;>
<option value=0>____<span class='name_field'>공석</span>____</option>
";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' order by npc,binary(name)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=0; $i < $count; $i++) {
$general = MYDB_fetch_array($result);
if($general['level'] == 2) {
echo "<option style=color:red; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['level'] > 1) {
echo "<option style=color:orange; value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
foreach ($candidateAny as $general) {
if($general['officer_level'] == 2) {
echo "<option style=color:red; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} elseif($general['officer_level'] > 1) {
echo "<option style=color:orange; data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
} else {
echo "<option value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
echo "<option data-officer_level='{$general['officer_level']}' data-name='{$general['name']}' value={$general['no']}>{$general['name']}".CityConst::byID($general['city'])->name."】</option>";
}
}
echo "
</select>
<input type=hidden name=level value=2>
<input type=$btn name=btn value=임명>
<input class='btn_appoint' type=$btn data-officer_level='2' data-officer_level_text='{$officerLevelText}' value=임명>
</td>
</tr>
<tr><td colspan=5> <font color=red>빨간색</font> 현재 임명중인 장수, <font color=orange>노란색</font> 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
</form>
";
}
echo "
@@ -521,46 +471,49 @@ echo "
$citylevel = getCityLevelList();
$query = "select city,name,officer4,officer3,officer2,level,region,officer4set,officer3set,officer2set from city where nation='{$nation['nation']}' order by region,level desc,binary(name)"; // 도시 이름 목록
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
$officerList = [];
foreach($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer){
$officerCityID = $officer['officer_city'];
if(!key_exists($officerCityID, $officerList)){
$officerList[$officerCityID] = [];
}
$officerList[$officerCityID][$officer['officer_level']] = $officer;
}
$region = 0;
for($j=0; $j < $citycount; $j++) {
$city = MYDB_fetch_array($cityresult);
$dummyOfficer = [
'name'=>'-',
'belong'=>0,
];
$query = "select name,belong,city from general where no='{$city['officer4']}'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$officer4 = MYDB_fetch_array($genresult);
$query = "select name,belong,city from general where no='{$city['officer3']}'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$officer3 = MYDB_fetch_array($genresult);
$query = "select name,belong,city from general where no='{$city['officer2']}'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$officer2 = MYDB_fetch_array($genresult);
$textColor = newColor($nation['color']);
$nationColor = $nation['color'];
if($region != $city['region']) {
echo "
foreach($db->query('SELECT city,name,level,region,officer_set from city where nation=%i order by region,level desc,binary(name)', $nationID) as $city) {
$cityID = $city['city'];
$cityOfficerList = $officerList[$cityID]??[];
?>
<?php if($region != $city['region']): ?>
<tr><td colspan=5 height=3 id=bg1></td></tr>
<tr><td colspan=5 id=bg1><font size=4 color=skyblue> ".CityConst::$regionMap[$city['region']]." </font></td></tr>";
$region = $city['region'];
}
<tr><td colspan=5 id=bg1><font size=4 color=skyblue> <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr>
<?php endif; $region = $city['region']; ?>
<tr>
<td width=78 align=center style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'><?=$citylevel[$city['level']]?>】</td>
<td width=78 align=right style='color:<?=$textColor?>;background-color:<?=$nationColor?>;font-size:1.2em;'><?=$city['name']?>&nbsp;&nbsp;</td>
<?php foreach(Util::range(4, 1, -1) as $officerLevel): ?>
<?php if(key_exists($officerLevel, $cityOfficerList)):
$officer = $cityOfficerList[$officerLevel];
?>
<td><?=$officer['name']?>(<?=$officer['belong']?>년) 【<?=CityConst::byID($officer['city'])->name?>】</td>
<?php else: ?>
<td>-</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php
$officer4['name'] = $officer4['name']==""?"-":$officer4['name']." ({$officer4['belong']}년) 【".CityConst::byID($officer4['city'])->name."";
$officer3['name'] = $officer3['name']==""?"-":$officer3['name']." ({$officer3['belong']}년) 【".CityConst::byID($officer3['city'])->name."";
$officer2['name'] = $officer2['name']==""?"-":$officer2['name']." ({$officer2['belong']}년) 【".CityConst::byID($officer2['city'])->name."";
if($city['officer4set'] == 1) { $officer4['name'] = "<font color=orange>".$officer4['name']."</font>"; }
if($city['officer3set'] == 1) { $officer3['name'] = "<font color=orange>".$officer3['name']."</font>"; }
if($city['officer2set'] == 1) { $officer2['name'] = "<font color=orange>".$officer2['name']."</font>"; }
echo "
<tr>
<td width=78 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=3>{$citylevel[$city['level']]}</font></td>
<td width=78 align=right style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=3>{$city['name']}&nbsp;&nbsp;</font></td>
<td align=center>{$officer4['name']}</td>
<td align=center>{$officer3['name']}</td>
<td align=center>{$officer2['name']}</td>
</tr>
";
}
?>
<tr><td colspan=5> <font color=orange>노란색</font> 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
+48 -49
View File
@@ -14,15 +14,12 @@ $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);
$me = $db->queryFirstRow('SELECT no,nation,officer_level FROM general WHERE owner=%i', $userID);
$nationID = $me['nation'];
if ($me['level'] == 0) {
if ($me['officer_level'] == 0) {
echo "재야입니다.";
exit();
}
@@ -75,30 +72,51 @@ $sel = [$type => "selected"];
$nation = getNationStaticInfo($me['nation']); //국가정보
$query = "select *,pop/pop_max as poprate from city where nation='{$me['nation']}'";
$officerList = [];
foreach($db->query('SELECT no,name,npc,city,officer_level,officer_city,belong FROM general WHERE nation = %i AND 2 <= officer_level AND officer_level <= 4', $nationID) as $officer){
$officerCityID = $officer['officer_city'];
if(!key_exists($officerCityID, $officerList)){
$officerList[$officerCityID] = [];
}
$officerList[$officerCityID][$officer['officer_level']] = $officer;
}
$cityList = $db->query('SELECT *,pop/pop_max as poprate from city where nation=%i', $nationID);
switch ($type) {
case 1: break;
case 2: $query .= " order by pop desc"; break;
case 3: $query .= " order by poprate desc"; break;
case 4: $query .= " order by trust desc"; break;
case 5: $query .= " order by agri desc"; break;
case 6: $query .= " order by comm desc"; break;
case 7: $query .= " order by secu desc"; break;
case 8: $query .= " order by def desc"; break;
case 9: $query .= " order by wall desc"; break;
case 10: $query .= " order by trade desc"; break;
case 11: $query .= " order by region,level desc"; break;
case 12: $query .= " order by level desc, region"; break;
case 2: usort($cityList, function($lhs, $rhs){return $rhs['pop'] <=> $lhs['pop'];}); break;
case 3: usort($cityList, function($lhs, $rhs){return $rhs['poprate'] <=> $lhs['poprate'];}); break;
case 4: usort($cityList, function($lhs, $rhs){return $rhs['trust'] <=> $lhs['trust'];}); break;
case 5: usort($cityList, function($lhs, $rhs){return $rhs['agri'] <=> $lhs['agri'];}); break;
case 6: usort($cityList, function($lhs, $rhs){return $rhs['comm'] <=> $lhs['comm'];}); break;
case 7: usort($cityList, function($lhs, $rhs){return $rhs['secu'] <=> $lhs['secu'];}); break;
case 8: usort($cityList, function($lhs, $rhs){return $rhs['def'] <=> $lhs['def'];}); break;
case 9: usort($cityList, function($lhs, $rhs){return $rhs['wall'] <=> $lhs['wall'];}); break;
case 10: usort($cityList, function($lhs, $rhs){return $rhs['trade'] <=> $lhs['trade'];}); break;
case 11: usort($cityList, function($lhs, $rhs){
$cmpTrust = $lhs['region'] <=> $rhs['region'];
if($cmpTrust != 0){
return $cmpTrust;
}
return $rhs['level']<=>$lhs['level'];
}); break;
case 12: usort($cityList, function($lhs, $rhs){
$cmpTrust = $rhs['level'] <=> $lhs['level'];
if($cmpTrust != 0){
return $cmpTrust;
}
return $lhs['region']<=>$rhs['region'];
}); break;
}
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($cityresult);
$region = 0;
$level = 0;
for ($j=0; $j < $citycount; $j++) {
$city = MYDB_fetch_array($cityresult);
foreach($cityList as $city){
$cityID = $city['city'];
if ($city['city'] == $nation['capital']) {
$city['name'] = "<font color=cyan>[{$city['name']}]</font>";
}
@@ -109,22 +127,12 @@ for ($j=0; $j < $citycount; $j++) {
3=>'-',
4=>'-'
];
if ($city['officer4'] > 0) {
$officerQuery[] = $city['officer4'];
}
if ($city['officer3'] > 0) {
$officerQuery[] = $city['officer3'];
}
if ($city['officer2'] > 0) {
$officerQuery[] = $city['officer2'];
}
if($officerQuery){
foreach($db->query('SELECT `level`, `name` FROM general WHERE `no` IN %li', $officerQuery) as $genOfficer){
$officerName[$genOfficer['level']] = $genOfficer['name'];
}
$cityOfficerList = $officerList[$cityID]??[];
foreach($cityOfficerList as $cityOfficer){
$officerName[$cityOfficer['officer_level']] = getColoredName($cityOfficer['name'], $cityOfficer['npc']);
}
if ($type == 10 && $city['region'] != $region) {
echo "<br>";
$region = $city['region'];
@@ -179,21 +187,12 @@ for ($j=0; $j < $citycount; $j++) {
<tr>
<td align=center id=bg1>장수</td>
<td colspan=11>";
$query = "select npc,name from general where city='{$city['city']}' and nation='{$me['nation']}'"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
if ($gencount == 0) {
$generalList = $db->query('SELECT npc, name FROM general WHERE city = %i AND nation = %i', $city['city'], $me['nation']);
if (!$generalList) {
echo "-";
}
for ($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($genresult);
if ($general['npc'] >= 2) {
echo "<font color=cyan>{$general['name']}, </font>";
} elseif ($general['npc'] == 1) {
echo "<font color=skyblue>{$general['name']}, </font>";
} else {
echo "{$general['name']}, ";
}
foreach($generalList as $general) {
echo getColoredName($general['name'], $general['npc']).', ';
}
echo "
</td>
+6 -6
View File
@@ -18,9 +18,9 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("세력장수", 1);
$me = $db->queryFirstRow('SELECT no,nation,level from general where owner=%i', $userID);
$me = $db->queryFirstRow('SELECT no,nation,officer_level from general where owner=%i', $userID);
if($me['level'] == 0) {
if($me['officer_level'] == 0) {
echo "재야입니다.";
exit();
}
@@ -82,7 +82,7 @@ if($gameStor->isunited){
$nationLevel = DB::db()->queryFirstField('select level from nation where nation = %i', $me['nation']);
[$orderKey, $orderDesc] = [
1=>['level', true],
1=>['officer_level', true],
2=>['dedication', true],
3=>['experience', true],
4=>['leadership', true],
@@ -99,7 +99,7 @@ $nationLevel = DB::db()->queryFirstField('select level from nation where nation
15=>['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,level,killturn,connect,gold,rice,crew,belong from general where nation = %i order by %b %l', $me['nation'], $orderKey, $orderDesc?'desc':'');
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_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'>
@@ -122,7 +122,7 @@ echo"
</tr>";
foreach($generalList as $general){
$lbonus = calcLeadershipBonus($general['level'], $nationLevel);
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
if($lbonus > 0) {
$lbonus = "<font color=cyan>+{$lbonus}</font>";
} else {
@@ -155,7 +155,7 @@ foreach($generalList as $general){
<tr>
<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 getLevelText($general['level'], $nationLevel); echo "</td>
<td align=center>"; echo getOfficerLevelText($general['officer_level'], $nationLevel); echo "</td>
<td align=center>".getDed($general['dedication'])."</td>
<td align=center>".getHonor($general['experience'])."</td>
<td align=center>".getBill($general['dedication'])."</td>
+2 -2
View File
@@ -43,7 +43,7 @@ if($nationID == 0) {
<br>
<?php
$nation = $db->queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,history,capital FROM nation WHERE nation=%i', $nationID); //국가정보
$nation = $db->queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,capital FROM nation WHERE nation=%i', $nationID); //국가정보
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
$currPop = 0;
@@ -146,7 +146,7 @@ if ($budgetricediff > 0) {
</tr>
<tr>
<td align=center valign=top id=bg1>국가열전</td>
<td colspan=7 id=bg0><?=ConvertLog($nation['history'])?></td>
<td colspan=7 id=bg0><?=formatHistoryToHTML(getNationHistoryLogAll($nation['nation']))?></td>
</tr>
</table>
<br>
+32 -9
View File
@@ -4,12 +4,15 @@ namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$defence_train = Util::getReq('defence_train', 'int', 2);
$tnmt = Util::getReq('tnmt', 'int', 1);
//$detachNPC = Util::getReq('detachNPC', 'bool');
$btn = Util::getPost('btn');
$defence_train = Util::getPost('defence_train', 'int', 2);
$tnmt = Util::getPost('tnmt', 'int', 1);
//$detachNPC = Util::getPost('detachNPC', 'bool');
$detachNPC = false;
$showDieImmediatelyBtn = false;
$availableDieImmediately = false;
if ($defence_train <= 60) {
$defence_train = 60;
}
@@ -68,7 +71,7 @@ if (($btn == "설정저장" || $detachNPC) && $myset > 0) {
$me->setVar('tnmt', $tnmt);
}
if($me->getVar('npc') == 1 && $detachNPC){
if($me->getNPCType() == 1 && $detachNPC){
$turnterm = $gameStor->turnterm;
if($turnterm < 10){
@@ -82,6 +85,17 @@ if (($btn == "설정저장" || $detachNPC) && $myset > 0) {
}
$me->applyDB($db);
if($gameStor->turntime <= $gameStor->opentime){
//서버 가오픈시 할 수 있는 행동
if($me->getNPCType() == 0){
$showDieImmediatelyBtn = true;
if(addTurn($me->getVar('lastrefresh'), $gameStor->turnterm, 2) <= TimeUtil::now()){
$availableDieImmediately = true;
}
}
}
?>
<!DOCTYPE html>
<html>
@@ -161,10 +175,16 @@ $('#die_immediately').click(function(){
</tr>
<tr>
<td valign=top>
<?=getGenLogRecent($generalID, 24)?>
<div id='generalActionPlate'>
<?=formatHistoryToHTML(getGeneralActionLogRecent($generalID, 24), 'generalAction')?>
</div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="generalAction">이전 로그 불러오기</button>
</td>
<td valign=top>
<?=getBatLogRecent($generalID, 24)?>
<div id='battleDetailPlate'>
<?=formatHistoryToHTML(getBattleDetailLogRecent($generalID, 24), 'battleDetail')?>
</div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleDetail">이전 로그 불러오기</button>
</td>
</tr>
<tr>
@@ -173,10 +193,13 @@ $('#die_immediately').click(function(){
</tr>
<tr>
<td valign=top>
<?=getGeneralHistoryAll($generalID)?>
<?=formatHistoryToHTML(getGeneralHistoryLogAll($generalID))?>
</td>
<td valign=top>
<?=getBatResRecent($generalID, 24)?>
<div id='battleResultPlate'>
<?=formatHistoryToHTML(getBattleResultRecent($generalID, 24), 'battleResult')?>
</div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleResult">이전 로그 불러오기</button>
</td>
</tr>
</table>
+419
View File
@@ -0,0 +1,419 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->cacheValues(['autorun_user', 'develcost']);
increaseRefresh("NPC 정책", 1);
$me = $db->queryFirstRow('SELECT no, npc, nation, city, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$nationID = $me['nation'];
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,tech,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$permission = checkSecretPermission($me);
if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.';
die();
} else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->cacheValues(['npc_nation_policy', 'npc_general_policy']);
$gameStor->cacheAll();
$general = new General($me, null, null, $nation, $gameStor->year, $gameStor->month, false);
$rawServerPolicy = $gameStor->getValue('npc_nation_policy') ?? [];
$rawNationPolicy = $nationStor->getValue('npc_nation_policy') ?? [];
$rawServerGeneralPolicy = $gameStor->getValue('npc_general_policy') ?? [];
$rawNationGeneralPolicy = $nationStor->getValue('npc_general_policy') ?? [];
$defaultNationPolicy = ($rawServerPolicy['values'] ?? []) + AutorunNationPolicy::$defaultPolicy;
$currentNationPolicy = ($rawNationPolicy['values'] ?? []) + $defaultNationPolicy;
$defaultNationPriority = $rawServerPolicy['priority'] ?? (AutorunNationPolicy::$defaultPriority);
$currentNationPriority = $rawNationPolicy['priority'] ?? $defaultNationPriority;
$defaultGeneralActionPriority = $rawServerGeneralPolicy['priority'] ?? (AutorunGeneralPolicy::$default_priority);
$currentGeneralActionPriority = $rawNationGeneralPolicy['priority'] ?? $defaultGeneralActionPriority;
$autoPolicyVariable = [];
if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
$autoPolicyVariable['reqHumanWarUrgentRice'] = $currentNationPolicy['reqHumanWarUrgentRice'];
}
if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
}
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 임시 NPC 정책</title>
<script>
var nationID = <?= $nationID ?>;
var defaultNationPolicy = <?= Json::encode($defaultNationPolicy) ?>;
var currentNationPolicy = <?= Json::encode($currentNationPolicy) ?>;
var defaultNationPriority = <?= Json::encode($defaultNationPriority) ?>;
var currentNationPriority = <?= Json::encode($currentNationPriority) ?>;
var availableNationPriorityItems = <?= Json::encode(AutorunNationPolicy::$defaultPriority) ?>;
var defaultGeneralActionPriority = <?= Json::encode($defaultGeneralActionPriority) ?>;
var currentGeneralActionPriority = <?= Json::encode($currentGeneralActionPriority) ?>;
var availableGeneralActionPriorityItems = <?= Json::encode(AutorunGeneralPolicy::$default_priority) ?>;
var btnHelpMessage = {
'선전포고': '군주가 NPC이고, 전쟁중이 아닐 때,<br>주변국중 하나를 골라 선포합니다.<br><br>선포 시점은 다음을 참고합니다.<br>- 인구율<br>- 도시내정률<br>- NPC전투장권장 금 충족률<br>- NPC전투장권장 쌀 충족률<br><br>국력이 낮은 국가를 조금 더 선호합니다.',
'천도': '인구가 많은 곳을 찾아 천도를 시도합니다.<br>영토의 가운데를 선호합니다.<br><br>도시 인구가 충분하다면, 굳이 천도하지는 않습니다.',
'유저장긴급포상': '금/쌀이 부족한 유저전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 적어지더라도 시도합니다.',
'부대전방발령': '(작동하지 않음)<br>전투 부대를 접경으로 발령합니다.<br>수도->시작점->도착점 경로를 따릅니다.',
'유저장구출발령': '아군 영토에 있지 않은 유저장을 아군 영토로 발령합니다.<br>곧 집합하는 부대에 탑승한 경우는 제외합니다.',
'유저장후방발령': '유저전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
'부대유저장후방발령': '접경에 위치한 부대에 탑승한 유저전투장 중에,<br>- 병력이 충분하지 않고,<br>- 첫 턴이 징병턴이며,<br>- 부대장 집합 턴 사이라면,<br>인구가 충분한 후방도시로 발령합니다.<br><br>부대장의 위치와 유저장의 위치가 다르다면 발령하지 않습니다.',
'유저장전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
'유저장포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>유저전투장과 유저내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
'부대후방발령': '(작동하지 않음)<br>후방 부대가 위치한 도시의 인구가 충분하지 않을 경우,<br>인구가 충분한 도시로 발령합니다.',
'부대구출발령': '전투 부대, 후방 부대가 아닌 부대가 아군 영토에 있지 않을 때,<br>전방 도시 중 하나를 골라 발령합니다.',
'NPC긴급포상': '금/쌀이 부족한 NPC전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 \'약간\' 적어지더라도 시도합니다.',
'NPC구출발령': '아군 영토에 있지 않은 NPC장을 아군 영토로 발령합니다.',
'NPC후방발령': 'NPC전투장 중에<br>- 병력이 충분하지 않고,<br>- 도시의 인구가 제자리 징병할 수 있을 정도로 충분하지 않고,<br>- 부대에 탑승하지 않았다면,<br>인구가 충분한 후방도시로 발령합니다.',
'NPC포상': '금/쌀이 부족한 유저장에게 포상합니다.<br>NPC전투장과 NPC내정장은 각각 기준을 따릅니다.<br>국고 권장량을 가급적 지킵니다.',
'NPC전방발령': '후방에 있는 유저장이<br>- 병력을 가지고 있으며,<br>- 곧 훈련/사기진작이 완료될 것 같으면,<br>전방으로 발령합니다.<br><br>도시 관직이 많이 임명된 도시를 선호합니다.',
'유저장내정발령': '내정중인 유저장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
'NPC내정발령': '내정중인 NPC장이 위치한 도시의 내정률이 95% 이상이면<br>개발되지 않은 도시로 발령합니다.',
'NPC몰수': '국고가 부족하다면 NPC에게서 몰수합니다. 내정NPC장은 국고가 부족하지 않아도 몰수합니다.',
'NPC사망대비': 'NPC의 사망까지 5턴 이내인 경우, 헌납합니다.<br>헌납할 금쌀이 없다면 물자조달을 수행합니다.',
'귀환': '아국 도시에 있지 않다면 귀환합니다.',
'금쌀구매': '전쟁 중에 금쌀의 비율이 크게 차이난다면 금쌀을 거래하여 비슷하게 맞춥니다.<br>금쌀 비율이 적절하는지 판단하는데 살상률을 포함합니다.<br>NPC는 상인이 없어도 금쌀을 구매할 수 있습니다.<br><br>또는 금쌀 한쪽이 지나치게 적은 경우에는 내정 중에도 금쌀을 거래합니다.',
'출병': '충분한 병력과 충분한 훈련/사기를 가지고 있는 경우 출병합니다.<br>접경이 여럿인 경우 무작위로 선택합니다.<br><br>타국과 전쟁중인 경우 공백지로는 출병하지 않습니다.',
'긴급내정': '전쟁중에 민심이 70 미만이거나,<br>인구가 제자리 징병이 가능하지 않을 정도로 적을 경우,<br>일정확률로 주민선정과 정착장려를 수행합니다.<br><br>통솔이 높을 수록 수행할 확률이 높습니다.',
'전투준비': '충분한 병력을 가지고 있지만 훈련과 사기가 부족한 경우 훈련과 사기진작을 수행합니다.',
'전방워프': '전투장이 충분한 병력을 가지고 있다면 전방으로 이동합니다.',
'NPC헌납': '국고가 부족한데 NPC장수가 충분한 금쌀을 가지고 있다면 일부를 헌납합니다. <br>NPC내정장은 국고가 넉넉하더라도 충분한 금쌀을 가지고 있다면 일부를 헌납합니다.',
'징병': '전쟁 중 병력을 소진하였다면 재 징병합니다.<br><br>기존에 사용한 병종군 중에서 사용가능한 병종을 랜덤하게 선택합니다.<br>고급 병종을 선택할 확률이 조금 더 높습니다.<br><br>NPC의 경우 도시의 인구가 충분하지 않다면 징병을 할 확률이 감소합니다.<br><br>유저장은 최대한 고급병종을 유지하며,<br>유저장 모병이 허용되는 경우 모병을 3회할 수 있다면 모병합니다.',
'후방워프': '전쟁 중 병력을 소진하였는데 도시의 인구가 충분하지 않다면,<br>인구가 많은 도시로 이동합니다.',
'전쟁내정': '전쟁 중 수행하는 내정입니다.<br>정착장려, 기술연구의 확률이 좀 더 높고,<br>치안강화, 농지개간, 상업투자의 확률이 낮습니다.<br><br>내정이 가능하다 하더라도 전시임을 고려해,<br>30% 확률로 다른 턴을 수행합니다.',
'소집해제': '전쟁 중이 아닌 데 병력이 남아있는 경우,<br>3/4 확률로 소집해제합니다.',
'일반내정': '도시에서 내정을 수행합니다. 낮은 내정일 수록 수행할 확률이 높습니다.<br>기술 연구는 1등급 이상 뒤쳐지지 않도록 노력합니다.',
'내정워프': '도시에서 더이상 내정을 수행할 수 없는 경우,<br>일정확률로 내정이 부족한 다른 도시로 이동합니다.',
};
</script>
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
<?= WebUtil::printJS('../e_lib/Sortable.min.js') ?>
<?= WebUtil::printJS('../e_lib/jquery-sortable.js') ?>
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
<?= WebUtil::printJS('../e_lib/jquery_toast/toast.js') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('js/common.js') ?>
<?= WebUtil::printJS('js/npc_control.js') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
<?= WebUtil::printCSS('../e_lib/font_awesome/css/all.min.css') ?>
<?= WebUtil::printCSS('../e_lib/jquery_toast/toast.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?>
<?= WebUtil::printCSS('css/npc_control.css') ?>
</head>
<body>
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
<div class='tb_layout bg0'>임시 NPC 정책<br>
<?= backButton() ?></div>
<div class='bg1 section_bar'>국가 정책</div>
<div class="text-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationPolicy['valueSetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['valueSetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class="form_list">
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNationGold" class="col-sm-6 col-form-label">국가 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNationGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNationRice" class="col-sm-6 col-form-label">국가 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNationRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarUrgentGold" class="col-sm-6 col-form-label">유저전투장 긴급포상 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
0이면 보병 6 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarUrgentRice" class="col-sm-6 col-form-label">유저전투장 긴급포상 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarRecommandGold" class="col-sm-6 col-form-label">유저전투장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
0이면 유저전투장 긴급포상 금의 3배를 기준으로 하며, 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanWarRecommandRice" class="col-sm-6 col-form-label">유저전투장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
0이면 유저전투장 긴급포상 쌀의 3배를 기준으로 하며, 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqHumanDevelGold" class="col-sm-6 col-form-label">유저내정장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqHumanDevelRice" class="col-sm-6 col-form-label">유저내정장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNPCWarGold" class="col-sm-6 col-form-label">NPC전투장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCWarGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
0이면 기본 병종 4(<?= number_format(GameConst::$defaultStatNPCMax * 100) ?> * 4) 징병비를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNPCWarRice" class="col-sm-6 col-form-label">NPC전투장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCWarRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatNPCMax * 100 * 4) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarRice) ?>입니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="reqNPCDevelGold" class="col-sm-6 col-form-label">NPC내정장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelGold" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 금입니다. 이보다 5 많다면 헌납합니다.<br>0이면 30 내정 가능한 금을 기준으로 하며, 수치는 현재 <?= number_format($autoPolicy->reqNPCDevelGold) ?>입니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="reqNPCDevelRice" class="col-sm-6 col-form-label">NPC내정장 권장 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelRice" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 쌀입니다. 이보다 5 많다면 헌납합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minimumResourceActionAmount" class="col-sm-6 col-form-label">포상/몰수/헌납// 최소 단위</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minimumResourceActionAmount" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">연산결과가 단위보다 적다면 수행하지 않습니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="minWarCrew" class="col-sm-6 col-form-label">최소 전투 가능 병력 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minWarCrew" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 적을 때에는 징병을 시도합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minNPCRecruitCityPopulation" class="col-sm-6 col-form-label">NPC 최소 징병 가능 인구 </label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minNPCRecruitCityPopulation" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">이보다 낮으면 NPC는 도시에서 징병하지 않고 후방 워프합니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="safeRecruitCityPopulationRatio" class="col-sm-6 col-form-label">제자리 징병 허용 인구율(%)</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="percent" id="safeRecruitCityPopulationRatio" min="0" max="100" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">전쟁 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면 '충분하다' 판단합니다.</small></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<div class="row">
<label for="minNPCWarLeadership" class="col-sm-6 col-form-label">NPC 전투 참여 통솔 기준</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="minNPCWarLeadership" min="0" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted"> 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.</small></div>
</div>
<div class="col-sm-6">
<div class="row">
<label for="properWarTrainAtmos" class="col-sm-6 col-form-label">훈련/사기진작 목표치</label>
<div class="col-sm-6">
<input type="number" class="form-control" data-type="integer" id="properWarTrainAtmos" min="0" max="100" value="0">
</div>
</div>
<div style='text-align:right;'><small class="form-text text-muted">훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다.</small></div>
</div>
</div>
<div class="alert alert-secondary">
전투 부대는 작업중입니다(json양식: {부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br>
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br>
내정 부대는 작업중입니다(json양식: [부대번호,...])
<input type="hidden" value="{}" data-type="json" id="CombatForce">
<input type="hidden" value="[]" data-type="json" id="SupportForce">
<input type="hidden" value="[]" data-type="json" id="DevelopForce">
<input type="hidden" value="true" data-type="json" id="allowNpcAttackCity">
<!--allowNpcAttackCity는 현재 게임 비활성-->
</div>
<div class='control_bar' data-type="nationPolicy">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
<div class="row">
<div class="col-sm-6 half_section_left">
<div class='bg1 section_bar'>NPC 사령턴 우선순위</div>
<div class="float-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class='text-left px-2'><small class="text-muted">예턴이 없거나, 지정되어 있더라도 실패할경우<br>아래 순위에 따라 사령턴을 시도합니다.</small></div>
<div class="form_list">
<div class="row">
<div class="col-sm-6">
<div class="bg2 sub_bar">비활성</div>
<div id="nationPriorityDisabled" class="list-group col" data-type="list">
</div>
</div>
<div class="col-sm-6">
<div class="bg2 sub_bar">활성</div>
<div id="nationPriority" class="list-group col" data-type="list">
</div>
</div>
</div>
<div class='control_bar' data-type="nationPriority">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
</div>
<div class="col-sm-6 half_section_right">
<div class='bg1 section_bar'>NPC 일반턴 우선순위</div>
<div class="float-right px-3"><small class="form-text text-muted">
최근 설정: <?= $rawNationGeneralPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationGeneralPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
</small></div>
<div class='text-left px-2'><small class="text-muted">순위가 높은 것부터 시도합니다. <br>아무것도 실행할 없으면 물자조달이나 인재탐색을 합니다.</small></div>
<div class="form_list">
<div class="row">
<div class="col-sm-6">
<div class="bg2 sub_bar">비활성</div>
<div id="generalPriorityDisabled" class="list-group col" data-type="list">
</div>
</div>
<div class="col-sm-6">
<div class="bg2 sub_bar">활성</div>
<div id="generalPriority" class="list-group col" data-type="list">
</div>
</div>
</div>
<div class='control_bar' data-type="generalPriority">
<div class="btn-group" role="group">
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
+6 -5
View File
@@ -9,7 +9,8 @@ $commandType = Util::getReq('command', 'string');
$turnList = array_map('intval', explode('_', Util::getReq('turnList', 'string', '0')));
$isChiefTurn = Util::getReq('is_chief', 'bool', false);
function die_redirect(){
function die_redirect()
{
global $isChiefTurn;
if(!$isChiefTurn){
header('location:index.php', true, 303);
@@ -40,14 +41,14 @@ if($isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$avail
}
$gameStor = KVStorage::getStorage($db, 'game_env')->turnOnCache();
$env = $gameStor->getValues(['init_year','init_month','startyear','year','month','show_img_level','join_mode','maxnation']);
$env = $gameStor->getAll();
$general = General::createGeneralObjFromDB($session->generalID);
if(!$isChiefTurn){
$commandObj = buildGeneralCommandClass($commandType, $general, $env);
}
else{
if($general->getVar('level') < 5){
if($general->getVar('officer_level') < 5){
die_redirect();
}
$commandObj = buildNationCommandClass($commandType, $general, $env, new LastTurn());
@@ -59,9 +60,9 @@ if($commandObj->isArgValid()){
die_redirect();
}
/*if(!$commandObj->isReservable()){
if(!$commandObj->hasPermissionToReserve()){
die_redirect();
}*/
}
$jsList = $commandObj->getJSFiles();
$cssList = $commandObj->getCSSFiles();
+47 -73
View File
@@ -9,14 +9,11 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("토너먼트", 1);
TurnExecutionHelper::executeAllCommand();
$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);
$me = $db->queryFirstRow('select no,tournament,con,turntime from general where owner=%i', $userID);
$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']);
@@ -113,38 +110,8 @@ if ($session->userGrade >= 5) {
switch ($admin['tournament']) {
case 1:
echo "<select name=gen size=1 style=color:white;background-color:black;>";
$query = "select no,name,npc,tnmt,leadership,strength,intel,leadership+strength+intel as total from general where tournament=0 and gold>='{$admin['develcost']}' order by {$tp3} desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$genCount = MYDB_num_rows($result);
for ($i=0; $i < $genCount; $i++) {
$general = MYDB_fetch_array($result);
if ($general['npc'] >= 2) {
$npc = "cyan";
} elseif ($general['npc'] == 1) {
$npc = "skyblue";
} elseif ($general['tnmt'] > 0) {
$npc = "blue";
} else {
$npc = "white";
}
echo "<option style=color:{$npc}; value={$general['no']}>[{$general[$tp3]}]{$general['name']}</option>";
}
echo "
</select>
<input type=submit name=btn value='투입'>
<input type=submit name=btn value='무명투입'>
<input type=submit name=btn value='쪼렙투입'>
<input type=submit name=btn value='일반투입'>
<input type=submit name=btn value='굇수투입'>
<input type=submit name=btn value='랜덤투입'>
<input type=submit name=btn value='쪼렙전부투입'>
<input type=submit name=btn value='일반전부투입'>
<input type=submit name=btn value='굇수전부투입'>
<input type=submit name=btn value='랜덤전부투입'>
<input type=submit name=btn value='무명전부투입'>";
echo "<input type=submit name=btn value='랜덤투입'>";
echo "<input type=submit name=btn value='랜덤전부투입'>";
break;
case 2: echo "<input type=submit name=btn value='예선'><input type=submit name=btn value='예선전부'>"; break;
case 3: echo "<input type=submit name=btn value='추첨'><input type=submit name=btn value='추첨전부'>"; break;
@@ -188,14 +155,15 @@ echo "
<table align=center width=2000 class='bg0 mimic_flex'>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$general = MYDB_fetch_array($result) ?? [
'name'=>'',
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
while(count($generalList) < 1){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -211,22 +179,21 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$cent = [];
for ($i=0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
$line = [];
$gen = [];
for ($i=0; $i < 2; $i++) {
//FIXME: 다시 작성. null인 경우엔 어쩌려고?
$general = MYDB_fetch_array($result) ?? [
'name'=>'',
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
while(count($generalList) < 2){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -260,18 +227,19 @@ for ($i=0; $i < 2; $i++) {
echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 4; $i++) {
$general = MYDB_fetch_array($result) ?? [
'name'=>'',
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
while(count($generalList) < 4){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -306,17 +274,19 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 8; $i++) {
$general = MYDB_fetch_array($result) ?? [
'name'=>'',
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
while(count($generalList) < 8){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -351,17 +321,18 @@ echo "
</tr>
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 16; $i++) {
$general = MYDB_fetch_array($result) ?? [
'name'=>'',
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
while(count($generalList) < 16){
$generalList[] = [
'name'=>'-',
'npc'=>0,
'win'=>0
];
}
foreach($generalList as $i=>$general){
if ($general['name'] == "") {
$general['name'] = "-";
}
@@ -394,7 +365,8 @@ for ($i=0; $i < 16; $i++) {
echo"
</tr>";
$globalBet = array_splice($db->queryFirstList('SELECT * FROM betting WHERE general_id = 0'), -16);
$globalBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = 0')??[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ];
$globalBet = array_splice($globalBet, -16);
$globalBetTotal = array_sum($globalBet);
$admin = $gameStor->getValues(['tournament', 'phase']);
$bet = [];
@@ -439,12 +411,13 @@ for ($i=0; $i < 8; $i++) {
<tr><td colspan=9 style=background-color:black;>{$num[$i]}</td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
$query = "select npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 4; $k++) {
$general = MYDB_fetch_array($result);
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
foreach($generalList as $k=>$general) {
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
}
foreach(Util::range(count($generalList), 4) as $idx){
printRow($idx, '', '', '', '', '', '', '', '', '', '');
}
echo "
</table>
</td>";
@@ -465,12 +438,13 @@ for ($i=0; $i < 8; $i++) {
<tr><td colspan=9 style=background-color:black;>{$num[$i]}</td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
$query = "select npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 8; $k++) {
$general = MYDB_fetch_array($result);
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp);
foreach($generalList as $k=>$general) {
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
}
foreach(Util::range(count($generalList), 8) as $idx){
printRow($idx, '', '', '', '', '', '', '', '', '', '');
}
echo "
</table>
</td>";
+8 -48
View File
@@ -88,52 +88,14 @@ uasort($troops, function($lhs, $rhs){
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/troop.js')?>
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/troops.css')?>
<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>
@@ -142,7 +104,6 @@ $('.submitBtn').click(function(event){
<table width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form id=form1 name=form1 method=post>
<table id="troop_list" class='tb_layout bg0'>
<thead>
<tr>
@@ -156,9 +117,9 @@ $('.submitBtn').click(function(event){
<tfoot><tr><td colspan='5'>
<?php if(!$troops): ?>
<?php elseif($me['troop'] == 0): ?>
<input type=submit class='submitBtn' value='부 대 가 입'>
<input type=button id='btnJoinTroop' value='부 대 가 입'>
<?php else: ?>
<input type=submit id="leaveTroop" class='submitBtn' value='부 대 탈 퇴'>
<input type=button id="btnLeaveTroop" value='부 대 탈 퇴'>
<?php endif;?>
</td></tr></tfoot>
<tbody>
@@ -187,7 +148,7 @@ foreach ($troops as $troopNo=>$troop) {
<?php if ($me['troop'] == 0): ?>
<tr>
<td align=center rowspan=2><input type='radio' class='troopId' name='troop' value='<?=$troop['troop']?>'></td>
<td align=center rowspan=2><input type='radio' class='troopId' name='troop' value='<?=$troopNo?>'></td>
<td align=center><?=$troop['name']?><br>【 <?=$cityText?> 】</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>
@@ -214,7 +175,7 @@ foreach ($troops as $troopNo=>$troop) {
<option value='<?=$troopUser['no']?>'><?=$troopUser['name']?></option>
<?php endforeach; ?>
</select><br>
<input type=submit class='submitBtn' value='부 대 추 방' style=width:130px;height:25px;>
<input type=button id='btnKickTroop' value='부 대 추 방' style=width:130px;height:25px;>
<?php else: ?>
<?=$troopLeader['turnText']?>
<?php endif; ?>
@@ -235,11 +196,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=18 name=name></td>
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=18 id='nameplate'></td>
<?php if($me['troop'] == 0): ?>
<td><input type=submit name=btn value='부 대 창 설'></td>
<td><input type=button id='btnCreateTroop' value='부 대 창 설'></td>
<?php else: ?>
<td><input type=submit name=btn value='부 대 변 경'></td>
<td><input type=button id='btnChangeTroopName' value='부 대 변 경'></td>
<?php endif; ?>
</tr>
</table>
@@ -248,7 +209,6 @@ foreach ($troops as $troopNo=>$troop) {
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</form>
</div>
</body>
</html>
+22 -19
View File
@@ -29,7 +29,7 @@ $startYear = $gameStor->getValue('startyear');
<?=WebUtil::printJS('../e_lib/download2.js')?>
<?=WebUtil::printJS('js/common.js')?>
<script>
var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
</script>
<?=WebUtil::printJS('js/battle_simulator.js')?>
</head>
@@ -167,7 +167,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<select class="custom-select form_nation_type" style="width:25ch;">
<?php foreach(GameConst::$availableNationType as $typeID): ?>
<?php $nationTypeObj = buildNationTypeClass($typeID) ?>
<option value="<?=$typeID?>"><?=$nationTypeObj->name?> (<?=$nationTypeClass::$pros?>, <?=$nationTypeClass::$cons?>)</option>
<option value="<?=$typeID?>"><?=$nationTypeObj->getName()?> (<?=$nationTypeObj::$pros?>, <?=$nationTypeObj::$cons?>)</option>
<?php endforeach; ?>
</select>
<div class="input-group-prepend">
@@ -256,7 +256,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">직위</span>
</div>
<select class="custom-select form_general_level" style="width:8ch;">
<select class="custom-select form_officer_level" style="width:8ch;">
<option value="1">일반</option>
<option value="4">태수</option>
<option value="3">군사</option>
@@ -291,7 +291,8 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<span class="input-group-text">명마</span>
</div>
<select class="custom-select form_general_horse">
<?php foreach(range(0, 26) as $horseID): ?>
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['horse'] as $horseID=>$cnt): ?>
<option value="<?=$horseID?>"><?=getItemName($horseID)?></option>
<?php endforeach; ?>
</select>
@@ -299,15 +300,17 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<span class="input-group-text">무기</span>
</div>
<select class="custom-select form_general_weap">
<?php foreach(range(0, 26) as $weapID): ?>
<option value="<?=$weapID?>"><?=getItemName($weapID)?></option>
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['weapon'] as $weaponID=>$cnt): ?>
<option value="<?=$weaponID?>"><?=getItemName($weaponID)?></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='None'>-</option>
<?php foreach(GameConst::$allItems['book'] as $bookID=>$cnt): ?>
<option value="<?=$bookID?>"><?=getItemName($bookID)?></option>
<?php endforeach; ?>
</select>
@@ -328,8 +331,9 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<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>
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['item'] as $itemID=>$cnt): ?>
<option value="<?=$itemID?>"><?=getItemName($itemID)?></option>
<?php endforeach; ?>
</select>
</div>
@@ -339,7 +343,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
</div>
<select class="custom-select form_crewtype">
<?php foreach(GameUnitConst::all() as $crewTypeID => $crewType): ?>
<?php if($crewTypeID < 0){ continue; } ?>
<?php if($crewType->armType === GameUnitConst::T_CASTLE){ continue; } ?>
<option value="<?=$crewTypeID?>"><?=$crewType->name?></option>
<?php endforeach; ?>
</select>
@@ -351,7 +355,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<span class="input-group-text">성격</span>
</div>
<select class="custom-select form_general_character">
<?php foreach(getCharacterList() as $characterID => [$name,$info]): ?>
<?php foreach(getCharacterList(false) as $characterID => [$name,$info]): ?>
<option value="<?=$characterID?>"><?=$name?></option>
<?php endforeach; ?>
</select>
@@ -369,9 +373,8 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<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 foreach(SpecialityHelper::getSpecialWarList(false) as $specialWarID =>$specialObj): ?>
<option value="<?=$specialWarID?>"><?=$specialObj->getName()?></option>
<?php endforeach; ?>
</select>
</div>
@@ -379,7 +382,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">보병숙련</span>
</div>
<select class="custom-select form_dex0">
<select class="custom-select form_dex1">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
@@ -387,7 +390,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">궁병숙련</span>
</div>
<select class="custom-select form_dex10">
<select class="custom-select form_dex2">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
@@ -395,7 +398,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">기병숙련</span>
</div>
<select class="custom-select form_dex20">
<select class="custom-select form_dex3">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
@@ -405,7 +408,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">귀병숙련</span>
</div>
<select class="custom-select form_dex30">
<select class="custom-select form_dex4">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
@@ -413,7 +416,7 @@ var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
<div class="input-group-prepend">
<span class="input-group-text">차병숙련</span>
</div>
<select class="custom-select form_dex40">
<select class="custom-select form_dex5">
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
<?php endforeach; ?>
+8 -8
View File
@@ -14,13 +14,13 @@ $v->rule('integer', [
'sel'
]);
$btn = Util::getReq('btn');
$amount = Util::getReq('amount', 'int');
$cost = Util::getReq('cost', 'int');
$topv = Util::getReq('topv', 'int');
$value = Util::getReq('value', 'int');
$term = Util::getReq('term', 'int');
$sel = Util::getReq('sel', 'int');
$btn = Util::getPost('btn');
$amount = Util::getPost('amount', 'int');
$cost = Util::getPost('cost', 'int');
$topv = Util::getPost('topv', 'int');
$value = Util::getPost('value', 'int');
$term = Util::getPost('term', 'int');
$sel = Util::getPost('sel', 'int');
$msg = '';
$msg2 = '';
@@ -55,7 +55,7 @@ if ($term > 24) {
}
$valid = 1;
if ($session->userGrade >= 5) {
if ($session->userGrade >= 5 || $btCount < 1) {
} else {
$msg = "ㆍ<span class='ev_warning'>더이상 등록할 수 없습니다.</span>";
$msg2 = "ㆍ<span class='ev_warning'>더이상 등록할 수 없습니다.</span>";
+7 -7
View File
@@ -13,7 +13,7 @@ $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);
$general = $db->queryFirstRow('SELECT no,name,owner_name,npc,lastrefresh FROM general WHERE owner=%i AND npc = 0', $userID);
if(!$general){
header('location:b_myPage.php');
@@ -25,7 +25,7 @@ $gameStor->cacheValues(['turnterm', 'opentime', 'turntime', 'year', 'month']);
if($gameStor->turntime <= $gameStor->opentime){
//서버 가오픈시 할 수 있는 행동
if(addTurn($general['lastrefresh'], $gameStor->turnterm, 2) <= TimeUtil::DatetimeNow()){
if(addTurn($general['lastrefresh'], $gameStor->turnterm, 2) <= TimeUtil::now()){
$availableDieImmediately = true;
}
}
@@ -36,14 +36,14 @@ if(!$availableDieImmediately){
}
if(!$db->query('DELETE FROM general WHERE owner=%i AND npc=0', $userID)){
$generalObj = General::createGeneralObjFromDB($general['no']);
if($generalObj instanceof DummyGeneral){
trigger_error("올바르지 않은 삭제 프로세스 $userID", E_USER_WARNING);
}
$generalName = $general['name'];
$generalName = $generalObj->getName();
$josaYi = JosaUtil::pick($generalName, '이');
pushGeneralPublicRecord(["<C>●</>{$gameStor->month}월:<Y>{$generalName}</>{$josaYi} 이 홀연히 모습을 <R>감추었습니다</>"], $gameStor->year, $gameStor->month);
$generalObj->kill($db, true, "<Y>{$generalName}</>{$josaYi} 이 홀연히 모습을 <R>감추었습니다</>");
$session->logoutGame();
header('location:..');
+20 -21
View File
@@ -5,12 +5,12 @@ include "lib.php";
include "func.php";
// $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit
$btn = Util::getReq('btn');
$msg = Util::getReq('msg');
$scoutmsg = Util::getReq('scoutmsg');
$rate = Util::getReq('rate', 'int');
$bill = Util::getReq('bill', 'int');
$secretlimit = Util::getReq('secretlimit', 'int');
$btn = Util::getPost('btn');
$msg = Util::getPost('msg');
$scoutmsg = Util::getPost('scoutmsg');
$rate = Util::getPost('rate', 'int');
$bill = Util::getPost('bill', 'int');
$secretlimit = Util::getPost('secretlimit', 'int');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
@@ -18,7 +18,7 @@ $userID = Session::getUserID();
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
$me = $db->queryFirstRow('SELECT `no`,nation,`officer_level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
//내가 수뇌부이어야함
$permission = checkSecretPermission($me);
@@ -26,53 +26,52 @@ if($permission < 0){
header('location:b_myBossInfo.php', true, 303);
exit();
}
else if ($me['level'] < 5 && $permission != 4) {
else if ($me['officer_level'] < 5 && $permission != 4) {
header('location:b_myBossInfo.php', true, 303);
exit();
}
$nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
if($btn == "국가방침 수정") {
$msg = mb_substr($msg, 0, 16384);
//$msg = StringUtil::
$db->update('nation', [
'msg'=>WebUtil::htmlPurify($msg)
], 'nation=%i',$me['nation']);
$nationStor->notice = WebUtil::htmlPurify($msg);
} elseif($btn == "임관 권유문 수정") {
$scoutmsg = mb_substr($scoutmsg, 0, 1000);
$db->update('nation', [
'scoutmsg'=>WebUtil::htmlPurify($scoutmsg)
], 'nation=%i',$me['nation']);
$nationStor->scout_msg = WebUtil::htmlPurify($scoutmsg);
} elseif($btn == "세율") {
$rate = Util::valueFit($rate, 5, 30);
$db->update('nation', [
'rate'=>$rate,
], 'nation=%i', $me['nation']);
], 'nation=%i', $nationID);
} elseif($btn == "지급률") {
$bill = Util::valueFit($bill, 20, 200);
$db->update('nation', [
'bill'=>$bill
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
} elseif($btn == "기밀권한") {
$secretlimit = Util::valueFit($secretlimit, 1, 99);
$db->update('nation', [
'secretlimit'=>$secretlimit
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
} elseif($btn == "임관 금지") {
$db->update('nation', [
'scout'=>1
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
} elseif($btn == "임관 허가") {
$db->update('nation', [
'scout'=>0
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
} elseif($btn == "전쟁 금지") {
$db->update('nation', [
'war'=>1
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
} elseif($btn == "전쟁 허가") {
$db->update('nation', [
'war'=>0
], 'nation=%i',$me['nation']);
], 'nation=%i',$nationID);
}
header('location:b_dipcenter.php');
-351
View File
@@ -1,351 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
// $btn, $level, $genlist, $outlist
$btn = Util::getReq('btn');
$level = Util::getReq('level', 'int');
$genlist = Util::getReq('genlist', 'int');
$outlist = Util::getReq('outlist', 'int');
$citylist = Util::getReq('citylist', 'int');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['startyear','year','month','scenario']);
$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);
$meLevel = $me['level'];
$query = "select no from general where nation='{$me['nation']}' and level=12";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$ruler = MYDB_fetch_array($result);
//수뇌가 아니면 아무것도 할 수 없음
if($meLevel < 5){
header('location:b_myBossInfo.php', true, 303);
exit();
}
if($btn == "임명") {
if($genlist==0){
$general = [];
}
else{
$general = $db->queryFirstRow('SELECT `no`,nation,`level`,leadership,`strength`,intel FROM general WHERE no = %i', $genlist);
}
if($genlist != 0 && !$general){
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', true, 303);
exit();
}
} elseif($btn == "추방") {
if(!$outlist){
header('location:b_myBossInfo.php', true, 303);
exit();
}
$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', true, 303);
exit();
}
//추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $outlist != 0)) {
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', true, 303);
exit();
}
if($btn == "추방") {
$query = "select name,l{$meLevel}set,color from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$alllog = [];
//이미 지정했다면 무시
if($nation["l{$meLevel}set"] == 0 && $general['level'] > 0 && $general['level'] < 12) {
$dipcount1 = $db->queryFirstField('SELECT count(no) FROM diplomacy WHERE me=%i AND state>=3 AND state<=4', $general['nation']);
$dipcount2 = $db->queryFirstField('SELECT count(no) FROM diplomacy WHERE me=%i AND state>=5 AND state<=6', $general['nation']);
$gold = 0;
$rice = 0;
// 금쌀1000이상은 남김
if($general['gold'] > GameConst::$defaultGold) {
$gold = $general['gold'] - GameConst::$defaultGold;
$general['gold'] = GameConst::$defaultGold;
}
if($general['rice'] > GameConst::$defaultRice) {
$rice = $general['rice'] - GameConst::$defaultRice;
$general['rice'] = GameConst::$defaultRice;
}
if($dipcount1 > 0) {
$josaYi = JosaUtil::pick($general['name'], '이');
$alllog[] = "<C>●</>{$admin['month']}월:통합에 반대하던 <Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
$log[] = "<C>●</>통합에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
// 재야로, 국가 무소속으로
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($dipcount2 > 0) {
$josaYi = JosaUtil::pick($general['name'], '이');
$alllog[] = "<C>●</>{$admin['month']}월:합병에 반대하던 <Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
$log[] = "<C>●</>합병에 반대하다가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
// 재야로, 국가 무소속으로
$query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} else {
$josaYi = JosaUtil::pick($general['name'], '이');
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>{$josaYi} <D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
$log[] = "<C>●</><D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
// 재야로, 국가 무소속으로, 명성/공헌 N*10%감소
if($admin['year'] <= $admin['startyear'] && $general['npc'] < 2){
$db->update('general', [
'level'=>0,
'nation'=>0,
'belong'=>0,
'permission'=>'normal',
], 'no=%i', $general['no']);
}
else{
$db->update('general', [
'level'=>0,
'permission'=>'normal',
'nation'=>0,
'belong'=>0,
'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']);
}
}
//부대장일 경우
if($general['troop'] == $general['no']){
// 모두 탈퇴
$db->update('general', [
'troop'=>0,
], 'troop = %i', $general['no']);
$db->delete('troop', 'troop_leader=%i', $general['no']);
}
else {
$db->update('general', [
'troop'=>0,
], 'no=%i', $general['no']);
}
// 도시관직해제
if(2 <= $general['level'] && $general['level'] <= 4){
$db->update('city', [
'officer'.$general['level']=>0
], "officer{$general['level']} = %i", $general['no']);
}
if($general['npc'] >= 2 && ($admin['scenario'] < 100 || rand()%100 == 0)) {
switch(rand()%5) {
case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break;
case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break;
case 2: $str = "어디 추방해가면서 잘되나 보자... 꼭 복수하겠다..."; break;
case 3: $str = "인덕이 제일이거늘... 추방이 웬말인가... 저주한다!"; break;
case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break;
}
$src = new MessageTarget(
$general['no'],
$general['name'],
$general['nation'],
$nation['name'],
$nation['color'],
GetImageURL($general['imgsvr'], $general['picture'])
);
$msg = new Message(
Message::MSGTYPE_PUBLIC,
$src,
$src,
$str,
new \DateTime(),
new \DateTime('9999-12-31'),
[]
);
$msg->send();
}
if($admin['year'] < $admin['startyear']+3) {
//초반엔 군주 부상 증가(엔장 임관지양)
$db->update('general', [
'injury'=>$db->sqleval('least(injury + 1, %i)', 80),
], 'no=%i', $ruler['no']);
$db->update('nation', [
'gennum'=>$db->sqleval('gennum - 1'),
'gold'=>$db->sqleval('gold + %i', $gold),
'rice'=>$db->sqleval('rice + %i', $rice),
], 'nation = %i', $general['nation']);
} else {
//이번분기는 추방불가(초반 제외)
$db->update('nation', [
"l{$meLevel}set"=>1,
'gennum'=>$db->sqleval('gennum - 1'),
'gold'=>$db->sqleval('gold + %i', $gold),
'rice'=>$db->sqleval('rice + %i', $rice),
], 'nation = %i', $general['nation']);
}
list($year, $month) = $gameStor->getValuesAsArray(['year','month']);
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:<D>{$nation['name']}</>에서 추방됨");
pushGenLog($general, $log);
pushGeneralPublicRecord($alllog, $year, $month);
}
header('location:b_myBossInfo.php', true, 303);
die();
}
if($btn == "임명" && $level >= 5 && $level <= 11) {
$query = "select l{$level}set,level 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($nation["l{$level}set"] == 0 && $lv <= $level) {
//기존 장수 일반으로
$query = "update general set level=1 where nation='{$me['nation']}' and level='$level'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if($genlist != 0) {
$valid = 0;
switch($level) {
case 10: if($general['strength'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 9: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 8: if($general['strength'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 7: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 6: if($general['strength'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 5: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
default: $valid = 1; break;
}
if($valid == 1) {
// 신임 장수의 원래 자리 해제
if(2 <= $general['level'] && $general['level'] <= 4){
$db->update('city', [
'officer'.$general['level']=>0
], "officer{$general['level']} = %i", $general['no']);
}
//신임 장수
$query = "update general set level='$level' where no='$genlist'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//이번분기는 불가
$query = "update nation set l{$level}set=1 where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
}
}
header('location:b_myBossInfo.php', true, 303);
die();
}
if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
$genlv = 'officer'.$level;
$genlvset = 'officer'.$level.'set';
$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', true, 303);
die();
}
$oldlist = $city[$genlv];
if($oldlist != 0) {
//기존 장수 일반으로
$db->update('general', [
'level'=>1
], 'no=%i', $oldlist);
//기존 자리 공석으로
$db->update('city', [
$genlv=>0
], 'city = %i AND nation = %i', $citylist , $me['nation']);
}
if($genlist != 0) {
$valid = 0;
switch($level) {
case 4: if($general['strength'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 3: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
default: $valid = 1; break;
}
if($valid == 1) {
// 신임 장수의 원래 자리 해제
if(2 <= $general['level'] && $general['level'] <= 4){
$db->update('city', [
'officer'.$general['level']=>0
], "officer{$general['level']} = %i", $general['no']);
}
//신임 장수
$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', true, 303);
die();
}
header('location:b_myBossInfo.php', true, 303);
+56 -113
View File
@@ -4,15 +4,15 @@ namespace sammo;
include "lib.php";
include "func.php";
// $btn, $msg
$btn = Util::getReq('btn');
$msg = Util::getReq('msg');
$btn = Util::getPost('btn');
$msg = Util::getPost('msg');
//관리자용
$auto = Util::getReq('auto', 'int');
$type = Util::getReq('type', 'int');
$gen = Util::getReq('gen', 'int');
$sel = Util::getReq('sel', 'int');
$trig = Util::getReq('trig', 'int');
$auto = Util::getPost('auto', 'int');
$type = Util::getPost('type', 'int');
$gen = Util::getPost('gen', 'int');
$sel = Util::getPost('sel', 'int');
$trig = Util::getPost('trig', 'int');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
@@ -20,13 +20,10 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost']);
$query = "select no,name,tournament 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,name,tournament from general where owner=%i',$userID);
switch($admin['tnmt_type']) {
case 0: $tp = "total"; $tp2 = "전력전"; $tp3 = "leadership+strength+intel"; break;
@@ -51,14 +48,27 @@ if($btn == '참가') {
}
$general['gold'] -= $admin['develcost'];
$occupied = [];
foreach($db->queryFirstColumn('SELECT grp FROM tournament WHERE grp < 10 GROUP BY grp HAVING count(*)=8') as $grp){
$occupied[$grp] = true;
$freeSlot = [
1=>8,
2=>8,
3=>8,
4=>8,
5=>8,
6=>8,
7=>8,
8=>8,
];
foreach($db->query('SELECT count(*) as cnt, grp FROM tournament WHERE grp < 10 GROUP BY grp') as $grpInfo){
if($grpInfo['cnt'] == 8){
unset($freeSlot[$grpInfo['grp']]);
}
$freeSlot[$grpInfo['grp']] = 8 - $grpInfo['cnt'];
}
$grpCount = count($occupied);
$fullGrpCnt = 8 - count($freeSlot);
if($grpCount < 8) {
$grp = Util::choiceRandom(array_keys($occupied));
if($freeSlot) {
$grp = Util::choiceRandom(array_keys($freeSlot));
$grpMemberCount = $db->queryFirstField('SELECT count(*) FROM tournament WHERE grp=%i', $grp);
$db->insert('tournament', [
'no'=>$general['no'],
@@ -102,57 +112,8 @@ if($btn == "자동개최설정") {
$gameStor->tnmt_auto = 0;
$gameStor->tournament = 0;
$gameStor->phase = 0;
} elseif($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") {
if($btn == "투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,horse,weapon,book from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "무명투입") {
$general['no'] = 0;
$general['name'] = "무명장수";
$general['npc'] = 2;
$general['leadership'] = 10;
$general['strength'] = 10;
$general['intel'] = 10;
$general['explevel'] = 10;
$general['gold'] = 0;
} elseif($btn == "쪼렙투입") {
$sel = rand() % 32;
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "일반투입") {
//참가한 사람 평균치
$query = "select AVG({$tp3}) as av from general where tournament=1";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$avgGen = MYDB_fetch_array($genResult);
//그 장수보다 높은장수 수
$query = "select no from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 and {$tp3}>{$avgGen['av']}";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genResult);
$sel = rand() % 32 + $genCount - 8;
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "굇수투입") {
$sel = rand() % 32;
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "랜덤투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
//참가
}
} elseif($btn == "랜덤투입") {
$general = $db->queryFirstRow('SELECT no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 order by rand() limit 1');
$occupied = [];
foreach($db->queryFirstColumn('SELECT grp FROM tournament WHERE grp < 10 GROUP BY grp HAVING count(*)=8') as $grp){
@@ -161,7 +122,13 @@ if($btn == "자동개최설정") {
$grpCount = count($occupied);
if($grpCount < 8) {
$grp = Util::choiceRandom(array_keys($occupied));
$notFullGrp = [];
foreach(Util::range(8) as $grpIdx){
if(!($occupied[$grpIdx]??false)){
$notFullGrp[] = $grpIdx;
}
}
$grp = Util::choiceRandom($notFullGrp);
$grpMemberCount = $db->queryFirstField('SELECT count(*) FROM tournament WHERE grp=%i', $grp);
$db->insert('tournament', [
'no'=>$general['no'],
@@ -179,7 +146,6 @@ if($btn == "자동개최설정") {
]);
$db->update('general', [
'tournament'=>1,
'gold'=>$general['gold']
], 'no=%i', $general['no']);
}
@@ -189,50 +155,28 @@ if($btn == "자동개최설정") {
$gameStor->phase = 0;
}
} elseif($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") {
$z = 0;
} elseif($btn == "랜덤전부투입") {
$grpIn = [];
foreach($db->queryAllLists('SELECT grp, count(*) FROM tournament WHERE 0 <= grp AND grp < 8 GROUP BY grp') as [$grpIdx, $cnt]){
$grpIn[$grpIdx] = $cnt;
}
$code = [];
for($i=0; $i < 8; $i++) {
$query = "select grp from tournament where grp='$i'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$grpCount = MYDB_num_rows($result);
for($k=$grpCount; $k < 8; $k++) {
$code[$z++] = $i * 10 + $k;
foreach(Util::range(8) as $grpIdx){
$cnt = $grpIn[$grpIdx]??0;
foreach(Util::range($cnt, 8) as $grpNo){
$code[] = $grpIdx * 10 + $grpNo;
}
}
//섞기
for($i=0; $i < $z; $i++) {
$index = rand() % $z;
$temp = $code[$i];
$code[$i] = $code[$index];
$code[$index] = $temp;
}
$z = count($code);
for($i=0; $i < $z; $i++) {
$generals = $db->query('SELECT no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 order by rand() limit %i', $z);
foreach(Util::range($z) as $i){
$sel = rand() % 32;
if($btn == "쪼렙전부투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
} elseif($btn == "일반전부투입") {
//참가한 사람 평균치
$query = "select AVG({$tp3}) as av from general where tournament=1";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$avgGen = MYDB_fetch_array($genResult);
//그 장수보다 높은장수 수
$query = "select no from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 and {$tp3}>{$avgGen['av']}";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genResult);
$sel += $genCount - 8;
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
} elseif($btn == "굇수전부투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
} else {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general = $generals[$i];
$grp = intdiv($code[$i], 10);
$grp_no = $code[$i] % 10;
@@ -250,11 +194,10 @@ if($btn == "자동개최설정") {
'w'=>$general['weapon'],
'b'=>$general['book']
]);
$db->update('general', [
'tournament'=>1,
'gold'=>$db->sqleval('gold - %i', $admin['develcost'])
], 'no=%i', $general['no']);
}
$db->update('general', [
'tournament'=>1,
], 'no IN %li', Util::squeezeFromArray($generals, 'no'));
$gameStor->tournament = 2;
$gameStor->phase = 0;
-67
View File
@@ -1,67 +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');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = $session::getUserID();
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`, nation, troop FROM general WHERE `owner`=%i', $userID);
if($name && mb_strwidth($name) > 18){
$name = mb_strimwidth($name, 0, 18);
}
$name = trim($name);
if($btn == "부 대 창 설" && $name != "" && $me['troop'] == 0) {
$db->insertIgnore('troop',[
'troop_leader'=>$me['no'],
'name'=>$name,
'nation'=>$me['nation'],
]);
$db->update('general', [
'troop'=>$me['no'],
], 'no=%i',$me['no']);
} elseif($btn == "부 대 변 경" && $name != "") {
$db->update('troop', [
'name'=>$name
], 'troop_leader=%i',$me['no']);
} elseif($btn == "부 대 추 방" && $gen != 0) {
$db->update('general', [
'troop'=>0
], 'no=%i AND troop= %i', $gen, $me['no']);
} elseif($btn == "부 대 가 입" && $troop != 0) {
$troopLeaderNation = $db->queryFirstField('SELECT `nation` FROM `general` WHERE `no`=%i AND `troop`=%i AND `nation`=%i', $troop, $troop, $me['nation']);
if($troopLeaderNation){
$db->update('general', [
'troop'=>$troop
], 'no=%i', $me['no']);
}
} elseif($btn == "부 대 탈 퇴") {
//부대장일 경우
if($me['troop'] == $me['no']) {
// 모두 탈퇴
$db->update('general', [
'troop'=>0
], 'troop=%i',$me['troop']);
// 부대 삭제
$db->delete('troop', 'troop_leader=%i', $me['troop']);
} else {
$db->update('general', [
'troop'=>0
], 'no=%i', $me['no']);
}
}
header('Location:b_troop.php', true, 303);
+15 -13
View File
@@ -4,11 +4,11 @@ namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$sel = Util::getReq('sel', 'int');
$comment = Util::getReq('comment');
$title = Util::getReq('title');
$str = Util::getReq('str');
$btn = Util::getPost('btn');
$sel = Util::getPost('sel', 'int');
$comment = Util::getPost('comment');
$title = Util::getPost('title');
$str = Util::getPost('str');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
@@ -22,28 +22,30 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votecomment']);
$me = $db->queryFirstRow('SELECT no,vote,name,nation,horse,weapon,book,item,npc from general where owner=%i', $userID);
$generalID = Session::getGeneralID();
if($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
$general = General::createGeneralObjFromDB($generalID, ['vote','horse','weapon','book','item','npc'], 2);
if($btn == "투표" && $general->getVar('vote') == 0 && $sel > 0) {
$develcost = $admin['develcost'] * 5;
$db->update('general', [
'gold'=>$db->sqleval('gold + %i', $develcost),
'vote'=>$sel
], 'owner=%i', $userID);
$log = [];
$log = uniqueItem($me, $log, 1);
pushGenLog($me, $log);
if(tryUniqueItemLottery($general, '설문조사')){
$general->applyDB($db);
}
}
else if($btn == "댓글" && trim($comment) != "") {
$comment = trim($comment);
$comment = StringUtil::neutralize($comment);
$nation = getNationStaticInfo($me['nation']);
$nation = $general->getStaticNation();
if(!$admin['votecomment']){
$admin['votecomment'] = [];
}
$admin['votecomment'][] = [$nation['name'],$me['name'],$comment];
$admin['votecomment'][] = [$nation['name'],$general->getName(),$comment];
$gameStor->votecomment = $admin['votecomment'];
}
+30
View File
@@ -0,0 +1,30 @@
#nation_list_frame{
vertical-align: top;
}
#nation_list{
width:100%;
}
#nation_list thead{
background-color:#cccccc;
color:black;
text-align:center
}
#nation_list th{
border:0;
border-left:1px solid gray;
padding:2px 6px;
}
#nation_list td{
border:0;
border-left:1px solid gray;
padding:1px 6px;
text-align:right;
}
#nation_list td:first-child{
text-align:left;
}
+1 -1
View File
@@ -31,7 +31,7 @@ color:white;
.commandButton {
float:left;
width:111px;
width:100px;
height:30px;
font-weight:bold;
font-size:13px;
+49
View File
@@ -0,0 +1,49 @@
.section_bar{
text-align:center;
border:0.5px solid #aaa;
padding-right:0;
padding-left:0;
}
.sub_bar{
text-align:center;
border:0.5px solid #aaa;
margin-left:-5px;
margin-right:-5px;
}
.reset_btn{
width:15ch;
}
.submit_btn{
margin-left:1em;
width:15ch;
}
.control_bar{
margin-top:8pt;
text-align:right;
}
.col-form-label{
text-align:right;
padding-right:2ch;
}
.form_list{
padding:8pt;
}
.half_section_left{
padding-right:0;
border-right:0.5px solid #aaa;
}
.half_section_right{
padding-left:0;
}
.popover{
max-width:100%;
}
+939 -823
View File
@@ -1,10 +1,12 @@
<?php
namespace sammo;
use sammo\Event\Action;
require_once 'process_war.php';
require_once 'func_gamerule.php';
require_once 'func_process.php';
require_once 'func_process_chief.php';
require_once 'func_tournament.php';
require_once 'func_auction.php';
require_once 'func_string.php';
@@ -25,7 +27,7 @@ require_once('func_command.php');
*
* @return array|null nationID에 해당하는 국가가 있을 경우 array 반환. 그외의 경우 null
*/
function getNationStaticInfo($nationID, $forceRefresh=false)
function getNationStaticInfo($nationID, $forceRefresh = false)
{
static $nationList = null;
@@ -34,37 +36,38 @@ function getNationStaticInfo($nationID, $forceRefresh=false)
}
if ($nationID === null) {
return null;
return null;
}
if($nationID === -1 && $nationList !== null){
if ($nationID === -1 && $nationList !== null) {
return $nationList;
}
if($nationID === 0){
if ($nationID === 0) {
return [
'nation'=>0,
'name'=>'재야',
'color'=>'#000000',
'type'=>GameConst::$neutralNationType,
'level'=>0,
'capital'=>0,
'gold'=>0,
'rice'=>2000,
'tech'=>0,
'gennum'=>1
'nation' => 0,
'name' => '재야',
'color' => '#000000',
'type' => GameConst::$neutralNationType,
'level' => 0,
'capital' => 0,
'gold' => 0,
'rice' => 2000,
'tech' => 0,
'gennum' => 1,
'power' => 1
];
}
if($nationList === null){
if ($nationList === null) {
$nationAll = DB::db()->query("select nation, name, color, type, level, capital, gennum, power from nation");
$nationList = Util::convertArrayToDict($nationAll, "nation");
}
if($nationID === -1){
if ($nationID === -1) {
return $nationList;
}
if(isset($nationList[$nationID])){
if (isset($nationList[$nationID])) {
return $nationList[$nationID];
}
return null;
@@ -73,19 +76,22 @@ function getNationStaticInfo($nationID, $forceRefresh=false)
/**
* getNationStaticInfo() 함수의 국가 캐시를 초기화
*/
function refreshNationStaticInfo(){
function refreshNationStaticInfo()
{
getNationStaticInfo(null, true);
}
/**
* getNationStaticInfo(-1) 단축형
*/
function getAllNationStaticInfo(){
function getAllNationStaticInfo()
{
return getNationStaticInfo(-1);
}
function GetImageURL($imgsvr, $filepath='') {
if($imgsvr == 0) {
function GetImageURL($imgsvr, $filepath = '')
{
if ($imgsvr == 0) {
return ServConfig::getSharedIconPath($filepath);
} else {
return AppConf::getUserIconPathWeb($filepath);
@@ -96,35 +102,38 @@ function GetImageURL($imgsvr, $filepath='') {
* @param null|int $con 장수의 벌점
* @param null|int $conlimit 최대 벌점
*/
function checkLimit($con = null) {
function checkLimit($con = null)
{
$session = Session::getInstance();
if($session->userGrade>=4){
if ($session->userGrade >= 4) {
return 0;
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($con === null){
if ($con === null) {
$con = $db->queryFirstField('SELECT con FROM general WHERE `owner`=%i', Session::getUserID());
}
$conlimit = $gameStor->conlimit;
if($con > $conlimit) {
if ($con > $conlimit) {
return 2;
//접속제한 90%이면 경고문구
} elseif($con > $conlimit * 0.9) {
//접속제한 90%이면 경고문구
} elseif ($con > $conlimit * 0.9) {
return 1;
} else {
return 0;
}
}
function getBlockLevel() {
function getBlockLevel()
{
return DB::db()->queryFirstField('select block from general where no = %i', Session::getInstance()->generalID);
}
function getRandGenName() {
function getRandGenName()
{
$firstname = Util::choiceRandom(GameConst::$randGenFirstName);
$middlename = Util::choiceRandom(GameConst::$randGenMiddleName);
$lastname = Util::choiceRandom(GameConst::$randGenLastName);
@@ -134,15 +143,17 @@ function getRandGenName() {
function cityInfo(General $generalObj) {
function cityInfo(General $generalObj)
{
$db = DB::db();
// 도시 정보
$city = $generalObj->getRawCity();
$cityID = $city['city'];
$nation = getNationStaticInfo($city['nation']);
if(!$nation){
if (!$nation) {
$nation = getNationStaticInfo(0);
}
@@ -152,27 +163,16 @@ function cityInfo(General $generalObj) {
$city['region'] = CityConst::$regionMap[$city['region']];
$city['levelText'] = CityConst::$levelMap[$city['level']];
$officerQuery = [];
$officerName = [
2=>'-',
3=>'-',
4=>'-'
2 => '-',
3 => '-',
4 => '-'
];
if ($city['officer4'] > 0) {
$officerQuery[] = $city['officer4'];
}
if ($city['officer3'] > 0) {
$officerQuery[] = $city['officer3'];
}
if ($city['officer2'] > 0) {
$officerQuery[] = $city['officer2'];
foreach ($db->query('SELECT `officer_level`, `name`, npc, no FROM general WHERE officer_city = %i', $cityID) as $officer) {
$officerName[$officer['officer_level']] = getColoredName($officer['name'], $officer['npc']);
}
if($officerQuery){
foreach($db->query('SELECT `level`, `name` FROM general WHERE `no` IN %li', $officerQuery) as $genOfficer){
$officerName[$genOfficer['level']] = $genOfficer['name'];
}
}
$city['officerName'] = $officerName;
$templates = new \League\Plates\Engine('templates');
@@ -180,117 +180,129 @@ function cityInfo(General $generalObj) {
return $templates->render('mainCityInfo', $city);
}
function myNationInfo() {
function myNationInfo(General $generalObj)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$userID = Session::getUserID();
$admin = $gameStor->getValues(['startyear','year']);
$admin = $gameStor->getValues(['startyear', 'year']);
$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);
$nationID = $generalObj->getNationID();
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation = %i', $nationID)??getNationStaticInfo(0);
$city = $db->queryFirstRow(
'SELECT COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop_max) as maxpop from city where nation=%i',
$nationID
);
$general = $db->queryFirstRow('SELECT COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leadership)*100 as maxcrew from general where nation=%i', $nationID);
$query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,strategic_cmd_limit,surlimit,tech,level,type from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$topChiefs = Util::convertArrayToDict($db->query('SELECT officer_level, no, name, npc FROM general WHERE nation = %i AND officer_level >= 11', $nationID), 'officer_level');
$query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop_max) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($result);
$query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leadership)*100 as maxcrew from general where nation='{$nation['nation']}'"; // 장수 목록
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$query = "select name from general where nation='{$nation['nation']}' and level='12'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level12 = MYDB_fetch_array($genresult);
$query = "select name from general where nation='{$nation['nation']}' and level='11'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level11 = MYDB_fetch_array($genresult);
$level12Name = key_exists(12, $topChiefs)?getColoredName($topChiefs[12]['name'], $topChiefs[12]['npc']):'-';
$level11Name = key_exists(11, $topChiefs)?getColoredName($topChiefs[11]['name'], $topChiefs[11]['npc']):'-';
echo "<table width=498 class='tb_layout bg2 nation_info'>
<tr>
<td colspan=4 ";
if($me['nation'] == 0) { echo "style='color:white;background-color:000000;font-weight:bold;font-size:13px;text-align:center;'>【재 야】"; }
else { echo "style='color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;text-align:center'>국가【 {$nation['name']} "; }
if (!$nationID) {
echo "style='color:white;background-color:000000;font-weight:bold;font-size:13px;text-align:center;'>【재 야";
} else {
echo "style='color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;text-align:center'>국가【 {$nation['name']}";
}
echo "
</td>
</tr>
<tr>
<td class='bg1 center'><b> </b></td>
<td colspan=3 class='center'><font color=\"yellow\">".getNationType($nation['type'])."</font> (".getNationType2($nation['type']).")</td>
<td colspan=3 class='center'><font color=\"yellow\">" . getNationType($nation['type']) . "</font> (" . getNationType2($nation['type']) . ")</td>
</td>
</tr>
<tr>
<td width=68 class='bg1 center'><b>".getLevelText(12, $nation['level'])."</b></td>
<td width=178 class='center'>";echo $level12?$level12['name']:"-"; echo "</td>
<td width=68 class='bg1 center'><b>".getLevelText(11, $nation['level'])."</b></td>
<td width=178 class='center'>";echo $level11?$level11['name']:"-"; echo "</td>
<td width=68 class='bg1 center'><b>" . getOfficerLevelText(12, $nation['level']) . "</b></td>
<td width=178 class='center'>{$level12Name}</td>
<td width=68 class='bg1 center'><b>" . getOfficerLevelText(11, $nation['level']) . "</b></td>
<td width=178 class='center'>{$level11Name}</td>
</tr>
<tr>
<td class='bg1 center'><b>총주민</b></td>
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$city['totpop']}/{$city['maxpop']}";echo "</td>
<td class='center'>";
echo $nationID===0 ? "해당 없음" : "{$city['totpop']}/{$city['maxpop']}";
echo "</td>
<td class='bg1 center'><b>총병사</b></td>
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$general['totcrew']}/{$general['maxcrew']}"; echo "</td>
<td class='center'>";
echo $nationID===0 ? "해당 없음" : "{$general['totcrew']}/{$general['maxcrew']}";
echo "</td>
</td>
</tr>
<tr>
<td class='bg1 center'><b> </b></td>
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$nation['gold']}";echo "</td>
<td class='center'>";
echo $nationID===0 ? "해당 없음" : "{$nation['gold']}";
echo "</td>
<td class='bg1 center'><b> </b></td>
<td class='center'>";echo $me['nation']==0?"해당 없음":"{$nation['rice']}";echo "</td>
<td class='center'>";
echo $nationID===0 ? "해당 없음" : "{$nation['rice']}";
echo "</td>
</tr>
<tr>
<td class='bg1 center'><b>지급률</b></td>
<td class='center'>";
if($me['nation'] == 0) {
if ($nationID===0) {
echo "해당 없음";
} else {
echo $nation['bill']==0?"0 %":"{$nation['bill']} %";
echo $nation['bill'] == 0 ? "0 %" : "{$nation['bill']} %";
}
echo "
</td>
<td class='bg1 center'><b> </b></td>
<td class='center'>";
if($me['nation'] == 0) {
if ($nationID===0) {
echo "해당 없음";
} else {
echo $nation['rate']==0?"0 %":"{$nation['rate']} %";
echo $nation['rate'] == 0 ? "0 %" : "{$nation['rate']} %";
}
$techCall = getTechCall($nation['tech']);
if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $nation['tech'] = "<font color=magenta>".floor($nation['tech'])."</font>"; }
else { $nation['tech'] = "<font color=limegreen>".floor($nation['tech'])."</font>"; }
if (TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) {
$nation['tech'] = "<font color=magenta>" . floor($nation['tech']) . "</font>";
} else {
$nation['tech'] = "<font color=limegreen>" . floor($nation['tech']) . "</font>";
}
$nation['tech'] = "$techCall / {$nation['tech']}";
if($me['nation']==0){
if ($nationID===0) {
$nation['strategic_cmd_limit'] = "<font color=white>해당 없음</font>";
$nation['surlimit'] = "<font color=white>해당 없음</font>";
$nation['scout'] = "<font color=white>해당 없음</font>";
$nation['war'] = "<font color=white>해당 없음</font>";
$nation['power'] = "<font color=white>해당 없음</font>";
} else {
if($nation['strategic_cmd_limit'] != 0) { $nation['strategic_cmd_limit'] = "<font color=red>{$nation['strategic_cmd_limit']}턴</font>"; }
else { $nation['strategic_cmd_limit'] = "<font color=limegreen>가 능</font>"; }
if($nation['surlimit'] != 0) { $nation['surlimit'] = "<font color=red>{$nation['surlimit']}</font>"; }
else { $nation['surlimit'] = "<font color=limegreen>가 능</font>"; }
if($nation['scout'] != 0) { $nation['scout'] = "<font color=red>금 지</font>"; }
else { $nation['scout'] = "<font color=limegreen>허 가</font>"; }
if($nation['war'] != 0) { $nation['war'] = "<font color=red>금 지</font>"; }
else { $nation['war'] = "<font color=limegreen>허 가</font>"; }
if ($nation['strategic_cmd_limit'] != 0) {
$nation['strategic_cmd_limit'] = "<font color=red>{$nation['strategic_cmd_limit']}</font>";
} else {
$nation['strategic_cmd_limit'] = "<font color=limegreen>가 능</font>";
}
if ($nation['surlimit'] != 0) {
$nation['surlimit'] = "<font color=red>{$nation['surlimit']}</font>";
} else {
$nation['surlimit'] = "<font color=limegreen>가 능</font>";
}
if ($nation['scout'] != 0) {
$nation['scout'] = "<font color=red>금 지</font>";
} else {
$nation['scout'] = "<font color=limegreen>허 가</font>";
}
if ($nation['war'] != 0) {
$nation['war'] = "<font color=red>금 지</font>";
} else {
$nation['war'] = "<font color=limegreen>허 가</font>";
}
}
echo "
@@ -298,15 +310,21 @@ function myNationInfo() {
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b> </b></td>
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$city['cnt']}"; echo "</td>
<td style='text-align:center;'>";
echo $nationID===0 ? "-" : "{$city['cnt']}";
echo "</td>
<td style='text-align:center;' class='bg1'><b> </b></td>
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$general['cnt']}"; echo "</td>
<td style='text-align:center;'>";
echo $nationID===0 ? "-" : "{$general['cnt']}";
echo "</td>
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b> </b></td>
<td style='text-align:center;'>{$nation['power']}</td>
<td style='text-align:center;' class='bg1'><b>기술력</b></td>
<td style='text-align:center;'>";echo $me['nation']==0?"-":"{$nation['tech']}"; echo "</td>
<td style='text-align:center;'>";
echo $nationID===0 ? "-" : "{$nation['tech']}";
echo "</td>
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b> </b></td>
@@ -324,60 +342,55 @@ function myNationInfo() {
";
}
function checkSecretMaxPermission($penalty){
function checkSecretMaxPermission($penalty)
{
$secretMax = 4;
if($penalty['noTopSecret']??false){
if ($penalty['noTopSecret'] ?? false) {
$secretMax = 1;
}
else if($penalty['noChief']??false){
} else if ($penalty['noChief'] ?? false) {
$secretMax = 1;
}
else if($penalty['noAmbassador']??false){
} else if ($penalty['noAmbassador'] ?? false) {
$secretMax = 2;
}
return $secretMax;
}
function checkSecretPermission($me, $checkSecretLimit=true){
if(!key_exists('penalty', $me) || !key_exists('permission', $me)){
trigger_error ('canAccessSecret() 함수에 필요한 인자가 부족');
function checkSecretPermission(array $me, $checkSecretLimit = true)
{
if (!key_exists('penalty', $me) || !key_exists('permission', $me)) {
trigger_error('canAccessSecret() 함수에 필요한 인자가 부족');
}
$penalty = Json::decode($me['penalty'])??[];
$penalty = Json::decode($me['penalty']) ?? [];
$permission = $me['permission'];
if(!$me['nation']){
if (!$me['nation']) {
return -1;
}
if($me['level'] == 0){
if ($me['officer_level'] == 0) {
return -1;
}
if($penalty['noSecret']??false){
if ($penalty['noSecret'] ?? false) {
return 0;
}
$secretMin = 0;
$secretMax = checkSecretMaxPermission($me, $penalty);
if($me['level'] == 12){
if ($me['officer_level'] == 12) {
$secretMin = 4;
}
else if($me['permission'] == 'ambassador'){
} else if ($me['permission'] == 'ambassador') {
$secretMin = 4;
}
else if($me['permission'] == 'auditor'){
} else if ($me['permission'] == 'auditor') {
$secretMin = 3;
}
else if($me['level'] >= 5){
} else if ($me['officer_level'] >= 5) {
$secretMin = 2;
}
else if($me['level'] > 1){
} else if ($me['officer_level'] > 1) {
$secretMin = 1;
}
else if($checkSecretLimit){
} else if ($checkSecretLimit) {
$db = DB::db();
$secretLimit = $db->queryFirstField('SELECT secretlimit FROM nation WHERE nation = %i', $me['nation']);
if ($me['belong'] >= $secretLimit) {
@@ -388,9 +401,10 @@ function checkSecretPermission($me, $checkSecretLimit=true){
return min($secretMin, $secretMax);
}
function addCommand($typename, $value, $valid = 1, $color=0) {
if($valid == 1) {
switch($color) {
function addCommand($typename, $value, $valid = 1, $color = 0)
{
if ($valid == 1) {
switch ($color) {
case 0:
echo "
<option style='color:white;background-color:black;' value='{$value}'>{$typename}</option>";
@@ -410,8 +424,9 @@ function addCommand($typename, $value, $valid = 1, $color=0) {
}
}
function commandGroup($typename, $type=0) {
if($type == 0) {
function commandGroup($typename, $type = 0)
{
if ($type == 0) {
echo "
<optgroup label='{$typename}' style='color:skyblue;background-color:black;'>";
} else {
@@ -420,7 +435,8 @@ function commandGroup($typename, $type=0) {
}
}
function printCommandTable(General $generalObj) {
function printCommandTable(General $generalObj)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$userID = Session::getUserID();
@@ -429,50 +445,46 @@ function printCommandTable(General $generalObj) {
$env = $gameStor->getAll();
?>
<select id='generalCommandList' name='commandtype' size=1 style='height:20px;width:260px;color:white;background-color:black;font-size:12px;'>";
<?php
<select id='generalCommandList' name='commandtype' size=1 style='height:20px;width:260px;color:white;background-color:black;font-size:12px;'>";
<?php
//보정(Pros,Cons) 여부.
$getCompensateClassName = function($value){
if($value > 0){
return 'compensatePositive';
}
else if($value < 0){
return 'compensateNegative';
}
return 'compensateNeutral';
};
//보정(Pros,Cons) 여부.
$getCompensateClassName = function ($value) {
if ($value > 0) {
return 'compensatePositive';
} else if ($value < 0) {
return 'compensateNegative';
}
return 'compensateNeutral';
};
foreach(GameConst::$availableGeneralCommand as $commandCategory => $commandList){
if($commandCategory){
commandGroup("======= {$commandCategory} =======");
}
foreach (GameConst::$availableGeneralCommand as $commandCategory => $commandList) {
if ($commandCategory) {
commandGroup("======= {$commandCategory} =======");
}
foreach($commandList as $commandClassName){
$commandObj = buildGeneralCommandClass($commandClassName, $generalObj, $env);
if(!$commandObj->canDisplay()){
continue;
foreach ($commandList as $commandClassName) {
$commandObj = buildGeneralCommandClass($commandClassName, $generalObj, $env);
if (!$commandObj->canDisplay()) {
continue;
}
?>
<option class='commandBasic <?= $getCompensateClassName($commandObj->getCompensationStyle()) ?> <?= $commandObj->hasMinConditionMet() ? '' : 'commandImpossible' ?>' value='<?= Util::getClassNameFromObj($commandObj) ?>' data-reqArg='<?= ($commandObj::$reqArg) ? 'true' : 'false' ?>'><?= $commandObj->getCommandDetailTitle() ?><?= $commandObj->hasMinConditionMet() ? '' : '(불가)' ?></option>
<?php
}
if ($commandCategory) {
commandGroup('', 1);
}
?>
<option
class='commandBasic <?=$getCompensateClassName($commandObj->getCompensationStyle())?> <?=$commandObj->isReservable()?'':'commandImpossible'?>'
value='<?=Util::getClassNameFromObj($commandObj)?>'
data-reqArg='<?=($commandObj::$reqArg)?'true':'false'?>'
><?=$commandObj->getCommandDetailTitle()?><?=$commandObj->isReservable()?'':'(불가)'?></option>
<?php
}
if($commandCategory){
commandGroup('', 1);
}
}
?>
</select>
?>
</select>
<?php
}
function chiefCommandTable(General $generalObj) {
function chiefCommandTable(General $generalObj)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$userID = Session::getUserID();
@@ -481,130 +493,46 @@ function chiefCommandTable(General $generalObj) {
$env = $gameStor->getAll();
?>
<select id='chiefCommandList' name='commandtype' size=1 style='height:20px;color:white;background-color:black;font-size:13px;display:inline-block;'>";
<?php
<select id='chiefCommandList' name='commandtype' size=1 style='height:20px;color:white;background-color:black;font-size:13px;display:inline-block;'>";
<?php
//보정(Pros,Cons) 여부.
$getCompensateClassName = function($value){
if($value > 0){
return 'compensatePositive';
}
else if($value < 0){
return 'compensateNegative';
}
return 'compensateNeutral';
};
//보정(Pros,Cons) 여부.
$getCompensateClassName = function ($value) {
if ($value > 0) {
return 'compensatePositive';
} else if ($value < 0) {
return 'compensateNegative';
}
return 'compensateNeutral';
};
foreach(GameConst::$availableChiefCommand as $commandCategory => $commandList){
if($commandCategory){
commandGroup("======= {$commandCategory} =======");
}
foreach (GameConst::$availableChiefCommand as $commandCategory => $commandList) {
if ($commandCategory) {
commandGroup("======= {$commandCategory} =======");
}
foreach($commandList as $commandClassName){
$commandObj = buildNationCommandClass($commandClassName, $generalObj, $env, new LastTurn());
if(!$commandObj->canDisplay()){
continue;
foreach ($commandList as $commandClassName) {
$commandObj = buildNationCommandClass($commandClassName, $generalObj, $env, new LastTurn());
if (!$commandObj->canDisplay()) {
continue;
}
?>
<option class='commandBasic <?= $getCompensateClassName($commandObj->getCompensationStyle()) ?> <?= $commandObj->hasMinConditionMet() ? '' : 'commandImpossible' ?>' value='<?= Util::getClassNameFromObj($commandObj) ?>' data-reqArg='<?= ($commandObj::$reqArg) ? 'true' : 'false' ?>'><?= $commandObj->getCommandDetailTitle() ?><?= $commandObj->hasMinConditionMet() ? '' : '(불가)' ?></option>
<?php
}
if ($commandCategory) {
commandGroup('', 1);
}
?>
<option
class='commandBasic <?=$getCompensateClassName($commandObj->getCompensationStyle())?> <?=$commandObj->isReservable()?'':'commandImpossible'?>'
value='<?=Util::getClassNameFromObj($commandObj)?>'
data-reqArg='<?=($commandObj::$reqArg)?'true':'false'?>'
><?=$commandObj->getCommandDetailTitle()?><?=$commandObj->isReservable()?'':'(불가)'?></option>
<?php
}
if($commandCategory){
commandGroup('', 1);
}
}
?>
</select>
?>
</select>
<?php
}
function chiefCommandTable_old() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$userID = Session::getUserID();
$develcost = $gameStor->develcost;
$me = $db->queryFirstRow('select no,nation,city,level from general where owner=%i', $userID);
$nation = $db->queryFirstRow('SELECT level,can_change_flag,gennum FROM nation WHERE nation=%i', $me['nation']);
$genCount = $nation['gennum'];
$citySupply = $db->queryFirstField('SELECT supply FROM city WHERE city=%i', $me['city']);
if($nation['level'] > 0) { $valid = 1; }
else { $valid = 0; }
if($citySupply == 0) { $valid = 0; }
echo "
<select name=commandtype size=1 style='height:20px;color:white;background-color:black;font-size:13px;display:inline-block;'>";
commandGroup("====== 휴 식 ======");
addCommand("휴 식", 99);
commandGroup("", 1);
commandGroup("====== 인 사 ======");
addCommand("발령", 27, $valid);
addCommand("포상", 23, $valid);
addCommand("몰수", 24, $valid);
commandGroup("", 1);
commandGroup("====== 외 교 ======");
//addCommand("통합 제의", 53, $valid);
addCommand("항복 권고", 51, $valid);
if($nation['level'] >= 2) {
addCommand("물자 원조", 52, $valid);
} else {
addCommand("물자 원조", 52, 0);
}
addCommand("불가침 제의", 61, $valid);
addCommand("선전 포고", 62, $valid);
addCommand("종전 제의", 63, $valid);
addCommand("파기 제의", 64, $valid);
commandGroup("", 1);
commandGroup("====== 특 수 ======");
addCommand("초토화", 65, $valid);
addCommand("천도/3턴(금쌀{$develcost}0)", 66, $valid);
$cost = $develcost * 500 + 60000; // 7만~13만
addCommand("증축/6턴(금쌀{$cost})", 67, $valid);
addCommand("감축/6턴", 68, $valid);
commandGroup("", 1);
commandGroup("====== 전 략 ======");
$term = Util::round(sqrt($genCount*8)*10);
addCommand("필사즉생/3턴(전략{$term})", 71, $valid);
$term = Util::round(sqrt($genCount*4)*10);
addCommand("백성동원/1턴(전략{$term})", 72, $valid);
$term = Util::round(sqrt($genCount*4)*10);
addCommand("수몰/3턴(전략{$term})", 73, $valid);
$term = Util::round(sqrt($genCount*4)*10);
addCommand("허보/2턴(전략{$term})", 74, $valid);
$term = Util::round(sqrt($genCount*2)*10);
if($term < 72) { $term = 72; }
addCommand("피장파장/3턴(전략{$term})", 75, $valid);
$term = Util::round(sqrt($genCount*10)*10);
addCommand("의병모집/3턴(전략{$term})", 76, $valid);
$term = Util::round(sqrt($genCount*16)*10);
addCommand("이호경식/1턴(전략{$term})", 77, $valid);
$term = Util::round(sqrt($genCount*16)*10);
addCommand("급습/1턴(전략{$term})", 78, $valid);
commandGroup("", 1);
commandGroup("====== 기 타 ======");
if($nation['can_change_flag'] > 0) {
addCommand("국기 변경", 81, 1);
} else {
addCommand("국기 변경", 81, 0);
}
commandGroup("", 1);
echo "
</select>
";
}
function generalInfo(General $generalObj) {
function generalInfo(General $generalObj)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -613,37 +541,34 @@ function generalInfo(General $generalObj) {
$nation = getNationStaticInfo($generalObj->getNationID());
$lbonus = calcLeadershipBonus($generalObj->getVar('level'), $nation['level']);
if($lbonus > 0) {
$lbonus = calcLeadershipBonus($generalObj->getVar('officer_level'), $nation['level']);
if ($lbonus > 0) {
$lbonus = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonus = "";
}
if($generalObj->getVar('troop') == 0){
if ($generalObj->getVar('troop') == 0) {
$troopInfo = '-';
}
else{
} else {
$troopCity = $db->queryFirstField('SELECT city FROM general WHERE no=%i', $generalObj->getVar('troop'));
$troopTurn = $db->queryFirstField('SELECT `brief` FROM general_turn WHERE general_id = %i AND turn_idx = 0', $generalObj->getVar('troop'));
$troopInfo = $db->queryFirstField('SELECT name FROM troop WHERE troop_leader = %i', $generalObj->getVar('troop'));
if($troopTurn == '집합'){
if ($troopTurn !== '집합') {
$troopInfo = "<strike style='color:gray;'>{$troopInfo}</strike>";
}
else if($troopCity != $generalObj->getCityID()){
} else if ($troopCity != $generalObj->getCityID()) {
$troopCityName = CityConst::byID($troopCity)->name;
$troopInfo = "<span style='color:orange;'>{$troopInfo}({$troopCityName})</span>";
}
}
$generalLevel = $generalObj->getVar('level');
$levelText = getLevelText($generalLevel, $nation['level']);
$officerLevel = $generalObj->getVar('officer_level');
$officerLevelText = getOfficerLevelText($officerLevel, $nation['level']);
if(2 <= $generalLevel && $generalLevel <= 4){
$cityOfficerKey = 'officer'.$generalLevel;
$cityOfficerName = $db->queryFirstField('SELECT name FROM city where %b = %i',$cityOfficerKey, $generalObj->getID());
$levelText = "{$cityOfficerName} {$levelText}";
if (2 <= $officerLevel && $officerLevel <= 4) {
$cityOfficerName = CityConst::byID($generalObj->getVar('officer_city'))->name;
$officerLevelText = "{$cityOfficerName} {$officerLevelText}";
}
$call = getCall(...$generalObj->getVars('leadership', 'strength', 'intel'));
@@ -656,83 +581,97 @@ function generalInfo(General $generalObj) {
$leadership = $generalObj->getLeadership(true, false, false);
$strength = $generalObj->getStrength(true, false, false);
$intel = $generalObj->getIntel(true, false, false);
$injury = $generalObj->getVar('injury');
if($injury > 60) { $color = "<font color=red>"; $injury = "위독"; }
elseif($injury > 40) { $color = "<font color=magenta>"; $injury = "심각"; }
elseif($injury > 20) { $color = "<font color=orange>"; $injury = "중상"; }
elseif($injury > 0) { $color = "<font color=yellow>"; $injury = "경상"; }
else { $color = "<font color=white>"; $injury = "건강"; }
if ($injury > 60) {
$color = "<span style='color:red'>";
$injury = "위독";
} elseif ($injury > 40) {
$color = "<span style='color:magenta'>";
$injury = "심각";
} elseif ($injury > 20) {
$color = "<span style='color:orange'>";
$injury = "중상";
} elseif ($injury > 0) {
$color = "<span style='color:yellow'>";
$injury = "경상";
} else {
$color = "<span style='color:white'>";
$injury = "건강";
}
$remaining = (new \DateTimeImmutable($generalObj->getTurnTime()))->diff(new \DateTimeImmutable())->i;
if($nation['color'] == "") { $nation['color'] = "#000000"; }
if ($nation['color'] == "") {
$nation['color'] = "#000000";
}
$age = $generalObj->getVar('age');
if($age < GameConst::$retirementYear*0.75) {$age = "<font color=limegreen>{$age} 세</font>"; }
elseif($age < GameConst::$retirementYear) { $age = "<font color=yellow>{$age} 세</font>"; }
else { $age = "<font color=red>{$age} 세</font>"; }
if ($age < GameConst::$retirementYear * 0.75) {
$age = "<font color=limegreen>{$age} 세</font>";
} elseif ($age < GameConst::$retirementYear) {
$age = "<font color=yellow>{$age} 세</font>";
} else {
$age = "<font color=red>{$age} 세</font>";
}
$connectCnt = round($generalObj->getVar('connect'), -1);
$specialDomestic = $generalObj->getVar('special')===GameConst::$defaultSpecialDomestic
?"{$generalObj->getVar('specage')}"
: "<font color=limegreen>".displayiActionObjInfo($generalObj->getSpecialDomestic())."</font>";
$specialWar = $generalObj->getVar('special2')===GameConst::$defaultSpecialDomestic
?"{$generalObj->getVar('specage2')}"
: "<font color=limegreen>".displayiActionObjInfo($generalObj->getSpecialWar())."</font>";
$specialDomestic = $generalObj->getVar('special') === GameConst::$defaultSpecialDomestic
? "{$generalObj->getVar('specage')}"
: "<font color=limegreen>" . displayiActionObjInfo($generalObj->getSpecialDomestic()) . "</font>";
$specialWar = $generalObj->getVar('special2') === GameConst::$defaultSpecialDomestic
? "{$generalObj->getVar('specage2')}"
: "<font color=limegreen>" . displayiActionObjInfo($generalObj->getSpecialWar()) . "</font>";
$atmos = $generalObj->getVar('atmos');
$atmosBonus = $generalObj->onCalcStat($generalObj, 'bonusAtmos', $atmos) - $atmos;
if($atmosBonus > 0){
if ($atmosBonus > 0) {
$atmos = "<font color=cyan>{$atmos} (+{$atmosBonus})</font>";
}
else if($atmosBonus < 0){
} else if ($atmosBonus < 0) {
$atmos = "<font color=magenta>{$atmos} ({$atmosBonus})</font>";
}
else{
} else {
$atmos = "$atmos";
}
$train = $generalObj->getVar('train');
$trainBonus = $generalObj->onCalcStat($generalObj, 'bonusTrain', $train) - $train;
if($trainBonus > 0){
if ($trainBonus > 0) {
$train = "<font color=cyan>{$train} (+{$trainBonus})</font>";
}
else if($trainBonus < 0){
} else if ($trainBonus < 0) {
$train = "<font color=magenta>{$train} ({$trainBonus})</font>";
}
else{
} else {
$train = "$train";
}
if($generalObj->getVar('defence_train') === 999){
if ($generalObj->getVar('defence_train') === 999) {
$defenceTrain = "<font color=red>수비 안함</font>";
}
else{
} else {
$defenceTrain = "<font color=limegreen>수비 함(훈사{$generalObj->getVar('defence_train')})</font>";
}
$crewType = $generalObj->getCrewTypeObj();
$weapImage = ServConfig::$gameImagePath."/weap{$crewType->id}.png";
if($show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
$weapImage = ServConfig::$gameImagePath . "/crewtype{$crewType->id}.png";
if ($show_img_level < 2) {
$weapImage = ServConfig::$sharedIconPath . "/default.jpg";
};
$imagePath = GetImageURL(...$generalObj->getVars('imgsvr', 'picture'));
echo "<table width=498 class='tb_layout bg2'>
<tr>
<td width=64 height=64 rowspan=3 class='generalIcon' style='text-align:center;background:no-repeat center url(\"{$imagePath}\");background-size:64px;'>&nbsp;</td>
<td colspan=9 height=16 style=text-align:center;color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$generalObj->getName()} {$levelText} | {$call} | {$color}{$injury}</font> ".$generalObj->getTurnTime($generalObj::TURNTIME_HMS)."</td>
<td colspan=9 height=16 style=text-align:center;color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$generalObj->getName()} {$officerLevelText} | {$call} | {$color}{$injury}</span> " . $generalObj->getTurnTime($generalObj::TURNTIME_HMS) . "</td>
</tr>
<tr height=16>
<td style='text-align:center;' class='bg1'><b>통솔</b></td>
<td style='text-align:center;'>&nbsp;{$color}{$leadership}</font>{$lbonus}&nbsp;</td>
<td style='text-align:center;' width=45>".bar(expStatus($generalObj->getVar('leadership_exp')), 20)."</td>
<td style='text-align:center;'>&nbsp;{$color}{$leadership}</span>{$lbonus}&nbsp;</td>
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('leadership_exp')), 20) . "</td>
<td style='text-align:center;' class='bg1'><b>무력</b></td>
<td style='text-align:center;'>&nbsp;{$color}{$strength}</font>&nbsp;</td>
<td style='text-align:center;' width=45>".bar(expStatus($generalObj->getVar('strength_exp')), 20)."</td>
<td style='text-align:center;'>&nbsp;{$color}{$strength}</span>&nbsp;</td>
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('strength_exp')), 20) . "</td>
<td style='text-align:center;' class='bg1'><b>지력</b></td>
<td style='text-align:center;'>&nbsp;{$color}{$intel}</font>&nbsp;</td>
<td style='text-align:center;' width=45>".bar(expStatus($generalObj->getVar('intel_exp')), 20)."</td>
<td style='text-align:center;'>&nbsp;{$color}{$intel}</span>&nbsp;</td>
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('intel_exp')), 20) . "</td>
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b>명마</b></td>
@@ -757,7 +696,7 @@ function generalInfo(General $generalObj) {
<td style='text-align:center;' class='bg1'><b>병사</b></td>
<td style='text-align:center;' colspan=2>{$generalObj->getVar('crew')}</td>
<td style='text-align:center;' class='bg1'><b>성격</b></td>
<td style='text-align:center;' colspan=2>".displayiActionObjInfo($generalObj->getPersonality())."</td>
<td style='text-align:center;' colspan=2>" . displayiActionObjInfo($generalObj->getPersonality()) . "</td>
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b>훈련</b></td>
@@ -770,7 +709,7 @@ function generalInfo(General $generalObj) {
<tr height=20>
<td style='text-align:center;' class='bg1'><b>Lv</b></td>
<td style='text-align:center;'>&nbsp;{$generalObj->getVar('explevel')}&nbsp;</td>
<td style='text-align:center;' colspan=5>".bar(getLevelPer(...$generalObj->getVars('experience', 'explevel')), 20)."</td>
<td style='text-align:center;' colspan=5>" . bar(getLevelPer(...$generalObj->getVars('experience', 'explevel')), 20) . "</td>
<td style='text-align:center;' class='bg1'><b>연령</b></td>
<td style='text-align:center;' colspan=2>{$age}</td>
</tr>
@@ -786,62 +725,69 @@ function generalInfo(General $generalObj) {
<td style='text-align:center;' class='bg1'><b>부대</b></td>
<td style='text-align:center;' colspan=3>{$troopInfo}</td>
<td style='text-align:center;' class='bg1'><b>벌점</b></td>
<td style='text-align:center;' colspan=5>".getConnect($connectCnt)." {$connectCnt}({$generalObj->getVar('con')})</td>
<td style='text-align:center;' colspan=5>" . getConnect($connectCnt) . " {$connectCnt}({$generalObj->getVar('con')})</td>
</tr>
</table>";
}
function generalInfo2(General $generalObj) {
function generalInfo2(General $generalObj)
{
$general = $generalObj->getRaw();
$winRate = round($generalObj->getRankVar('killnum')/max($generalObj->getRankVar('warnum'),1), 2);
$killRate = round($generalObj->getRankVar('killcrew')/max($generalObj->getRankVar('deathcrew'),1), 2);
$winRate = round($generalObj->getRankVar('killnum') / max($generalObj->getRankVar('warnum'), 1) * 100, 2);
$killRate = round($generalObj->getRankVar('killcrew') / max($generalObj->getRankVar('deathcrew'), 1) * 100, 2);
$experienceBonus = $generalObj->onCalcStat($generalObj, 'experience', 10000) - 10000;
if($experienceBonus > 0){
$experience = "<font color=cyan>".getHonor($general['experience'])." ({$general['experience']})</font>";
}
else if($experienceBonus < 0){
$experience = "<font color=magenta>".getHonor($general['experience'])." ({$general['experience']})</font>";
}
else{
$experience = getHonor($general['experience'])." ({$general['experience']})";
if ($experienceBonus > 0) {
$experience = "<font color=cyan>" . getHonor($general['experience']) . " ({$general['experience']})</font>";
} else if ($experienceBonus < 0) {
$experience = "<font color=magenta>" . getHonor($general['experience']) . " ({$general['experience']})</font>";
} else {
$experience = getHonor($general['experience']) . " ({$general['experience']})";
}
$dedicationBonus = $generalObj->onCalcStat($generalObj, 'dedication', 10000) - 10000;
if($dedicationBonus > 0){
$dedication = "<font color=cyan>".getHonor($general['dedication'])." ({$general['dedication']})</font>";
}
else if($dedicationBonus < 0){
$dedication = "<font color=magenta>".getHonor($general['dedication'])." ({$general['dedication']})</font>";
}
else{
$dedication = getHonor($general['dedication'])." ({$general['dedication']})";
if ($dedicationBonus > 0) {
$dedication = "<font color=cyan>" . getHonor($general['dedication']) . " ({$general['dedication']})</font>";
} else if ($dedicationBonus < 0) {
$dedication = "<font color=magenta>" . getHonor($general['dedication']) . " ({$general['dedication']})</font>";
} else {
$dedication = getHonor($general['dedication']) . " ({$general['dedication']})";
}
$dex0 = $general['dex0'] / GameConst::$dexLimit * 100;
$dex10 = $general['dex10'] / GameConst::$dexLimit * 100;
$dex20 = $general['dex20'] / GameConst::$dexLimit * 100;
$dex30 = $general['dex30'] / GameConst::$dexLimit * 100;
$dex40 = $general['dex40'] / GameConst::$dexLimit * 100;
$dex1 = $general['dex1'] / GameConst::$dexLimit * 100;
$dex2 = $general['dex2'] / GameConst::$dexLimit * 100;
$dex3 = $general['dex3'] / GameConst::$dexLimit * 100;
$dex4 = $general['dex4'] / GameConst::$dexLimit * 100;
$dex5 = $general['dex5'] / GameConst::$dexLimit * 100;
if($dex0 > 100) { $dex0 = 100; }
if($dex10 > 100) { $dex10 = 100; }
if($dex20 > 100) { $dex20 = 100; }
if($dex30 > 100) { $dex30 = 100; }
if($dex40 > 100) { $dex40 = 100; }
if ($dex1 > 100) {
$dex1 = 100;
}
if ($dex2 > 100) {
$dex2 = 100;
}
if ($dex3 > 100) {
$dex3 = 100;
}
if ($dex4 > 100) {
$dex4 = 100;
}
if ($dex5 > 100) {
$dex5 = 100;
}
$general['dex0_text'] = getDexCall($general['dex0']);
$general['dex10_text'] = getDexCall($general['dex10']);
$general['dex20_text'] = getDexCall($general['dex20']);
$general['dex30_text'] = getDexCall($general['dex30']);
$general['dex40_text'] = getDexCall($general['dex40']);
$general['dex1_text'] = getDexCall($general['dex1']);
$general['dex2_text'] = getDexCall($general['dex2']);
$general['dex3_text'] = getDexCall($general['dex3']);
$general['dex4_text'] = getDexCall($general['dex4']);
$general['dex5_text'] = getDexCall($general['dex5']);
$general['dex0_short'] = sprintf('%.1fK', $general['dex0']/1000);
$general['dex10_short'] = sprintf('%.1fK', $general['dex10']/1000);
$general['dex20_short'] = sprintf('%.1fK', $general['dex20']/1000);
$general['dex30_short'] = sprintf('%.1fK', $general['dex30']/1000);
$general['dex40_short'] = sprintf('%.1fK', $general['dex40']/1000);
$general['dex1_short'] = sprintf('%.1fK', $general['dex1'] / 1000);
$general['dex2_short'] = sprintf('%.1fK', $general['dex2'] / 1000);
$general['dex3_short'] = sprintf('%.1fK', $general['dex3'] / 1000);
$general['dex4_short'] = sprintf('%.1fK', $general['dex4'] / 1000);
$general['dex5_short'] = sprintf('%.1fK', $general['dex5'] / 1000);
echo "<table width=498 class='tb_layout bg2'>
<tr><td style='text-align:center;' colspan=6 class='bg1'><b> </b></td></tr>
@@ -880,98 +826,99 @@ function generalInfo2(General $generalObj) {
<tr><td style='text-align:center;' colspan=4 class='bg1'><b> </b></td></tr>
<tr height=16>
<td width=64 style='text-align:center;' class='bg1'><b>보병</b></td>
<td width=40> {$general['dex0_text']}</td>
<td width=60 align=right>{$general['dex0_short']}&nbsp;</td>
<td width=330 style='text-align:center;'>".bar($dex0, 16)."</td>
<td width=40> {$general['dex1_text']}</td>
<td width=60 align=right>{$general['dex1_short']}&nbsp;</td>
<td width=330 style='text-align:center;'>" . bar($dex1, 16) . "</td>
</tr>
<tr height=16>
<td style='text-align:center;' class='bg1'><b>궁병</b></td>
<td> {$general['dex10_text']}</td>
<td align=right>{$general['dex10_short']}&nbsp;</td>
<td style='text-align:center;'>".bar($dex10, 16)."</td>
<td> {$general['dex2_text']}</td>
<td align=right>{$general['dex2_short']}&nbsp;</td>
<td style='text-align:center;'>" . bar($dex2, 16) . "</td>
</tr>
<tr height=16>
<td style='text-align:center;' class='bg1'><b>기병</b></td>
<td> {$general['dex20_text']}</td>
<td align=right>{$general['dex20_short']}&nbsp;</td>
<td style='text-align:center;'>".bar($dex20, 16)."</td>
<td> {$general['dex3_text']}</td>
<td align=right>{$general['dex3_short']}&nbsp;</td>
<td style='text-align:center;'>" . bar($dex3, 16) . "</td>
</tr>
<tr height=16>
<td style='text-align:center;' class='bg1'><b>귀병</b></td>
<td> {$general['dex30_text']}</td>
<td align=right>{$general['dex30_short']}&nbsp;</td>
<td style='text-align:center;'>".bar($dex30, 16)."</td>
<td> {$general['dex4_text']}</td>
<td align=right>{$general['dex4_short']}&nbsp;</td>
<td style='text-align:center;'>" . bar($dex4, 16) . "</td>
</tr>
<tr height=16>
<td style='text-align:center;' class='bg1'><b>차병</b></td>
<td> {$general['dex40_text']}</td>
<td align=right>{$general['dex40_short']}&nbsp;</td>
<td style='text-align:center;'>".bar($dex40, 16)."</td>
<td> {$general['dex5_text']}</td>
<td align=right>{$general['dex5_short']}&nbsp;</td>
<td style='text-align:center;'>" . bar($dex5, 16) . "</td>
</tr>
</table>";
}
function getOnlineNum() {
function getOnlineNum()
{
return KVStorage::getStorage(DB::db(), 'game_env')->online;
}
function onlinegen() {
function onlinegen(General $general)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$onlinegen = "";
$generalID = Session::getInstance()->generalID;
$nationID = DB::db()->queryFirstField('select `nation` from `general` where `no` = %i', $generalID);
if($nationID === null || Util::toInt($nationID) === 0) {
$onlinegen = $gameStor->onlinegen;
} else {
$onlinegen = DB::db()->queryFirstField('select onlinegen from nation where nation=%i',$nationID);
}
$nationID = $general->getNationID();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$onlinegen = $nationStor->online_genenerals;
return $onlinegen;
}
function nationMsg(General $general) {
function nationMsg(General $general)
{
$db = DB::db();
$msg = $db->queryFirstField(
'SELECT msg FROM nation WHERE nation = %i',
$general->getNationID()
);
return $msg?:'';
$nationID = $general->getNationID();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
return $nationStor->notice??'';
}
function banner() {
function banner()
{
return sprintf(
'<font size=2>%s %s / %s</font>',
GameConst::$title,
VersionGit::$version,
GameConst::$banner);
GameConst::$banner
);
}
function addTurn($date, int $turnterm, int $turn=1, bool $withFraction=true) {
function addTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
{
$date = new \DateTime($date);
$target = $turnterm*$turn;
$target = $turnterm * $turn;
$date->add(new \DateInterval("PT{$target}M"));
if($withFraction){
if ($withFraction) {
return $date->format('Y-m-d H:i:s.u');
}
return $date->format('Y-m-d H:i:s');
}
function subTurn($date, int $turnterm, int $turn=1, bool $withFraction=true) {
function subTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
{
$date = new \DateTime($date);
$target = $turnterm*$turn;
$target = $turnterm * $turn;
$date->sub(new \DateInterval("PT{$target}M"));
if($withFraction){
if ($withFraction) {
return $date->format('Y-m-d H:i:s.u');
}
return $date->format('Y-m-d H:i:s');
}
function cutTurn($date, int $turnterm, bool $withFraction=true) {
function cutTurn($date, int $turnterm, bool $withFraction = true)
{
$date = new \DateTime($date);
$baseDate = new \DateTime($date->format('Y-m-d'));
$baseDate->sub(new \DateInterval("P1D"));
$baseDate->add(new \DateInterval("PT1H"));
@@ -980,16 +927,16 @@ function cutTurn($date, int $turnterm, bool $withFraction=true) {
$diffMin -= $diffMin % $turnterm;
$baseDate->add(new \DateInterval("PT{$diffMin}M"));
if($withFraction){
if ($withFraction) {
return $baseDate->format('Y-m-d H:i:s.u');
}
return $baseDate->format('Y-m-d H:i:s');
}
function cutDay($date, int $turnterm, bool $withFraction=true) {
function cutDay($date, int $turnterm, bool $withFraction = true)
{
$date = new \DateTime($date);
$baseDate = new \DateTime($date->format('Y-m-d'));
$baseDate->sub(new \DateInterval("P1D"));
$baseDate->add(new \DateInterval("PT1H"));
@@ -1002,24 +949,24 @@ function cutDay($date, int $turnterm, bool $withFraction=true) {
$newMonth = intdiv($timeAdjust, $turnterm) + 1;
$yearPulled = false;
if($newMonth > 3){//3월 이후일때는
if ($newMonth > 3) { //3월 이후일때는
$yearPulled = true;
$diffMin += $baseGap;
}
$diffMin -= $timeAdjust;
$baseDate->add(new \DateInterval("PT{$diffMin}M"));
if($withFraction){
if ($withFraction) {
$dateTimeString = $baseDate->format('Y-m-d H:i:s.u');
}
else{
} else {
$dateTimeString = $baseDate->format('Y-m-d H:i:s');
}
return [$dateTimeString, $yearPulled, $newMonth];
}
function increaseRefresh($type="", $cnt=1) {
function increaseRefresh($type = "", $cnt = 1)
{
//FIXME: 로그인, 비로그인 시 처리가 명확하지 않음
$session = Session::getInstance();
$userID = $session->userID;
@@ -1030,16 +977,17 @@ function increaseRefresh($type="", $cnt=1) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->refresh = $gameStor->refresh+$cnt; //TODO: +로 증가하는 값은 별도로 분리
$gameStor->refresh = $gameStor->refresh + $cnt; //TODO: +로 증가하는 값은 별도로 분리
$isunited = $gameStor->isunited;
$opentime = $gameStor->opentime;
if($isunited != 2 && $generalID && $userGrade < 6) {
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::DatetimeNow()) {
$db->update('general', [
'lastrefresh'=>$date,
'con'=>$db->sqleval('con + %i', $cnt),
'connect'=>$db->sqleval('connect + %i', $cnt),
'refcnt'=>$db->sqleval('refcnt + %i', $cnt),
'refresh'=>$db->sqleval('refresh + %i', $cnt)
'lastrefresh' => $date,
'con' => $db->sqleval('con + %i', $cnt),
'connect' => $db->sqleval('connect + %i', $cnt),
'refcnt' => $db->sqleval('refcnt + %i', $cnt),
'refresh' => $db->sqleval('refresh + %i', $cnt)
], 'owner=%i', $userID);
}
@@ -1047,7 +995,7 @@ function increaseRefresh($type="", $cnt=1) {
$date2 = substr($date, 0, 10);
$online = getOnlineNum();
file_put_contents(
__DIR__."/logs/".UniqueConst::$serverID."/_{$date2}_refresh.txt",
__DIR__ . "/logs/" . UniqueConst::$serverID . "/_{$date2}_refresh.txt",
sprintf(
"%s, %s, %s, %s, %s, %d\n",
$date,
@@ -1079,12 +1027,12 @@ function increaseRefresh($type="", $cnt=1) {
);
$str = "";
foreach($proxy_headers as $x) {
if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}";
foreach ($proxy_headers as $x) {
if (isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}";
}
if($str != "") {
if ($str != "") {
file_put_contents(
__DIR__."/logs/".UniqueConst::$serverID."/_{$date2}_ipcheck.txt",
__DIR__ . "/logs/" . UniqueConst::$serverID . "/_{$date2}_ipcheck.txt",
sprintf(
"%s, %s, %s%s\n",
$session->userName,
@@ -1092,46 +1040,51 @@ function increaseRefresh($type="", $cnt=1) {
$_SERVER['REMOTE_ADDR'],
$str
),
FILE_APPEND);
FILE_APPEND
);
}
}
function updateTraffic() {
function updateTraffic()
{
$online = getOnlineNum();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['year','month','refresh','maxonline','maxrefresh']);
$admin = $gameStor->getValues(['year', 'month', 'refresh', 'maxonline', 'maxrefresh']);
//최다갱신자
$user = $db->queryFirstRow('select name,refresh from general order by refresh desc limit 1');
if($admin['maxrefresh'] < $admin['refresh']) {
if ($admin['maxrefresh'] < $admin['refresh']) {
$admin['maxrefresh'] = $admin['refresh'];
}
if($admin['maxonline'] < $online) {
if ($admin['maxonline'] < $online) {
$admin['maxonline'] = $online;
}
$gameStor->refresh = 0;
$gameStor->maxrefresh = $admin['maxrefresh'];
$gameStor->maxonline = $admin['maxonline'];
$db->update('general', ['refresh'=>0], true);
$db->update('general', ['refresh' => 0], true);
$date = TimeUtil::now();
//일시|년|월|총갱신|접속자|최다갱신자
file_put_contents(__DIR__."/logs/".UniqueConst::$serverID."/_traffic.txt",
file_put_contents(
__DIR__ . "/logs/" . UniqueConst::$serverID . "/_traffic.txt",
Json::encode([
$date,
$admin['year'],
$admin['month'],
$admin['refresh'],
$online,
$user['name']."(".$user['refresh'].")"
])."\n"
, FILE_APPEND);
$user['name'] . "(" . $user['refresh'] . ")"
]) . "\n",
FILE_APPEND
);
}
function CheckOverhead() {
function CheckOverhead()
{
//서버정보
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -1140,39 +1093,43 @@ function CheckOverhead() {
$con = Util::round(pow($turnterm, 0.6) * 3) * 10;
if($con != $conlimit){
if ($con != $conlimit) {
$gameStor->conlimit = $con;
}
}
function isLock() {
function isLock()
{
return DB::db()->queryFirstField("SELECT plock from plock limit 1") != 0;
}
function tryLock():bool{
function tryLock(): bool
{
//NOTE: 게임 로직과 관련한 모든 insert, update 함수들은 lock을 거칠것을 권장함.
$db = DB::db();
// 잠금
$db->update('plock', [
'plock'=>1,
'locktime'=>TimeUtil::now(true)
'plock' => 1,
'locktime' => TimeUtil::now(true)
], 'plock=0');
return $db->affectedRows() > 0;
}
function unlock():bool{
function unlock(): bool
{
// 풀림
$db = DB::db();
$db->update('plock', [
'plock'=>0
'plock' => 0
], true);
return $db->affectedRows() > 0;
}
function timeover():bool {
function timeover(): bool
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -1182,11 +1139,15 @@ function timeover():bool {
$t = min($turnterm, 5);
$term = $diff;
if($term >= $t || $term < 0) { return true; }
else { return false; }
if ($term >= $t || $term < 0) {
return true;
} else {
return false;
}
}
function checkDelay() {
function checkDelay()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -1194,21 +1155,19 @@ function checkDelay() {
$now = new \DateTimeImmutable();
$turntime = new \DateTimeImmutable($gameStor->turntime);
$timeMinDiff = intdiv($now->getTimestamp() - $turntime->getTimestamp(), 60);
// 1턴이상 갱신 없었으면 서버 지연
$term = $gameStor->turnterm;
if($term >= 20){
if ($term >= 20) {
$threshold = 1;
}
else if($term >= 10){
} else if ($term >= 10) {
$threshold = 3;
}
else{
} else {
$threshold = 6;
}
//지연 해야할 밀린 턴 횟수
$iter = intdiv($timeMinDiff, $term);
if($iter > $threshold) {
if ($iter > $threshold) {
$minute = $iter * $term;
$newTurntime = $turntime->add(new \DateInterval("PT{$minute}M"));
$newNextTurntime = $turntime->add(new \DateInterval("PT{$term}M"));
@@ -1218,105 +1177,109 @@ function checkDelay() {
->format('Y-m-d H:i:s');
$db->update('general', [
'turntime'=> $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
'turntime' => $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
], 'turntime<=DATE_ADD(turntime, INTERVAL %i MINUTE)', $term);
$db->update('auction', [
'expire'=> $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
'expire' => $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
], true);
}
}
function updateOnline() {
function updateOnline()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$nationname = ["재야"];
//국가별 이름 매핑
foreach(getAllNationStaticInfo() as $nation) {
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
}
//동접수
$query = "select no,name,nation from general where lastrefresh > DATE_SUB(NOW(), INTERVAL 5 MINUTE)";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$onlinenum = MYDB_num_rows($result);
$before5Min = TimeUtil::nowAddMinutes(-5);
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s', $before5Min);
$onlineNum = count($onlineUser);
$onlineNationUsers = Util::arrayGroupBy($onlineUser, 'nation');
uasort($onlineNationUsers, function(array $lhs, array $rhs){
return -(count($lhs)<=>count($rhs));
});
$onnation = array();
$onnationstr = "";
//국가별 접속중인 장수
for($i=0; $i < $onlinenum; $i++) {
$general = MYDB_fetch_array($result);
if(isset($onnation[$general['nation']])){
$onnation[$general['nation']] .= $general['name'].', ';
}else {
$onnation[$general['nation']] = $general['name'].', ';
}
$onlineNation = [];
foreach($onlineNationUsers as $nationID=>$rawOnlineUser){
$nationName = getNationStaticInfo($nationID)['name'];
$onlineNation[] = "{$nationName}";
$userList = join(', ', Util::squeezeFromArray($rawOnlineUser, 'name'));
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->online_genenerals = $userList;
}
//$onnation이 empty라면 굳이 foreach를 수행 할 이유가 없음.
if(!empty($onnation)){
foreach($onnation as $key => $val) {
$onnationstr .= "{$nationname[$key]}】, ";
if($key == 0) {
$gameStor->onlinegen = $onnation[0];
} else {
$query = "update nation set onlinegen='$onnation[$key]' where nation='$key'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
}
}
//접속중인 국가
$gameStor->online = $onlinenum;
$gameStor->onlinenation = $onnationstr;
$gameStor->online_user_cnt = $onlineNum;
$gameStor->online_nation = join(', ', $onlineNation);
}
function addAge() {
function addAge()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
//나이와 호봉 증가
$query = "update general set age=age+1,belong=belong+1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('general', [
'age' => $db->sqleval('age+1'),
'belong' => $db->sqleval('belong+1')
], true);
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
[$startYear, $year, $month] = $gameStor->getValuesAsArray(['startyear', 'year', 'month']);
if($admin['year'] >= $admin['startyear']+3) {
foreach($db->query('SELECT no,name,nation,leadership,strength,intel from general where specage<=age and special=%s', GameConst::$defaultSpecialDomestic) as $general){
$special = SpecialityConst::pickSpecialDomestic($general);
if ($year >= $startYear + 3) {
foreach ($db->query('SELECT no,name,nation,leadership,strength,intel,aux from general where specage<=age and special=%s', GameConst::$defaultSpecialDomestic) as $general) {
$generalID = $general['no'];
$special = SpecialityHelper::pickSpecialDomestic(
$general,
(Json::decode($general['aux'])['prev_types_special2'])??[]
);
$specialClass = buildGeneralSpecialDomesticClass($special);
$specialText = $specialClass->getName();
$db->update('general', [
'special'=>$special
], 'no=%i',$general['no']);
'special' => $special
], 'no=%i', $generalID);
$logger = new ActionLogger($generalID, $general['nation'], $year, $month);
$josaUl = JosaUtil::pick($specialText, '을');
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
$logger->pushGeneralActionLog("특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!", ActionLogger::PLAIN);
$logger->pushGeneralHistoryLog("특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
}
foreach($db->query('SELECT no,name,nation,leadership,strength,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2=%s', GameConst::$defaultSpecialWar) as $general){
$special2 = SpecialityConst::pickSpecialWar($general);
foreach ($db->query('SELECT no,name,nation,leadership,strength,intel,npc,dex1,dex2,dex3,dex4,dex5,aux from general where specage2<=age and special2=%s', GameConst::$defaultSpecialWar) as $general) {
$generalID = $general['no'];
$special2 = SpecialityHelper::pickSpecialWar(
$general,
(Json::decode($general['aux'])['prev_types_special2'])??[]
);
$specialClass = buildGeneralSpecialWarClass($special2);
$specialText = $specialClass->getName();
$db->update('general', [
'special2'=>$special2
], 'no=%i',$general['no']);
'special2' => $special2
], 'no=%i', $general['no']);
$logger = new ActionLogger($generalID, $general['nation'], $year, $month);
$josaUl = JosaUtil::pick($specialText, '을');
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
$logger->pushGeneralActionLog("특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!", ActionLogger::PLAIN);
$logger->pushGeneralHistoryLog("특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
}
}
}
function turnDate($curtime) {
function turnDate($curtime)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['startyear', 'starttime', 'turnterm', 'year', 'month']);
@@ -1324,17 +1287,17 @@ function turnDate($curtime) {
$turn = $admin['starttime'];
$curturn = cutTurn($curtime, $admin['turnterm']);
$term = $admin['turnterm'];
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term*60);
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term * 60);
$date = $admin['startyear'] * 12;
$date += $num;
$year = intdiv($date, 12);
$month = 1 + $date % 12;
$month = 1 + $date % 12;
// 바뀐 경우만 업데이트
if($admin['month'] != $month || $admin['year'] != $year) {
if ($admin['month'] != $month || $admin['year'] != $year) {
$gameStor->year = $year;
$gameStor->month = $month;
}
@@ -1343,22 +1306,26 @@ function turnDate($curtime) {
}
function triggerTournament() {
function triggerTournament()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['tournament', 'tnmt_trig']);
//현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
if($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
if ($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
$type = rand() % 5; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
//전력전 40%, 통, 일, 설 각 20%
if($type > 3) { $type = 0; }
if ($type > 3) {
$type = 0;
}
startTournament($admin['tnmt_trig'], $type);
}
}
function CheckHall($no) {
function CheckHall($no)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -1368,23 +1335,23 @@ function CheckHall($no) {
["firenum", 'rank'],
["warnum", 'rank'],
["killnum", 'rank'],
["winrate", 'rank'],
["winrate", 'calc'],
["killcrew", 'rank'],
["killrate", 'calc'],
["dex0", 'natural'],
["dex10", 'natural'],
["dex20", 'natural'],
["dex30", 'natural'],
["dex40", 'natural'],
["dex1", 'natural'],
["dex2", 'natural'],
["dex3", 'natural'],
["dex4", 'natural'],
["dex5", 'natural'],
["ttrate", 'calc'],
["tlrate", 'calc'],
["tprate", 'calc'],
["tsrate", 'calc'],
["tirate", 'calc'],
["betgold", 'rank'],
["betwin", 'rank'],
["betwingold", 'rank'],
["betrate", 'calc'],
];//XXX: 순서가 DB에 박혀있다 ㅜㅜ
];
$generalObj = General::createGeneralObjFromDB($no, null, 2);
@@ -1395,27 +1362,39 @@ function CheckHall($no) {
$tlw = $generalObj->getRankVar('tlw');
$tld = $generalObj->getRankVar('tld');
$tll = $generalObj->getRankVar('tll');
$tsw = $generalObj->getRankVar('tsw');
$tsd = $generalObj->getRankVar('tsd');
$tsl = $generalObj->getRankVar('tsl');
$tiw = $generalObj->getRankVar('tiw');
$tid = $generalObj->getRankVar('tid');
$til = $generalObj->getRankVar('til');
$tt = max($ttw+$ttd+$ttl, 1);
$tl = max($tlw+$tld+$tll, 1);
$ts = max($tsw+$tsd+$tsl, 1);
$ti = max($tiw+$tid+$til, 1);
$betWinGold = $generalObj->getRankVar('betwingold');
$betGold = Util::valueFit($generalObj->getRankVar('betgold'), 1);
$win = $generalObj->getRankVar('killnum');
$war = Util::valueFit($generalObj->getRankVar('warnum'), 1);
$kill = $generalObj->getRankVar('killcrew');
$death = Util::valueFit($generalObj->getRankVar('deathcrew'), 1);
$tt = Util::valueFit($ttw + $ttd + $ttl, 1);
$tl = Util::valueFit($tlw + $tld + $tll, 1);
$ts = Util::valueFit($tsw + $tsd + $tsl, 1);
$ti = Util::valueFit($tiw + $tid + $til, 1);
$calcVar = [];
$calcVar['ttrate'] = $ttw/$tt;
$calcVar['tlrate'] = $tlw/$tl;
$calcVar['tsrate'] = $tsw/$ts;
$calcVar['tirate'] = $tiw/$ti;
if($generalObj instanceof DummyGeneral){
$calcVar['ttrate'] = $ttw / $tt;
$calcVar['tlrate'] = $tlw / $tl;
$calcVar['tsrate'] = $tsw / $ts;
$calcVar['tirate'] = $tiw / $ti;
$calcVar['betrate'] = $betWinGold / $betGold;
$calcVar['winrate'] = $win / $war;
$calcVar['killrate'] = $kill / $death;
if ($generalObj instanceof DummyGeneral) {
return;
}
@@ -1426,171 +1405,139 @@ function CheckHall($no) {
[$scenarioIdx, $scenarioName, $startTime] = $gameStor->getValuesAsArray(['scenario', 'scenario_text', 'starttime']);
$ownerName = $generalObj->getVar('name2');
if($generalObj->getVar('owner')){
$ownerName = $generalObj->getVar('owner_name');
if ($generalObj->getVar('owner')) {
$ownerName = RootDB::db()->queryFirstField('SELECT name FROM member WHERE no = %i', $generalObj->getVar('owner'));
}
foreach($types as $idx=>[$typeName, $valueType]) {
if($valueType === 'natural'){
foreach ($types as [$typeName, $valueType]) {
if ($valueType === 'natural') {
$value = $generalObj->getVar($typeName);
}
else if($valueType === 'rank'){
} else if ($valueType === 'rank') {
$value = $generalObj->getRankVar($typeName);
}
else if($valueType === 'calc'){
} else if ($valueType === 'calc') {
$value = $calcVar[$typeName];
}
//승률,살상률인데 10회 미만 전투시 스킵
if(($typeName === 'winrate' || $typeName === 'killrate') && $generalObj->getRankVar('warnum')<10) { continue; }
if (($typeName === 'winrate' || $typeName === 'killrate') && $generalObj->getRankVar('warnum') < 10) {
continue;
}
//토너승률인데 50회 미만시 스킵
if($typeName === 'ttrate' && $tt < 50) { continue; }
if ($typeName === 'ttrate' && $tt < 50) {
continue;
}
//토너승률인데 50회 미만시 스킵
if($typeName === 'tlrate' && $tl < 50) { continue; }
if ($typeName === 'tlrate' && $tl < 50) {
continue;
}
//토너승률인데 50회 미만시 스킵
if($typeName === 'tsrate' && $ts < 50) { continue; }
if ($typeName === 'tsrate' && $ts < 50) {
continue;
}
//토너승률인데 50회 미만시 스킵
if($typeName === 'tirate' && $ti < 50) { continue; }
if ($typeName === 'tirate' && $ti < 50) {
continue;
}
//수익률인데 1000미만시 스킵
if($typeName === 'betrate' && $generalObj->getRankVar('betgold') < 1000) { continue; }
if ($typeName === 'betrate' && $generalObj->getRankVar('betgold') < 1000) {
continue;
}
if($value<=0){
if ($value <= 0) {
continue;
}
$aux = [
'name'=>$generalObj->getName(),
'nationName'=>$nation['name'],
'bgColor'=>$nation['color'],
'fgColor'=>newColor($nation['color']),
'picture'=>$generalObj->getVar('picture'),
'imgsvr'=>$generalObj->getVar('imgsvr'),
'startTime'=>$startTime,
'unitedTime'=>$unitedDate,
'owner_name'=>$ownerName,
'serverID'=>UniqueConst::$serverID,
'serverIdx'=>$serverCnt,
'serverName'=>UniqueConst::$serverName,
'scenarioName'=>$scenarioName,
'name' => $generalObj->getName(),
'nationName' => $nation['name'],
'bgColor' => $nation['color'],
'fgColor' => newColor($nation['color']),
'picture' => $generalObj->getVar('picture'),
'imgsvr' => $generalObj->getVar('imgsvr'),
'startTime' => $startTime,
'unitedTime' => $unitedDate,
'ownerName' => $ownerName,
'serverID' => UniqueConst::$serverID,
'serverIdx' => $serverCnt,
'serverName' => UniqueConst::$serverName,
'scenarioName' => $scenarioName,
];
$jsonAux = Json::encode($aux);
$db->insertIgnore('ng_hall', [
'server_id'=>UniqueConst::$serverID,
'season'=>UniqueConst::$seasonIdx,
'scenario'=>$scenarioIdx,
'general_no'=>$no,
'type'=>$idx,
'value'=>$value,
'owner'=>$generalObj->getVar('owner'),
'aux'=>$jsonAux
$db->insertIgnore('hall', [
'server_id' => UniqueConst::$serverID,
'season' => UniqueConst::$seasonIdx,
'scenario' => $scenarioIdx,
'general_no' => $no,
'type' => $typeName,
'value' => $value,
'owner' => $generalObj->getVar('owner'),
'aux' => $jsonAux
]);
if($db->affectedRows() == 0){
$db->update('ng_hall', [
'value'=>$value,
'aux'=>$jsonAux
],
'server_id = %s AND scenario = %i AND general_no = %i AND type = %i AND value < %d',
UniqueConst::$serverID,
$scenarioIdx,
$no,
$idx,
$value);
if ($db->affectedRows() == 0) {
$db->update(
'hall',
[
'value' => $value,
'aux' => $jsonAux
],
'server_id = %s AND scenario = %i AND general_no = %i AND type = %s AND value < %d',
UniqueConst::$serverID,
$scenarioIdx,
$no,
$typeName,
$value
);
}
}
}
function tryUniqueItemLottery(General $general, string $acquireType='아이템'):bool{
function giveRandomUniqueItem(General $general, string $acquireType): bool
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($general->getVar('npc') >= 2){
return false;
}
if($general->getVar('npc') > 6){
return false;
}
foreach($general->getItems() as $item){
if(!$item){
continue;
}
if(!$item->isBuyable()){
return false;
}
}
$scenario = $gameStor->scenario;
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
if ($scenario < 100) {
$prob = 1 / ($genCount * 5); // 5~6개월에 하나씩 등장
}
else {
$prob = 1 / $genCount; // 1~2개월에 하나씩 등장
}
if($acquireType == '투표'){
$prob = 1 / ($genCount * 0.7 / 3); // 투표율 70%, 투표 한번에 2~3개 등장
}
else if($acquireType == '랜덤 임관'){
$prob = 1 / ($genCount / 10/ 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
}
else if($acquireType == '건국'){
$prob = 1 / ($genCount / 10/ 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
}
$prob = Util::valueFit($prob, 1/3, 1);
if(!Util::randBool($prob)){
return false;
}
//아이템 습득 상황
$availableUnique = [];
//TODO: 너무 바보 같다. 장기적으로는 유니크 아이템 테이블 같은게 필요하지 않을까?
//일단은 '획득' 시에만 동작하므로 이대로 사용하기로...
$occupiedUnique = [];
foreach (array_keys(GameConst::$allItems) as $itemType) {
foreach($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]){
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
$itemClass = buildItemClass($itemCode);
if(!$itemClass){
if (!$itemClass) {
continue;
}
if($itemClass->isBuyable()){
if ($itemClass->isBuyable()) {
continue;
}
$occupiedUnique[$itemCode] = $cnt;
}
}
foreach(GameConst::$allItems as $itemType=>$itemCategories){
foreach($itemCategories as $itemCode => $cnt){
if(!key_exists($itemCode, $occupiedUnique)){
foreach (GameConst::$allItems as $itemType => $itemCategories) {
foreach ($itemCategories as $itemCode => $cnt) {
if (!key_exists($itemCode, $occupiedUnique)) {
$availableUnique[] = [[$itemType, $itemCode], $cnt];
continue;
}
$remain = $cnt - $occupiedUnique[$itemCode];
if($remain > 0){
$availableUnique[] = [[$itemType, $itemCode], $cnt];
if ($remain > 0) {
$availableUnique[] = [[$itemType, $itemCode], $remain];
}
}
}
if(!$availableUnique){
if (!$availableUnique) {
return false;
}
[$itemType, $itemCode] = Util::choiceRandomUsingWeightPair($availableUnique);
$nationName = $general->getStaticNation()['name'];
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
@@ -1605,121 +1552,139 @@ function tryUniqueItemLottery(General $general, string $acquireType='아이템')
$logger = $general->getLogger();
$logger->pushGeneralActionLog("<C>{$itemName}</>{$josaUl} 습득했습니다!");
$logger->pushGeneralHistoryLog("<C>{$itemName}</>{$josaUl} 습득");
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <C>{$itemName}</>{$josaUl} 습득했습니다!");
$logger->pushGlobalHistoryLog("<C><b>【{$acquireType}】</b></><D><b>{$nationName}</b></>의 <Y>{$generalName}</>{$josaYi} <C>{$itemName}</>{$josaUl} 습득했습니다!");
return true;
}
function checkDedication($general, $log) {
function tryUniqueItemLottery(General $general, string $acquireType = '아이템'): bool
{
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
$dedlevel = getDedLevel($general['dedication']);
$query = "update general set dedlevel='$dedlevel' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 승급했다면
$josaRoDed = JosaUtil::pick(getDed($general['dedication']), '로');
$josaRoBill = JosaUtil::pick(getBill($general['dedication']), '로');
if($general['dedlevel'] < $dedlevel) {
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>{$josaRoDed} <C>승급</>하여 봉록이 <C>".getBill($general['dedication'])."</>{$josaRoBill} <C>상승</>했습니다!";
// 강등했다면
} elseif($general['dedlevel'] > $dedlevel) {
$log[] = "<C>●</><Y>".getDed($general['dedication'])."</>{$josaRoDed} <R>강등</>되어 봉록이 <C>".getBill($general['dedication'])."</>{$josaRoBill} <R>하락</>했습니다!";
if ($general->getNPCType() >= 2) {
return false;
}
return $log;
}
function checkExperience($general, $log) {
$db = DB::db();
$connect=$db->get();
$explevel = getExpLevel($general['experience']);
$query = "update general set explevel='$explevel' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 승급했다면
if($general['explevel'] < $explevel) {
$log[] = "<C>●</><C>Lv $explevel</>로 <C>레벨업</>!";
// 강등했다면
} elseif($general['explevel'] > $explevel) {
$log[] = "<C>●</><C>Lv $explevel</>로 <R>레벨다운</>!";
if ($general->getNPCType() > 6) {
return false;
}
return $log;
foreach ($general->getItems() as $item) {
if (!$item) {
continue;
}
if (!$item->isBuyable()) {
return false;
}
}
$scenario = $gameStor->scenario;
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
if ($scenario < 100) {
$prob = 1 / ($genCount * 5); // 5~6개월에 하나씩 등장
} else {
$prob = 1 / $genCount; // 1~2개월에 하나씩 등장
}
if ($acquireType == '설문조사') {
$prob = 1 / ($genCount * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
} else if ($acquireType == '랜덤 임관') {
$prob = 1 / ($genCount / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
} else if ($acquireType == '건국') {
$prob = 1 / ($genCount / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
}
$prob = Util::valueFit($prob, null, 1 / 3);
if (!Util::randBool($prob)) {
return false;
}
return giveRandomUniqueItem($general, $acquireType);
}
function getAdmin() {
function getAdmin()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
return $gameStor->getAll();
}
function getCity($city, $sel="*") {
/** @return General[] */
function deleteNation(General $lord, bool $applyDB):array
{
$lordID = $lord->getID();
$nationID = $lord->getNationID();
DeleteConflict($nationID);
$db = DB::db();
$connect=$db->get();
$query = "select {$sel} from city where city='$city'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($result);
return $city;
}
function deleteNation(General $general) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$nation = $general->getStaticNation();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nationID);
$nationName = $nation['name'];
$nationID = $nation['nation'];
$logger = $general->getLogger();
$logger = $lord->getLogger();
$josaUn = JosaUtil::pick($nationName, '은');
$logger->pushGlobalHistoryLog("<R><b>【멸망】</b></><D><b>{$nationName}</b></>{$josaUn} <R>멸망</>했습니다.");
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nationID);
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nationID);
$oldNation['generals'] = $oldNationGenerals;
$oldNation['aux'] = Json::decode($oldNation['aux']);
$nationGeneralList = General::createGeneralObjListFromDB(
$db->queryFirstColumn(
'SELECT `no` FROM general WHERE nation=%i AND no != %i',
$nationID,
$lordID
),
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1
);
$nationGeneralList[$lordID] = $lord;
$nation['generals'] = array_keys($nationGeneralList);
$nation['aux'] = Json::decode($nation['aux']);
$nation['msg'] = $nationStor->notice;
$nation['scout_msg'] = $nationStor->scout_msg;
$nation['aux'] += $nationStor->max_power;
$nation['history'] = getNationHistoryLogAll($nationID);
$general->setVar('belong', 0);
$general->setVar('troop', 0);
$general->setVar('level', 0);
$general->setVar('nation', 0);
$general->setVar('makelimit', 12);
$josaYi = JosaUtil::pick($nationName, '이');
$destroyLog = "<D><b>{$nationName}</b></>{$josaYi} <R>멸망</>했습니다.";
$destroyHistoryLog = "<D><b>{$nationName}</b></>{$josaYi} <R>멸망</>";
// 전 장수 재야로
foreach($nationGeneralList as $general){
$general->setVar('belong', 0);
$general->setVar('troop', 0);
$general->setVar('officer_level', 0);
$general->setVar('officer_city', 0);
$general->setVar('nation', 0);
$general->setVar('permission', 'normal');
$logger = $general->getLogger();
$logger->pushGeneralActionLog($destroyLog, ActionLogger::PLAIN);
$logger->pushGeneralHistoryLog($destroyHistoryLog);
if($applyDB){
$general->applyDB($db);
}
}
// 전 장수 재야로 // 전 장수 소속 무소속으로
$db->update('general', [
'belong'=>0,
'troop'=>0,
'level'=>0,
'nation'=>0,
'makelimit'=>12,
'permission'=>'normal',
], 'nation=%i', $nationID);
// 도시 공백지로
$db->update('city', [
'nation'=>0,
'front'=>0,
'officer4'=>0,
'officer3'=>0,
'officer2'=>0,
'nation' => 0,
'front' => 0,
], 'nation=%i', $nationID);
// 부대 삭제
$db->delete('troop', 'nation=%i', $nationID);
// 국가 삭제
// 국가 삭제
$db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID,
'nation'=>$nationID,
'data'=>Json::encode($oldNation)
'server_id' => UniqueConst::$serverID,
'nation' => $nationID,
'data' => Json::encode($nation)
]);
$db->delete('nation', 'nation=%i', $nationID);
$db->delete('nation_turn', 'nation_id=%i', $nationID);
@@ -1727,12 +1692,18 @@ function deleteNation(General $general) {
$db->delete('diplomacy', 'me = %i OR you = %i', $nationID, $nationID);
refreshNationStaticInfo();
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->resetValues();
return $nationGeneralList;
}
function nextRuler(General $general) {
function nextRuler(General $general)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$nation = $general->getStaticNation();
$nationName = $nation['name'];
@@ -1741,53 +1712,54 @@ function nextRuler(General $general) {
$candidate = null;
//npc or npc유저인 경우 후계 찾기
if($general->getVar('npc') > 0) {
if ($general->getNPCType() > 0) {
$candidate = $db->queryFirstRow(
'SELECT no,name,nation,level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and level!=12 and npc>0 order by npcmatch2,rand() LIMIT 1',
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
$general->getVar('affinity'),
$general->getVar('affinity'),
$general->getVar('affinity'),
$nationID
);
}
if(!$candidate){
if (!$candidate) {
$candidate = $db->queryFirstRow(
'SELECT no,name,npc,level FROM general WHERE nation=%i and level!= 12 AND level >= 9 ORDER BY level DESC LIMIT 1',
'SELECT no,name,npc,officer_level FROM general WHERE nation=%i and officer_level!= 12 AND officer_level >= 9 and npc != 5 ORDER BY officer_level DESC LIMIT 1',
$nationID
);
}
if(!$candidate){
if (!$candidate) {
$candidate = $db->queryFirstRow(
'SELECT no,name,npc,level FROM general WHERE nation=%i and level!= 12 ORDER BY dedication DESC LIMIT 1',
'SELECT no,name,npc,officer_level FROM general WHERE nation=%i and officer_level!= 12 and npc != 5 ORDER BY dedication DESC LIMIT 1',
$nationID
);
}
if(!$candidate){
DeleteConflict($general['nation']);
deleteNation($general);
if (!$candidate) {
deleteNation($general, true);
return;
}
$nextRulerID = $candidate['no'];
$nextRulerName = $candidate['name'];
$general->setVar('level', 1);
$general->setVar('officer_level', 1);
$general->setVar('officer_city', 0);
$db->update('general', [
'level'=>12
], 'no=%i', $nextRulerID);
if(2 <= $candidate['level'] && $candidate['level'] <= 4){
$db->update('city', [
'officer'.$candidate['level']=>0
], "officer{$candidate['level']}=%i", $nextRulerID);
'officer_level' => 12,
'officer_city' => 0,
], 'no=%i AND nation=%i', $nextRulerID, $nationID);
if ($db->affectedRows() == 0) {
throw new \RuntimeException('선양되지 않음');
}
$josaYi = JosaUtil::pick($nextRulerName, '이');
$logger = $general->getLogger();
$logger->pushGlobalHistoryLog("<C><b>【유지】</b></><Y>{$nextRulerName}</>{$josaYi} <D><b>{$nationName}</b></>의 유지를 이어 받았습니다");
$logger->pushGlobalHistoryLog("<C><b>【유지】</b></><Y>{$nextRulerName}</>{$josaYi} <D><b>{$nationName}</b></>의 유지를 이어 받음.");
$nextRulerLogger = new ActionLogger($nextRulerID, $nationID, $year, $month);
$nextRulerLogger->pushGlobalHistoryLog("<C><b>【유지】</b></><Y>{$nextRulerName}</>{$josaYi} <D><b>{$nationName}</b></>의 유지를 이어 받았습니다");
$nextRulerLogger->pushGeneralHistoryLog("<C><b>【유지】</b></><Y>{$nextRulerName}</>{$josaYi} <D><b>{$nationName}</b></>의 유지를 이어 받음.");
$nextRulerLogger->flush();
// 장수 삭제 및 부대처리는 checkTurn에서
}
@@ -1797,7 +1769,8 @@ function nextRuler(General $general) {
* @param $maxDist 검색하고자 하는 최대 거리
* @param $distForm 리턴 타입. true일 경우 $result[$dist] = [...$city] 이며, false일 경우 $result[$city] = $dist
*/
function searchDistance(int $from, int $maxDist=99, bool $distForm = false) {
function searchDistance(int $from, int $maxDist = 99, bool $distForm = false)
{
$queue = new \SplQueue();
$cities = [];
@@ -1805,39 +1778,105 @@ function searchDistance(int $from, int $maxDist=99, bool $distForm = false) {
$queue->enqueue([$from, 0]);
while(!$queue->isEmpty()){
while (!$queue->isEmpty()) {
list($cityID, $dist) = $queue->dequeue();
if(key_exists($cityID, $cities)){
if (key_exists($cityID, $cities)) {
continue;
}
if(!key_exists($dist, $distanceList)){
if (!key_exists($dist, $distanceList)) {
$distanceList[$dist] = [];
}
$distanceList[$dist][] = $cityID;
$cities[$cityID] = $dist;
if($dist >= $maxDist){
if ($dist >= $maxDist) {
continue;
}
foreach(array_keys(CityConst::byID($cityID)->path) as $connCityID){
if(key_exists($connCityID, $cities)){
foreach (array_keys(CityConst::byID($cityID)->path) as $connCityID) {
if (key_exists($connCityID, $cities)) {
continue;
}
$queue->enqueue([$connCityID, $dist+1]);
$queue->enqueue([$connCityID, $dist + 1]);
}
}
if($distForm){
if ($distForm) {
unset($distanceList[0]);
return $distanceList;
}
else{
} else {
return $cities;
}
}
/**
* $from 으로 지정한 도시부터 $to 도시까지의 최단 거리를 계산해
* @param $from 기준 도시 코드
* @param $to 대상 도시 코드
* @param array|null $linkNationList 경로에 해당하는 국가 리스트, null인 경우 제한 없음
* @return null|int 거리.
*/
function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
{
$queue = new \SplQueue();
$cities = [];
if ($linkNationList === []) {
return null;
}
if ($linkNationList !== null) {
$db = DB::db();
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
$allowedCityList = [];
foreach ($db->queryFirstColumn(
'SELECT city FROM city WHERE nation IN %li',
$linkNationList
) as $cityID) {
$allowedCityList[$cityID] = $cityID;
}
} else {
$allowedCityList = CityConst::all();
}
if (!key_exists($to, $allowedCityList)) {
return null;
}
if ($from === $to) {
return 0;
}
$queue->enqueue([$from, 0]);
while (!$queue->isEmpty()) {
list($cityID, $dist) = $queue->dequeue();
if (key_exists($cityID, $cities)) {
continue;
}
$cities[$cityID] = $dist;
if ($cityID === $to) {
return $dist;
}
foreach (array_keys(CityConst::byID($cityID)->path) as $connCityID) {
if (!key_exists($connCityID, $allowedCityList)) {
continue;
}
if (key_exists($connCityID, $cities)) {
continue;
}
$queue->enqueue([$connCityID, $dist + 1]);
}
}
//길이 없음
return null;
}
/**
* $from 으로 지정한 도시의 인접 도시와 $to 도시의 최단 거리를 계산해
* @param $from 기준 도시 코드
@@ -1845,7 +1884,8 @@ function searchDistance(int $from, int $maxDist=99, bool $distForm = false) {
* @param $linkNationList 경로에 해당하는 국가 리스트
* @return array $dist=>[cityID, $nation] 배열 가장 앞이 가장 가까움
*/
function searchDistanceListToDest(int $from, int $to, array $linkNationList) {
function searchDistanceListToDest(int $from, int $to, array $linkNationList)
{
$queue = new \SplQueue();
$cities = [];
@@ -1854,77 +1894,147 @@ function searchDistanceListToDest(int $from, int $to, array $linkNationList) {
//TODO: 도시-국가 캐싱이 있으면 쓸모 있지 않을까
$allowedCityList = [];
foreach($db->queryAllLists(
foreach ($db->queryAllLists(
'SELECT city, nation FROM city WHERE nation IN %li',
$linkNationList
) as [$cityID, $nationID]){
) as [$cityID, $nationID]) {
$allowedCityList[$cityID] = $nationID;
}
$remainFromCities = [];
foreach(array_keys(CityConst::byID($from)->path) as $fromCityID){
if(key_exists($fromCityID, $allowedCityList)){
foreach (array_keys(CityConst::byID($from)->path) as $fromCityID) {
if (key_exists($fromCityID, $allowedCityList)) {
$remainFromCities[$fromCityID] = true;
}
}
if(!key_exists($to, $allowedCityList)){
if (!key_exists($to, $allowedCityList)) {
return [];
}
$result = [];
$queue->enqueue([$to, 0]);
while(!empty($remainFromCities) && !$queue->isEmpty()){
while (!empty($remainFromCities) && !$queue->isEmpty()) {
list($cityID, $dist) = $queue->dequeue();
if(key_exists($cityID, $cities)){
if (key_exists($cityID, $cities)) {
continue;
}
$cities[$cityID] = $dist;
if(key_exists($cityID, $remainFromCities)){
if (key_exists($cityID, $remainFromCities)) {
unset($remainFromCities[$cityID]);
$result[$dist][] = [$cityID, $allowedCityList[$cityID]];
}
foreach(array_keys(CityConst::byID($cityID)->path) as $connCityID){
if($allowedCityList !== null && !key_exists($connCityID, $allowedCityList)){
foreach (array_keys(CityConst::byID($cityID)->path) as $connCityID) {
if ($allowedCityList !== null && !key_exists($connCityID, $allowedCityList)) {
continue;
}
if(key_exists($connCityID, $cities)){
if (key_exists($connCityID, $cities)) {
continue;
}
$queue->enqueue([$connCityID, $dist+1]);
$queue->enqueue([$connCityID, $dist + 1]);
}
}
return $result;
}
function isNeighbor(int $nation1, int $nation2, bool $includeNoSupply=true) {
if($nation1 === $nation2){
/**
* 지정된 도시 내의 최단 거리를 계산해 (Floyd-Warshall)
* @param $cityIDList 이동 가능한 도시 리스트.
* @return array [from][to] 표시되는 거리값
*/
function searchAllDistanceByCityList(array $cityIDList): array
{
if (!$cityIDList) {
return [];
}
$cityList = [];
foreach ($cityIDList as $cityID) {
$cityList[$cityID] = $cityID;
}
$distanceList = [];
foreach ($cityIDList as $cityID) {
$nearList = [$cityID => 0];
foreach (array_keys(CityConst::byID($cityID)->path) as $nextCityID) {
if (!key_exists($nextCityID, $cityList)) {
continue;
}
$nearList[$nextCityID] = 1;
}
$distanceList[$cityID] = $nearList;
}
//Floyd-Warshall
foreach ($cityList as $cityStop) {
foreach ($cityList as $cityFrom) {
foreach ($cityList as $cityTo) {
if (!key_exists($cityStop, $distanceList[$cityFrom])) {
continue;
}
if (!key_exists($cityTo, $distanceList[$cityStop])) {
continue;
}
if (!key_exists($cityTo, $distanceList[$cityFrom])) {
$distanceList[$cityFrom][$cityTo] = $distanceList[$cityFrom][$cityStop] + $distanceList[$cityStop][$cityTo];
continue;
}
$distanceList[$cityFrom][$cityTo] = min($distanceList[$cityFrom][$cityStop] + $distanceList[$cityStop][$cityTo], $distanceList[$cityFrom][$cityTo]);
}
}
}
return $distanceList;
}
/**
* 지정된 국가 내의 모든 도시들의 최단 거리를 계산해 (Floyd-Warshall)
* @param $linkNationList 경로에 해당하는 국가 리스트
* @param $suppliedCityOnly 보급된 도시만을 이용해 검색
* @return array [from][to] 표시되는 거리값
*/
function searchAllDistanceByNationList(array $linkNationList, bool $suppliedCityOnly = false): array
{
if (!$linkNationList) {
return [];
}
$db = DB::db();
if ($suppliedCityOnly) {
$cityIDList = $db->queryFirstColumn('SELECT city FROM city WHERE nation IN %li AND supply=1', $linkNationList);
} else {
$cityIDList = $db->queryFirstColumn('SELECT city FROM city WHERE nation IN %li', $linkNationList);
}
return searchAllDistanceByCityList($cityIDList);
}
function isNeighbor(int $nation1, int $nation2, bool $includeNoSupply = true)
{
if ($nation1 === $nation2) {
return false;
}
$db = DB::db();
$nation1Cities = [];
if($includeNoSupply){
if ($includeNoSupply) {
$supplySql = '';
}
else{
} else {
$supplySql = 'AND supply = 1';
}
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i %l', $nation1, $supplySql) as $city){
foreach ($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i %l', $nation1, $supplySql) as $city) {
$nation1Cities[$city] = $city;
}
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i %l', $nation2, $supplySql) as $city){
foreach(array_keys(CityConst::byID($city)->path) as $adjCity){
if(key_exists($adjCity, $nation1Cities)){
foreach ($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i %l', $nation2, $supplySql) as $city) {
foreach (array_keys(CityConst::byID($city)->path) as $adjCity) {
if (key_exists($adjCity, $nation1Cities)) {
return true;
}
}
@@ -1933,16 +2043,17 @@ function isNeighbor(int $nation1, int $nation2, bool $includeNoSupply=true) {
return false;
}
function SabotageInjury(array $cityGeneralList, string $reason):int{
function SabotageInjury(array $cityGeneralList, string $reason): int
{
$injuryCount = 0;
$josaRo = JosaUtil::pick($reason, '로');
$text = "<M>{$reason}</>{$josaRo} 인해 <R>부상</>을 당했습니다.";
$db = DB::db();
foreach($cityGeneralList as $general){
foreach ($cityGeneralList as $general) {
/** @var General $general */
if(!Util::randBool(0.3)){
if (!Util::randBool(0.3)) {
continue;
}
$general->getLogger()->pushGeneralActionLog($text);
@@ -1951,7 +2062,7 @@ function SabotageInjury(array $cityGeneralList, string $reason):int{
$general->multiplyVar('crew', 0.98);
$general->multiplyVar('atmos', 0.98);
$general->multiplyVar('train', 0.98);
$general->applyDB($db);
$injuryCount += 1;
@@ -1960,30 +2071,35 @@ function SabotageInjury(array $cityGeneralList, string $reason):int{
return $injuryCount;
}
function getRandTurn($term, ?\DateTimeInterface $baseDateTime = null) {
if($baseDateTime === null){
function getRandTurn($term, ?\DateTimeInterface $baseDateTime = null)
{
if ($baseDateTime === null) {
$baseDateTime = new \DateTimeImmutable();
}
else if($baseDateTime instanceof \DateTime){
$baseDateTime = DateTimeImmutable::createFromMutable($baseDateTime);
} else if ($baseDateTime instanceof \DateTime) {
$baseDateTime = \DateTimeImmutable::createFromMutable($baseDateTime);
} else if ($baseDateTime instanceof \DateTimeImmutable) {
//do Nothing
} else {
throw new MustNotBeReachedException();
}
$randSecond = Util::randRangeInt(0, 60 * $term - 1);
$randFraction = Util::randRangeInt(0, 999999) / 1000000;//6자리 소수
$randFraction = Util::randRangeInt(0, 999999) / 1000000; //6자리 소수
return $baseDateTime->add(TimeUtil::secondsToDateInterval($randSecond + $randFraction))->format('Y-m-d H:i:s');
}
function getRandTurn2($term, ?\DateTimeInterface $baseDateTime = null)
{
if($baseDateTime === null){
if ($baseDateTime === null) {
$baseDateTime = new \DateTimeImmutable();
}
else if($baseDateTime instanceof \DateTime){
$baseDateTime = DateTimeImmutable::createFromMutable($baseDateTime);
} else if ($baseDateTime instanceof \DateTime) {
$baseDateTime = \DateTimeImmutable::createFromMutable($baseDateTime);
} else {
throw new MustNotBeReachedException();
}
$randSecond = Util::randRangeInt(0, 60 * $term - 1);
$randFraction = Util::randRangeInt(0, 999999) / 1000000;//6자리 소수
$randFraction = Util::randRangeInt(0, 999999) / 1000000; //6자리 소수
return $baseDateTime->sub(TimeUtil::secondsToDateInterval($randSecond + $randFraction))->format('Y-m-d H:i:s');
}
}
+163 -148
View File
@@ -4,16 +4,13 @@ namespace sammo;
function registerAuction() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'turnterm']);
$unit = 60 * $admin['turnterm'];
// 장수들 평금,평쌀
$query = "select avg(gold) as gold, avg(rice) as rice,max(gold) as maxgold from general where npc<2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general = $db->queryFirstRow('SELECT avg(gold) as gold, avg(rice) as rice,max(gold) as maxgold from general where npc<2');
if($general['gold'] < 1000) { $general['gold'] = 1000; }
if($general['gold'] > 20000) { $general['gold'] = 20000; }
@@ -23,7 +20,7 @@ function registerAuction() {
$count = $db->queryFirstField('SELECT count(*) FROM auction WHERE type=0 AND no1=0');
$count += 5;
// 판매건 등록
if(rand()%$count == 0) {
if(Util::randBool(1/$count)) {
//평균 쌀의 5% ~ 25%
$mul = rand() % 5 + 1;
$amount = $general['rice'] / 20 * $mul;
@@ -38,16 +35,24 @@ function registerAuction() {
$term = 3 + rand() % 10;
$date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term);
$query = "insert into auction (type, no1, name1, amount, cost, value, topv, expire) values (0, '0', 'ⓝ상인', '$amount', '$cost', '$cost', '$topv', '$date')";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->insert('auction', [
'type'=>0,
'no1'=>0,
'name1'=>'ⓝ상인',
'amount'=>$amount,
'cost'=>$cost,
'value'=>$cost,
'topv'=>$topv,
'expire'=>$date
]);
}
$count = $db->queryFirstField('SELECT count(*) FROM auction WHERE type=1 AND no1=0');
$count += 5;
// 구매건 등록
if(rand()%$count == 0) {
if(Util::randBool(1/$count)) {
//평균 쌀의 5% ~ 25%
$mul = rand() % 5 + 1;
$mul = Util::randRangeInt(1, 5);
$amount = $general['rice'] / 20 * $mul;
$cost = $general['gold'] / 20 * 1.1 * $mul;
$topv = $amount * 0.5;
@@ -58,36 +63,31 @@ function registerAuction() {
$cost = Util::round($cost, -1);
$topv = Util::round($topv, -1);
$term = 3 + rand() % 10;
$term = Util::randRangeInt(3, 12);
$date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term);
$query = "insert into auction (type, no1, name1, amount, cost, value, topv, expire) values (1, '0', 'ⓝ상인', '$amount', '$cost', '$cost', '$topv', '$date')";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->insert('auction', [
'type'=>1,
'no1'=>0,
'name1'=>'ⓝ상인',
'amount'=>$amount,
'cost'=>$cost,
'value'=>$cost,
'topv'=>$topv,
'expire'=>$date
]);
}
}
function processAuction() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$trader = [];
$traderLog = [];
$auctionLog = [];
$bidderLog = [];
$alllog = [];
$history = [];
$date = TimeUtil::now();
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$admin = $gameStor->getValues(['year', 'month']);
$query = "select * from auction where expire<='$date'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count2 = MYDB_num_rows($result2);
for($i=0; $i < $count2; $i++) {
$auction = MYDB_fetch_array($result2);
foreach($db->query('SELECT * from auction where expire<=%s', $date) as $auction){
$josaYi1 = JosaUtil::pick($auction['name1'], '이');
$josaYi2 = JosaUtil::pick($auction['name2'], '이');
@@ -95,138 +95,153 @@ function processAuction() {
if($auction['no2'] == 0) {
// 상인건수가 아닌것만 출력
if($auction['no1'] != 0) {
$query = "select no from general where no='{$auction['no1']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$trader = MYDB_fetch_array($result);
$traderID = $db->queryFirstField('SELECT no FROM general WHERE no=%i', $auction['no1']);
$logger = new ActionLogger($traderID, 0, $year, $month);
$logger->pushGeneralActionLog("입찰자 부재로 {$auction['no']}번 거래 <M>유찰</>!", ActionLogger::EVENT_PLAIN);
$logger->flush();
$traderLog[0] = "<S>◆</>입찰자 부재로 {$auction['no']}번 거래 <M>유찰</>!";
$auctionLog = [];
if($auction['type'] == 0) {
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 그러나 입찰자 부재";
$auctionLog[] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 그러나 입찰자 부재";
} else {
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, 그러나 입찰자 부재";
$auctionLog[] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, 그러나 입찰자 부재";
}
pushGenLog($trader, $traderLog);
pushAuctionLog($auctionLog);
}
} else {
if($auction['no1'] == 0) {
$trader['no'] = 0;
$trader['name'] = 'ⓝ상인';
$trader['gold'] = 99999;
$trader['rice'] = 99999;
} else {
$query = "select no,name,gold,rice from general where no='{$auction['no1']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$trader = MYDB_fetch_array($result);
}
$query = "select no,name,gold,rice from general where no='{$auction['no2']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$bidder = MYDB_fetch_array($result);
//판매거래
if($auction['type'] == 0) {
if($auction['amount'] > $trader['rice'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$trader['gold'] -= $gold;
if($trader['gold'] < 0) $trader['gold'] = 0;
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
$bidderLog[0] = "<S>◆</>판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 판매자 군량부족, 벌금 <C>{$gold}</>";
} elseif($auction['value'] > $bidder['gold'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$bidder['gold'] -= $gold;
if($bidder['gold'] < 0) $bidder['gold'] = 0;
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
$bidderLog[0] = "<S>◆</>입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
} else {
$josaUlGold = JosaUtil::pick($auction['value'], '을');
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!";
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 구매";
if($auction['value'] >= $auction['amount'] * 2) {
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
} elseif($auction['value'] >= $auction['topv']) {
$auctionLog[0] .= " <M>★ 즉시구매가 거래 ★</>";
} elseif($auction['value'] * 2 <= $auction['amount']) {
$auctionLog[0] .= " <R>★ 최저가 거래 ★</>";
}
$query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='{$auction['no1']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='{$auction['no2']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
pushGenLog($trader, $traderLog);
pushGenLog($bidder, $bidderLog);
pushAuctionLog($auctionLog);
//구매거래
} else {
if($auction['amount'] > $bidder['rice'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$bidder['gold'] -= $gold;
if($bidder['gold'] < 0) $bidder['gold'] = 0;
$query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
$bidderLog[0] = "<S>◆</>입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 군량부족, 벌금 <C>{$gold}</>";
} elseif($auction['value'] > $trader['gold'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$trader['gold'] -= $gold;
if($trader['gold'] < 0) $trader['gold'] = 0;
$query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>";
$bidderLog[0] = "<S>◆</>구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 구매자 자금부족, 벌금 <C>{$gold}</>";
} else {
$josaUlGold = JosaUtil::pick($auction['value'], '을');
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!";
$bidderLog[0] = "<S>◆</>{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!";
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 판매";
if($auction['value'] >= $auction['amount'] * 2) {
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
} elseif($auction['value'] * 2 <= $auction['amount']) {
$auctionLog[0] .= " <R>★ 최저가 거래 ★</>";
} elseif($auction['value'] <= $auction['topv']) {
$auctionLog[0] .= " <M>★ 즉시구매가 거래 ★</>";
}
$query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='{$auction['no1']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='{$auction['no2']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
pushGenLog($trader, $traderLog);
pushGenLog($bidder, $bidderLog);
pushAuctionLog($auctionLog);
}
continue;
}
if($auction['no1'] == 0) {
$trader = [
'no'=>0,
'name'=>'ⓝ상인',
'gold'=>99999,
'rice'=>99999
];
} else {
$trader = $db->queryFirstRow('SELECT no,name,gold,rice from general where no=%i', $auction['no1']);
}
$bidder = $db->queryFirstRow('SELECT no,name,gold,rice from general where no=%i', $auction['no2']);
$traderLogger = new ActionLogger($trader['no'], 0, $year, $month, false);
$bidderLogger = new ActionLogger($bidder['no'], 0, $year, $month, false);
$auctionLog = [];
//판매거래
if($auction['type'] == 0) {
if($auction['amount'] > $trader['rice'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$db->update('general', [
'gold'=>Util::valueFit($trader['gold'] - $gold, 0)
], 'no=%i', $trader['no']);
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog("판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>", ActionLogger::EVENT_PLAIN);
$bidderLogger->pushGeneralActionLog("판매자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 판매자 군량부족, 벌금 <C>{$gold}</>";
} elseif($auction['value'] > $bidder['gold'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$db->update('general', [
'gold'=>Util::valueFit($bidder['gold'] - $gold, 0)
], 'no=%i', $bidder['no']);
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog("입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!", ActionLogger::EVENT_PLAIN);
$bidderLogger->pushGeneralActionLog("입찰자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 자금부족, 벌금 <C>{$gold}</>";
} else {
$josaUlGold = JosaUtil::pick($auction['value'], '을');
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog("{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!", ActionLogger::EVENT_PLAIN);
$bidderLogger->pushGeneralActionLog("{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <span class='sell'>판매</span> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 구매";
if($auction['value'] >= $auction['amount'] * 2) {
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
} elseif($auction['value'] >= $auction['topv']) {
$auctionLog[0] .= " <M>★ 즉시구매가 거래 ★</>";
} elseif($auction['value'] * 2 <= $auction['amount']) {
$auctionLog[0] .= " <R>★ 최저가 거래 ★</>";
}
$db->update('general', [
'gold'=>$db->sqleval('gold + %i', $auction['value']),
'rice'=>$db->sqleval('rice - %i', $auction['amount']),
], 'no=%i', $auction['no1']);
$db->update('general', [
'gold'=>$db->sqleval('gold - %i', $auction['value']),
'rice'=>$db->sqleval('rice + %i', $auction['amount']),
], 'no=%i', $auction['no2']);
}
pushAuctionLog($auctionLog);
//구매거래
} else {
if($auction['amount'] > $bidder['rice'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$db->update('general', [
'gold'=>Util::valueFit($bidder['gold'] - $gold, 0)
], 'no=%i', $bidder['no']);
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog("입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>!", ActionLogger::EVENT_PLAIN);
$bidderLogger->pushGeneralActionLog("입찰자의 군량 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 입찰자 군량부족, 벌금 <C>{$gold}</>";
} elseif($auction['value'] > $trader['gold'] - 1000) {
$gold = Util::round($auction['value'] * 0.01);
$db->update('general', [
'gold'=>Util::valueFit($trader['gold'] - $gold, 0)
], 'no=%i', $trader['no']);
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog("구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>! 벌금 <C>{$gold}</>", ActionLogger::EVENT_PLAIN);
$bidderLogger->pushGeneralActionLog("구매자의 자금 부족으로 {$auction['no']}번 거래 <M>유찰</>!", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <M>유찰</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 입찰, 그러나 구매자 자금부족, 벌금 <C>{$gold}</>";
} else {
$josaUlGold = JosaUtil::pick($auction['value'], '을');
$josaUlRice = JosaUtil::pick($auction['amount'], '을');
$josaRo = JosaUtil::pick($auction['value'], '로');
$traderLogger->pushGeneralActionLog(
"{$auction['no']}번 거래 <C>성사</>로 금 <C>{$auction['value']}</>{$josaUlGold} 지불, 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구입!", ActionLogger::EVENT_PLAIN
);
$bidderLogger->pushGeneralActionLog("{$auction['no']}번 거래 <C>성사</>로 쌀 <C>{$auction['amount']}</>{$josaUlRice} 판매, 금 <C>{$auction['value']}</>{$josaUlGold} 획득!", ActionLogger::EVENT_PLAIN);
$auctionLog[0] = "<S>◆</>{$admin['year']}{$admin['month']}월, {$auction['no']}번 <S>구매</> <C>성사</> : <Y>{$auction['name1']}</>{$josaYi1} 쌀 <C>{$auction['amount']}</>{$josaUlRice} 구매, <Y>{$auction['name2']}</>{$josaYi2} 금 <C>{$auction['value']}</>{$josaRo} 판매";
if($auction['value'] >= $auction['amount'] * 2) {
$auctionLog[0] .= " <R>★ 최고가 거래 ★</>";
} elseif($auction['value'] * 2 <= $auction['amount']) {
$auctionLog[0] .= " <R>★ 최저가 거래 ★</>";
} elseif($auction['value'] <= $auction['topv']) {
$auctionLog[0] .= " <M>★ 즉시구매가 거래 ★</>";
}
$db->update('general', [
'gold'=>$db->sqleval('gold - %i', $auction['value']),
'rice'=>$db->sqleval('rice + %i', $auction['amount']),
], 'no=%i', $auction['no1']);
$db->update('general', [
'gold'=>$db->sqleval('gold + %i', $auction['value']),
'rice'=>$db->sqleval('rice - %i', $auction['amount']),
], 'no=%i', $auction['no2']);
}
$traderLogger->flush();
$bidderLogger->flush();
pushAuctionLog($auctionLog);
}
$traderLogger->flush();
$bidderLogger->flush();
}
$query = "delete from auction where expire<='$date'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->delete('auction', 'expire <= %s', $date);
}
+68 -43
View File
@@ -1,6 +1,9 @@
<?php
namespace sammo;
use sammo\Command\GeneralCommand;
use sammo\Command\NationCommand;
function getGeneralTurnBrief(General $generalObj, array $turnList) {
$result = [];
@@ -92,13 +95,7 @@ function repeatGeneralCommand(int $generalId, int $turnCnt){
$turnList = $db->query('SELECT turn_idx, `action`, arg, brief FROM general_turn WHERE general_id=%i AND turn_idx < %i', $generalId, $reqTurn);
foreach($turnList as $turnItem){
$turnIdx = $turnItem['turn_idx'];
$nextTurnIdx = $turnIdx+$turnCnt;
$turnTarget = [];
while($nextTurnIdx < GameConst::$maxTurn){
//NOTE: range(15, 24, 12) 가 PHP에선 에러다. 그러니 직접 짠다.
$turnTarget[] = $nextTurnIdx;
$nextTurnIdx += $turnCnt;
}
$turnTarget = iterator_to_array(Util::range($turnIdx+$turnCnt, GameConst::$maxTurn, $turnCnt));
$db->update('general_turn', [
'action'=>$turnItem['action'],
@@ -108,18 +105,18 @@ function repeatGeneralCommand(int $generalId, int $turnCnt){
}
}
function pushNationCommand(int $nationID, int $level, int $turnCnt=1){
function pushNationCommand(int $nationID, int $officerLevel, int $turnCnt=1){
if($nationID == 0){
return;
}
if($level < 5){
if($officerLevel < 5){
return;
}
if($turnCnt == 0){
return;
}
if($turnCnt < 0){
pullNationCommand($nationID, $level, -$turnCnt);
pullNationCommand($nationID, $officerLevel, -$turnCnt);
return;
}
if($turnCnt >= GameConst::$maxChiefTurn){
@@ -130,27 +127,27 @@ function pushNationCommand(int $nationID, int $level, int $turnCnt=1){
$db->update('nation_turn', [
'turn_idx'=>$db->sqleval('turn_idx + %i', $turnCnt)
], 'nation_id=%i AND level=%i ORDER BY turn_idx DESC', $nationID, $level);
], 'nation_id=%i AND officer_level=%i ORDER BY turn_idx DESC', $nationID, $officerLevel);
$db->update('nation_turn', [
'turn_idx'=>$db->sqleval('turn_idx - %i', GameConst::$maxChiefTurn),
'action'=>'휴식',
'arg'=>'{}',
'brief'=>'휴식'
], 'nation_id=%i AND level=%i AND turn_idx >= %i ORDER BY turn_idx ASC', $nationID, $level, GameConst::$maxChiefTurn);
], 'nation_id=%i AND officer_level=%i AND turn_idx >= %i ORDER BY turn_idx ASC', $nationID, $officerLevel, GameConst::$maxChiefTurn);
}
function pullNationCommand(int $nationID, int $level, int $turnCnt=1){
function pullNationCommand(int $nationID, int $officerLevel, int $turnCnt=1){
if($nationID == 0){
return;
}
if($level < 5){
if($officerLevel < 5){
return;
}
if($turnCnt == 0){
return;
}
if($turnCnt < 0){
pushNationCommand($nationID, $level, -$turnCnt);
pushNationCommand($nationID, $officerLevel, -$turnCnt);
return;
}
if($turnCnt >= GameConst::$maxChiefTurn){
@@ -164,38 +161,69 @@ function pullNationCommand(int $nationID, int $level, int $turnCnt=1){
'action'=>'휴식',
'arg'=>'{}',
'brief'=>'휴식',
], 'nation_id=%i AND level=%i AND turn_idx < %i', $nationID, $level, $turnCnt);
], 'nation_id=%i AND officer_level=%i AND turn_idx < %i', $nationID, $officerLevel, $turnCnt);
$db->update('nation_turn', [
'turn_idx'=>$db->sqleval('turn_idx - %i', $turnCnt)
], 'nation_id=%i AND level=%i ORDER BY turn_idx ASC', $nationID, $level);
], 'nation_id=%i AND officer_level=%i ORDER BY turn_idx ASC', $nationID, $officerLevel);
}
function _setGeneralCommand(int $generalID, array $turnList, string $command, ?array $arg, string $brief) {
function _setGeneralCommand(GeneralCommand $command, array $turnList):void {
if(!$turnList){
return;
}
$db = DB::db();
$generalID = $command->getGeneral()->getID();
$commandName = $command->getRawClassName();
$arg = $command->getArg();
$brief = $command->getBrief();
$db->update('general_turn', [
'action'=>$command,
'action'=>$commandName,
'arg'=>Json::encode($arg, JSON::EMPTY_ARRAY_IS_DICT),
'brief'=>$brief
], 'general_id = %i AND turn_idx IN %li', $generalID, $turnList);
}
function _setNationCommand(int $nationID, int $level, array $turnList, string $command, ?array $arg, string $brief) {
function _setNationCommand(NationCommand $command, array $turnList):void {
if(!$turnList){
return;
}
$db = DB::db();
$nationID = $command->getNationID();
$officerLevel = $command->getOfficerLevel();
$commandName = $command->getRawClassName();
$arg = $command->getArg();
$brief = $command->getBrief();
$db->update('nation_turn', [
'action'=>$command,
'action'=>$commandName,
'arg'=>Json::encode($arg, JSON::EMPTY_ARRAY_IS_DICT),
'brief'=>$brief
], 'nation_id = %i AND level = %i AND turn_idx IN %li', $nationID, $level, $turnList);
], 'nation_id = %i AND officer_level = %i AND turn_idx IN %li', $nationID, $officerLevel, $turnList);
}
function sanitizeArg(?array $args):?array{
if($args === null){
return $args;
}
$result = [];
foreach($args as $key=>$value){
if(is_array($value)){
$result[$key] = sanitizeArg($value);
}
else if(is_string($value)){
$result[$key] = StringUtil::neutralize(StringUtil::removeSpecialCharacter($value));
}
else{
$result[$key] = $value;
}
}
return $result;
}
function checkCommandArg(?array $arg):?string{
@@ -209,6 +237,7 @@ function checkCommandArg(?array $arg):?string{
'integer'=>[
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
'amount', 'colorType',
'srcArmType', 'destArmType', //숙련전환 전용
],
'boolean'=>[
'isGold', 'buyRice',
@@ -256,25 +285,26 @@ function setGeneralCommand(int $generalID, array $rawTurnList, string $command,
}
else if($turnIdx == -1){
//홀수
for ($subIdx = 1; $subIdx < GameConst::$maxTurn; $subIdx+=2) {
$turnList[$subIdx] = true;
foreach(Util::range(1, GameConst::$maxTurn, 2) as $subIdx){
$turnList[$subIdx] = true;
}
}
else if($turnIdx == -2){
//짝수
for ($subIdx = 0; $subIdx < GameConst::$maxTurn; $subIdx+=2) {
foreach(Util::range(0, GameConst::$maxTurn, 2) as $subIdx){
$turnList[$subIdx] = true;
}
}
else if($turnIdx == -3){
//모두
for ($subIdx = 0; $subIdx < GameConst::$maxTurn; $subIdx++) {
foreach(Util::range(GameConst::$maxTurn) as $subIdx){
$turnList[$subIdx] = true;
}
}
}
$turnList = array_keys($turnList);
$arg = sanitizeArg($arg);
$argBasicTestResult = checkCommandArg($arg);
if($argBasicTestResult !== null){
return [
@@ -319,18 +349,16 @@ function setGeneralCommand(int $generalID, array $rawTurnList, string $command,
];
}
/*if(!$commandObj->isReservable()){
if(!$commandObj->hasPermissionToReserve()){
return [
'result'=>false,
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testReservable(),
'test'=>'isReservable',
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testPermissionToReserve(),
'test'=>'hasPermissionToReserve',
'target'=>'command'
];
}*/
}
$brief = $commandObj->getBrief();
_setGeneralCommand($generalID, $turnList, $command, $arg, $brief);
_setGeneralCommand($commandObj, $turnList);
return [
'result'=>true,
'reason'=>'success'
@@ -350,6 +378,7 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
}
}
$arg = sanitizeArg($arg);
$argBasicTestResult = checkCommandArg($arg);
if($argBasicTestResult !== null){
return [
@@ -365,7 +394,7 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
$env = $gameStor->getAll();
$general = General::createGeneralObjFromDB($generalID);
if($general->getVar('level') < 5){
if($general->getVar('officer_level') < 5){
return [
'result'=>false,
'reason'=>'수뇌가 아닙니다'
@@ -401,20 +430,16 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
];
}
/*if(!$commandObj->isReservable()){
if(!$commandObj->hasPermissionToReserve()){
return [
'result'=>false,
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testReservable(),
'test'=>'isReservable',
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testPermissionToReserve(),
'test'=>'hasPermissionToReserve',
'target'=>'command'
];
}*/
//TODO: Reservable은 '정말로 입력 불가'이고, '입력은 가능하지만 실행은 안될 것 같은' 군을 하나더 추가해야함
// Runnable은 Arg를 모두 받아서 처리해야 하는 것이고, Arg를 받지 않아도 안될 것 같지만 입력 자체는 가능할 것 같은 커맨드.
}
$brief = $commandObj->getBrief();
_setNationCommand($general->getNationID(), $general->getVar('level'), $turnList, $command, $arg, $brief);
_setNationCommand($commandObj, $turnList);
return [
'result'=>true,
'arg_test'=>true,
+54 -15
View File
@@ -2,6 +2,8 @@
namespace sammo;
use sammo\Command\BaseCommand;
/**
* Value Converter
*
@@ -9,15 +11,33 @@ namespace sammo;
* (, autoload, 정적 변수 초기화는 허용)
*/
function getCharacterList(){
function getCharacterList(bool $onlyAvailable=true){
$infoText = [];
foreach(GameConst::$allPersonality as $personalityID){
if(!$onlyAvailable){
$class = buildPersonalityClass(GameConst::$neutralPersonality);
$infoText[GameConst::$neutralPersonality] = [$class->getName(), $class->getInfo()];
}
foreach(GameConst::$availablePersonality as $personalityID){
$class = buildPersonalityClass($personalityID);
$infoText[$personalityID] = [$class->getName(), $class->getInfo()];
}
if(!$onlyAvailable){
foreach(GameConst::$optionalPersonality as $personalityID){
$class = buildPersonalityClass($personalityID);
$infoText[$personalityID] = [$class->getName(), $class->getInfo()];
}
}
return $infoText;
}
function isOfficerSet(int $officerSet, int $reqOfficerLevel):bool{
return ($officerSet & (1 << $reqOfficerLevel)) !== 0;
}
function doOfficerSet(int $officerSet, int $reqOfficerLevel):int{
return ($officerSet | (1 << $reqOfficerLevel));
}
function getNationChiefLevel(int $level) {
return [
7=>5,
@@ -146,7 +166,7 @@ function getNationTypeClass(?string $type){
throw new \InvalidArgumentException("{$type}은 올바른 국가 타입 클래스가 아님");
}
function buildNationTypeClass(?string $type):iAction{
function buildNationTypeClass(?string $type):BaseNation{
static $cache = [];
if($type === null){
$type = 'None';
@@ -247,7 +267,7 @@ function getGeneralSpecialDomesticClass(?string $type){
throw new \InvalidArgumentException("{$type}은 올바른 내정 특기가 아님");
}
function buildGeneralSpecialDomesticClass(?string $type):iAction{
function buildGeneralSpecialDomesticClass(?string $type):BaseSpecial{
static $cache = [];
if($type === null){
$type = 'None';
@@ -282,7 +302,7 @@ function getGeneralSpecialWarClass(?string $type){
throw new \InvalidArgumentException("{$type}은 올바른 전투 특기가 아님");
}
function buildGeneralSpecialWarClass(?string $type):iAction{
function buildGeneralSpecialWarClass(?string $type):BaseSpecial{
static $cache = [];
if($type === null){
$type = 'None';
@@ -349,7 +369,7 @@ function getWarUnitTriggerClass(string $type){
}
function buildWarUnitTriggerClass(?string $type, WarUnit $unit, ?array $args = null):BaseWarUnitTrigger{
$classPath = getNationCommandClass($type);
$classPath = getWarUnitTriggerClass($type);
if(!$args){
return new $classPath($unit);
}
@@ -358,9 +378,24 @@ function buildWarUnitTriggerClass(?string $type, WarUnit $unit, ?array $args = n
return $class->newInstanceArgs(array_merge([$unit], $args));
}
function getLevelText($level, $nlevel=8) {
if($level >= 0 && $level <= 4) { $nlevel = 0; }
$code = $nlevel * 100 + $level;
function countPureGeneralFromRawList(?array $rawGeneralList=null):int{
if(!$rawGeneralList){
return 0;
}
$result = 0;
foreach($rawGeneralList as $rawGeneral){
if(!$rawGeneral['npc'] === 5){
continue;
}
$result+=1;
}
return $result;
}
function getOfficerLevelText($officerLevel, $nlevel=8) {
if($officerLevel >= 0 && $officerLevel <= 4) { $nlevel = 0; }
$code = $nlevel * 100 + $officerLevel;
return [
812 => '군주',
811 => '참모',
@@ -435,11 +470,13 @@ function getCall($leadership, $strength, $intel) {
}
function getDed($dedication) {
$dedLevel = getDedLevel($dedication);
if($dedLevel == 0){
return getDedLevelText(getDedLevel($dedication));
}
function getDedLevelText(int $dedLevel):string{
if($dedLevel === 0){
return '무품관';
}
//{$maxDedLevel}품관 ~ 1품관
$dedInvLevel = GameConst::$maxDedLevel - $dedLevel + 1;
return "{$dedInvLevel}품관";
@@ -497,8 +534,11 @@ function getLevelPer($exp, $level) {
}
function getBill(int $dedication) : int{
$level = getDedLevel($dedication);
return ($level * 200 + 400);
return getBillByLevel(getDedLevel($dedication));
}
function getBillByLevel(int $dedLevel) : int{
return ($dedLevel * 200 + 400);
}
function getCost(int $armtype) : int {
@@ -642,7 +682,6 @@ function getColoredName(string $name, int $npcType):string{
if($color === null){
return $name;
}
//TODO: font 폐기.
return "<span style='color:{$color}'>{$name}</span>";
}
+556 -833
View File
@@ -1,4 +1,5 @@
<?php
namespace sammo;
use Monolog\Logger;
@@ -7,7 +8,8 @@ use Monolog\Logger;
* 게임 룰에 해당하는 함수 모음
*/
function getNationLevelList():array{
function getNationLevelList(): array
{
$table = [
0 => ['방랑군', 2, 0],
1 => ['호족', 2, 1],
@@ -21,28 +23,8 @@ function getNationLevelList():array{
return $table;
}
function getNationTypeList():array{
return GameConst::$availableNationType;
$table = [
13=>['명가', '기술↑ 인구↑', '쌀수입↓ 수성↓'],
12=>['음양가', '내정↑ 인구↑', '기술↓ 전략↓'],
11=>['종횡가', '전략↑ 수성↑', '금수입↓ 내정↓'],
10=>['불가', '민심↑ 수성↑', '금수입↓'],
9=>['도적', '계략↑', '금수입↓ 치안↓ 민심↓'],
8=>['오두미도', '쌀수입↑ 인구↑', '기술↓ 수성↓ 내정↓'],
7=>['태평도', '인구↑ 민심↑', '기술↓ 수성↓'],
6=>['도가', '인구↑', '기술↓ 치안↓'],
5=>['묵가', '수성↑', '기술↓'],
4=>['덕가', '치안↑인구↑ 민심↑', '쌀수입↓ 수성↓'],
3=>['병가', '기술↑ 수성↑', '인구↓ 민심↓'],
2=>['유가', '내정↑ 민심↑', '쌀수입↓'],
1=>['법가', '금수입↑ 치안↑', '인구↓ 민심↓'],
];
return $table;
}
function getCityLevelList():array{
function getCityLevelList(): array
{
return [
1 => '수',
2 => '진',
@@ -55,103 +37,72 @@ function getCityLevelList():array{
];
}
function getGenDex($general, $type) {
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
$ntype = GameUnitConst::byId($type)->armType * 10;
return $general["dex{$ntype}"]??0;
}
function addGenDex($no, $atmos, $train, $type, $exp) {
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
$db = DB::db();
$armType = GameUnitConst::byId($type)->armType;
if($armType == GameUnitConst::T_CASTLE){
$armType = GameUnitConst::T_SIEGE;
}
if($armType < 0){
//한국가의 전체 전방 설정
function SetNationFront($nationNo)
{
if (!$nationNo) {
return;
}
$ntype = $armType*10;
$dexType = "dex{$ntype}";
if($armType == GameUnitConst::T_WIZARD) {
$exp = Util::round($exp * 0.90);
}
else if($armType == GameUnitConst::T_SIEGE) {
$exp = Util::round($exp * 0.90);
}
$exp = Util::round($exp * ($atmos + $train) / 200); // 사기 + 훈련 / 200
$db->update('general', [
$dexType=>$db->sqleval('%b + %i', $dexType, $exp)
], 'no=%i', $no);
}
//한국가의 전체 전방 설정
function SetNationFront($nationNo) {
if(!$nationNo) { return; }
// 도시소유 국가와 선포,교전중인 국가
$adj3 = [];
$adj2 = [];
$adj1 = [];
$db = DB::db();
foreach($db->queryFirstColumn(
'SELECT city FROM city JOIN diplomacy ON diplomacy.you = city.nation WHERE diplomacy.state = 0 AND me = %i'
, $nationNo
) as $city){
foreach(CityConst::byID($city)->path as $adjKey=>$adjVal){
foreach ($db->queryFirstColumn(
'SELECT city FROM city JOIN diplomacy ON diplomacy.you = city.nation WHERE diplomacy.state = 0 AND me = %i',
$nationNo
) as $city) {
foreach (CityConst::byID($city)->path as $adjKey => $adjVal) {
$adj3[$adjKey] = $adjVal;
}
};
foreach($db->queryFirstColumn(
'SELECT city FROM city JOIN diplomacy ON diplomacy.you = city.nation WHERE diplomacy.state = 1 AND diplomacy.term <= 5 AND me = %i'
, $nationNo
) as $city){
foreach(CityConst::byID($city)->path as $adjKey=>$adjVal){
foreach ($db->queryFirstColumn(
'SELECT city FROM city JOIN diplomacy ON diplomacy.you = city.nation WHERE diplomacy.state = 1 AND diplomacy.term <= 5 AND me = %i',
$nationNo
) as $city) {
foreach (CityConst::byID($city)->path as $adjKey => $adjVal) {
$adj1[$adjKey] = $adjVal;
}
}
if(!$adj3 && !$adj1){
if (!$adj3 && !$adj1) {
//평시이면 공백지
//NOTE: if, else일 경우 NPC는 전쟁시에는 공백지로 출병하지 않는다는 뜻이 된다.
foreach ($db->queryFirstColumn('SELECT city from city where nation=0') as $city) {
foreach(CityConst::byID($city)->path as $adjKey=>$adjVal){
foreach (CityConst::byID($city)->path as $adjKey => $adjVal) {
$adj2[$adjKey] = $adjVal;
}
}
}
$db->update('city', [
'front'=>0
'front' => 0
], 'nation=%i', $nationNo);
if($adj1){
if ($adj1) {
$db->update('city', [
'front'=>1,
'front' => 1,
], 'nation=%i and city in %li', $nationNo, array_keys($adj1));
}
if($adj2){
if ($adj2) {
$db->update('city', [
'front'=>2,
'front' => 2,
], 'nation=%i and city in %li', $nationNo, array_keys($adj2));
}
if($adj3){
if ($adj3) {
$db->update('city', [
'front'=>3,
'front' => 3,
], 'nation=%i and city in %li', $nationNo, array_keys($adj3));
}
}
function checkSupply() {
function checkSupply()
{
$db = DB::db();
$cities = [];
foreach($db->query('SELECT city, nation FROM city WHERE nation != 0') as $city){
foreach ($db->query('SELECT city, nation FROM city WHERE nation != 0') as $city) {
$newCity = new \stdClass();
$newCity->id = Util::toInt($city['city']);
$newCity->nation = Util::toInt($city['nation']);
@@ -159,33 +110,33 @@ function checkSupply() {
$cities[$newCity->id] = $newCity;
}
$queue = new \SplQueue();
foreach($db->queryAllLists('SELECT capital, nation FROM nation WHERE `level` > 0') as list($capitalID, $nationID)){
if(!key_exists($capitalID, $cities)){
foreach ($db->queryAllLists('SELECT capital, nation FROM nation WHERE `level` > 0') as list($capitalID, $nationID)) {
if (!key_exists($capitalID, $cities)) {
continue;
}
$city = $cities[$capitalID];
if($nationID != $city->nation){
if ($nationID != $city->nation) {
continue;
}
$city->supply = true;
$queue->enqueue($city);
}
while(!$queue->isEmpty()){
while (!$queue->isEmpty()) {
$cityLink = $queue->dequeue();
$city = CityConst::byID($cityLink->id);
foreach(array_keys($city->path) as $connCityID){
if(!key_exists($connCityID, $cities)){
foreach (array_keys($city->path) as $connCityID) {
if (!key_exists($connCityID, $cities)) {
continue;
}
$connCity = $cities[$connCityID];
if($connCity->nation != $cityLink->nation){
if ($connCity->nation != $cityLink->nation) {
continue;
}
if($connCity->supply){
if ($connCity->supply) {
continue;
}
$connCity->supply = true;
@@ -193,194 +144,205 @@ function checkSupply() {
}
}
$db->update('city',[
'supply'=>1
$db->update('city', [
'supply' => 1
], 'nation=0');
$db->update('city',[
'supply'=>0
$db->update('city', [
'supply' => 0
], 'nation!=0');
$supply = [];
foreach($cities as $city){
if($city->supply){
foreach ($cities as $city) {
if ($city->supply) {
$supply[] = $city->id;
}
}
if($supply){
if ($supply) {
$db->update('city', [
'supply'=>1
'supply' => 1
], 'city IN %li', $supply);
}
}
function updateGeneralNumber(){
$db = DB::db();
foreach($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]){
if($nationID === 0){
continue;
}
$db->update('nation', [
'gennum'=>$gennum
], 'nation=%i', $nationID);
}
refreshNationStaticInfo();
}
function updateYearly() {
function updateYearly()
{
//통계
checkStatistic();
}
//관직 변경 해제
function updateQuaterly() {
function updateQuaterly()
{
$db = DB::db();
$connect=$db->get();
//천도 제한 해제, 관직 변경 제한 해제
$query = "update nation set capset='0',l12set='0',l11set='0',l10set='0',l9set='0',l8set='0',l7set='0',l6set='0',l5set='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('nation', [
'chief_set' => 0,
], true);
//관직 변경 제한 해제
$query = "update city set officer4set='0',officer3set='0',officer2set='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('city', [
'officer_set' => 0,
], true);
}
// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정
function preUpdateMonthly() {
function preUpdateMonthly()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
//연감 월결산
$result = LogHistory();
$history = array();
if($result == false) { return false; }
if ($result == false) {
return false;
}
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
//배신 횟수 최대 10회 미만
$query = "update general set betray=9 where betray>9";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$logger = new ActionLogger(0, 0, $admin['year'], $admin['month']);
//보급선 체크
checkSupply();
//미보급도시 10% 감소
$query = "update city set pop=pop*0.9,trust=trust*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,def=def*0.9,wall=wall*0.9 where supply='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//미보급도시 장수 5% 감소
$query = "select city,nation from city where supply='0'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$cityCount = MYDB_num_rows($result);
for($i=0; $i < $cityCount; $i++) {
$city = MYDB_fetch_array($result);
//병 훈 사 5%감소
$query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='{$city['city']}' and nation='{$city['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('city', [
'pop' => $db->sqleval('pop * 0.9'),
'trust' => $db->sqleval('trust * 0.9'),
'agri' => $db->sqleval('agri * 0.9'),
'comm' => $db->sqleval('comm * 0.9'),
'secu' => $db->sqleval('secu * 0.9'),
'def' => $db->sqleval('def * 0.9'),
'wall' => $db->sqleval('wall * 0.9'),
], 'supply = 0');
//미보급도시 장수 병 훈 사 5%감소
//NOTE: update inner join도 가능하지만, meekrodb 기준으로 깔끔하게.
$unsuppliedCities = $db->query('SELECT city, nation, trust, name FROM city WHERE supply = 0');
foreach (Util::arrayGroupBy($unsuppliedCities, 'nation') as $nationID => $cityList) {
$cityIDList = Util::squeezeFromArray($cityList, 'city');
$db->update('general', [
'crew' => $db->sqleval('crew*0.95'),
'atmos' => $db->sqleval('atmos*0.95'),
'train' => $db->sqleval('train*0.95'),
], 'city IN %li AND nation = %i', $cityIDList, $nationID);
}
//민심30이하 공백지 처리
$query = "select city,name,officer4,officer3,officer2 from city where trust<=30 and supply='0'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$cityCount = MYDB_num_rows($result);
for($i=0; $i < $cityCount; $i++) {
$city = MYDB_fetch_array($result);
$query = "update general set level=1 where no='{$city['officer4']}' or no='{$city['officer3']}' or no='{$city['officer2']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$josaYi = JosaUtil::pick($city['name'], '이');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【고립】</b></><G><b>{$city['name']}</b></>{$josaYi} 보급이 끊겨 <R>미지배</> 도시가 되었습니다.";
$lostCities = [];
foreach ($unsuppliedCities as $unsuppliedCity) {
if ($unsuppliedCity['trust'] >= 30) {
continue;
}
$lostCities[$unsuppliedCity['city']] = $unsuppliedCity;
}
pushWorldHistory($history, $admin['year'], $admin['month']);
//민심30이하 공백지 처리
$query = "update city set nation='0',officer4='0',officer3='0',officer2='0',conflict='{}',term=0,front=0 where trust<=30 and supply='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//접률감소
$query = "update general set connect=floor(connect*0.99)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//건국제한, 전략제한, 외교제한-1
$query = "update general set makelimit=makelimit-1 where makelimit>'0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set strategic_cmd_limit=strategic_cmd_limit-1 where strategic_cmd_limit>'0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set surlimit=surlimit-1 where surlimit>'0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//세율 동기화 목적
$query = "update nation set rate_tmp=rate";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if ($lostCities) {
foreach ($lostCities as $lostCity) {
$josaYi = JosaUtil::pick($lostCity['name'], '이');
$logger->pushGlobalHistoryLog("<R><b>【고립】</b></><G><b>{$lostCity['name']}</b></>{$josaYi} 보급이 끊겨 <R>미지배</> 도시가 되었습니다.");
}
$db->update('general', [
'officer_level' => 1,
'officer_city' => 0
], 'officer_city IN %li', array_keys($lostCities));
$db->update('city', [
'nation' => 0,
'officer_set' => 0,
'conflict' => '{}',
'term' => 0,
'front' => 0
], 'city IN %li', array_keys($lostCities));
}
//접률감소, 건국제한-1
$db->update('general', [
'connect' => $db->sqleval('floor(connect*0.99)'),
'makelimit' => $db->sqleval('greatest(0, makelimit - 1)'),
], true);
//전략제한-1, 외교제한-1, 세율동기화
$db->update('nation', [
'strategic_cmd_limit' => $db->sqleval('greatest(0, strategic_cmd_limit - 1)'),
'surlimit' => $db->sqleval('greatest(0, surlimit - 1)'),
'rate_tmp' => $db->sqleval('rate')
], true);
//도시훈사 180년 60, 220년 87, 240년 100
$rate = Util::round(($admin['year'] - $admin['startyear']) / 1.5) + 60;
if($rate > 100) $rate = 100;
if ($rate > 100) $rate = 100;
$ratio = 100;
// 20 ~ 140원
$develcost = ($admin['year'] - $admin['startyear'] + 10) * 2;
$gameStor->gold_rate = $ratio;
$gameStor->rice_rate = $ratio;
$gameStor->city_rate = $rate;
$gameStor->develcost = $develcost;
//매달 사망자 수입 결산
processWarIncome($ratio);
processWarIncome();
//계략, 전쟁표시 해제
$query = "update city set state=0 where state=31 or state=33";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set state=state-1 where state=32 or state=34";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set term=term-1 where term>0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set conflict='{}' where term=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set state=0 where state=41";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set state=41 where state=42";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update city set state=42 where state=43";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 계급 검사 및 승,강급
$query = "select no,name,dedication,dedlevel,experience,explevel from general";
$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);
$log = [];
$log = checkDedication($general, $log);
$log = checkExperience($general, $log);
pushGenLog($general, $log);
}
$db->update('city', [
'state' => $db->sqleval(<<<EOD
(CASE
WHEN state=31 THEN 0
WHEN state=32 THEN 31
WHEN state=33 THEN 0
WHEN state=34 THEN 33
WHEN state=41 THEN 0
WHEN state=42 THEN 41
WHEN state=43 THEN 42
ELSE state END)
EOD),
'term' => $db->sqleval('greatest(0, term - 1)'),
'conflict' => $db->sqleval('if(term = 0,%s,conflict)', '{}'),
], true);
//첩보-1
foreach($db->queryAllLists("SELECT nation, spy FROM nation WHERE spy!='' AND spy!='{}'") as [$nationNo, $rawSpy]){
foreach ($db->queryAllLists("SELECT nation, spy FROM nation WHERE spy!='' AND spy!='{}'") as [$nationNo, $rawSpy]) {
$spyInfo = Json::decode($rawSpy);
foreach($spyInfo as $cityNo => $remainMonth){
if($remainMonth <= 1){
foreach ($spyInfo as $cityNo => $remainMonth) {
if ($remainMonth <= 1) {
unset($spyInfo[$cityNo]);
}
else{
} else {
$spyInfo[$cityNo] -= 1;
}
}
$db->update('nation', [
'spy'=>Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
'spy' => Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
], 'nation=%i', $nationNo);
}
return true;
}
// 외교 로그처리, 외교 상태 처리
function postUpdateMonthly() {
function postUpdateMonthly()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'scenario']);
$history = [];
$globalLogger = new ActionLogger(0, 0, $admin['year'], $admin['month']);
//도시 수 측정
$cityNations = [];
foreach($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $cityNation]){
if(!key_exists($cityNation, $cityNations)){
foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $cityNation]) {
if (!key_exists($cityNation, $cityNations)) {
$cityNations[$cityNation] = [];
}
$cityNations[$cityNation][] = $cityName;
@@ -388,18 +350,18 @@ function postUpdateMonthly() {
//각 국가 전월 장수수 대비 당월 장수수로 단합도 산정
//각 국가 장수수를 구하고 국력 산정
// $query = "select nation,gennum from nation where level>0";
// 국력=
// 자원(국가/장수의 금,쌀)
// 기술력
// 인구수*내정%
// 장수능력
// 접속률
// 숙련도
// 명성,공헌
$nations = $db->query('SELECT
// $query = "select nation,gennum from nation where level>0";
// 국력=
// 자원(국가/장수의 금,쌀)
// 기술력
// 인구수*내정%
// 장수능력
// 접속률
// 숙련도
// 명성,공헌
$nations = Util::convertArrayToDict($db->query('SELECT
A.nation,
A.gennum, A.aux,
A.gennum,
round((
round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100)
+A.tech
@@ -409,61 +371,56 @@ function postUpdateMonthly() {
) from city where nation=A.nation and supply=1
))
+(select sum(leadership+strength+intel) from general where nation=A.nation)
+(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation)
+(select round(sum(dex1+dex2+dex3+dex4+dex5)/1000) from general where nation=A.nation)
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
+(select round(avg(connect)) from general where nation=A.nation)
)/10)
as power,
(select sum(crew) from general where nation=A.nation) as totalCrew
from nation A
group by A.nation');
foreach($nations as $nation) {
$genNum[$nation['nation']] = $nation['gennum'];
group by A.nation'), 'nation');
$maxPowerValues = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'max_power');
$aux = Json::decode($nation['aux']);
foreach ($nations as $nation) {
$nationID = $nation['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$genNum[$nationID] = $nation['gennum'];
$powerValues = $maxPowerValues[$nationID]??[];
//약간의 랜덤치 부여 (95% ~ 105%)
$nation['power'] = Util::round($nation['power'] * (rand()%101 + 950) / 1000);
$aux['maxPower'] = max($aux['maxPower']??0, $nation['power']);
$aux['maxCrew'] = max($aux['maxCrew']??0, Util::toInt($nation['totalCrew']));
if(count($cityNations[$nation['nation']]??[]) > count($aux['maxCities']??[])){
$aux['maxCities'] = $cityNations[$nation['nation']];
$nation['power'] = Util::round($nation['power'] * (rand() % 101 + 950) / 1000);
$powerValues['maxPower'] = max($powerValues['maxPower'] ?? 0, $nation['power']);
$powerValues['maxCrew'] = max($powerValues['maxCrew'] ?? 0, Util::toInt($nation['totalCrew']));
if (count($cityNations[$nationID] ?? []) > count($powerValues['maxCities'] ?? [])) {
$powerValues['maxCities'] = $cityNations[$nationID];
}
$db->update('nation', [
'power'=>$nation['power'],
'aux'=>Json::encode($aux)
], 'nation=%i', $nation['nation']);
'power' => $nation['power']
], 'nation=%i', $nationID);
$nationStor->max_power = $powerValues;
}
// 전쟁기한 세팅
$query = "select me,you,dead,term from diplomacy where state='0'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$dipCount = MYDB_num_rows($result);
for($i=0; $i < $dipCount; $i++) {
$dip = MYDB_fetch_array($result);
foreach($db->query('SELECT me, you, dead, term FROM diplomacy WHERE state = 0') as $dip) {
$genCount = $genNum[$dip['me']];
// 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산
// 4000 / 10 * 0.25 = 100
$term = floor($dip['dead'] / 100 / $genCount);
$dip['dead'] -= $term * 100 * $genCount;
$term = Util::valueFit($dip['term'] + $term, 0, 13);
$db->update('diplomacy', [
'term' => $term,
'dead'=> $dip['dead'],
'dead' => $dip['dead'],
], 'me = %i AND you = %i', $dip['me'], $dip['you']);
}
//개전국 로그
$query = "select me,you from diplomacy where state='1' and term<='1' and me<you";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$dipCount = MYDB_num_rows($result);
for($i=0; $i < $dipCount; $i++) {
$dip = MYDB_fetch_array($result);
foreach($db->query('SELECT me, you FROM diplomacy WHERE state = 1 AND term <= 1 AND me < you') as $dip){
$nation1 = getNationStaticInfo($dip['me']);
$name1 = $nation1['name'];
$nation2 = getNationStaticInfo($dip['you']);
@@ -471,53 +428,62 @@ function postUpdateMonthly() {
$josaYi = JosaUtil::pick($name2, '이');
$josaWa = JosaUtil::pick($name1, '와');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【개전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <R>전쟁</>을 시작합니다.";
$globalLogger->pushGlobalHistoryLog("<R><b>【개전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <R>전쟁</>을 시작합니다.");
}
//휴전국 로그
$query = "select A.me as me,A.you as you,A.term as term1,B.term as term2 from diplomacy A, diplomacy B where A.me=B.you and A.you=B.me and A.state='0' and A.me<A.you";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$dipCount = MYDB_num_rows($result);
for($i=0; $i < $dipCount; $i++) {
$dip = MYDB_fetch_array($result);
$stopWarList = [];
foreach($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$me, $you]){
if($me < $you){
$key = "{$me}_{$you}";
}
else{
$key = "{$you}_{$me}";
}
if(!key_exists($key, $stopWarList)){
$stopWarList[$key] = true;
continue;
}
//양측 기간 모두 0이 되는 상황이면 휴전
if($dip['term1'] <= 1 && $dip['term2'] <= 1) {
$nation1 = getNationStaticInfo($dip['me']);
$name1 = $nation1['name'];
$nation2 = getNationStaticInfo($dip['you']);
$name2 = $nation2['name'];
$nation1 = getNationStaticInfo($me);
$name1 = $nation1['name'];
$nation2 = getNationStaticInfo($you);
$name2 = $nation2['name'];
$josaWa = JosaUtil::pick($name1, '와');
$josaYi = JosaUtil::pick($name2, '이');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<R><b>【휴전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <S>휴전</>합니다.";
//기한 되면 휴전으로
$query = "update diplomacy set state='2',term='0' where (me='{$dip['me']}' and you='{$dip['you']}') or (me='{$dip['you']}' and you='{$dip['me']}')";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
$josaWa = JosaUtil::pick($name1, '와');
$josaYi = JosaUtil::pick($name2, '이');
$globalLogger->pushGlobalHistoryLog("<R><b>【휴전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <S>휴전</>합니다.");
$db->update('diplomacy', [
'state'=>2,
'term'=>0,
], '(me=%i AND you=%i) OR (you=%i AND me=%i)', $me, $you, $me, $you);
}
pushWorldHistory($history, $admin['year'], $admin['month']);
//사상자 초기화
$query = "update diplomacy set dead=0 WHERE state != 0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//외교 기한-1
$query = "update diplomacy set term=term-1 where term!=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$globalLogger->flush();
//사상자 초기화, 외교 기한-1
$db->update('diplomacy', [
'dead'=>$db->sqleval('if(state!=0, 0, dead)'),
'term'=>$db->sqleval('greatest(0, term-1)'),
], true);
//불가침 끝나면 통상으로
$query = "update diplomacy set state='2' where state='7' and term='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('diplomacy', [
'state'=>2,
], 'state = 7 AND term = 0');
//선포 끝나면 교전으로
$query = "update diplomacy set state='0',term='6' where state='1' and term='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//3,4 기간 끝나면 통합
checkMerge();
//5,6 기간 끝나면 합병
checkSurrender();
$db->update('diplomacy', [
'state'=>0,
'term'=>6,
], 'state = 1 AND term = 0');
//초반이후 방랑군 자동 해체
if($admin['year'] >= $admin['startyear']+3) {
if ($admin['year'] >= $admin['startyear'] + 2) {
checkWander();
}
// 작위 업데이트
updateNationState();
updateGeneralNumber();
refreshNationStaticInfo();
// 천통여부 검사
checkEmperior();
@@ -526,8 +492,8 @@ function postUpdateMonthly() {
// 시스템 거래건 등록
registerAuction();
//전방설정
foreach(getAllNationStaticInfo() as $nation){
if($nation['level'] <= 0){
foreach (getAllNationStaticInfo() as $nation) {
if ($nation['level'] <= 0) {
continue;
}
SetNationFront($nation['nation']);
@@ -535,461 +501,224 @@ function postUpdateMonthly() {
}
function checkWander() {
function checkWander()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['year', 'month']);
$wanderers = $db->queryFirstColumn('SELECT general.`no` FROM general LEFT JOIN nation ON general.nation = nation.nation WHERE nation.`level` = 0 AND general.`level` = 12');
$wanderers = $db->queryFirstColumn('SELECT general.`no` FROM general LEFT JOIN nation ON general.nation = nation.nation WHERE nation.`level` = 0 AND general.`officer_level` = 12');
foreach(General::createGeneralObjListFromDB($wanderers) as $wanderer){
foreach (General::createGeneralObjListFromDB($wanderers) as $wanderer) {
$wanderCmd = buildGeneralCommandClass('che_해산', $wanderer, $admin);
if($wanderCmd->isRunnable()){
if ($wanderCmd->hasFullConditionMet()) {
$logger = $wanderer->getLogger();
$logger->pushGeneralActionLog('초반 제한후 방랑군은 자동 해산됩니다.', ActionLogger::PLAIN);
$wanderCmd->run();
}
}
if($wanderers){
if ($wanderers) {
refreshNationStaticInfo();
}
}
function checkMerge() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$mylog = [];
$youlog = [];
$history = [];
$admin = $gameStor->getValues(['year', 'month']);
$query = "select * from diplomacy where state='3' and term='0'";
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$dipcount = MYDB_num_rows($dipresult);
for($i=0; $i < $dipcount; $i++) {
$dip = MYDB_fetch_array($dipresult);
// 아국군주
$query = "select no,name,nation from general where nation='{$dip['me']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
// 상대군주
$query = "select no,name,nation,makenation from general where nation='{$dip['you']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$you = MYDB_fetch_array($result);
// 모국
$query = "select nation,name,surlimit,tech from nation where nation='{$you['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$younation = MYDB_fetch_array($result);
// 아국
$query = "select nation,name,gold,rice,surlimit,tech from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$mynation = MYDB_fetch_array($result);
//양국 NPC수
$query = "select no from general where nation='{$you['nation']}' and npc>=2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$npccount = MYDB_num_rows($result);
//양국 NPC수
$query = "select no from general where nation='{$me['nation']}' and npc>=2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$npccount2 = MYDB_num_rows($result);
//TODO: 로그 기록에 대한 쿼리는 한번만 할 수 있다.
//피항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$you['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
$josaWa = JosaUtil::pick($mynation['name'], '와');
$genlog = ["<C>●</><D><b>{$mynation['name']}</b></>{$josaWa} 통합에 성공했습니다."];
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} <D><b>{$you['makenation']}</b></>로 통합에 성공");
}
//항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount2 = MYDB_num_rows($result);
$josaWa = JosaUtil::pick($younation['name'], '와');
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>{$josaWa} 통합에 성공했습니다.";
for($i=0; $i < $gencount2; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$younation['name']}</b></>{$josaWa} <D><b>{$you['makenation']}</b></>로 통합에 성공");
}
$josaRo = JosaUtil::pick($you['makenation'], '로');
$josaYi = JosaUtil::pick($younation['name'], '이');
$josaWa = JosaUtil::pick($mynation['name'], '와');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【통합】</b></><D><b>{$mynation['name']}</b></>{$josaWa} <D><b>{$younation['name']}</b></>{$josaYi} <D><b>{$you['makenation']}</b></>{$josaRo} 통합하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$you['makenation']}</b></>에 혼란이 일고 있습니다.";
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
$newGenCount = $gencount + $gencount2;
$newTech = ($younation['tech']*$gencount + $mynation['tech']*$gencount2)/$newGenCount;
// 국가 백업
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
$oldNation['generals'] = $oldNationGenerals;
$oldNation['aux'] = Json::decode($oldNation['aux']);
// 자금 통합, 외교제한 5년, 기술유지
$db->update('nation', [
'name'=>$you['makenation'],
'gold'=>$db->sqleval('gold+%i',$mynation['gold']),
'rice'=>$db->sqleval('rice+%i',$mynation['rice']),
'surlimit'=>24,
'tech'=>$newTech,
'gennum'=>$newGenCount
], 'nation=%i',$younation['nation']);
//국가 삭제
$db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID,
'nation'=>$me['nation'],
'data'=>Json::encode($oldNation)
]);
$db->update('general', [
'nation'=>0,
'permission'=>'normal',
], 'nation=%i AND npc = 5', $me['nation']);
$query = "delete from nation where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->delete('nation_turn', 'nation_id=%i', $me['nation']);
// 아국 모든 도시들 상대국 소속으로
$query = "update city set nation='{$you['nation']}',officer4='0',officer3='0',officer2='0',conflict='{}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동
$query = "update general set belong=1,level=1,nation='{$you['nation']}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 공헌도0.9, 명성0.9
$query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='{$you['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 부대도 모두 국가 소속 변경
$query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 통합국 모든 도시 5% 감소
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,trust=trust*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 외교 삭제
$query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼)
$resignCount = 0;
if($npccount >= $npccount2) {
$resignCount = Util::round($npccount*(rand()%21+90)/100);
} else {
$resignCount = Util::round($npccount2*(rand()%21+90)/100);
}
$npcList = $db->queryFirstColumn('SELECT no FROM general WHERE nation=%i AND npc>=2 AND npc != 5 ORDER BY rand() LIMIT %i', $you['nation'], $resignCount);
if($npcList){
$db->update('general_turn', [
'action'=>'che_하야',
'arg'=>null,
'brief'=>'하야',
], 'general_id IN %li AND turn_idx = 0');
}
pushGenLog($me, $mylog);
pushGenLog($you, $youlog);
pushWorldHistory($history, $admin['year'], $admin['month']);
$mylog = [];
$youlog = [];
$history = [];
refreshNationStaticInfo();
}
}
function checkSurrender() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['year', 'month']);
$query = "select * from diplomacy where state='5' and term='0'";
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$dipcount = MYDB_num_rows($dipresult);
for($i=0; $i < $dipcount; $i++) {
$mylog = [];
$youlog = [];
$history = [];
$dip = MYDB_fetch_array($dipresult);
// 아국군주
$query = "select no,name,nation from general where nation='{$dip['me']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
// 상대군주
$query = "select no,name,nation,makenation from general where nation='{$dip['you']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$you = MYDB_fetch_array($result);
// 모국
$query = "select nation,name,surlimit,tech from nation where nation='{$you['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$younation = MYDB_fetch_array($result);
// 아국
$query = "select nation,name,gold,rice,surlimit,tech from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$mynation = MYDB_fetch_array($result);
//양국 NPC수
$query = "select no from general where nation='{$you['nation']}' and npc>=2 and npc != 5";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$npccount = MYDB_num_rows($result);
//양국 NPC수
$query = "select no from general where nation='{$me['nation']}' and npc>=2 and npc != 5";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$npccount2 = MYDB_num_rows($result);
//피항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$you['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
$genlog = ["<C>●</><D><b>{$mynation['name']}</b></> 합병에 성공했습니다."];
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></> 합병에 성공");
}
$josaRo = JosaUtil::pick($younation['name'], '로');
//항복국 장수들 역사 기록 및 로그 전달
$query = "select no,name,nation from general where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount2 = MYDB_num_rows($result);
$genlog[0] = "<C>●</><D><b>{$younation['name']}</b></>{$josaRo} 항복하여 수도로 이동합니다.";
for($i=0; $i < $gencount2; $i++) {
$gen = MYDB_fetch_array($result);
pushGenLog($gen, $genlog);
pushGeneralHistory($gen, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>가 <D><b>{$younation['name']}</b></>{$josaRo} 항복");
}
$josaYi = JosaUtil::pick($mynation['name'], '이');
$josaWa = JosaUtil::pick($mynation['name'], '와');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【투항】</b></><D><b>{$mynation['name']}</b></>{$josaYi} <D><b>{$younation['name']}</b></>{$josaRo} 항복하였습니다.";
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>【혼란】</b></>통합에 반대하는 세력들로 인해 <D><b>{$younation['name']}</b></>에 혼란이 일고 있습니다.";
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} 합병");
// 국가 백업
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $me['nation']);
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $me['nation']);
$oldNation['generals'] = $oldNationGenerals;
$oldNation['aux'] = Json::decode($oldNation['aux']);
$newGenCount = $gencount + $gencount2;
$newTech = ($younation['tech'] * $gencount + $mynation['tech'] * $gencount2) / $newGenCount;
// 자금 통합, 외교제한 5년, 기술유지
$db->update('nation', [
'gold'=>$db->sqleval('gold+%i',$mynation['gold']),
'rice'=>$db->sqleval('rice+%i',$mynation['rice']),
'surlimit'=>24,
'tech'=>$newTech,
'gennum'=>$newGenCount
], 'nation=%i', $younation['nation']);
//합병 당한국 모든 도시 10%감소
$query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,trust=trust*0.9,def=def*0.9,wall=wall*0.9 where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//합병 시도국 모든 도시 5%감소
$query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,trust=trust*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//국가 삭제
$db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID,
'nation'=>$me['nation'],
'data'=>Json::encode($oldNation)
]);
$db->update('general', [
'nation'=>0,
'permission'=>'normal',
], 'nation=%i AND npc = 5', $me['nation']);
$query = "delete from nation where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->delete('nation_turn', 'nation_id=%i', $me['nation']);
// 군주가 있는 위치 구함
$query = "select city from general where nation='{$you['nation']}' and level='12'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$king = MYDB_fetch_array($result);
// 아국 모든 도시들 상대국 소속으로
$query = "update city set nation='{$you['nation']}',officer4='0',officer3='0',officer2='0',conflict='{}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 제의국 모든 장수들 공헌도0.95, 명성0.95
$query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='{$you['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9
$query = "update general set belong=1,level=1,nation='{$you['nation']}',city='{$king['city']}',dedication=dedication*1.1,experience=experience*0.9 where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 부대도 모두 국가 소속 변경
$query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 외교 삭제
$query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼)
$resignCount = 0;
if($npccount >= $npccount2) {
$resignCount = Util::round($npccount*(rand()%21+90)/100);
} else {
$resignCount = Util::round($npccount2*(rand()%21+90)/100);
}
$npcList = $db->queryFirstColumn('SELECT no FROM general WHERE nation=%i AND npc>=2 AND npc != 5 ORDER BY rand() LIMIT %i', $you['nation'], $resignCount);
if($npcList){
$db->update('general_turn', [
'action'=>'che_하야',
'arg'=>null,
'brief'=>'하야',
], 'general_id IN %li AND turn_idx = 0');
}
pushGenLog($me, $mylog);
pushGenLog($you, $youlog);
pushWorldHistory($history, $admin['year'], $admin['month']);
refreshNationStaticInfo();
}
}
function updateNationState() {
function updateNationState()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$history = array();
$admin = $gameStor->getValues(['year', 'month', 'fiction', 'startyear', 'show_img_level', 'turnterm', 'turntime']);
$admin = $gameStor->getValues(['killturn', 'year', 'month', 'fiction', 'startyear', 'show_img_level', 'turnterm', 'turntime']);
$assemblerCnts = [];
foreach($db->queryAllLists('SELECT nation,count(no) FROM general WHERE npc = 5 GROUP BY nation') as [$nationID, $assemblerCnt]){
foreach ($db->queryAllLists('SELECT nation,count(no) FROM general WHERE npc = 5 GROUP BY nation') as [$nationID, $assemblerCnt]) {
$assemblerCnts[$nationID] = $assemblerCnt;
};
foreach($db->query('SELECT nation,name,level,tech FROM nation') as $nation) {
foreach ($db->query('SELECT nation,name,level,tech,aux FROM nation') as $nation) {
//TODO: level이 진관수이소중대특 체계를 벗어날 수 있음
$citycount = $db->queryFirstField('SELECT count(*) FROM city WHERE nation=%i AND level>=4', $nation['nation']);
if($citycount == 0) {
if ($citycount == 0) {
$nationlevel = 0; // 방랑군
} elseif($citycount == 1) {
} elseif ($citycount == 1) {
$nationlevel = 1; // 호족
} elseif($citycount <= 4) {
} elseif ($citycount <= 4) {
$nationlevel = 2; // 군벌
} elseif($citycount <= 7) {
} elseif ($citycount <= 7) {
$nationlevel = 3; // 주자사
} elseif($citycount <= 10) {
} elseif ($citycount <= 10) {
$nationlevel = 4; // 주목
} elseif($citycount <= 15) {
} elseif ($citycount <= 15) {
$nationlevel = 5; // 공
} elseif($citycount <= 20) {
} elseif ($citycount <= 20) {
$nationlevel = 6; // 왕
} else {
$nationlevel = 7; // 황제
}
if ($nationlevel > $nation['level']) {
$levelDiff = $nationlevel - $nation['level'];
$oldLevel = $nation['level'];
$nation['level'] = $nationlevel;
$updateVals = [
'level' => $nationlevel
];
switch ($nationlevel) {
case 7:
$josaUl = JosaUtil::pick(getNationLevel($nationlevel), '을');
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>{$josaUl} 자칭하였습니다.";
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>{$josaUl} 자칭");
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>{$josaUl} 자칭하였습니다.";
pushNationHistoryLog($nation['nation'], ["<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>{$josaUl} 자칭"]);
$auxVal = Json::decode($nation['aux']);
$auxVal['can_국기변경'] = 1;
$auxVal['can_국호변경'] = 1;
$updateVals['aux'] = Json::encode($auxVal);
break;
case 6:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극하였습니다.";
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 등극");
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>에 등극하였습니다.";
pushNationHistoryLog($nation['nation'], ["<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>에 등극"]);
break;
case 5:
case 4:
case 3:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 임명되었습니다.";
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>에 임명됨");
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>에 임명되었습니다.";
pushNationHistoryLog($nation['nation'], ["<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>에 임명됨"]);
break;
case 2:
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 독립하여 <Y>".getNationLevel($nationlevel)."</>로 나섰습니다.";
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>".getNationLevel($nationlevel)."</>로 나서다");
$history[] = "<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【작위】</b></><D><b>{$nation['name']}</b></>의 군주가 독립하여 <Y>" . getNationLevel($nationlevel) . "</>로 나섰습니다.";
pushNationHistoryLog($nation['nation'], ["<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>의 군주가 <Y>" . getNationLevel($nationlevel) . "</>로 나서다"]);
break;
}
$db->update('nation', [
'level'=>$nation['level']
], 'nation=%i', $nation['nation']);
$db->update('nation', $updateVals, 'nation=%i', $nation['nation']);
$turnRows = [];
foreach(range(12, getNationChiefLevel($nation['level']), -1) as $chiefLevel){
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){
foreach (Util::range(getNationChiefLevel($nation['level']), 12) as $chiefLevel) {
foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) {
$turnRows[] = [
'nation_id'=>$nation['nation'],
'level'=>$chiefLevel,
'turn_idx'=>$turnIdx,
'action'=>'휴식',
'arg'=>null,
'brief'=>'휴식'
'nation_id' => $nation['nation'],
'officer_level' => $chiefLevel,
'turn_idx' => $turnIdx,
'action' => '휴식',
'arg' => null,
'brief' => '휴식'
];
}
}
$db->insertIgnore('nation_turn', $turnRows);
if ($levelDiff) {
//유니크 아이템 하나 돌리자
$targetKillTurn = $admin['killturn'];
$targetKillTurn -= 24 * 60 / $admin['turnterm'];
$nationGenIDList = $db->queryFirstColumn(
'SELECT no FROM general WHERE nation = %i AND killturn >= %i AND npc < 2',
$nation['nation'],
$targetKillTurn
);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong'], 2);
$uniqueLotteryWeightList = [];
foreach ($nationGenList as $nationGen) {
$hasUnique = false;
foreach ($nationGen->getItems() as $item) {
if (!$item->isBuyable()) {
$hasUnique = true;
break;
}
}
if ($hasUnique) {
continue;
}
$score = $nationGen->getVar('belong') + 5;
if ($nationGen->getVar('officer_level') == 12) {
$score += 200; //NOTE: 꼬우면 군주하세요.
} else if ($nationGen->getVar('officer_level') == 11) {
$score += 70;
} else if ($nationGen->getVar('officer_level') > 4) {
$score += 35;
}
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
}
foreach (Util::range($levelDiff) as $idx) {
if (!$uniqueLotteryWeightList) {
break;
}
/** @var General */
$winnerObj = Util::choiceRandomUsingWeightPair($uniqueLotteryWeightList);
unset($uniqueLotteryWeightList[$winnerObj->getID()]);
giveRandomUniqueItem($winnerObj, '작위보상');
$winnerObj->applyDB($db);
}
}
}
$assemblerCnt = $assemblerCnts[$nation['nation']]??0;
$assemblerCnt = $assemblerCnts[$nation['nation']] ?? 0;
$maxAssemblerCnt = [
1=>0,
2=>1,
3=>3,
4=>4,
5=>6,
6=>7,
7=>9
][$nationlevel]??0;
1 => 0,
2 => 1,
3 => 3,
4 => 4,
5 => 6,
6 => 7,
7 => 9
][$nationlevel] ?? 0;
if($assemblerCnt < $maxAssemblerCnt){
$lastAssemblerID = $gameStor->assembler_id??0;
if ($assemblerCnt < $maxAssemblerCnt) {
$lastAssemblerID = $gameStor->assembler_id ?? 0;
while($assemblerCnt < $maxAssemblerCnt){
while ($assemblerCnt < $maxAssemblerCnt) {
$lastAssemblerID += 1;
$npcObj = new Scenario\NPC(
999, sprintf('부대장%4d',$lastAssemblerID), null, $nation['nation'], null,
10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, '은둔', '척사'
999,
sprintf('부대장%4d', $lastAssemblerID),
null,
$nation['nation'],
null,
10,
10,
10,
1,
$admin['year'] - 15,
$admin['year'] + 15,
'은둔',
'척사'
);
$npcObj->killturn = 70;
$npcObj->gold = 0;
$npcObj->rice = 0;
$npcObj->npc = 5;
$npcObj->build($admin);
$npcID = $npcObj->generalID;
$db->insert('troop', [
'troop_leader'=>$npcID,
'name'=>$npcObj->realName,
'nation'=>$nation['nation'],
'troop_leader' => $npcID,
'name' => $npcObj->realName,
'nation' => $nation['nation'],
]);
$db->update('general', [
'troop'=>$npcID
'troop' => $npcID
], 'no=%i', $npcID);
//TODO: 5턴간 집합턴 입력
$assemblerCnt += 1;
$gameStor->assembler_id = $lastAssemblerID;
}
}
}
pushWorldHistory($history, $admin['year'], $admin['month']);
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
}
function checkStatistic() {
function checkStatistic()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -1004,13 +733,13 @@ function checkStatistic() {
$etc = '';
$auxData = [
'generals'=>[],
'nations'=>[],
'generals' => [],
'nations' => [],
];
$avgGeneral = $db->queryFirstRow(
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex,
max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
max(dex1+dex2+dex3+dex4) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
FROM general'
);
$auxData['generals']['avg'] = $avgGeneral;
@@ -1023,7 +752,8 @@ function checkStatistic() {
$avgNation = $db->queryFirstRow(
'SELECT min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech,
min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0');
min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0'
);
$auxData['nations']['avg'] = $avgNation;
$avgNation['mintech'] = floor($avgNation['mintech']);
@@ -1032,13 +762,14 @@ function checkStatistic() {
$avgNation['avgpower'] = Util::round($avgNation['avgpower']);
$etc .= "최저/평균/최고 기술({$avgNation['mintech']}/{$avgNation['avgtech']}/{$avgNation['maxtech']}), ";
$etc .= "최저/평균/최고 국력({$avgNation['minpower']}/{$avgNation['avgpower']}/{$avgNation['maxpower']}), ";
$nationName = '';
$powerHist = '';
$nations = Util::convertArrayToDict(
$db->query(
'SELECT nation,name,type,power,gennum,gold+rice as goldrice from nation where level>0 order by power desc', 'nation'
'SELECT nation,name,type,power,gennum,gold+rice as goldrice from nation where level>0 order by power desc',
'nation'
),
'nation'
);
@@ -1047,7 +778,7 @@ function checkStatistic() {
$nationGeneralInfos = Util::convertArrayToDict(
$db->query(
'SELECT nation, sum(leadership+strength+intel) as abil,sum(gold+rice) as goldrice,
sum(dex0+dex10+dex20+dex30) as dex,sum(experience+dedication) as expded
sum(dex1+dex2+dex3+dex4) as dex,sum(experience+dedication) as expded
from general GROUP BY nation'
),
'nation'
@@ -1058,28 +789,31 @@ function checkStatistic() {
'nation'
);
foreach($nations as $nationNo=>&$nation) {
foreach ($nations as $nationNo => &$nation) {
$general = $nationGeneralInfos[$nationNo];
$city = $nationCityInfos[$nationNo];
$nation['generalInfo'] = $general;
$nation['cityInfo'] = $city;
$nationName .= $nation['name'].'('.getNationType($nation['type']).'), ';
$nationName .= $nation['name'] . '(' . getNationType($nation['type']) . '), ';
$powerHist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop_max']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), ";
if(!isset($nationHists[$nation['type']])){
if (!isset($nationHists[$nation['type']])) {
$nationHists[$nation['type']] = 0;
}
$nationHists[$nation['type']]++;
}
unset($nation);
$auxData['nations']['all'] = $nations;
$nationHist = '';
foreach(GameConst::$availableNationType as $nationType){
if(!Util::array_get($nationHists[$nationType])) { $nationHists[$nationType] = '-'; }
$nationHist .= getNationType($nationType)."({$nationHists[$nationType]}), ";
foreach (GameConst::$availableNationType as $nationType) {
if (!Util::array_get($nationHists[$nationType])) {
$nationHists[$nationType] = '-';
}
$nationHist .= getNationType($nationType) . "({$nationHists[$nationType]}), ";
}
$generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general');
@@ -1088,24 +822,23 @@ function checkStatistic() {
$npcCount = 0;
$generalCount = count($generals);
foreach($generals as $general) {
if(!isset($personalHists[$general['personal']])){
foreach ($generals as $general) {
if (!isset($personalHists[$general['personal']])) {
$personalHists[$general['personal']] = 0;
}
if(!isset($specialHists[$general['special']])){
if (!isset($specialHists[$general['special']])) {
$specialHists[$general['special']] = 0;
}
if(!isset($specialHists2[$general['special2']])){
if (!isset($specialHists2[$general['special2']])) {
$specialHists2[$general['special2']] = 0;
}
if($general['npc'] < 2){
$genCount+=1;
}
else{
$npcCount+=1;
if ($general['npc'] < 2) {
$genCount += 1;
} else {
$npcCount += 1;
}
$personalHists[$general['personal']]++;
@@ -1113,10 +846,9 @@ function checkStatistic() {
$specialHists2[$general['special2']]++;
}
foreach($db->queryAllLists(
'SELECT crewtype, count(crewtype) AS cnt FROM general WHERE recwar != NULL GROUP BY crewtype'
) as [$crewtype, $cnt]
){
foreach ($db->queryAllLists(
'SELECT crewtype, count(crewtype) AS cnt FROM general WHERE recent_war != NULL GROUP BY crewtype'
) as [$crewtype, $cnt]) {
$crewtypeHists[$crewtype] = $cnt;
}
@@ -1131,62 +863,64 @@ function checkStatistic() {
$generalCountStr = "{$generalCount}({$genCount}+{$npcCount})";
$personalHistStr = join(', ', array_map(function($histPair){
$personalHistStr = join(', ', array_map(function ($histPair) {
[$histKey, $cnt] = $histPair;
return getGenChar($histKey).'('.$cnt.')';
return getGenChar($histKey) . '(' . $cnt . ')';
}, Util::convertDictToArray($personalHists)));
$specialHistsStr = join(', ', array_map(function($histPair){
$specialHistsStr = join(', ', array_map(function ($histPair) {
[$histKey, $cnt] = $histPair;
return getGeneralSpecialDomesticName($histKey).'('.$cnt.')';
return getGeneralSpecialDomesticName($histKey) . '(' . $cnt . ')';
}, Util::convertDictToArray($specialHists)));
$specialHists2Str = join(', ', array_map(function($histPair){
$specialHists2Str = join(', ', array_map(function ($histPair) {
[$histKey, $cnt] = $histPair;
return getGeneralSpecialWarName($histKey).'('.$cnt.')';
return getGeneralSpecialWarName($histKey) . '(' . $cnt . ')';
}, Util::convertDictToArray($specialHists2)));
$specialHistsAllStr = "$specialHistsStr // $specialHists2Str";
$crewtypeHistsStr = join(', ', array_map(function($histPair){
$crewtypeHistsStr = join(', ', array_map(function ($histPair) {
[$histKey, $cnt] = $histPair;
return GameUnitConst::byID($histKey)->getShortName().'('.$cnt.')';
return GameUnitConst::byID($histKey)->getShortName() . '(' . $cnt . ')';
}, Util::convertDictToArray($crewtypeHists)));
$db->insert('statistic', [
'year'=>$admin['year'],
'month'=>$admin['month'],
'nation_count'=>$nationCount,
'nation_name'=>$nationName,
'nation_hist'=>$nationHist,
'gen_count'=>$generalCountStr,
'personal_hist'=>$personalHistStr,
'special_hist'=>$specialHistsAllStr,
'power_hist'=>$powerHist,
'crewtype'=>$crewtypeHistsStr,
'etc'=>$etc,
'aux'=>Json::encode($auxData)
]);
$db->insert('statistic', [
'year' => $admin['year'],
'month' => $admin['month'],
'nation_count' => $nationCount,
'nation_name' => $nationName,
'nation_hist' => $nationHist,
'gen_count' => $generalCountStr,
'personal_hist' => $personalHistStr,
'special_hist' => $specialHistsAllStr,
'power_hist' => $powerHist,
'crewtype' => $crewtypeHistsStr,
'etc' => $etc,
'aux' => Json::encode($auxData)
]);
}
function convForOldGeneral(array $general, int $year, int $month){
function convForOldGeneral(array $general, int $year, int $month)
{
$general['history'] = getGeneralHistoryLogAll($general['no']);
return [
'server_id'=>UniqueConst::$serverID,
'general_no'=>$general['no'],
'owner'=>$general['owner'],
'name'=>$general['name'],
'last_yearmonth'=>$year*100+$month,
'turntime'=>$general['turntime'],
'data'=>Json::encode($general)
'server_id' => UniqueConst::$serverID,
'general_no' => $general['no'],
'owner' => $general['owner'],
'name' => $general['name'],
'last_yearmonth' => $year * 100 + $month,
'turntime' => $general['turntime'],
'data' => Json::encode($general)
];
}
function storeOldGeneral(int $no, int $year, int $month){
function storeOldGeneral(int $no, int $year, int $month)
{
$db = DB::db();
$general = $db->queryFirstRow('SELECT * FROM general WHERE `no` = %i', $no);
if(!$general){
if (!$general) {
return;
}
$data = convForOldGeneral($general, $year, $month);
@@ -1197,9 +931,10 @@ function storeOldGeneral(int $no, int $year, int $month){
);
}
function storeOldGenerals(int $nation, int $year, int $month){
function storeOldGenerals(int $nation, int $year, int $month)
{
$db = DB::db();
foreach($db->query('SELECT * FROM general WHERE nation = %i',$nation) as $general){
foreach ($db->query('SELECT * FROM general WHERE nation = %i', $nation) as $general) {
$data = convForOldGeneral($general, $year, $month);
$db->insertUpdate(
'ng_old_generals',
@@ -1209,204 +944,192 @@ function storeOldGenerals(int $nation, int $year, int $month){
}
}
function checkEmperior() {
function checkEmperior()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = $gameStor->getValues(['year', 'month', 'isunited']);
$query = "select nation,name from nation where level>0";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
if ($count != 1 || $admin['isunited'] != 0) {
return;
}
$nation = MYDB_fetch_array($result);
$count = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nation['nation']);
if(!$count){
$admin = $gameStor->getValues(['year', 'month', 'isunited', 'conlimit']);
if ($admin['isunited'] != 0) {
return;
}
$allcount = $db->queryFirstField('SELECT count(city) FROM city');
if ($count != $allcount) {
$remainNations = $db->queryFirstColumn('SELECT nation FROM nation WHERE level > 0 LIMIT 2');
if (!$remainNations || count($remainNations) != 1) {
return;
}
$nationID = $remainNations[0];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$cityCnt = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i', $nationID);
if (!$cityCnt) {
return;
}
if ($cityCnt != count(CityConst::all())) {
return;
}
checkStatistic();
$josaYi = JosaUtil::pick($nation['name'], '이');
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nationID);
$nationName = $nation['name'];
pushNationHistory($nation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일");
$josaYi = JosaUtil::pick($nationName, '이');
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
$gameStor->isunited = 2;
$gameStor->conlimit = $gameStor->conlimit*100;
$gameStor->conlimit = $gameStor->conlimit * 100;
foreach($db->queryFirstColumn('SELECT no FROM general WHERE npc<2 AND age>=%i', GameConst::$minPushHallAge) as $hallGeneralNo){
foreach ($db->queryFirstColumn('SELECT no FROM general WHERE npc<2 AND age>=%i', GameConst::$minPushHallAge) as $hallGeneralNo) {
CheckHall($hallGeneralNo);
}
$query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$query = "select SUM(pop) as totalpop,SUM(pop_max) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityresult);
$pop = "{$city['totalpop']} / {$city['maxpop']}";
$poprate = round($city['totalpop']/$city['maxpop']*100, 2);
$poprate .= " %";
[$totalPop, $totalMaxPop] = $db->queryFirstList('SELECT SUM(pop), SUM(pop_max) FROM city');
$pop = "{$totalPop} / {$totalMaxPop}";
$poprate = round($totalPop / $totalMaxPop * 100, 2). " %";
$chiefs = Util::convertArrayToDict(
$db->query(
'SELECT name,picture,belong,level FROM general WHERE nation=%i AND level >= 5',
$nation['nation']
'SELECT no,name,picture,belong,officer_level FROM general WHERE nation=%i AND officer_level >= 5',
$nationID
),
'level'
'officer_level'
);
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
$oldNationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
$oldNation['generals'] = $oldNationGenerals;
$nationGenerals = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nationID);
$nation['generals'] = $nationGenerals;
$tigers = $db->query('SELECT value, name
$tigers = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "warnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nation['nation']
);// 오호장군
$nationID
); // 오호장군
$tigerstr = join(', ', array_map(function($arr){
$tigerstr = join(', ', array_map(function ($arr) {
$number = number_format($arr['value']);
return "{$arr['name']}{$number}";
}, $tigers));
$eagles = $db->query('SELECT value, name
$eagles = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nation['nation']
);// 건안칠자
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nationID
); // 건안칠자
$eaglestr = join(', ', array_map(function($arr){
$eaglestr = join(', ', array_map(function ($arr) {
$number = number_format($arr['value']);
return "{$arr['name']}{$number}";
}, $eagles));
$log = ["<C>●</>{$admin['year']}{$admin['month']}월: <D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
$query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
$gen = '';
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
$gen .= "{$general['name']}, ";
pushGenLog($general, $log);
$rawGeneralList = $db->query('SELECT no, name, npc, owner FROM general WHERE nation=%i ORDER BY dedication DESC', $nationID);
foreach ($rawGeneralList as $rawGeneral) {
$generalLogger = new ActionLogger($rawGeneral['no'], $nationID, $admin['year'], $admin['month']);
$generalLogger->pushGeneralActionLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일하였습니다.", ActionLogger::YEAR_MONTH);
$generalLogger->flush();
}
$gen = join(', ', array_column($rawGeneral, 'name'));
$nation['type'] = getNationType($nation['type']);
$query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$stat = MYDB_fetch_array($result);
$query = "select count(*) as cnt from general";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_fetch_array($result);
$stat = $db->queryFirstRow('SELECT max(nation_count) as nc, max(gen_count) as gc FROM statistic');
$genCnt = $db->queryFirstField('SELECT count(*) FROM general');
$statNC = "1 / {$stat['nc']}";
$statGC = "{$gencount['cnt']} / {$stat['gc']}";
$statGC = "{$genCnt} / {$stat['gc']}";
$statNation = $db->queryFirstRow('SELECT nation_count,nation_name,nation_hist from statistic where nation_count=%i LIMIT 1', $stat['nc']);
$statGeneral = $db->queryFirstRow('SELECT gen_count,personal_hist,special_hist,aux from statistic order by no desc LIMIT 1');
$query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$statNation = MYDB_fetch_array($result);
$query = "select gen_count,personal_hist,special_hist,aux from statistic order by no desc limit 0,1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$statGeneral = MYDB_fetch_array($result);
$oldNation = $db->queryFirstRow('SELECT * FROM nation WHERE nation=%i', $nation['nation']);
$oldNation['generals'] = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
$oldNation['aux'] = Json::decode($oldNation['aux']);
$nation = $nation;
$nation['generals'] = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=%i', $nation['nation']);
$nation['aux'] = Json::decode($nation['aux']);
$nation['msg'] = $nationStor->notice;
$nation['scout_msg'] = $nationStor->scout_msg;
$nation['aux'] += $nationStor->max_power;
$nation['history'] = getNationHistoryLogAll($nation['nation']);
storeOldGenerals(0, $admin['year'], $admin['month']);
storeOldGenerals($nation['nation'], $admin['year'], $admin['month']);
$db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID,
'nation'=>$nation['nation'],
'data'=>Json::encode($oldNation)
'server_id' => UniqueConst::$serverID,
'nation' => $nation['nation'],
'data' => Json::encode($nation)
]);
$noNationGeneral = $db->queryFirstColumn('SELECT `no` FROM general WHERE nation=0');
$db->insert('ng_old_nations', [
'server_id'=>UniqueConst::$serverID,
'nation'=>0,
'data'=>Json::encode([
'nation'=>0,
'name'=>'재야',
'generals'=>$noNationGeneral
'server_id' => UniqueConst::$serverID,
'nation' => 0,
'data' => Json::encode([
'nation' => 0,
'name' => '재야',
'generals' => $noNationGeneral
])
]);
$nationHistory = DB::db()->queryFirstField('SELECT `history` FROM `nation` WHERE `nation` = %i', $nation['nation']);
$nationHistory = getNationHistoryLogAll($nation['nation']);
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
$serverName = UniqueConst::$serverName;
$db->update('ng_games', [
'winner_nation'=>$nation['nation']
'winner_nation' => $nation['nation']
], 'server_id=%s', UniqueConst::$serverID);
$db->insert('emperior', [
'phase'=>$serverName.$serverCnt.'기',
'server_id'=>UniqueConst::$serverID,
'nation_count'=>$statNC,
'nation_name'=>$statNation['nation_name'],
'nation_hist'=>$statNation['nation_hist'],
'gen_count'=>$statGC,
'personal_hist'=>$statGeneral['personal_hist'],
'special_hist'=>$statGeneral['special_hist'],
'name'=>$nation['name'],
'type'=>$nation['type'],
'color'=>$nation['color'],
'year'=>$admin['year'],
'month'=>$admin['month'],
'power'=>$nation['power'],
'gennum'=>$nation['gennum'],
'citynum'=>$allcount,
'pop'=>$pop,
'poprate'=>$poprate,
'gold'=>$nation['gold'],
'rice'=>$nation['rice'],
'l12name'=>$chiefs[12]['name'],
'l12pic'=>$chiefs[12]['picture'],
'l11name'=>$chiefs[11]['name'],
'l11pic'=>$chiefs[11]['picture'],
'l10name'=>$chiefs[10]['name'],
'l10pic'=>$chiefs[10]['picture'],
'l9name'=>$chiefs[9]['name'],
'l9pic'=>$chiefs[9]['picture'],
'l8name'=>$chiefs[8]['name'],
'l8pic'=>$chiefs[8]['picture'],
'l7name'=>$chiefs[7]['name'],
'l7pic'=>$chiefs[7]['picture'],
'l6name'=>$chiefs[6]['name'],
'l6pic'=>$chiefs[6]['picture'],
'l5name'=>$chiefs[5]['name'],
'l5pic'=>$chiefs[5]['picture'],
'tiger'=>$tigerstr,
'eagle'=>$eaglestr,
'gen'=>$gen,
'history'=>$nationHistory,
'aux'=>$statGeneral['aux']
'phase' => $serverName . $serverCnt . '기',
'server_id' => UniqueConst::$serverID,
'nation_count' => $statNC,
'nation_name' => $statNation['nation_name'],
'nation_hist' => $statNation['nation_hist'],
'gen_count' => $statGC,
'personal_hist' => $statGeneral['personal_hist'],
'special_hist' => $statGeneral['special_hist'],
'name' => $nation['name'],
'type' => $nation['type'],
'color' => $nation['color'],
'year' => $admin['year'],
'month' => $admin['month'],
'power' => $nation['power'],
'gennum' => $nation['gennum'],
'citynum' => $cityCnt,
'pop' => $pop,
'poprate' => $poprate,
'gold' => $nation['gold'],
'rice' => $nation['rice'],
'l12name' => $chiefs[12]['name'],
'l12pic' => $chiefs[12]['picture'],
'l11name' => $chiefs[11]['name'],
'l11pic' => $chiefs[11]['picture'],
'l10name' => $chiefs[10]['name'],
'l10pic' => $chiefs[10]['picture'],
'l9name' => $chiefs[9]['name'],
'l9pic' => $chiefs[9]['picture'],
'l8name' => $chiefs[8]['name'],
'l8pic' => $chiefs[8]['picture'],
'l7name' => $chiefs[7]['name'],
'l7pic' => $chiefs[7]['picture'],
'l6name' => $chiefs[6]['name'],
'l6pic' => $chiefs[6]['picture'],
'l5name' => $chiefs[5]['name'],
'l5pic' => $chiefs[5]['picture'],
'tiger' => $tigerstr,
'eagle' => $eaglestr,
'gen' => $gen,
'history' => JSON::encode($nationHistory),
'aux' => $statGeneral['aux']
]);
$history = ["<C>●</>{$admin['year']}{$admin['month']}월:<Y><b>【통일】</b></><D><b>{$nation['name']}</b></>{$josaYi} 전토를 통일하였습니다."];
pushWorldHistory($history, $admin['year'], $admin['month']);
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
//연감 월결산
LogHistory();
+251 -161
View File
@@ -44,7 +44,7 @@ function getFormattedFileLogAll(string $path){
}
function eraseTnmtFightLogAll(){
foreach(range(0, 49) as $i){
foreach(Util::range(50) as $i){
eraseTnmtFightLog($i);
}
}
@@ -100,185 +100,281 @@ function getAuctionLogRecent(int $count) {
return join('<br>', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $count, 300)));
}
function pushGenLog($general, $log) {
$no = Util::toInt($general['no']);
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $log);
}
function getGenLogRecent(int $no, int $count) {
return join('<br>', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $count, 300)));
}
function pushBatRes($general, $log) {
$no = Util::toInt($general['no']);
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $log);
}
function getBatResRecent(int $no, int $count) {
return join('<br>', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $count, 300)));
}
function pushBatLog($general, $log) {
$no = Util::toInt($general['no']);
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $log);
}
function getBatLogRecent(int $no, int $count) {
return join('<br>', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300)));
}
function pushOldNationStop(int $no, int $nationNo){
$logPrefixList = ['batres', 'gen', 'batlog'];
//DB-based
function formatHistoryToHTML(array $history, ?string $type=null):string{
$result = [];
foreach($logPrefixList as $logPrefix){
$path = __DIR__."/logs/".UniqueConst::$serverID."/{$logPrefix}{$no}.txt";
if(file_exists($path)){
$fileLen = @filesize($path);
if($type){
foreach($history as $seq=>$item){
$result[] = "<div class='log_{$type}' id='log_{$type}_{$seq}' data-seq='{$seq}'>".ConvertLog($item).'</div>';
}
else{
$fileLen = 0;
}
$result[$logPrefix] = $fileLen;
}
$baseStopPath = __DIR__."/logs/".UniqueConst::$serverID."/stop{$no}.txt";
if(file_exists($baseStopPath)){
$oldValues = Json::decode(file_get_contents($baseStopPath));
}
else{
$oldValues = [];
foreach($history as $seq=>$item){
$result[] = '<div>'.ConvertLog($item).'</div>';
}
}
$oldValues[$nationNo] = $result;
file_put_contents($baseStopPath, Json::encode($oldValues, Json::PRETTY));
return join('', $result);
}
//DB-based
function pushNationHistory($nation, ?string $history) {
if(!$history){
return;
}
if(!$nation || !$nation['nation']){
return;
}
$db = DB::db();
$db->update('nation', [
'history'=>$db->sqleval('concat(%s, history)', $history.'<br>')
], 'nation=%i', $nation['nation']);
}
function pushGeneralHistory($me, ?string $history) {
function pushGeneralActionLog(int $generalID, ?array $history, ?int $year=null, ?int $month=null) {
if(!$history){
return;
}
$db = DB::db();
$db->update('general', [
'history'=>$db->sqleval('concat(%s, history)', $history.'<br>')
], 'nation=%i', $me['no']);
}
function getGeneralHistoryAll(int $no) {
$history = DB::db()->queryFirstField('SELECT history FROM general WHERE `no`=%i',$no);
return ConvertLog($history);
}
function pushWorldHistory(?array $history, $year=null, $month=null) {
if(!$history){
return;
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month) {
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
$request = array_map(function($text) use ($year, $month, $generalID) {
return [
'general_id'=>$generalID,
'log_type'=>'action',
'year'=>$year,
'month'=>$month,
'text'=>$text
];
}, array_values($history));
$db->insert('general_record', $request);
}
function getGeneralActionLogRecent(int $generalID, int $count):array{
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`,`text` from general_record WHERE general_id = %i AND log_type = "action" order by id desc LIMIT %i',
$generalID, $count
));
}
function getGeneralActionLogMore(int $generalID, int $startSeq, int $count):array{
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`,`text` from general_record WHERE general_id = %i AND log_type = "action" AND id < %i order by id desc LIMIT %i',
$generalID, $startSeq, $count
));
}
function pushBattleResultLog(int $generalID, array $history, ?int $year=null, ?int $month=null) {
if(!$history){
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month, $generalID) {
return [
'general_id'=>$generalID,
'log_type'=>'battle_brief',
'year'=>$year,
'month'=>$month,
'text'=>$text
];
}, array_values($history));
$db->insert('general_record', $request);
}
function getBattleResultRecent(int $generalID, int $count):array {
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`, `text` from general_record WHERE general_id = %i AND log_type = "battle_brief" order by id desc LIMIT %i',
$generalID, $count
));
}
function getBattleResultMore(int $generalID, int $startSeq, int $count):array {
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`, `text` from general_record WHERE general_id = %i AND log_type = "battle_brief" AND id < %i order by id desc LIMIT %i',
$generalID, $startSeq, $count
));
}
function pushBattleDetailLog(int $generalID, array $history, ?int $year=null, ?int $month=null) {
if(!$history){
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month, $generalID) {
return [
'general_id'=>$generalID,
'log_type'=>'battle',
'year'=>$year,
'month'=>$month,
'text'=>$text
];
}, array_values($history));
$db->insert('general_record', $request);
}
function getBattleDetailLogRecent(int $generalID, int $count):array {
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`,`text` from general_record WHERE general_id = %i AND log_type = "battle" order by id desc LIMIT %i',
$generalID, $count
));
}
function getBattleDetailLogMore(int $generalID, int $startSeq, int $count):array {
$db = DB::db();
return Util::convertPairArrayToDict($db->queryAllLists(
'SELECT `id`,`text` from general_record WHERE general_id = %i AND log_type = "battle" AND id < %i order by id desc LIMIT %i',
$generalID, $startSeq, $count
));
}
function pushGeneralHistoryLog(int $generalID, ?array $history, $year=null, $month=null) {
if(!$history){
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month, $generalID) {
return [
'general_id'=>$generalID,
'log_type'=>'history',
'year'=>$year,
'month'=>$month,
'text'=>$text
];
}, array_values($history));
$db->insert('general_record', $request);
}
function getGeneralHistoryLogAll(int $generalID):array {
$db = DB::db();
return $db->queryFirstColumn(
'SELECT `text` from general_record WHERE general_id = %i AND log_type = "history" order by id desc',
$generalID
);
}
function pushNationHistoryLog(int $nationID, ?array $history, ?int $year=null, ?int $month=null) {
if(!$history){
return;
}
if(!$nationID){
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month, $nationID) {
return ['nation_id'=>$nationID, 'year'=>$year, 'month'=>$month, 'text'=>$text];
}, array_values($history));
$db->insert('world_history', $request);
}
function getWorldHistoryRecent(int $count) {
function getNationHistoryLogAll(int $nationID):array {
$db = DB::db();
$texts = [];
foreach($db->queryFirstColumn('SELECT `text` from world_history order by id desc limit %i', $count) as $text){
$texts[] = ConvertLog($text);
}
return join('<br>', $texts);
}
function getWorldHistoryWithDate($year, $month) {
$db = DB::db();
$texts = [];
foreach(
$db->queryFirstColumn(
'SELECT `text` from world_history where year = %i and month = %i order by id desc',
$year,
$month
) as $text
){
$texts[] = ConvertLog($text);
}
if(!$texts){
return ConvertLog("<C>●</>{$year}{$month}월: 기록 없음");
}
return join('<br>', $texts);
return $db->queryFirstColumn(
'SELECT `text` from world_history WHERE nation_id = %i order by id desc',
$nationID
);
}
function pushGeneralPublicRecord(?array $history, $year=null, $month=null) {
function pushGlobalHistoryLog(?array $history, $year=null, $month=null) {
if(!$history){
return;
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month) {
return ['year'=>$year, 'month'=>$month, 'text'=>$text];
return ['nation_id'=>0, 'year'=>$year, 'month'=>$month, 'text'=>$text];
}, array_values($history));
$db->insert('general_public_record', $request);
$db->insert('world_history', $request);
}
function getGeneralPublicRecordRecent($count) {
function getGlobalHistoryLogRecent(int $count):array {
$db = DB::db();
$texts = [];
foreach(
$db->queryFirstColumn(
'SELECT `text` from general_public_record order by id desc limit %i',
$count
) as $text
){
$texts[] = ConvertLog($text);
}
return join('<br>', $texts);
return $db->queryFirstColumn('SELECT `text` from world_history WHERE nation_id = 0 order by id desc limit %i', $count);
}
function getGeneralPublicRecordWithDate($year, $month) {
function getGlobalHistoryLogWithDate(int $year, int $month):array {
$db = DB::db();
$texts = [];
foreach(
$db->queryFirstColumn(
'SELECT `text` from general_public_record where year = %i and month = %i order by id desc',
$year,
$month
) as $text
){
$texts[] = ConvertLog($text);
}
$texts = $db->queryFirstColumn(
'SELECT `text` from world_history where nation_id = 0 AND year = %i and month = %i order by id desc',
$year,
$month
);
if(!$texts){
return ConvertLog("<C>●</>{$month}월: 기록 없음");
return ["<C>●</>{$year}{$month}월: 기록 없음"];
}
return join('<br>', $texts);
return $texts;
}
function pushGlobalActionLog(?array $history, ?int $year=null, ?int $month=null) {
if(!$history){
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month) {
return ['general_id'=>0, 'log_type'=>'history', 'year'=>$year, 'month'=>$month, 'text'=>$text];
}, array_values($history));
$db->insert('general_record', $request);
}
function getGlobalActionLogRecent(int $count):array {
$db = DB::db();
return $db->queryFirstColumn(
'SELECT `text` from general_record WHERE general_id = 0 AND log_type = "history" order by id desc limit %i',
$count
);
}
function getGlobalActionLogWithDate(int $year, int $month):array {
$db = DB::db();
$texts = $db->queryFirstColumn(
'SELECT `text` from general_record where general_id = 0 AND log_type = "history" AND year = %i and month = %i order by id desc',
$year,
$month
);
if(!$texts){
return ["<C>●</>{$month}월: 기록 없음"];
}
return $texts;
}
function LogHistory($isFirst=0) {
@@ -288,7 +384,6 @@ function LogHistory($isFirst=0) {
$gameStor = KVStorage::getStorage($db, 'game_env');
$obj = $gameStor->getValues(['startyear', 'year', 'month']);
//TODO: 새롭게 추가할 지도 값 받아오는 함수를 이용하여 재구성
$map = getWorldMap([
'year'=>null,
'month'=>null,
@@ -309,43 +404,38 @@ function LogHistory($isFirst=0) {
}
}
$startYear = $obj['startyear'];
$year = $map['year'];
$month = $map['month'];
$map_json = Json::encode($map);
$log = getWorldHistoryWithDate($year, $month);
$genlog = getGeneralPublicRecordWithDate($year, $month);
$nationStr = "";
$powerStr = "";
$genStr = "";
$cityStr = "";
$globalHistory = getGlobalHistoryLogWithDate($year, $month);
$globalAction = getGlobalActionLogWithDate($year, $month);
foreach($db->query('select nation,color,name,power,gennum from nation where level>0 order by power desc') as $nation){
$cityCount = $db->queryFirstField('select count(*) from city where nation = %i',$nation['nation']);
$nations = getAllNationStaticInfo();
$nations[0] = getNationStaticInfo(0);
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
$powerStr .= "{$nation['power']}<br>";
$genStr .= "{$nation['gennum']}<br>";
$cityStr .= "$cityCount<br>";
foreach($db->query('SELECT name, nation FROM city') as $city){
$cityNationID = $city['nation'];
if(!key_exists('cities', $nations[$cityNationID])){
$nations[$cityNationID]['cities'] = [];
}
$nations[$cityNationID]['cities'][] = $city['name'];
}
usort($nations, function(array $lhs, array $rhs){
return -($lhs['power']<=>$rhs['power']);
});
if(STEP_LOG) pushStepLog(TimeUtil::now().', contents collected');
$db->insert('history', [
$db->insert('ng_history', [
'server_id' => UniqueConst::$serverID,
'year' => $year,
'month' => $month,
'map' => $map_json,
'log' => $log,
'genlog' => $genlog,
'nation' => $nationStr,
'power' => $powerStr,
'gen' => $genStr,
'city' => $cityStr
'map' => Json::encode($map),
'global_history' => Json::encode($globalHistory),
'global_action' => Json::encode($globalAction),
'nations' => Json::encode($nations),
]);
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Finish');
+1 -1
View File
@@ -33,7 +33,7 @@ function getHistoryMap($year, $month, ?string $serverID=null){
$serverID = UniqueConst::$serverID;
}
$map = DB::db()->queryFirstField('SELECT map FROM history WHERE server_id = %s AND year=%i and month=%i',
$map = DB::db()->queryFirstField('SELECT map FROM ng_history WHERE server_id = %s AND year=%i and month=%i',
$serverID,
$year,
$month);
+5 -4
View File
@@ -1,13 +1,14 @@
<?php
namespace sammo;
function getMailboxList(){
function getMailboxList()
{
$generalNations = [];
foreach(DB::db()->query('select `no`, `name`, `nation`, `level`, `npc`, `permission`, `penalty` from `general` where `npc` < 2') as $general)
foreach(DB::db()->query('select `no`, `name`, `nation`, `officer_level`, `npc`, `permission`, `penalty` from `general` where `npc` < 2') as $general)
{
[$generalID, $generalName, $nationID, $level, $npc] = [$general['no'], $general['name'], $general['nation'], $general['level'], $general['npc']];
[$generalID, $generalName, $nationID, $officerLevel, $npc] = [$general['no'], $general['name'], $general['nation'], $general['officer_level'], $general['npc']];
if(!isset($generalNations[$nationID])){
$generalNations[$nationID] = [];
}
@@ -15,7 +16,7 @@ function getMailboxList(){
$obj = [$generalID, $generalName, 0];
$permission = checkSecretPermission($general, false);
if($level == 12){
if($officerLevel == 12){
$obj[2] |= 1;
}
+4 -4
View File
@@ -4,7 +4,7 @@ namespace sammo;
/**
* 내정 커맨드 사용시 성공 확률 계산
*
* @param array $general 장수 정보
* @param General $general 장수 정보
* @param string $type 내정 커맨드 타입, 'leadership' = 통솔 기반, 'strength' = 무력 기반, 'intel' = 지력 기반
*
* @return array 계산된 실패, 성공 확률 ('success' => 성공 확률, 'fail' => 실패 확률)
@@ -49,10 +49,10 @@ function CriticalRatioDomestic(General $general, string $type) {
);
}
function calcLeadershipBonus($generalLevel, $nationLevel):int{
if($generalLevel == 12) {
function calcLeadershipBonus($officerLevel, $nationLevel):int{
if($officerLevel == 12) {
$lbonus = $nationLevel * 2;
} elseif($generalLevel >= 5) {
} elseif($officerLevel >= 5) {
$lbonus = $nationLevel;
} else {
$lbonus = 0;

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