Compare commits

...
431 Commits
Author SHA1 Message Date
Hide_D 77a496baa7 암행부 추가 확장 2018-07-28 02:38:19 +09:00
Hide_D 86e863de09 암행부 너비 추가 수정 2018-07-28 02:33:42 +09:00
Hide_D c2cfd217c2 암행부 턴 표기 수정 2018-07-28 02:02:50 +09:00
Hide_D f2366a61b0 IE11 모병창 UI 버그 수정 2018-07-28 01:58:35 +09:00
Hide_D 9959393dee IE 메인페이지 깨짐 일부 수정 2018-07-28 01:38:53 +09:00
Hide_D 16facf98f1 submit_btn 버그 수정 2018-07-28 01:32:00 +09:00
Hide_D bc8ce8832a 모/징병 페이지 변경 2018-07-28 01:24:23 +09:00
Hide_D 20bcf960ef 로그인 페이지를 모바일에서도 조금 더 잘보이게 변경 2018-07-27 18:56:01 +09:00
Hide_D 5cecd3e995 로그인 페이지가 약관 등에 가리지 않도록 변경 2018-07-27 18:47:48 +09:00
Hide_D d7ead25ea4 1턴에 어쩌다 휴식턴이 입력되는 버그 수정 2018-07-27 18:14:16 +09:00
Hide_D 75c0c375d1 장수 호칭 변경 2018-07-27 03:03:25 +09:00
Hide_D 5db4913292 세력일람 장수 표기순 변경 2018-07-27 02:39:26 +09:00
Hide_D a6a53b1d0d Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-07-27 02:34:02 +09:00
Hide_D 81a0c0e120 세력일람 업데이트 2018-07-27 02:33:56 +09:00
Hide_D 0dae71a644 회피 디버그 수정 2018-07-26 17:13:27 +09:00
Hide_D f8eedaa3ea 전투 디버그 2018-07-26 15:40:46 +09:00
Hide_D ce2d97a7e7 전투 회피 코드 디버깅 적용 2018-07-26 15:39:34 +09:00
Hide_D 2cb570eaca foreach reference loop 버그 2018-07-26 00:12:12 +09:00
Hide_D c8c4352957 기존 도시/암행부 스크립트 통합. 2018-07-25 23:58:58 +09:00
Hide_D a311db4555 서버 관리 창에 에러 로그 보기 버튼 추가 2018-07-23 23:44:48 +09:00
Hide_D 05c515b2da j_map_history에서 fallback arg 제거 2018-07-23 23:30:53 +09:00
Hide_D c1acf2b0fe Trace의 모든 내용이 나오도록 수정 2018-07-23 23:26:32 +09:00
Hide_D 803a2407eb 에러 로그 보기 기능 추가 2018-07-23 23:19:39 +09:00
Hide_D a87945d1fb 에러 로그 업데이트 2018-07-23 22:54:06 +09:00
Hide_D 30793e68df 에러 로그용 클래스 설정 2018-07-23 22:50:22 +09:00
Hide_D 9c666bf7a9 FileDB 클래스 추가 2018-07-23 22:37:30 +09:00
Hide_D eff1dd7c34 라이브러리 업데이트 catfan/medoo 추가 2018-07-23 21:27:26 +09:00
Hide_D e79a33ebb0 NPC 군주의 호전성 추가(?) 2018-07-23 02:56:33 +09:00
Hide_D cb0adfdeaf npc attackable 보완 2018-07-23 02:50:58 +09:00
Hide_D 6b135c343c NPC의 선포 대상을 '국력'이 낮은 국가에 더 잘 하도록 변경 2018-07-23 01:49:43 +09:00
Hide_D 6c92db524b 선포 코드를 조금더 직관적으로 수정 2018-07-23 01:28:34 +09:00
Hide_D b8dfd1c041 징,모병시 민심이 떨어지지 않는 버그 수정 2018-07-22 15:39:53 +09:00
Hide_D 54d6347c1d 사령부 휴식 커맨드가 제대로 안보이는 문제 해결 2018-07-22 15:10:37 +09:00
Hide_D 4ea6e90600 연감에 serverID가 잘못된 경우 해결 2018-07-22 03:37:14 +09:00
Hide_D 4c7628a247 부대편성의 '집합' 확인 코드가 하드코딩인 부분 수정 2018-07-22 03:28:10 +09:00
revofpla 6c7334155a 필살확률 무조건 최소 50%인 버그 픽스 2018-07-21 13:49:15 +09:00
revofpla 480e3ea974 체섭 버그로 인한 핫픽스 1차
- 징병 숙련 100배 문제
 - 모병 비용 2배로 계산 안되는 문제
2018-07-21 13:12:52 +09:00
Hide_D 1f639a5bc6 애니집결 시나리오 번호 변경 2018-07-20 19:53:21 +09:00
Hide_D ccf3b07c3a 애니집결 업데이트 2018-07-20 19:51:11 +09:00
Hide_D d8508f2b72 충차가 1등급 되기만 하면 쓸 수 있던 버그 수정 2018-07-20 10:44:14 +09:00
Hide_D 5e13961ec8 protected인 자료에 접근해서 발생하는 문제 수정 2018-07-20 10:05:08 +09:00
Hide_D 80b1139371 버튼 너비 수정 2018-07-20 09:12:37 +09:00
Hide_D 635b41765c 계정 관리 창 살짝 넓힘 2018-07-20 09:08:04 +09:00
Hide_D 4b03686aa2 숙련 단련 버그 수정 2018-07-20 09:01:50 +09:00
Hide_D bfb0d8d639 message 템플릿 버그 수정 2018-07-20 00:06:03 +09:00
Hide_D 93d4a0211d 등용장의 경우에도 누를수 없는 경우 수정 2018-07-19 23:59:27 +09:00
Hide_D cd31bc69ef 추방 버그 수정 2018-07-19 23:13:05 +09:00
Hide_D 4a7b84d6de 외교 서신 레벨 지정 2018-07-19 22:19:26 +09:00
Hide_D 3142714c11 리셋 첫 해에는 추방해도 제약 없음 2018-07-19 21:25:00 +09:00
Hide_D 7ea10416a9 임관 권유 메시지 창 2018-07-19 21:03:42 +09:00
Hide_D 3e427db0f1 relativeYear에 음수 불가 2018-07-19 20:53:46 +09:00
Hide_D 9f7b18d294 시작 시 develcost가 0인 버그 해결 2018-07-19 20:50:29 +09:00
Hide_D 9af0e351b8 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-07-19 20:06:51 +09:00
Hide_D 5c6aa2340d 공백지 시나리오에 특기 연령 문제 해결 2018-07-19 20:06:39 +09:00
Hide_D 4424ec48cf 전투시 병종 명 버그 수정 2018-07-19 10:59:01 +09:00
Hide_D 61be34581e 반복 버튼 키움 2018-07-19 02:33:59 +09:00
Hide_D 731978356d Credit 양식 추가 2018-07-19 02:29:03 +09:00
Hide_D d5223ad1ab 리셋 시 사령부 Command encode가 제대로 이뤄지지 않았던 버그 수정 2018-07-19 01:42:16 +09:00
Hide_D 7cfdfab198 연감에서도 비교적 빠르게 동작하도록 설정 2018-07-19 01:31:13 +09:00
Hide_D eb70e51ac1 실시간 맵은 캐싱하도록 처리 2018-07-19 01:21:00 +09:00
Hide_D 1d48e7c7ae 영웅 난무 220 제목 변경 2018-07-19 00:51:47 +09:00
Hide_D d6fc9fc8c3 지도가 들어간 곳에 부트스트랩 추가 2018-07-19 00:46:15 +09:00
Hide_D 8ada0976fe 연감에 부트스트랩 없는 문제 해결 2018-07-19 00:44:01 +09:00
Hide_D 389ff5e9a4 지도에 도시명 켬끔 추가 2018-07-19 00:39:05 +09:00
Hide_D 5179e0228c 최대 스탯 표기 변경 2018-07-18 23:44:41 +09:00
Hide_D 2268526314 내 정보 페이지 툴팁 안나오는 문제 2018-07-18 23:14:52 +09:00
Hide_D db4bc0eafe 도시 좌표 업데이트 2018-07-18 23:11:02 +09:00
Hide_D 6edaf79df1 출력 병종 에러 2018-07-18 22:26:15 +09:00
Hide_D 79cead3b59 도시 css contain 2018-07-18 22:24:22 +09:00
Hide_D db1b12b85c 훈련에서 사기 하락 문구 삭제 2018-07-18 16:54:25 +09:00
Hide_D 9360b7675a 천인 강림 극 소형맵 2018-07-18 14:23:12 +09:00
Hide_D 9c82fd17fe 훈련시 사기 감소하지 않음 2018-07-18 11:18:33 +09:00
Hide_D 3a4665e473 맵 업데이트 2018-07-18 10:46:33 +09:00
Hide_D b34f4648ee 호로->사수, 몇몇 소성들 다시 진,수로 롤백 2018-07-18 10:41:06 +09:00
Hide_D 0de786d2ea 쿼리 받아오는 것 수정 2018-07-18 09:28:53 +09:00
Hide_D ec7aafa1ff history 받아오는 버그 수정 2018-07-18 09:28:10 +09:00
Hide_D 30c219716d 오타 수정 2018-07-18 09:08:20 +09:00
Hide_D 5dd47cb89b 오타수정 2018-07-18 09:05:36 +09:00
Hide_D abe856bd3f 버그 수정. 오타 수정 2018-07-18 08:24:09 +09:00
Hide_D 6ecb009466 오타 수정 2018-07-18 04:51:19 +09:00
Hide_D 3b4b2383a8 $me 버그 2018-07-18 04:50:17 +09:00
Hide_D 4ddd46c4a2 모병코드 2018-07-18 04:49:30 +09:00
Hide_D 69ec2469b4 쌀 검사 코드 2018-07-18 04:47:28 +09:00
Hide_D 5789af801a 징모병창 코스트 2018-07-18 04:44:12 +09:00
Hide_D 7171b6302b formattext 2018-07-18 04:41:08 +09:00
Hide_D 51d4818b1e gameStor 값 버그 2018-07-18 04:40:18 +09:00
Hide_D 1c2875e7fc 모병창 수정 2018-07-18 04:37:00 +09:00
Hide_D 5048a88310 징병창 우선 부활 2018-07-18 04:30:54 +09:00
Hide_D aef37f4362 징모병창 변수명 에러 2018-07-18 04:18:15 +09:00
Hide_D d04641041b 아이템 return 값 수정 2018-07-18 04:15:28 +09:00
Hide_D 67b2ccea86 급한대로 도시명 띄움 2018-07-18 04:10:07 +09:00
Hide_D 5ff9ca3c99 miniche가 최신 버전이 아닌 버그 수정 2018-07-18 03:44:32 +09:00
Hide_D fe55df8b2f 버그 체크 2018-07-18 03:41:45 +09:00
Hide_D 457f605898 버그 수정 2018-07-18 03:32:47 +09:00
Hide_D 0f2625133f 미니체 basemap 2018-07-18 03:05:36 +09:00
Hide_D fa34dbdf6f 초기 버그 수정 2018-07-18 03:04:59 +09:00
Hide_D 050913b0b4 영난 1c 2018-07-18 02:58:56 +09:00
Hide_D a47e47d42c 도시 정보 업데이트 2018-07-18 02:57:08 +09:00
Hide_D 43d994b59a credit 링크 추가 2018-07-18 02:31:15 +09:00
Hide_D e8204d46ce 커스텀 맵 준비 2018-07-18 00:25:51 +09:00
Hide_D fece659cfb 변수명 통일 2018-07-16 02:56:52 +09:00
Hide_D 695265b299 병종 코드를 GameUnitConst, GameUnitDetail에 기반하도록 변경 2018-07-16 02:54:47 +09:00
Hide_D b652ed0b33 병종 테이블에 상성 값 확장 2018-07-16 01:43:11 +09:00
Hide_D 9a641552e4 전투 코드 반영 중 2018-07-15 01:46:29 +09:00
Hide_D 3d18aeb5bc 징병, 모병 form 수정 2018-07-15 01:01:36 +09:00
Hide_D b545afce50 모병, 징병 코드 재 구현. 능력치 상승/감소 코드 재구현 2018-07-14 22:41:10 +09:00
Hide_D 8fca98c0c9 ActionLogger rollback 추가 2018-07-14 18:23:31 +09:00
Hide_D 0a98c71dfe 현재까지 작업물 보강, 모.징병 페이지 개선 중 2018-07-14 18:17:37 +09:00
Hide_D ed75f39094 ActionLogger 보강 2018-07-14 18:17:18 +09:00
Hide_D 456245f23a ActionLogger 추가 2018-07-14 17:53:08 +09:00
Hide_D b4529c9338 병종값 변경 2018-07-13 00:41:56 +09:00
Hide_D 0ca7a8ab8a 병종 테이블에 '병종 타입' 지정, 턴 커맨드를 json array로 변경 2018-07-13 00:12:12 +09:00
Hide_D 02f2209e8f GameConst에 mapName과 unitSet추가 2018-07-12 01:59:32 +09:00
Hide_D fb72d02912 d_setting 디렉도리 보관 방식 변경 2018-07-12 01:56:46 +09:00
Hide_D 665fb25fc1 기본 파일 추가 2018-07-12 01:02:28 +09:00
Hide_D 742c3c7156 맵 규격 재 정의 2018-07-12 01:00:24 +09:00
Hide_D 637dbbba0d 새 지도 준비를 위해 커밋 2018-07-12 00:20:43 +09:00
Hide_D f2a3bc4626 메시지함 높이 고정을 최소 높이로 변경 2018-07-11 23:49:57 +09:00
Hide_D e8ffa44544 메시지함 사라지는 버그 수정? 2018-07-11 23:04:38 +09:00
Hide_D bc09287666 도움 주신 분 임시 삭제. 나중에 Credit으로 되살리기로 2018-07-11 22:37:36 +09:00
Hide_D 392d9055fe td tr 되돌려놓음 2018-07-11 22:18:08 +09:00
Hide_D 0ee833d7ae list 일부 수정. tfoot 안에 tr td없는거 수정 2018-07-11 22:17:03 +09:00
Hide_D 3074bc00d7 지도 표기에서 box 표기 문제로 일부 수정 2018-07-11 22:04:20 +09:00
Hide_D cb6fb590c4 귀병, 환술 설명 수정 2018-07-11 21:53:13 +09:00
Hide_D a7270b2cd2 장수 성격, 아이템 설명 툴팁 추가 2018-07-11 21:50:01 +09:00
Hide_D 0d925af065 tooltip html trim 추가 2018-07-11 20:52:46 +09:00
Hide_D 7c7991e8ae 특기 없을 때 텍스트 수정 2018-07-11 20:51:13 +09:00
Hide_D 54461b6ea4 특기가 없는 경우에도 tooltip 띄우도록 2018-07-11 17:03:47 +09:00
Hide_D 6a17497fbd 빙의 시에도 전특 표기 2018-07-11 03:27:27 +09:00
Hide_D 84f18aa4b6 특기 전 페이지에 반영 2018-07-11 03:03:52 +09:00
Hide_D 73ab38563f 특기 마우스 오버 1차 적용 2018-07-11 02:47:31 +09:00
Hide_D 1f2b40e4d4 message form box sizing 변경. 메인 페이지에 bootstrap css 적용 2018-07-11 01:31:59 +09:00
Hide_D 1d920c5935 darkly 적용 2018-07-11 01:19:24 +09:00
Hide_D 037a1e9c0c 툴팁 준비 2018-07-11 01:15:22 +09:00
Hide_D 87e324d4d9 bootstrap 최신 버전으로 2018-07-11 01:15:02 +09:00
Hide_D d1e9b489e3 공성 전특 버그 수정. 전특 설명을 위한 텍스트 추가 2018-07-11 00:53:10 +09:00
Hide_D 34f1d538d1 세력도시에서 n장, m장 임명이 불가능한 버그 수정 2018-07-07 05:13:22 +09:00
Hide_D fb8d2a2e01 구버전 첩보 마이그레이션시 지도 표기 버그 수정 2018-07-07 04:58:19 +09:00
Hide_D 837db5183e 첩보를 join '|' 에서 json dict로 변경 2018-07-07 04:39:44 +09:00
Hide_D a556877a17 현재 진행중인 깃수인 경우 장수가 안 죽었으면 안나타나는 문제 해결 2018-07-05 00:24:03 +09:00
Hide_D bcbd6dc4db 왕조일람 버그 수정 2018-07-05 00:12:34 +09:00
Hide_D 41f7ad8d75 왕조 일람에 아무것도 없을 때 '현재'가 안보이는 문제 해결 2018-07-05 00:10:33 +09:00
Hide_D 258d4b28da 왕조 일람에 현재 국가 표시 2018-07-05 00:05:48 +09:00
Hide_D 31e900c422 메시지 버그 수정 2018-07-03 22:09:07 +09:00
Hide_D 7b1a76871a parseJsonPost 기반 동작 포기 2018-07-03 21:35:17 +09:00
Hide_D c6f3e7672f 국가 정보 빈칸 2018-07-03 20:48:34 +09:00
Hide_D 540c31903c 월마다 최대 국력, 최대 병력, 최대 도시 수를 계산하는 코드 추가. ng_old_nations에도 반영 2018-07-03 20:43:14 +09:00
Hide_D 3e5262d7a3 nation 테이블에 aux 추가 2018-07-03 20:09:36 +09:00
Hide_D 2b36ffef45 왕조일람 임시 갱신 2018-07-03 06:59:27 +09:00
Hide_D 4c25d2275c 버튼 대체 css 추가. form 일부 제거 2018-07-03 02:55:45 +09:00
Hide_D 6c66fcdfc3 명예의 전당 시나리오명 제대로 표기 안되는 문제 해결 2018-07-02 19:45:41 +09:00
Hide_D aaa972d767 명예의 전당 배경색 오류 수정 2018-07-02 19:15:43 +09:00
Hide_D 45c8538426 빙의 해제시 닉네임 초기화 2018-07-02 03:23:20 +09:00
Hide_D 95702724a9 베팅수익률 오타 2018-07-01 15:34:20 +09:00
Hide_D 98c4d3853c 명장 일람 레퍼런스 값 미표기 문제 해결 2018-07-01 15:30:15 +09:00
Hide_D 7c91143f39 명장일람에서 제약 조건 수정 2018-07-01 15:27:41 +09:00
Hide_D 56e6f57568 회원 가입시 링크 변경 2018-07-01 03:58:47 +09:00
Hide_D ccab456679 세력도시 스크립트 동작 안하는 문제 해결 2018-07-01 01:35:47 +09:00
Hide_D 5af000ca43 html 5 비표준 스크립트 제거 2018-07-01 01:28:35 +09:00
Hide_D 354c8f04ae IE=edge 대소문자 주의 2018-06-30 01:52:07 +09:00
Hide_D 3fbd336b45 Revert "컬러 프로필 적용"
This reverts commit 4f279c49c8.
2018-06-30 01:32:46 +09:00
Hide_D 3c0b86a322 컬러 프로필 적용 2018-06-30 01:26:23 +09:00
Hide_D fca4b69d5a 범장 -> 만능장 2018-06-30 01:18:52 +09:00
Hide_D ce62072761 확장 스크립트를 위해 태그 일부 정리 2018-06-30 00:28:45 +09:00
Hide_D 93dd7a8478 extractMissingPostToGlobals 호환을 위해 server_id 인자명 변경 2018-06-29 16:23:48 +09:00
Hide_D 02fb84a312 font boosting 약화 2018-06-29 14:46:06 +09:00
Hide_D f3e68989e5 뷰포트 추가 지정 2018-06-29 14:41:09 +09:00
Hide_D 468050a9ce 뷰포트 크기 변경 2018-06-29 14:37:30 +09:00
Hide_D f37a602da3 모든 웹 페이지에 viewport 지정 2018-06-29 14:32:59 +09:00
Hide_D 2979691d7e 기본 폰트 크기 지정 2018-06-29 14:20:20 +09:00
Hide_D 72920a0432 unset대신 []로 초기화 2018-06-29 09:35:24 +09:00
Hide_D e81075ef04 history 함수 인자 제한 완화 2018-06-29 09:28:58 +09:00
Hide_D df1a99d877 기본 폰트 지정 2018-06-29 09:16:40 +09:00
Hide_D 10e825dc9f 예약 테이블 점검. 스키마 수정 2018-06-29 01:50:28 +09:00
Hide_D 07ba7933fb 토너먼트 inf 버그 수정 2018-06-29 01:25:43 +09:00
Hide_D 3059eac0fd jquery 버전 업데이트 2018-06-29 01:22:03 +09:00
Hide_D aa33aa6d4f Json 에러시 에러 표기하도록 2018-06-29 00:30:05 +09:00
Hide_D 0a1cdeeaa3 세력일람 코드 변경 2018-06-28 14:16:38 +09:00
Hide_D e4bef47b7e 세력일람 연동 2018-06-28 14:14:56 +09:00
Hide_D f551f994b5 세력도시 코드 일단 통합 2018-06-28 13:57:21 +09:00
Hide_D 4b7a3af691 IE에서 카카오 2018-06-28 13:39:58 +09:00
Hide_D 6f88a80118 randBool이 아니라 randF 써서 생기는 버그 수정 2018-06-28 01:57:41 +09:00
Hide_D e03715ee46 천통 안되는 버그 수정 2018-06-28 00:28:00 +09:00
Hide_D aafe6d8863 천통시 저장되는 데이터 변경 2018-06-27 03:43:01 +09:00
Hide_D 47005483cd 버그 수정 2018-06-27 03:05:39 +09:00
Hide_D 378075955a 서버 오픈시 천통국 체크가 이상한 버그 수정 2018-06-27 03:04:54 +09:00
Hide_D 2059797904 사망, 천통시 장수를 ng_old_generals에 보관 2018-06-27 02:53:58 +09:00
Hide_D 8c711242a9 왕조 일람에 연감을 볼 수 있도록 통합 2018-06-27 02:12:59 +09:00
Hide_D 481894c89b 모든 국가 멸망 케이스에 ng_old_nations 백업 추가 2018-06-27 01:55:28 +09:00
Hide_D ba53275322 천통시 깃수 자동 표기 2018-06-27 01:49:46 +09:00
Hide_D cfe2b4c1bd 사소한 코드 수정 2018-06-27 01:34:11 +09:00
Hide_D 60e83f8324 오타 수정 2018-06-27 01:26:02 +09:00
Hide_D ceac040d82 명전에 0 이하는 안받도록 변경 2018-06-27 01:25:50 +09:00
Hide_D 89d400c81a 연감 월 표기 버그 수정 2018-06-27 01:22:16 +09:00
Hide_D 4cf7bca399 왕조 일람에서 서버 정보와 국가 정보를 보관하도록 변경 2018-06-27 01:14:34 +09:00
Hide_D 761441622e 왕조일람 '전체보기' 기능 살림 2018-06-26 23:05:04 +09:00
Hide_D 1b814abf0b 천통 시 왕조 일람용 테이블에 server_id 기록. 연감에 server_id로 이전 연감 조회기능 추가 2018-06-26 23:01:43 +09:00
Hide_D 62a2147e33 천통국 정상 추가 2018-06-26 22:45:47 +09:00
Hide_D 246dff9c87 명장일람 버그? 2018-06-26 16:27:51 +09:00
Hide_D 50494beb27 명장 일람 보정 시도 2018-06-26 16:21:47 +09:00
Hide_D ce3b3ebfd8 명장 일람, 설전 승률 % 표기 오류 2018-06-26 16:18:58 +09:00
Hide_D 213090c32e 오타 수정 2018-06-26 09:45:15 +09:00
Hide_D adb8668197 크롬과 파이어폭스에 최적화 2018-06-26 09:44:26 +09:00
Hide_D 0023677003 임관 권유문 길이 제한 2018-06-26 04:13:41 +09:00
Hide_D 0b19a37ad4 초반 3년 수뇌 임명 방식 변경 2018-06-26 03:52:17 +09:00
Hide_D 9f34ae5d28 천통시 재야 장수도 저장 2018-06-26 03:33:56 +09:00
Hide_D 6f07b5cf08 ng_games에 시나리오명 남도록 수정 2018-06-26 03:20:57 +09:00
Hide_D 0f39431157 chmod 재설정 2018-06-26 03:19:47 +09:00
Hide_D bc1a470e64 디렉토리 권한 문제 해결 2018-06-26 03:15:38 +09:00
Hide_D 09e24f5684 ng_games 누락분 추가 2018-06-26 03:10:50 +09:00
Hide_D 2f27ea4c8a schema 값 꼬이는 문제 해결 2018-06-26 03:06:34 +09:00
Hide_D d09aba70b7 천통시에도 ng_old_nations에 데이터가 저장되도록 변경 2018-06-26 03:00:02 +09:00
Hide_D 69b0a80684 명장 일람, 명예의 전당 최종 개선 2018-06-26 02:36:20 +09:00
Hide_D 48f0c56a9e 국가 멸망시 국가 정보 백업 2018-06-26 00:47:54 +09:00
Hide_D 83833a3693 등용장 및 메시지 일괄 전송 TODO 해결 2018-06-26 00:45:31 +09:00
Hide_D 18429d52d4 명장 일람, 명예의 전당 코드 재구현. 연감 등에 이전 국가 기록 남기도록 설정 2018-06-26 00:32:43 +09:00
Hide_D 58cc90083b 서버 별명에 연월일 추가 2018-06-25 16:08:19 +09:00
Hide_D 2772161144 왕조 일람 테이블 구조 변경. 2018-06-25 01:53:16 +09:00
Hide_D 0e95259b14 게임 오픈 시 logs에 서브 디렉토리를 사용하도록 변경 2018-06-25 01:45:23 +09:00
Hide_D 3d9f38f1e3 건국 등 문자열 입력 변경 2018-06-25 00:46:07 +09:00
Hide_D ba3accd834 스페이스 바 등 몇몇 문자열 가능하게 처리 & 문자열 보정 2018-06-24 04:44:34 +09:00
Hide_D 0786e40ebd 국방 표기 변경 2018-06-24 04:18:54 +09:00
Hide_D 8a56393159 임관 권유 메시지를 템플릿으로 이동 2018-06-24 04:12:19 +09:00
Hide_D 5ca8a6ecfa purifier 1차 적용 2018-06-24 03:47:44 +09:00
Hide_D 5c82edc4be html purifier 보강 2018-06-24 02:56:38 +09:00
Hide_D 093c04bc24 포상 계수 조절 2018-06-23 23:49:22 +09:00
Hide_D 131dd46a38 무지장의 경우에는 쌀 적게 주도록 수정 2018-06-23 22:58:11 +09:00
Hide_D 6b1b4fdfbb 베팅 표기 오류 변경 2018-06-23 22:55:59 +09:00
Hide_D e4ad779b37 npc 발령 로직 변경. 유저 무지장 포상 로직 변경 2018-06-23 22:52:43 +09:00
Hide_D 65d817624e 인사부 조건 검사 순서 변경 2018-06-23 14:36:05 +09:00
Hide_D 66501189c4 적극적 금쌀 교환 2018-06-23 14:22:41 +09:00
Hide_D 4303898bb8 금쌀 계수 조정 2018-06-23 14:10:52 +09:00
Hide_D 7d76a9d3ed 인사부 임명 해제 불가 버그 수정 2018-06-23 13:28:36 +09:00
Hide_D 1cc42f341b 내정, 전투 기준 일부 변경 2018-06-23 13:08:16 +09:00
Hide_D 0b41ee0a29 내정 발령시 내정 찬곳으로는 안함 2018-06-23 12:57:11 +09:00
Hide_D 66b6c4d04f query 간소화 2018-06-23 05:37:34 +09:00
Hide_D 6502843d6c 포상 전략 변경 2018-06-23 05:22:49 +09:00
Hide_D 5ecfe72e19 발령 전략 변경 2018-06-23 05:06:10 +09:00
Hide_D f28cdefffe npc 발령 전략 변경 2018-06-23 05:00:57 +09:00
Hide_D 40494f2cf1 전방 설정을 5개월 내로 변경 2018-06-23 04:51:07 +09:00
Hide_D f2664c112b NPC 사령턴 로직 새로 작성 2018-06-23 04:45:27 +09:00
Hide_D 41d91df355 상인 거래시 110% 가 잘 적용되도록 변경. 삭제된 거상 문구 수정 2018-06-23 02:23:06 +09:00
Hide_D 965671dd93 key,value pair를 보존한 섞기 추가 2018-06-23 02:22:49 +09:00
Hide_D c8d08e4b2c 저격 특기, 활 유니크, 수극 확률이 각각 적용되도록 수정 2018-06-23 02:22:32 +09:00
Hide_D 2897a9b484 환상향 시나리오 전콘 방식 재 적용 2018-06-21 20:16:01 +09:00
Hide_D d190e59d83 장수 등록시 최저 스탯이 10으로 표시되는 버그 수정 2018-06-21 02:55:52 +09:00
Hide_D 0bb25e8773 천인 강림 개선 2018-06-21 02:47:29 +09:00
Hide_D 37e1903cb1 HTML Purifier 추가 2018-06-21 02:27:02 +09:00
Hide_D b402846d43 PHP 7.2 버전용으로 올림! 2018-06-21 02:17:31 +09:00
Hide_D c1a6dd385a 설문 제목이 제대로 표시되지 않는 버그 수정 2018-06-19 02:42:55 +09:00
Hide_D ccbef236d3 업데이트 기능 추가 2018-06-19 02:11:17 +09:00
Hide_D d7b9e8b2e0 투표 동작 방식 변경 2018-06-19 01:49:16 +09:00
Hide_D deaf77d3d0 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-06-19 01:42:46 +09:00
Hide_D 5c738f97ed 투표 권한 추가 2018-06-19 01:42:40 +09:00
Hide_D c9f7f7ab08 공지 수정 불가능한 버그 수정 2018-06-18 10:11:56 +09:00
Hide_D 746977d5d0 서버 열단, 리셋 부분 권한 추가 2018-06-18 03:21:52 +09:00
Hide_D acb09bfe71 시나리오 생성시 잘못된 도시를 입력한 경우에도 정상 빌드되도록 수정 2018-06-18 02:23:30 +09:00
Hide_D e2a1203b43 시나리오 두개 수정 2018-06-18 02:01:45 +09:00
Hide_D 124036cea6 npc 생성시 전콘이 있는지 확인하는 코드 추가. 걸그룹 대전 변경 2018-06-16 11:01:12 +09:00
Hide_D 2ac1d82826 buildScoutMessage에서 null 반환 가능하던 문제 수정 2018-06-16 00:42:48 +09:00
Hide_D fa4e0c1948 이미지 주소 기반 자동 NPC 전콘 설정 기능 추가. 루드라사움 추가 2018-06-15 03:32:37 +09:00
Hide_D 735427ead0 기본 iconPath 설정 2018-06-15 02:18:44 +09:00
Hide_D 4fa99a7e1b 변환 코드를 v3에 맞게 변경 2018-06-15 02:17:07 +09:00
Hide_D 2f963a205a 등용장 안 받아지는 버그 수정 2018-06-14 02:41:36 +09:00
Hide_D 1f03f7e7c3 빙의 모드에서 장수 칸 여유있게 2018-06-14 02:00:09 +09:00
Hide_D 31689fb6ba processCommand에 affinity 없는 버그 수정, 등용장 못받는 버그 수정 2018-06-14 01:57:28 +09:00
Hide_D cf7ebbd314 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-06-14 01:49:22 +09:00
Hide_D 40a953aed5 storage의 isunited 변수 문제 2018-06-14 01:49:15 +09:00
revofpla c4d999ada7 가상시나리오 16(애니집결) 추가 2018-06-13 17:46:34 +09:00
Hide_D fff6b4e155 개전시 조사 버그 2018-06-13 10:20:48 +09:00
Hide_D 380e08d89f 랜임시 장수수를 셀 때 유저장, 빙의장, n장만 카운트하도록 변경 2018-06-13 04:17:18 +09:00
Hide_D 96c8199092 거병 확률 최종 수정 2018-06-13 03:50:51 +09:00
Hide_D 54870cf067 거병 확률 재 수정 2018-06-13 03:29:09 +09:00
Hide_D 8654447aac 추방 기준을 3년 이내로 재 변경 2018-06-13 03:28:11 +09:00
Hide_D 28a690cbba 추방 후 임관 확률 재 조정 2018-06-13 03:27:08 +09:00
Hide_D 52d1a48c0b 거병 확률 변경. NPC 임관 확률 추가 변경 2018-06-13 03:21:55 +09:00
Hide_D f45333db5e 임관 속도 조정 2018-06-13 03:06:30 +09:00
Hide_D c920e45934 임관 시도 확률 변경, NPC 랜임시 부상 패널티 약화 2018-06-13 02:51:39 +09:00
Hide_D dd86ef4591 걸그룹 시나리오 수정, NPC 임관 확률 대폭 감소 2018-06-13 02:45:00 +09:00
Hide_D b9fb00f042 npc 거병 확률 수정 2018-06-13 02:29:37 +09:00
Hide_D 355d9fd995 거병 확률 계수 변경 2018-06-13 02:24:52 +09:00
Hide_D b68c13c4f2 임관시 $general['nations'] 를 Json Array로 변경 2018-06-13 02:21:31 +09:00
Hide_D f2803291ab 일부 브라우저에서 명령창 줄 넘어감 방지 2018-06-13 00:53:31 +09:00
Hide_D 54df034c77 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2018-06-12 22:28:10 +09:00
Hide_D 7317b8bc18 JosaUtil 응급 대응 2018-06-12 13:05:22 +09:00
Hide_D 2f030a6dd6 NPC 임관 로직 변경 2018-06-12 02:47:33 +09:00
Hide_D ef0dec32ee 임관 제한을 하드코딩 10에서 Const로 전환 2018-06-12 01:32:34 +09:00
Hide_D e7f5850c31 Session 클래스 구조 살짝 수정. 호출 구조 살짝 수정.
환상향 시나리오 전콘 반영(임시)
2018-06-11 22:55:32 +09:00
Hide_D d1d81e03d1 makenation 텍스트에 null이 들어가는경우(??)에도 우회 동작.
변환 스크립트에서 숫자 장수명 대응
2018-06-11 20:27:55 +09:00
Hide_D c65d6565df checkSupply를 검출하기 쉬도록 변경 2018-06-11 03:20:18 +09:00
Hide_D a2d40ecf4a 재야가 아닌 NPC 시나리오 생성시 버그 수정 2018-06-11 03:19:47 +09:00
Hide_D 7291c828c0 isGameLoggedIn 추가 2018-06-11 02:16:07 +09:00
revofpla 01caa625bd 환상향 시나리오 및 소울소드(8글자 신규) 업데이트 2018-06-10 16:55:34 +09:00
Hide_D 6cad6f45fe 전투 로그 숫자를 최악의 조건에도 표현 가능하도록 수정 2018-06-04 03:05:30 +09:00
Hide_D a6936ac8d7 연감 표기 수정 2018-06-04 02:28:33 +09:00
Hide_D eb9ae00d24 명예의 전당 글자수 반영 2018-06-04 01:52:33 +09:00
Hide_D b8c8321757 명장일람 글자 반영 2018-06-04 01:51:10 +09:00
Hide_D 41235bed5d 닉네임 길이 9자 2018-06-04 01:11:02 +09:00
Hide_D 7367eb1c45 메시지 시스템에 9자 닉네임 적용 2018-06-04 01:03:05 +09:00
Hide_D f9d90c38ef 전투 로그 길이 축소 2018-06-01 03:11:46 +09:00
Hide_D 275d9b1c25 한자 케이스 우회 2018-06-01 03:01:06 +09:00
Hide_D 663c24b31f 나머지 조사 변경 2018-06-01 02:49:21 +09:00
Hide_D beb501354d (이)가 조사 적용 2018-06-01 02:37:32 +09:00
Hide_D ba165239c3 (으)로 조사 반영 2018-06-01 01:59:19 +09:00
Hide_D e64ef5de84 (을)를 에 조사 적용 2018-06-01 01:43:40 +09:00
Hide_D c6bbbe081d 조사 유틸 한자 포함 2018-06-01 00:34:33 +09:00
Hide_D 66dcefc844 JosaUtil 버그 수정. 알파벳+숫자 형태 수정 2018-05-31 23:58:49 +09:00
Hide_D 93d580e74e 조사 처리 클래스 추가 2018-05-31 02:50:58 +09:00
Hide_D 9eb35b55c6 설문조사 너비 반영 2018-05-31 02:49:48 +09:00
Hide_D d2e052dfa3 회의실, 기밀실 너비 수정 2018-05-31 01:20:26 +09:00
Hide_D ddd889c42c 중원정보 너비 수정 2018-05-31 00:59:27 +09:00
Hide_D 70da3909a9 cacheValue 버그 수정 2018-05-31 00:52:43 +09:00
Hide_D c398b55f3c 턴 밀림 버그 수정 2018-05-31 00:46:40 +09:00
Hide_D 317c42b384 장수명을 9글자까지 반영할 수 있도록 수정하고. 레이아웃 틀어지지 않도록 수정 진행중 2018-05-30 02:47:33 +09:00
revofpla a95903ceff 소울소드 시나리오(가상14번) 추가 2018-05-29 14:40:49 +09:00
Hide_D 98c386622a 버그 수정 2018-05-29 01:50:50 +09:00
Hide_D 398f54cced 군주가 지정되지 않더라도 안전하게 동작 2018-05-29 01:49:06 +09:00
Hide_D c337ff2f67 변환 스크립트 동작 변경, 환상향 시나리오 적용 2018-05-29 01:28:03 +09:00
Hide_D d9f6f7956e 시나리오 json 파일에서 받아오는 규격 확장
국가를 'string'으로 표기 가능하도록 변경
전콘 번호를 'string'으로 표기 가능하도록 변경
2018-05-28 23:08:59 +09:00
revofpla 30e2432fc3 걸그룹대전 스텟 변경 2018-05-28 18:50:02 +09:00
Hide_D 8238f27dfa 환상향 스탯 2018-05-26 22:32:46 +09:00
Hide_D b00d8f2ebd 하드리셋 버그 수정 2018-05-26 17:51:46 +09:00
Hide_D 98168c61b3 서버 2개 추가. 냐. 퍄. 2018-05-26 17:47:54 +09:00
Hide_D 6627797cc6 Merge branch 'devel' of https://storage.hided.net/gogs/devsam/core into devel 2018-05-26 17:36:36 +09:00
Hide_D 30e54c3d0e 34번 시나리오 중복 장수 제거 2018-05-25 23:12:33 +09:00
Hide_D ee3764f5f5 걸그룹 시나리오 추가 2018-05-25 22:50:59 +09:00
Hide_D a86e4cf64b 전콘 사이즈 확장 2018-05-25 00:51:03 +09:00
Hide_D 78ea405e40 영웅난무 스탯 변경 2018-05-24 23:41:38 +09:00
Hide_D f99583dc99 시나리오 능력치 수정. 영웅난무2 수정 2018-05-24 23:39:42 +09:00
Hide_D b9e5ddce94 c_myBossInfo 수정. RegNPC nullable 변경 2018-05-24 23:33:07 +09:00
Hide_D 1d28f22577 도시 정보, 장수 목록 2018-05-22 02:36:00 +09:00
Hide_D 90235660db 세력 도시 너비 조절 2018-05-22 02:25:53 +09:00
Hide_D 8e12aea3ff 오타 수정 2018-05-22 01:51:19 +09:00
Hide_D 280ff18526 세력 일람에서 장수명 너비 확보 2018-05-22 01:50:47 +09:00
Hide_D 9e88b03438 autoreset 버그 수정 2018-05-21 23:52:13 +09:00
Hide_D 14213ea3cd 토너먼트 인자 실수 체크 2018-05-21 23:22:49 +09:00
Hide_D 5352a507b2 삼11 시나리오 유저 스탯캡 조절 2018-05-21 22:54:25 +09:00
Hide_D 3b382199fc 리셋 시 최대 스탯 보여주도록 변경 2018-05-21 22:51:03 +09:00
Hide_D 67dea49a9b 삼국지11 시나리오 스탯 재 변경 2018-05-21 22:33:06 +09:00
Hide_D 8bdca87bf9 확장 장수 안되는 버그 해결. 환상향 시나리오 추가 2018-05-21 16:17:33 +09:00
Hide_D 8085e96fdd gameStor 대소문자 마저 수정 2018-05-21 16:05:17 +09:00
Hide_D 86b40695e6 외교 서신 안 받아지는 버그 수정. 의병, m장 스탯 버그 해결 2018-05-21 12:16:02 +09:00
Hide_D 676f98659a storage 테이블 생성 문제 해결 2018-05-21 05:38:43 +09:00
Hide_D 2fbf8bc2e2 누락된 GameCustomConst 추가 2018-05-21 05:30:38 +09:00
Hide_D bf233f7552 시나리오마다 별도로 스탯 제한치를 설정 가능하도록 변경 2018-05-21 05:10:44 +09:00
Hide_D 2c3e577c4e 설문조사 수정 2018-05-21 03:54:43 +09:00
Hide_D 7270de6775 Merge branch 'devel' into kvstorage_game 2018-05-21 03:54:16 +09:00
Hide_D e45f3a7d03 턴 지연 버그 수정. 설문조사 % 막대 2018-05-21 03:51:04 +09:00
Hide_D 742e2e8003 설문조사 offset 버그 2018-05-21 03:42:04 +09:00
Hide_D 4cdec6c393 투표 버그 수정 2018-05-21 03:39:42 +09:00
Hide_D a2d273bdc9 설문조사 보이도록 2018-05-21 03:37:59 +09:00
Hide_D a163fbef7f 설문조사 동작 2018-05-21 03:35:53 +09:00
Hide_D ec226ede65 스탯 31 생몰년 2018-05-21 03:20:15 +09:00
Hide_D 771fcbec6a 장수 생성 버그 수정 2018-05-21 03:16:06 +09:00
Hide_D ae62669fe8 KBO 중복 장수 제거, 삼국지 11 스탯 시나리오 추가 2018-05-21 03:11:26 +09:00
Hide_D 4823795c50 토너먼트 '투입' 버그 수정 2018-05-21 01:47:36 +09:00
Hide_D a80442399d KVStorage를 무조건 소문자만 받도록 설정 2018-05-21 01:32:30 +09:00
Hide_D 913b308892 $game_env -> $admin 2018-05-21 01:05:59 +09:00
Hide_D 21837d0869 getDBValues 쓴 부분 수정 2018-05-21 00:58:28 +09:00
Hide_D 5706fcfb7d DateInterval namespace버그 수정 2018-05-21 00:51:38 +09:00
Hide_D 5bc3b55400 turnterm 대소문자 버그 수정 2018-05-21 00:49:24 +09:00
Hide_D ffbe2844e4 npcmode 대소문자 버그 수정 2018-05-21 00:47:42 +09:00
Hide_D 7776b35cab kvstorage 버그 수정 2018-05-21 00:23:50 +09:00
Hide_D c39794c086 scneraio_frame을 올바르게 서술 2018-05-20 23:04:22 +09:00
Hide_D 6aaa50364b 인사부에 스탯, 삭턴 보이도록 2018-05-20 22:37:18 +09:00
Hide_D d0778550ab Merge branch 'devel' into kvstorage_game 2018-05-20 22:20:03 +09:00
Hide_D 8cba6ac16a 커스텀 종능 대비 json 변경 2018-05-20 22:19:23 +09:00
Hide_D 0516007130 game 테이블을 모두 gameStor로 변환 2018-05-20 03:43:02 +09:00
Hide_D af9df325f0 현재까지 작업 분량 반영 2018-05-20 02:23:44 +09:00
Hide_D 4dd69db652 장수 도시를 제대로 못 받는 버그 수정 2018-05-15 22:42:14 +09:00
Hide_D 316d466795 방랑군 시나리오를 제대로 시작할 수 없는 버그 수정 2018-05-15 22:38:05 +09:00
Hide_D 3fb5b99af3 시나리오 8번 버그 수정, printJS, printCSS 버그 수정 2018-05-15 22:10:33 +09:00
Hide_D 1764504ea3 23번 시나리오 변경 2018-05-14 23:05:45 +09:00
Hide_D fab0495a39 game table 이전 2018-05-13 01:31:28 +09:00
Hide_D 166eafe4ee game 테이블을 KVStorage로 일부 대체 2018-05-13 01:26:44 +09:00
Hide_D 9d6181ede1 game table을 KVStorage로 일부 대체 2018-05-13 00:52:16 +09:00
Hide_D 67ecd514a4 KVStorage의 game namespace를 game_env로 '편의를 위해' 변경 2018-05-12 22:21:53 +09:00
Hide_D 52f4b79fdf KVStorage로 game 테이블 대체 준비 2018-05-12 22:05:44 +09:00
Hide_D 5e74a34d3e 관리자 도구 css 파일명 이상 수정 2018-05-12 16:12:45 +09:00
Hide_D 288be33eac js, css 캐시 문제로 printJS, printCSS 함수를 이용하도록 변경 2018-05-12 16:09:32 +09:00
Hide_D 451a759cca common.css 버전 올림 2018-05-12 13:01:39 +09:00
Hide_D a9052705a8 바 막대 100% 넘을때 문제 해결, 분쟁현황 막대 수정 2018-05-12 13:00:28 +09:00
Hide_D 5490e74f04 부운영자도 회원 관리 가능하도록 변경 2018-05-12 06:30:45 +09:00
Hide_D ab5768998b admin_server.js에 버전명 지정 2018-05-12 06:12:21 +09:00
Hide_D b71ae96d66 부운영자가 hwe 서버(base server)를 업데이트 할 수 없는 버그 해결 2018-05-12 06:11:31 +09:00
Hide_D e3528ac82f 부운영자도 기존의 git tree-ish 경로로 업데이트 할 수 있도록 변경 2018-05-12 06:08:48 +09:00
Hide_D bad5a3c0ef 가장 마지막에 업데이트한 git tree-ish path를 저장하는 기능 추가 2018-05-12 06:04:06 +09:00
Hide_D bb49e6dec7 KVStorage 버그 수정 2018-05-12 06:03:29 +09:00
Hide_D 2d24ba659f KVStorage에 unset 추가 2018-05-12 05:46:43 +09:00
Hide_D 29ce47251a KVStorage가 사용할 db를 직접 선택할 수 있도록 변경.
KVStorage를 전역으로 이동
2018-05-12 05:40:15 +09:00
Hide_D d02a84e87e kvstorage를 schema에 추가 2018-05-12 05:36:25 +09:00
Hide_D c5d008ec47 KVStorage에 reset추가 2018-05-12 05:32:18 +09:00
Hide_D 798be5fd5c 이용 약관, 개인정보처리 방침 이동 2018-05-12 05:07:55 +09:00
Hide_D ab6bb54eae KVStorage 추가 2018-05-12 04:59:44 +09:00
Hide_D ae24d18adb isClose의 함수이름을 isNeighbor로 변경 2018-05-12 02:04:21 +09:00
Hide_D dcfb49d927 firefox groove에 color 적용 안되는 문제 해결 2018-05-11 03:46:50 +09:00
Hide_D d82ab51d58 모병, 징병창 가운데 정렬 2018-05-11 03:30:57 +09:00
Hide_D 5166001956 턴 명령 창 가운데 정렬 2018-05-11 03:21:10 +09:00
Hide_D aa46fc9668 html5 비호환 border=1, border=0 제거. bar 태그를 div로 변경 2018-05-11 03:16:24 +09:00
Hide_D beea13ff4b checkSupply()에서 국가 select 쿼리 직접하도록 변경 2018-05-09 01:44:22 +09:00
Hide_D 766d0b3ad5 빙의 탈출 기능 임시 제한 2018-05-08 23:40:35 +09:00
Hide_D 64e279d859 빙의시 로그가 잘못 남는 버그 수정 2018-05-08 23:39:48 +09:00
Hide_D a3f6a8e8ab symfony/lock 추가 2018-05-08 00:38:29 +09:00
Hide_D 330853c98d 30번 시나리오 2018-05-07 19:34:56 +09:00
Hide_D 776e16b58b 빙의 선택 대기 시간 변경 2018-05-07 12:39:03 +09:00
Hide_D 70b1f23a49 빙의 해제용 삭턴 세팅.
- 10분 미만은 30분
- 10분 이하는 60분 대기 필요
2018-05-05 23:25:21 +09:00
Hide_D 5e4493b49a 빙의 목록을 종능 순으로 정렬해서 표현 2018-05-05 23:03:10 +09:00
Hide_D dec24e09cf 빙의시 장수명 빼먹는 버그 수정 2018-05-05 22:52:53 +09:00
Hide_D 95445d8f8a 빙의창에서 만료 후 다른 장수 보기 시 안보이는 문제 해결 2018-05-05 22:46:56 +09:00
Hide_D 683a844a08 빙의 코드 개선
- 유효 기간 관련 늘림.
- 유효 기간 가까워지면 색으로 표시. 만료 표기도 추가
- 다른 장수 보기를 남은 초 기준으로 수정
2018-05-05 22:39:21 +09:00
Hide_D a75eb5b74e 장수 선택 테이블을 schema에 추가 2018-05-05 21:44:15 +09:00
Hide_D 5dfb844c7e 빙의 재선택 시간을 빠르게 2018-05-05 21:40:59 +09:00
Hide_D 20f991a205 빙의시 오래된 데이터 삭제 2018-05-05 21:22:38 +09:00
Hide_D 3c1c339498 장수 빙의 코드 변경 2018-05-05 21:20:15 +09:00
Hide_D 5974028c4d 빙의 장수 기능 추가(선택은 미완) 2018-05-05 19:51:56 +09:00
Hide_D a534b8f812 시나리오 30번 수정 2018-05-05 19:49:22 +09:00
Hide_D cb2fbf1a32 common.js에 iconpath 연산 코드 추가 2018-05-05 19:49:07 +09:00
Hide_D a1392652ae config.css에서 div, button에 적용되던 전역 style 제거
모바일 화면에서 입구 햄버거 버튼 동작
2018-05-05 19:48:38 +09:00
Hide_D 69af23b60a Session에서 requireLogin 인자 이름을 직관적으로 변경 2018-05-05 19:45:10 +09:00
Hide_D 063b3d37a6 exception이 trace 수정하도록 임시 수정 2018-05-05 19:44:22 +09:00
Hide_D ebf9b4b75d 가상 상성인 경우 새 장수는 재야임. 2018-04-30 00:15:43 +09:00
Hide_D 45fd06c195 성인으로 등장시 월이 제대로 로그로 남지 않는 버그 수정 2018-04-30 00:01:11 +09:00
Hide_D 7db3675e71 성인 등장이 꼭 1월이 아니어도 되도록 변경 2018-04-29 23:31:21 +09:00
Hide_D a19661199e Date의 비교 대상 lhs, rhs가 바뀐 버그 수정 2018-04-29 23:13:49 +09:00
Hide_D 953196ec78 예약 오픈 시 데이터를 바로 날리진 않도록 설정 2018-04-29 12:55:16 +09:00
Hide_D d5be6e3e08 내 정보에서 숙련도를 수치로 표기 2018-04-29 04:29:46 +09:00
Hide_D 551b79d8c2 관리자 패널 접속 허용, 접속 제한 쿼리 버그 수정 2018-04-29 04:02:23 +09:00
Hide_DandGogs 95a22f228c Merge branch 'devel' of devsam/core into master 2018-04-29 03:17:12 +09:00
Hide_D a242b9a20e 주요 메뉴에 상단 바 추가 2018-04-29 03:08:30 +09:00
Hide_D 19e91b2de0 입구 코드 추가 2018-04-29 02:44:09 +09:00
Hide_DandGogs eac92293fc Merge branch 'devel' of devsam/core into master 2018-04-29 02:01:54 +09:00
824 changed files with 69311 additions and 10760 deletions
+5
View File
@@ -15,6 +15,7 @@ d_log/*.txt
d_log/*.zip
sess_*
*/logs/*.txt
*/logs/*/*.txt
err.txt
che/.htaccess
kwe/.htaccess
@@ -38,6 +39,10 @@ test.php
/che
/kwe
/pwe
/nya
/pya
/twe
phpinfo.php
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
*.sqlite3
+5 -1
View File
@@ -5,11 +5,13 @@
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/logs/*.txt": true,
"**/logs/**/*.txt": true,
"**/session/sess*":true,
"/che":true,
"/kwe":true,
"/pwe":true,
"/nya":true,
"/pya":true,
"/twe":true,
},
@@ -19,6 +21,8 @@
"/che":true,
"/kwe":true,
"/pwe":true,
"/nya":true,
"/pya":true,
"/twe":true,
},
}
+3 -3
View File
@@ -7,7 +7,7 @@
* Apache2
* <code>mpm_event</code> 권장
* PHP 7.0 이상
* PHP 7.2 이상
* <code>php-fpm</code> 권장
* php에서 curl을 실행가능해야 합니다.
* MySQL 5.6 이상, 또는 MariaDB 10.0 이상
@@ -32,13 +32,13 @@ sudo -u www-data git clone ssh://git@storage.hided.net:2525/devsam/core.git
git clone ssh://git@storage.hided.net:2525/devsam/image.git
```
> 이미지는 별도의 업데이트 기능을 제공하지 않습니다. 수동으로 <code>git pull</code>을 해야합니다.
> 이미지는 git hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
### 설치
이후 해당 경로를 웹 브라우저를 통해 접근하여 설치를 진행할 수 있습니다.
Database 수는 로그인 관리 서버 1개, 내부 서버 5개로, 총 6개의 Database가 필요합니다. 내부 설정을 고쳐서 서버 수를 늘리거나 줄일 경우 그에 맞는 Database 수가 필요합니다. 또한 Database마다 관리할 별도의 계정을 만드는 것을 추천합니다.
Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의 Database가 필요합니다. 내부 설정을 고쳐서 서버 수를 늘리거나 줄일 경우 그에 맞는 Database 수가 필요합니다. 또한 Database마다 관리할 별도의 계정을 만드는 것을 추천합니다.
설치 이후에는 서버관리 페이지에서 **업데이트** 명령을 통해 원 클릭 업데이트가 가능합니다.
+5 -1
View File
@@ -16,7 +16,11 @@
"firephp/firephp-core": "^0.4.0",
"vlucas/valitron": "^1.4",
"php-extended/php-tail": "^2.1",
"pguardiario/phpuri": "^1.0"
"pguardiario/phpuri": "^1.0",
"symfony/lock": "^4.1",
"ezyang/htmlpurifier": "^4.10",
"xemlock/htmlpurifier-html5": "^0.1.7",
"catfan/medoo": "^1.5"
},
"autoload": {
"psr-4": {
Generated
+249 -39
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "1753c2c2ad9fe40ecc5c6ae541dd2e78",
"content-hash": "3fceaf3c2925068c7e757ab12036e29e",
"packages": [
{
"name": "brandonwamboldt/utilphp",
@@ -52,6 +52,112 @@
],
"time": "2015-02-02T17:56:14+00:00"
},
{
"name": "catfan/medoo",
"version": "v1.5.7",
"source": {
"type": "git",
"url": "https://github.com/catfan/Medoo.git",
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/catfan/Medoo/zipball/8d90cba0e8ff176028847527d0ea76fe41a06ecf",
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf",
"shasum": ""
},
"require": {
"ext-pdo": "*",
"php": ">=5.4"
},
"suggest": {
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
"ext-pdo_mysql": "For MySQL or MariaDB database",
"ext-pdo_oci": "For Oracle database",
"ext-pdo_oci8": "For Oracle version 8 database",
"ext-pdo_pqsql": "For PostgreSQL database",
"ext-pdo_sqlite": "For SQLite database",
"ext-pdo_sqlsrv": "For MSSQL database"
},
"type": "framework",
"autoload": {
"psr-4": {
"Medoo\\": "/src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Angel Lai",
"email": "angel@catfan.me"
}
],
"description": "The lightest PHP database framework to accelerate development",
"homepage": "https://medoo.in",
"keywords": [
"database",
"lightweight",
"mariadb",
"mssql",
"mysql",
"oracle",
"php framework",
"postgresql",
"sql",
"sqlite"
],
"time": "2018-06-14T18:59:08+00:00"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.10.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "d85d39da4576a6934b72480be6978fb10c860021"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
"reference": "d85d39da4576a6934b72480be6978fb10c860021",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
"require-dev": {
"simpletest/simpletest": "^1.1"
},
"type": "library",
"autoload": {
"psr-0": {
"HTMLPurifier": "library/"
},
"files": [
"library/HTMLPurifier.composer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"description": "Standards compliant HTML filter written in PHP",
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
],
"time": "2018-02-23T01:58:20+00:00"
},
{
"name": "firephp/firephp-core",
"version": "v0.4.0",
@@ -90,16 +196,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.2",
"version": "6.3.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"shasum": ""
},
"require": {
@@ -109,7 +215,7 @@
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.0"
},
"suggest": {
@@ -151,7 +257,7 @@
"rest",
"web service"
],
"time": "2018-03-26T16:33:04+00:00"
"time": "2018-04-22T15:46:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -271,16 +377,16 @@
},
{
"name": "leafo/scssphp",
"version": "v0.7.5",
"version": "v0.7.7",
"source": {
"type": "git",
"url": "https://github.com/leafo/scssphp.git",
"reference": "8b538d828bbb75276974605c4a1a435e939da74e"
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/leafo/scssphp/zipball/8b538d828bbb75276974605c4a1a435e939da74e",
"reference": "8b538d828bbb75276974605c4a1a435e939da74e",
"url": "https://api.github.com/repos/leafo/scssphp/zipball/1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
"shasum": ""
},
"require": {
@@ -319,7 +425,7 @@
"scss",
"stylesheet"
],
"time": "2018-02-09T02:04:21+00:00"
"time": "2018-07-22T01:22:08+00:00"
},
{
"name": "league/plates",
@@ -480,16 +586,16 @@
},
{
"name": "php-extended/php-system",
"version": "1.3.0",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/php-extended/php-system.git",
"reference": "66727d5dc0a665916bd7e08bcfb9820e7be1d20c"
"url": "https://gitlab.com/php-extended/php-system.git",
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-extended/php-system/zipball/66727d5dc0a665916bd7e08bcfb9820e7be1d20c",
"reference": "66727d5dc0a665916bd7e08bcfb9820e7be1d20c",
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-system/repository/archive.zip?sha=9e6b3c2009ef56dc123efc43900e40cdf217ace0",
"reference": "9e6b3c2009ef56dc123efc43900e40cdf217ace0",
"shasum": ""
},
"type": "library",
@@ -505,31 +611,31 @@
"authors": [
{
"name": "Anastaszor",
"role": "developer"
"role": "Developer"
}
],
"description": "A generic way to find informations about the running system",
"homepage": "https://github.com/php-extended/php-system",
"homepage": "https://gitlab.com/php-extended/php-system",
"keywords": [
"operating system",
"os",
"php",
"system"
],
"time": "2017-01-14T11:56:24+00:00"
"time": "2018-06-07T06:03:27+00:00"
},
{
"name": "php-extended/php-tail",
"version": "2.1.1",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/php-extended/php-tail.git",
"reference": "eabf7bee64f8c30fe9b9e1176562fdb903c54ae7"
"url": "https://gitlab.com/php-extended/php-tail.git",
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-extended/php-tail/zipball/eabf7bee64f8c30fe9b9e1176562fdb903c54ae7",
"reference": "eabf7bee64f8c30fe9b9e1176562fdb903c54ae7",
"url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-tail/repository/archive.zip?sha=19fbd3a79ccc071954f28296b2c44754335304a0",
"reference": "19fbd3a79ccc071954f28296b2c44754335304a0",
"shasum": ""
},
"require": {
@@ -548,11 +654,11 @@
"authors": [
{
"name": "Anastaszor",
"role": "developer"
"role": "Developer"
}
],
"description": "A smart way to tail files depending of the environment",
"homepage": "https://github.com/php-extended/php-tail",
"homepage": "https://gitlab.com/php-extended/php-tail",
"keywords": [
"cheat",
"mighty",
@@ -560,7 +666,7 @@
"php",
"tail"
],
"time": "2017-07-25T13:52:42+00:00"
"time": "2018-06-07T06:04:58+00:00"
},
{
"name": "psr/http-message",
@@ -703,34 +809,98 @@
"time": "2014-06-16T22:40:22+00:00"
},
{
"name": "vlucas/valitron",
"version": "v1.4.2",
"name": "symfony/lock",
"version": "v4.1.1",
"source": {
"type": "git",
"url": "https://github.com/vlucas/valitron.git",
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6"
"url": "https://github.com/symfony/lock.git",
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/87775d76268beda2afa085bdd6e44b17e98907c6",
"reference": "87775d76268beda2afa085bdd6e44b17e98907c6",
"url": "https://api.github.com/repos/symfony/lock/zipball/d508b5dd92272cb74300396ecaadde969d0f7976",
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"psr/log": "~1.0"
},
"require-dev": {
"predis/predis": "~1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Lock\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Jérémy Derussé",
"email": "jeremy@derusse.com"
}
],
"description": "Symfony Lock Component",
"homepage": "https://symfony.com",
"keywords": [
"cas",
"flock",
"locking",
"mutex",
"redlock",
"semaphore"
],
"time": "2018-06-21T11:15:46+00:00"
},
{
"name": "vlucas/valitron",
"version": "v1.4.3",
"source": {
"type": "git",
"url": "https://github.com/vlucas/valitron.git",
"reference": "3c5463315bfa23b17f8949b100a960d035234e43"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/3c5463315bfa23b17f8949b100a960d035234e43",
"reference": "3c5463315bfa23b17f8949b100a960d035234e43",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
},
"suggest": {
"ext-mbstring": "It can support the multiple bytes string length."
},
"type": "library",
"autoload": {
"psr-0": {
"Valitron": "src/"
"psr-4": {
"Valitron\\": "src/Valitron"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
"BSD-3-Clause"
],
"authors": [
{
@@ -746,7 +916,47 @@
"validation",
"validator"
],
"time": "2017-10-30T23:15:06+00:00"
"time": "2018-05-06T10:45:26+00:00"
},
{
"name": "xemlock/htmlpurifier-html5",
"version": "v0.1.7",
"source": {
"type": "git",
"url": "https://github.com/xemlock/htmlpurifier-html5.git",
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/b4b35e51ec75e0207c23035f7d9a354bdcdac359",
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359",
"shasum": ""
},
"require": {
"ezyang/htmlpurifier": "^4.7",
"php": ">=5.2"
},
"require-dev": {
"phpunit/phpunit": "4.7.*|5.7.*"
},
"type": "library",
"autoload": {
"classmap": [
"library/HTMLPurifier/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "xemlock",
"email": "xemlock@gmail.com"
}
],
"description": "HTML Purifier definitions for HTML5 elements",
"time": "2018-06-07T14:30:17+00:00"
}
],
"packages-dev": [],
BIN
View File
Binary file not shown.
+94 -24
View File
@@ -1,8 +1,10 @@
@charset "utf-8";
* { margin: 0px; padding: 0px; }
body { color:white; background-color:black; border-width:1px; border-color:gray; }
table {
body {
color:white; background-color:black; font-family: '맑은 고딕';
}
table {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
@@ -23,14 +25,8 @@ a.just_link {
text-decoration: none;
}
div {
margin:0px;
padding: 0px;
word-break: break-all;
font-family: '맑은 고딕';
}
.with_border{
margin:0;
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
@@ -45,6 +41,8 @@ div {
line-height:50px;
font-size: 30px; font-weight: bold;
text-align: center;
color:white;
padding:0;
}
.legacy_layout div {
@@ -56,8 +54,6 @@ div {
font-family: '맑은 고딕';;
}
font { font-family: '맑은 고딕';}
.obj_fill{
display:block;
width:100%;
@@ -65,28 +61,24 @@ font { font-family: '맑은 고딕';}
}
button.with_skin {
padding:0 4px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
button.with_skin:disabled {
background-color:#333333;
}
input.with_skin {
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
select {
width: 100px; height: 18px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
button {
width: 100px; height: 20px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
input.with_skin:disabled {
background-color: #333333;
}
.font0 { font-size: 10px; }
@@ -94,4 +86,82 @@ button {
.font2 { font-size: 15px; }
.font3 { font-size: 20px; }
.font4 { font-size: 30px; }
.font5 { font-size: 50px; }
.font5 { font-size: 50px; }
caption.section_title {
caption-side:top;
}
.samButton{
float:left;
display:block;
padding:0;
margin:0;
text-decoration: none;
position:relative;
}
a.samButton.disabled {
pointer-events: none;
cursor: default;
}
.samButtonOuter{
display: table;
border: outset 2px white;
box-sizing: border-box;
font-weight:bold;
padding: 1px 6px;
width:125px;
height:30px;
background-color:#000000;
color:#ffffff;
}
.samButtonOuter:active{
border: inset 2px white;
}
.samButtonInner{
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
text-align: center;
user-select: none;
}
.samToolbarButton > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:white;
}
.samToolbarButton2 > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:magenta;
}
.samCommandButton > .samButtonOuter{
width:111px;
height:30px;
}
.samCommandButton.disabled > .samButtonOuter{
background-color:transparent !important;
color:gray !important;
border-color:transparent !important;
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
content:'【'
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
content:'】'
}
+13 -93
View File
@@ -1,5 +1,9 @@
@charset "utf-8";
body{
line-height: 1.3;
}
#server_notice {
margin:10px 0;
border: none;
@@ -55,77 +59,6 @@
text-align:center;
}
/*Legacy*/
#Entrance_00 {
width: 800px;
position: absolute; top: 50px; left: 50%;
margin-left: -400px;
border: none;
}
#Entrance_0004 {
width: 52px; height: 52px;
position: absolute; top: 0px; left: -62px;
border: 1px solid white;
}
#Entrance_0005 {
width: 160px; height: 600px;
position: absolute; top: 62px; left: -170px;
}
#Entrance_0006 {
width: 160px; height: 600px;
position: absolute; top: 62px; left: 810px;
}
#Entrance_0000 {
width: 800px; height: 134px;
position: absolute; top: 0px; left: 0px;
}
#Entrance_000000 {
width: 798px; height: 50px;
position: absolute; top: 0px; left: 0px;
font-size: 30px; font-weight: bold;
}
#Entrance_000001 {
width: 798px; height: 20px;
position: absolute; top: 52px; left: 0px;
border: none;
}
#Entrance_00000000 {
width: 98px; height: 20px;
position: absolute; top: 0px; left: 0px;
}
#Entrance_00000001 {
width: 398px; height: 20px;
position: absolute; top: 0px; left: 100px;
}
#Entrance_00000002 {
width: 178px; height: 20px;
position: absolute; top: 0px; left: 500px;
}
#Entrance_00000003 {
width: 118px; height: 20px;
position: absolute; top: 0px; left: 680px;
}
#Entrance_000002 {
width: 798px; height: 64px;
position: absolute; top: 74px; left: 0px;
border: none;
}
.Entrance_ServerList {
width: 800px; height: 64px;
border: none;
@@ -195,27 +128,14 @@
color: magenta; font-size: 15px; font-weight: bold;
}
.Entrance_Nya {
color: #e67e22; font-size: 15px; font-weight: bold;
}
.Entrance_Pya {
color: #9b59b6; font-size: 15px; font-weight: bold;
}
.Entrance_Hwe {
color: red; font-size: 15px; font-weight: bold;
}
#Entrance_0001 {
width: 800px; height: 130px;
position: absolute; top: 154px; left: 0px;
}
#Entrance_000100 {
width: 798px; height: 50px;
position: absolute; top: 0px; left: 0px;
font-size: 30px; font-weight: bold;
}
#Entrance_000101 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 150px;
}
#Entrance_000102 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 450px;
}
}
+11
View File
@@ -87,6 +87,17 @@ input::-webkit-input-placeholder {
align-items: center;
}
.full-content {
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
margin:0;
padding:0;
z-index:800;
}
#btn_kakao_login{
cursor: pointer;
height:46px;
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+7 -9
View File
@@ -1,7 +1,7 @@
@charset "utf-8";
#user_info_container{
width:500px;
width:550px;
position:absolute;
left:50%;
margin-left:-250px;
@@ -21,6 +21,7 @@
right: 6px;
margin:6px;
height:40px;
line-height:40px;
}
#btn_delete_me{
@@ -37,15 +38,15 @@
#image_upload_filename{
position:absolute;
height:16px;
height:20px;
left:10px;
width:130px;
top:16px;
top:12px;
}
#image_upload_fake_btn{
top:16px;
height:20px;
top:12px;
height:22px;
right:10px;
position:absolute;
}
@@ -53,8 +54,7 @@
#image_upload{
opacity: 0;
position:absolute;
top:16px;
height:22px;
top:12px;
left:0;
height:20px;
width:100%;
@@ -70,7 +70,6 @@
bottom:0;
left:0;
width:50%;
height:20px;
}
#btn_remove_icon{
@@ -78,7 +77,6 @@
bottom:0;
right:0;
width:50%;
height:20px;
}
#third_use_disallow{
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

-4
View File
File diff suppressed because one or more lines are too long
+2
View File
File diff suppressed because one or more lines are too long
+7
View File
File diff suppressed because one or more lines are too long
+13
View File
File diff suppressed because one or more lines are too long
+69 -21
View File
@@ -2,6 +2,7 @@
namespace sammo;
define('ROOT', realpath(__dir__.'/..'));
setlocale(LC_ALL, 'ko_KR.UTF-8');
date_default_timezone_set('Asia/Seoul');
mb_internal_encoding("UTF-8");
mb_http_output('UTF-8');
@@ -48,40 +49,87 @@ function getFriendlyErrorType($type)
return "{$type}";
}
function getExceptionTraceAsString($exception) {
//https://gist.github.com/abtris/1437966
$rtn = "";
$count = 0;
$rtn = [];
foreach ($exception->getTrace() as $frame) {
$args = "";
if (isset($frame['args'])) {
$args = array();
foreach ($frame['args'] as $arg) {
if (is_string($arg)) {
$args[] = "'" . $arg . "'";
} elseif (is_array($arg)) {
$args[] = "Array";
} elseif (is_null($arg)) {
$args[] = 'NULL';
} elseif (is_bool($arg)) {
$args[] = ($arg) ? "true" : "false";
} elseif (is_object($arg)) {
$args[] = get_class($arg);
} elseif (is_resource($arg)) {
$args[] = get_resource_type($arg);
} else {
$args[] = $arg;
}
}
$args = join(", ", $args);
}
$rtn[] = sprintf( "#%s %s(%s): %s(%s)",
$count,
isset($frame['file']) ? $frame['file'] : 'unknown file',
isset($frame['line']) ? $frame['line'] : 'unknown line',
(isset($frame['class'])) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'],
$args );
$count++;
}
return $rtn;
}
function logError(string $err, string $errstr, array $trace){
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
$date = date("Ymd_His");
$trace = array_map(function(string $text){
return str_replace(ROOT, '{ROOT}', $text);
}, $trace);
$fdb->insert('err_log', [
'date'=>$date,
'err'=>$err,
'errstr'=>$errstr,
'trace'=>Json::encode($trace)
]);
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
// through to the standard PHP error handler
return false;
}
$date = date("Ymd_His");
$e = new \Exception();
$data = Json::encode([
'date'=>$date,
'err'=>getFriendlyErrorType($errno),
'errstr'=>$errstr,
'trace'=>explode("\n", $e->getTraceAsString())
], Json::PRETTY);
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
logError(
getFriendlyErrorType($errno),
$errstr,
getExceptionTraceAsString($e)
);
}
set_error_handler("\sammo\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e){
$date = date("Ymd_His");
$data = Json::encode([
'date'=>$date,
'err'=>get_class($e),
'errstr'=>$e->getMessage(),
'trace'=>explode("\n", $e->getTraceAsString())
], Json::PRETTY);
file_put_contents(ROOT.'/d_log/err_log.txt',"$data\n", FILE_APPEND);
logError(
get_class($e),
$e->getMessage(),
getExceptionTraceAsString($e)
);
echo $e->getTraceAsString();
throw $e;
}
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
+10 -8
View File
@@ -8,15 +8,17 @@ require(__dir__.'/../vendor/autoload.php');
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>설치</title>
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../e_lib/bootstrap.bundle.min.js"></script>
<script src="../e_lib/jquery.validate.min.js"></script>
<script src="../e_lib/sha512.min.js"></script>
<script src="../js/install.js"></script>
<link type="text/css" rel="stylesheet" href="../e_lib/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="../css/install.css">
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
<?=WebUtil::printJS('../js/common.js')?>
<?=WebUtil::printJS('../js/install.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../css/install.css')?>
</head>
<body>
<div class="container">
+7
View File
@@ -216,6 +216,13 @@ $result = Util::generateFileUsingSimpleTemplate(
true
);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/menu.orig.js',
ROOT.'/d_shared/menu.js',
[],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
+11 -6
View File
@@ -2,7 +2,6 @@
DROP TABLE IF EXISTS `system`;
DROP TABLE IF EXISTS `member`;
DROP TABLE IF EXISTS `member_log`;
DROP TABLE IF EXISTS `config`;
-- 시스템 테이블
-- TODO:장기적으로는 key-value(json) storage 형태로 바꾸는게 나을 듯.
@@ -30,6 +29,7 @@ CREATE TABLE `member` (
`NAME` VARCHAR(64) NOT NULL,
`PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg',
`IMGSVR` INT(1) NULL DEFAULT '0',
`acl` text NOT NULL DEFAULT '{}' COMMENT 'json',
`GRADE` INT(1) NULL DEFAULT '1',
`REG_NUM` INT(3) NULL DEFAULT '0',
`REG_DATE` DATETIME NOT NULL,
@@ -57,11 +57,16 @@ CREATE TABLE `member_log` (
)
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
CREATE TABLE `config` (
###################
# KV storage
###################
CREATE TABLE if not exists `storage` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`key` VARCHAR(50) NOT NULL,
`value` VARCHAR(100) NULL DEFAULT NULL,
`namespace` VARCHAR(40) NOT NULL,
`key` VARCHAR(40) NOT NULL,
`value` TEXT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `key` (`key`)
UNIQUE INDEX `key` (`namespace`, `key`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
COLLATE='utf8mb4_general_ci'
ENGINE=MyISAM
+10
View File
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS `err_log` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`date` TEXT NOT NULL,
`err` TEXT NOT NULL,
`errstr` TEXT NOT NULL,
`trace` TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS `date` ON `err_log` (
`date` DESC
);
+39 -8
View File
@@ -41,18 +41,49 @@
url('_tK_gameImagePath_/winter.gif') no-repeat right;
}
.map_spring .map_body{
background: url('_tK_gameImagePath_/map1.jpg') no-repeat;
/*체 지도*/
.map_theme_che.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
}
.map_summer .map_body{
background: url('_tK_gameImagePath_/map2.jpg') no-repeat;
.map_theme_che.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
}
.map_fall .map_body{
background: url('_tK_gameImagePath_/map3.jpg') no-repeat;
.map_theme_che.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
}
.map_winter .map_body{
background: url('_tK_gameImagePath_/map4.jpg') no-repeat;
.map_theme_che.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
}
.map_theme_che .map_bgroad{
background: url('_tK_gameImagePath_/map/che/che_road.png') no-repeat;
}
/*미니체 지도*/
.map_theme_miniche.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
background-size: 700px 500px;
}
.map_theme_miniche .map_bgroad{
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
background-size: 700px 500px;
}
+8
View File
@@ -0,0 +1,8 @@
window.sammo_menu = [
['/bbs/board', '삼모게시판', '_blank'],
['/bbs/tip', '팁/강좌', '_blank'],
['/bbs/news', '삼국 일보', '_blank'],
['/bbs/history2', '개인 열전', '_blank'],
['/bbs/history3', '국가 열전', '_blank'],
['/bbs/patch', '패치 내역', '_blank']
];
+15 -12
View File
@@ -6,14 +6,16 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 4) {
?><!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
@@ -25,11 +27,10 @@ if($session->userGrade < 4) {
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$query = "select turntime,tnmt_time from game";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
$query = "select plock from plock";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -39,14 +40,16 @@ $plock = MYDB_fetch_array($result);
<html>
<head>
<title>삼국지 모의전투 HiDCHe</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
<form action=_119_b.php method=post>
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$admin['turntime']?><br>
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$admin['tnmt_time']?><br>
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$turntime?><br>
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$tnmt_time?><br>
봉급지급 : <input type=submit name=btn value='금지급'><input type=submit name=btn value='쌀지급'><br>
: <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
</form>
+39 -22
View File
@@ -27,32 +27,51 @@ $minute2 = Util::getReq('minute2', 'int');
extractMissingPostToGlobals();
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
switch($btn) {
case "분당김":
$query = "update game set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE),starttime=DATE_SUB(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update general set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update auction set expire=DATE_SUB(expire, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
$gameStor->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);
break;
case "분지연":
$query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
$gameStor->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);
break;
case "토너분당김":
$query = "update game set tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute2 MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$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 "토너분지연":
$query = "update game set tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute2 MINUTE)";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$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();
@@ -61,12 +80,10 @@ case "쌀지급":
processRiceIncome();
break;
case "락걸기":
$query = "update plock set plock=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('plock', ['plock'=>1], true);
break;
case "락풀기":
$query = "update plock set plock=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('plock', ['plock'=>0], true);
break;
}
+18 -15
View File
@@ -7,22 +7,23 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
@@ -35,16 +36,18 @@ $admin = getAdmin();
<html>
<head>
<title>게임관리</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class="tb_layout bg0">
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=_admin1_submit.php>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class="tb_layout bg0">
<tr><td width=110 align=right>운영자메세지</td>
<td colspan=3><input type=textarea size=90 style=color:white;background-color:black; name=msg value='<?=$admin['msg']?>'><input type=submit name=btn value=변경></td></td>
</tr>
@@ -81,7 +84,7 @@ $admin = getAdmin();
</tr>
</table>
</form>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+8 -13
View File
@@ -33,15 +33,14 @@ $startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
extractMissingPostToGlobals();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = getAdmin();
switch ($btn) {
case "변경":
$msg = addslashes(SQ2DQ($msg));
$query = "update game set msg='$msg'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->msg = $msg;
break;
case "로그쓰기":
$lognum = $admin['historyindex'] + 1;
@@ -51,20 +50,16 @@ switch ($btn) {
pushWorldHistory(["<R>★</><S>{$log}</>"]);
break;
case "변경1":
$query = "update game set starttime='$starttime'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
break;
case "변경2":
$query = "update game set maxgeneral='$maxgeneral'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->maxgeneral = $maxgeneral;
break;
case "변경3":
$query = "update game set maxnation='$maxnation'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->maxnation = $maxnation;
break;
case "변경4":
$query = "update game set startyear='$startyear'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->startyear = $startyear;
break;
case "1분턴":
case "2분턴":
@@ -88,8 +83,8 @@ switch ($btn) {
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
$starttime = cutTurn($starttime, $turnterm);
$query = "update game set turnterm='$turnterm',starttime='$starttime'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gameStor->turnterm = $turnterm;
$gameStor->starttime = $starttime;
// 턴시간이 길어지는 경우 랜덤턴 배정
if ($turnterm < $admin['turnterm']) {
$query = "select no from general";
+23 -28
View File
@@ -7,66 +7,61 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
?>
<!DOCTYPE html>
<html>
<head>
<title>회원관리</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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 "
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
<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`)');
$query = "select no,name,npc,block from general 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);
foreach($generalList as $general){
$style = "style=;";
if($general['block'] > 0) { $style .= "background-color:red;"; }
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
@@ -81,7 +76,7 @@ echo "
</td>
<td width=100 align=center>아이템 지급</td>
<td width=504>
<select name=weap size=1 style=color:white;background-color:black;font-size:13>";
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
for($i=0; $i < 27; $i++) {
echo "
<option value={$i}>{$i}</option>";
@@ -131,7 +126,7 @@ for($i=0; $i < 27; $i++) {
</tr>
</table>
</form>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+15 -10
View File
@@ -6,6 +6,8 @@ include "func.php";
$btn = Util::getReq('btn');
$weap = Util::getReq('weap', 'int');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg', 'string');
extractMissingPostToGlobals();
@@ -19,9 +21,11 @@ if($session->userGrade < 5) {
$generalID = $session->generalID;
if(!$generalID){
header('location:_admin2.php');
die();
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$src = MessageTarget::buildQuick($session->generalID);
@@ -91,13 +95,13 @@ switch($btn) {
case "강제 사망":
$date = date('Y-m-d H:i:s');
$db->update('general', [
'turn0'=>0,
'turn0'=>EncodeCommand(0, 0, 0, 0),
'killturn'=>0,
'turntime'=>$date,
], '`no` IN %li', $genlist);
break;
case "특기 부여":
list($year, $month) = $db->queryFirstList('select `year`, `month` from `game` where `no`=1');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$text = "특기 부여!";
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
@@ -110,8 +114,9 @@ switch($btn) {
'special2'=>$specialWar
], 'no=%i', $general['no']);
$specialWarName = SpecialityConst::WAR[$specialWar][0];
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:특기 【<b><C>{$specialWarName}</></b>】(을)를 습득");
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】(을)를 익혔습니다!"]);
$josaUl = JosaUtil::pick($specialWarName, '을');
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
}
break;
@@ -191,12 +196,12 @@ switch($btn) {
], '`no` IN %li', $genlist);
break;
case "접속 허용":
$db->update('genera',[
$db->update('general',[
'con'=>0
], '`no` IN %li', $genlist);
break;
case "접속 제한":
$db->update('genera',[
$db->update('general',[
'con'=>1000
], '`no` IN %li', $genlist);
break;
@@ -311,13 +316,13 @@ switch($btn) {
break;
case "하야입력":
$db->update('general', [
'turn0'=>'00000000000045'
'turn0'=>EncodeCommand(0, 0, 0, 45)
], '`no` IN %li', $genlist);
break;
case "방랑해산":
$db->update('general', [
'turn0'=>'00000000000047',
'turn1'=>'00000000000056'
'turn0'=>EncodeCommand(0, 0, 0, 47),
'turn1'=>EncodeCommand(0, 0, 0, 56)
], '`no` IN %li', $genlist);
break;
case "NPC설정":
@@ -326,7 +331,7 @@ switch($btn) {
], '`no` IN %li', $genlist);
break;
case "00턴":
$turnterm = $db->queryFirstField('SELECT turnterm FROM game LIMIT 1');
$turnterm = $gameStor->turnterm;
foreach($genlist as $generalID){
$turntime = getRandTurn($turnterm);
+24 -27
View File
@@ -7,65 +7,62 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$conlimit = $gameStor->conlimit;
?>
<!DOCTYPE html>
<html>
<head>
<title>멀티관리</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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:13>";
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
$query = "select no,name,npc,block from general where ip!='' order by npc,ip";
$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);
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'] > $admin['conlimit']) { $style .= "color:red;"; }
if($general['con'] > $conlimit) { $style .= "color:red;"; }
echo "
<option value={$general['no']} $style>{$general['name']}</option>";
@@ -90,7 +87,7 @@ echo "
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center width=100>장수명</td>
<td align=center width=180>최근로그인</td>
@@ -137,7 +134,7 @@ echo "
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
?>
</form>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+15 -2
View File
@@ -13,11 +13,11 @@ if($session->userGrade < 5) {
$btn = Util::getReq('btn');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg','string', '메시지');
extractMissingPostToGlobals();
$db = DB::db();
$connect=$db->get();
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
@@ -52,12 +52,25 @@ switch($btn) {
break;
case "강제 사망":
$date = date('Y-m-d H:i:s');
DB::db()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist);
DB::db()->query('update general set turn0=%s,killturn=0,turntime=%s where no IN %li',EncodeCommand(0, 0, 0, 0),$date, $genlist);
break;
case "메세지 전달":
//TODO:새 갠메 시스템으로 변경
$date = date('Y-m-d H:i:s');
$src = MessageTarget::buildQuick($session->generalID);
for($i=0; $i < count($genlist); $i++) {
$msgObj = new Message(
Message::MSGTYPE_PRIVATE,
$src,
MessageTarget::buildQuick($genlist[$i]),
$msg,
new DateTime(),
new \DateTime('9999-12-31'),
[]
);
if($msgObj){
$msgObj->send(true);
}
}
break;
}
+20 -20
View File
@@ -20,22 +20,23 @@ extractMissingPostToGlobals();
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
@@ -47,20 +48,19 @@ $sel2 = [];
$sel[$type] = "selected";
$sel2[$type2] = "selected";
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
?>
<!DOCTYPE html>
<html>
<head>
<title>일제정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>정렬순서 :
@@ -115,7 +115,7 @@ for($i=1; $i <= $count; $i++) {
</td></tr>
</table>
<table align=center width=1600 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px; id=bg0>
<table align=center width=1600 class="tb_layout bg0">
<tr id=bg1>
<td align=center>국명</td>
<td align=center>접률</td>
@@ -262,11 +262,11 @@ for($i=0; $i < $nationCount; $i++) {
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
</table>
<table align=center width=1760 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px; id=bg0>
<table align=center width=1760 class="tb_layout bg0">
<tr id=bg1>
<td width=30 align=center></td>
<td width=30 align=center></td>
@@ -317,7 +317,7 @@ for($i=0; $i < $count; $i++) {
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+18 -15
View File
@@ -14,22 +14,23 @@ extractMissingPostToGlobals();
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
@@ -43,12 +44,14 @@ $sel[$type] = "selected";
<html>
<head>
<title>접속정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -61,7 +64,7 @@ $sel[$type] = "selected";
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<tr id=bg1>
<td align=center width=120>장수명</td>
<td align=center width=50>접속률</td>
@@ -100,7 +103,7 @@ for($i=0; $i < $gencount; $i++) {
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+18 -15
View File
@@ -18,22 +18,23 @@ extractMissingPostToGlobals();
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
@@ -50,12 +51,14 @@ $sel[$type] = "selected";
<html>
<head>
<title>로그정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
@@ -99,7 +102,7 @@ for($i=0; $i < $gencount; $i++) {
</form>
</td></tr>
</table>
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -136,7 +139,7 @@ for($i=0; $i < $gencount; $i++) {
</td>
</tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+20 -17
View File
@@ -14,22 +14,23 @@ extractMissingPostToGlobals();
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
echo "<!DOCTYPE html>
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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>
";
echo banner();
echo "
<?=banner()?>
</body>
</html>";
</html>
<?php
exit();
}
@@ -46,12 +47,14 @@ $sel[$type] = "selected";
<html>
<head>
<title>외교정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
@@ -63,11 +66,11 @@ $sel[$type] = "selected";
</form>
</td></tr>
</table>
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table width=1000 align=center class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue> </td></tr>
<tr>
<td width=100 align=center id=bg1> </td>
<td width=100 align=center id=bg1> </td>
<td width=130 align=center id=bg1> </td>
<td width=130 align=center id=bg1> </td>
<td width=80 align=center id=bg1> </td>
<td width=60 align=center id=bg1> </td>
<td align=center id=bg1> </td>
@@ -155,7 +158,7 @@ for ($i=0; $i < $dipcount; $i++) {
}
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+33 -29
View File
@@ -74,6 +74,7 @@ $dec = 0;
$rice = 0;
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("시뮬", 2);
@@ -81,11 +82,9 @@ $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);
$query = "select * from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$game = MYDB_fetch_array($result);
$admin = $gameStor->getAll();
$con = checkLimit($me['con'], $game['conlimit']);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if($session->userGrade < 3) {
@@ -173,7 +172,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
$opposecount = 0;
}
$warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
$warphase = getRate($admin, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
// 우선 스케일링
$city['def'] *= 10;
@@ -189,7 +188,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
while($phase < $warphase) {
// 장수가 없어서 도시 공격
if($opposecount == 0) {
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."(으)로 성을 <M>공격</>합니다.<br>";
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} 성을 <M>공격</>합니다.<br>";
$mykillnum = 0; $mydeathnum = 0;
while($phase < $warphase) {
@@ -301,7 +301,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $avoid == 1) {
$msg .= "<C>●</><C>회피</>했다!</><br>";
$myCrew /= 10; // 10%만 소모
@@ -379,7 +379,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
}
// 장수 대결
} else {
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."(으)로 <Y>수비장수</>의 ".GameUnitConst::byID($oppose['crewtype'])->name."(을)를 공격합니다.<br>";
$josaUl = JosaUtil::pick(GameUnitConst::byID($oppose['crewtype'])->name, '을');
$josaRo = JosaUtil::pick(GameUnitConst::byID($general['crewtype'])->name, '로');
$msg .= "<C>●</>".GameUnitConst::byID($general['crewtype'])->name."{$josaRo} <Y>수비장수</>의 ".GameUnitConst::byID($oppose['crewtype'])->name."{$josaUl} 공격합니다.<br>";
$mykillnum = 0; $mydeathnum = 0;
while($phase < $warphase) {
@@ -665,7 +667,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
$ratio2 = getRate($admin, $general['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $myAvoid == 1) {
$msg .= "<C>●</><C>회피</>했다!</><br>";
$myCrew /= 10; // 10%만 소모
@@ -673,7 +675,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율
$ratio2 = getRate($admin, $oppose['crewtype'], "avd"); //회피율
if($ratio < $ratio2 && $opAvoid == 1) {
$msg .= "<C>●</>상대가 <R>회피</>했다!</><br>";
$opCrew /= 10; // 10%만 소모
@@ -802,8 +804,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평
$def = 7000;
$wall = 7000;
$train3 = $game['city_rate'];
$atmos3 = $game['city_rate'];
$train3 = $admin['city_rate'];
$atmos3 = $admin['city_rate'];
}
switch($level1) {
@@ -1138,10 +1140,12 @@ switch($dex240) {
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title>전투시뮬레이션</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style type="text/css">
select { background-color:black;color:white; }
input { background-color:black;color:white; }
@@ -1151,7 +1155,7 @@ input { background-color:black;color:white; }
<body>
<form method=post action=_simul.php>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr id=bg1>
<td>공격장수</td>
<td>상대장수</td>
@@ -1584,7 +1588,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
?>
</td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr id=bg1>
<td align=right></td>
<td align=center>공격</td>
@@ -1598,31 +1602,31 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
<?php
for($i=0; $i <= 5; $i++) {
printSimul($game, $i);
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=10; $i <= 14; $i++) {
printSimul($game, $i);
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=20; $i <= 27; $i++) {
printSimul($game, $i);
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=30; $i <= 38; $i++) {
printSimul($game, $i);
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
for($i=40; $i <= 43; $i++) {
printSimul($game, $i);
printSimul($admin, $i);
}
echo "
<tr><td height=5 colspan=8 id=bg1></td></tr>";
@@ -1633,13 +1637,13 @@ if($isgen == "장수공격" || $isgen == "성벽공격") {
</html>
<?php
function printSimul($game, $i) {
$att = $game["att{$i}"];
$def = $game["def{$i}"];
$spd = $game["spd{$i}"];
$avd = $game["avd{$i}"];
$cst = $game["cst{$i}"];
$ric = $game["ric{$i}"];
function printSimul($admin, $i) {
$att = $admin["att{$i}"];
$def = $admin["def{$i}"];
$spd = $admin["spd{$i}"];
$avd = $admin["avd{$i}"];
$cst = $admin["cst{$i}"];
$ric = $admin["ric{$i}"];
echo "
<tr>
<td align=right>".GameUnitConst::byId($i)->name."</td>
+211 -287
View File
@@ -13,40 +13,34 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("명장일람", 2);
increaseRefresh("명장일람", 1);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$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);
$con = checkLimit($me['con'], $admin['conlimit']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명장일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1100 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1100 class='tb_layout bg0'>
<form name=form1 action=a_bestGeneral.php method=post>
<tr><td align=center>
<input type=submit name=btn value='유저 보기'>
@@ -54,293 +48,223 @@ if ($con >= 2) {
</td></tr>
</form>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<div style="margin:auto;width=1000px;">
<?php
if (isset($btn) && $btn == "NPC 보기") {
//FIXME: query가 너무 적나라.
$sel = "npc>=2";
} else {
$sel = "npc<2";
}
$nationName = ['재야'];
$nationColor = ['#000000'];
$nationName = [0=>'재야'];
$nationColor = [0=>'#000000'];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
$type = array(
"명 성",
"계 급",
"계 략 성 공",
"전 투 횟 수",
"승 리",
"승 률",
"사 살",
"살 상 률",
"보 병 숙 련 도",
"궁 병 숙 련 도",
"기 병 숙 련 도",
"귀 병 숙 련 도",
"차 병 숙 련 도",
"전 력 전 승 률",
"통 솔 전 승 률",
"일 기 토 승 률",
"설 전 승 률",
"베 팅 투 자 액",
"베 팅 당 첨",
"베 팅 수 익 금",
"베 팅 수 익 률"
);
$types = [
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
["계 략 성 공", "int", function($v){
$v['value'] = $v['firenum'];
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
$v['name'] = '???';
$v['owner_name'] = null;
$v['bgColor'] = GameConst::$basecolor4;
$v['fgColor'] = newColor($v['bgColor']);
return $v;
}],
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }],
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }],
["승 률", "percent", function($v){
if($v['warnum'] < 10){
$v['value'] = 0;
}
else{
$v['value'] = $v['killnum'] / max(1, $v['warnum']);
}
return $v;
}],
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }],
["살 상 률", "percent", function($v){
if($v['warnum'] < 10){
$v['value'] = 0;
}
else{
$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']);
}
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; }],
["전 력 전 승 률", "percent", function($v){
$totalCnt = $v['ttw']+$v['ttd']+$v['ttl'];
if($totalCnt < 50){
$v['value'] = 0;
}
else{
$v['value'] = $v['ttw']/max(1, $totalCnt);
}
return $v;
}],
["통 솔 전 승 률", "percent", function($v){
$totalCnt = $v['tlw']+$v['tld']+$v['tll'];
if($totalCnt < 50){
$v['value'] = 0;
}
else{
$v['value'] = $v['tlw']/max(1, $totalCnt);
}
return $v;
}],
["일 기 토 승 률", "percent", function($v){
$totalCnt = $v['tpw']+$v['tpd']+$v['tpl'];
if($totalCnt < 50){
$v['value'] = 0;
}
else{
$v['value'] = $v['tpw']/max(1, $totalCnt);
}
return $v;
}],
["설 전 승 률", "percent", function($v){
$totalCnt = $v['tiw']+$v['tid']+$v['til'];
if($totalCnt < 50){
$v['value'] = 0;
}
else{
$v['value'] = $v['tiw']/max(1, $totalCnt);
}
return $v;
}],
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }],
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }],
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }],
["베 팅 수 익 률", "percent", function($v){
if($v['betgold'] < 1000){
$v['value'] = 0;
}
else{
$v['value'] = $v['betwingold']/max(1, $v['betgold']);
}
return $v;
}],
];
for ($i=0; $i < 21; $i++) {
$name = [];
$data = [];
$color = [];
$pic = [];
switch ($i) {
case 0: $query = "select nation,no,name,picture,imgsvr,experience as data from general where $sel order by data desc limit 0,10"; break;
case 1: $query = "select nation,no,name,picture,imgsvr,dedication as data from general where $sel order by data desc limit 0,10"; break;
case 2: $query = "select nation,no,name,picture,imgsvr,firenum as data from general where $sel order by data desc limit 0,10"; break;
case 3: $query = "select nation,no,name,picture,imgsvr,warnum as data from general where $sel order by data desc limit 0,10"; break;
case 4: $query = "select nation,no,name,picture,imgsvr,killnum as data from general where $sel order by data desc limit 0,10"; break;
case 5: $query = "select nation,no,name,picture,imgsvr,killnum/warnum*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break;
case 6: $query = "select nation,no,name,picture,imgsvr,killcrew as data from general where $sel order by data desc limit 0,10"; break;
case 7: $query = "select nation,no,name,picture,imgsvr,killcrew/deathcrew*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break;
case 8: $query = "select nation,no,name,picture,imgsvr,dex0 as data from general where $sel order by data desc limit 0,10"; break;
case 9: $query = "select nation,no,name,picture,imgsvr,dex10 as data from general where $sel order by data desc limit 0,10"; break;
case 10: $query = "select nation,no,name,picture,imgsvr,dex20 as data from general where $sel order by data desc limit 0,10"; break;
case 11: $query = "select nation,no,name,picture,imgsvr,dex30 as data from general where $sel order by data desc limit 0,10"; break;
case 12: $query = "select nation,no,name,picture,imgsvr,dex40 as data from general where $sel order by data desc limit 0,10"; break;
case 13: $query = "select nation,no,name,picture,imgsvr,ttw/(ttw+ttd+ttl)*10000 as data from general where $sel and (ttw+ttd+ttl)>=50 order by data desc limit 0,10"; break;
case 14: $query = "select nation,no,name,picture,imgsvr,tlw/(tlw+tld+tll)*10000 as data from general where $sel and (tlw+tld+tll)>=50 order by data desc limit 0,10"; break;
case 15: $query = "select nation,no,name,picture,imgsvr,tpw/(tpw+tpd+tpl)*10000 as data from general where $sel and (tpw+tpd+tpl)>=50 order by data desc limit 0,10"; break;
case 16: $query = "select nation,no,name,picture,imgsvr,tiw/(tiw+tid+til)*10000 as data from general where $sel and (tiw+tid+til)>=50 order by data desc limit 0,10"; break;
case 17: $query = "select nation,no,name,picture,imgsvr,betgold as data from general where $sel order by data desc limit 0,10"; break;
case 18: $query = "select nation,no,name,picture,imgsvr,betwin as data from general where $sel order by data desc limit 0,10"; break;
case 19: $query = "select nation,no,name,picture,imgsvr,betwingold as data from general where $sel order by data desc limit 0,10"; break;
case 20: $query = "select nation,no,name,picture,imgsvr,betwingold/betgold*10000 as data from general where $sel and betgold >= 1000 order by data desc limit 0,10"; break;
$generals = array_map(function($general) use($nationColor, $nationName) {
$general['bgColor'] = $nationColor[$general['nation']]??GameConst::$basecolor4;
$general['fgColor'] = newColor($general['bgColor']);
$general['nationName'] = $nationName[$general['nation']];
if(key_exists('picture', $general)){
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
echo "
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
<tr align=center id=bg2><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr>
<tr>";
for ($k=0; $k < 10; $k++) {
$gen = MYDB_fetch_array($result);
if ($i != 2) {
if (isset($gen)) {
$name[$k] = $gen['name'];
$nation[$k] = $nationName[$gen['nation']];
$data[$k] = $gen['data'];
$color[$k] = $nationColor[$gen['nation']];
$pic[$k] = $gen['picture'];
} else {
$name[$k] = "-";
$nation[$k] = "-";
$data[$k] = "-";
$color[$k] = GameConst::$basecolor4;
$pic[$k] = "";
}
} else {
$name[$k] = "???";
$nation[$k] = "???";
$data[$k] = $gen['data'];
$color[$k] = GameConst::$basecolor4;
$gen['imgsvr'] = 0;
$pic[$k] = "9999.jpg";
}
if ($color[$k] == "") {
$color[$k] = GameConst::$basecolor4;
}
if ($nation[$k] == "") {
$nation[$k] = "&nbsp;";
}
if ($pic[$k] == "") {
echo "<td align=center>&nbsp;</td>";
} else {
$imageTemp = GetImageURL($gen['imgsvr']);
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></td>";
}
else{
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
}
echo "</tr><tr>";
return $general;
}, $db->query(
"SELECT nation,no,name,name2 as owner_name, picture, imgsvr,
experience, dedication, firenum, warnum, killnum, killcrew, deathcrew,
dex0, dex10, dex20, dex30, dex40,
ttw, ttd, ttl, tlw, tld, tll, tpw, tpd, tpl, tiw, tid, til,
betgold, betwin, betwingold,
horse, weap, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2"));
for ($k=0; $k < 10; $k++) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
}
echo "</tr><tr>";
$templates = new \League\Plates\Engine('templates');
for ($k=0; $k < 10; $k++) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
}
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
$validCnt = 0;
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt){
$general = ($typeFunc)($general);
$value = $general['value'];
echo "</tr><tr>";
for ($k=0; $k < 10; $k++) {
if($data[$k] === '-'){
//do Nothing
if($value > 0){
$validCnt+=1;
}
else if ($i == 5 || $i == 7 || $i == 20) {
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
if($typeValue == 'percent'){
$general['printValue'] = number_format($value*100, 2).'%';
}
else if ($i >= 13 && $i <= 16) {
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
else {
$general['printValue'] = number_format($value);
}
echo "<td align=center>{$data[$k]}</td>";
}
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
return $general;
}, $generals);
usort($typeGenerals, function($lhs, $rhs){
//내림차순
return -($lhs['value'] <=> $rhs['value']);
});
echo $templates->render('hallOfFrame', [
'typeName'=>$typeName,
'generals'=>array_slice($typeGenerals, 0, min(10, $validCnt))
]);
}
echo "
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
";
$type = array(
"명 마",
"명 검",
"명 서",
"도 구"
);
$call = array(
"horse",
"weap",
"book",
"item"
);
$func = array(
"\\sammo\\getHorseName",
"\\sammo\\getWeapName",
"\\sammo\\getBookName",
"\\sammo\\getItemName"
);
for ($i=0; $i < 4; $i++) {
$name = [];
$data = [];
$color = [];
$pic = [];
echo "
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
<tr align=center id=bg2>";
for ($k=26; $k > 16; $k--) {
$str = $func[$i]($k);
echo "<td>".$str."</td>";
}
echo "</tr><tr>";
for ($k=26; $k > 16; $k--) {
$query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen = MYDB_fetch_array($result);
if (isset($gen)) {
$name[$k] = $gen['name'];
$nation[$k] = $nationName[$gen['nation']];
$color[$k] = $nationColor[$gen['nation']];
$pic[$k] = $gen['picture'];
} else {
$name[$k] = "미발견";
$nation[$k] = "-";
$color[$k] = "";
$pic[$k] = "";
}
if ($color[$k] == "") {
$color[$k] = GameConst::$basecolor4;
}
if ($nation[$k] == "") {
$nation[$k] = "&nbsp;";
}
if ($pic[$k] == "") {
echo "<td align=center>&nbsp;</td>";
} else {
$imageTemp = GetImageURL($gen['imgsvr']??0);
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
}
}
echo "</tr><tr>";
for ($k=26; $k > 16; $k--) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
}
echo "</tr><tr>";
for ($k=26; $k > 16; $k--) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
}
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
echo "
<tr align=center id=bg2>";
for ($k=16; $k > 6; $k--) {
$str = $func[$i]($k);
echo "<td>".$str."</td>";
}
echo "</tr><tr>";
for ($k=16; $k > 6; $k--) {
$query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen = MYDB_fetch_array($result);
if (isset($gen)) {
$name[$k] = $gen['name'];
$nation[$k] = $nationName[$gen['nation']];
$color[$k] = $nationColor[$gen['nation']];
$pic[$k] = $gen['picture'];
} else {
$name[$k] = "미발견";
$nation[$k] = "-";
$color[$k] = "";
$pic[$k] = "";
}
if ($color[$k] == "") {
$color[$k] = GameConst::$basecolor4;
}
if ($nation[$k] == "") {
$nation[$k] = "&nbsp;";
}
if ($pic[$k] == "") {
echo "<td align=center>&nbsp;</td>";
} else {
$imageTemp = GetImageURL($gen['imgsvr']??0);
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
}
}
echo "</tr><tr>";
for ($k=16; $k > 6; $k--) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
}
echo "</tr><tr>";
for ($k=16; $k > 6; $k--) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
}
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
}
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
</div>
<div style="margin:auto;width=1000px;margin-top:5px;">
<?php
//유니크 아이템 소유자
$itemTypes = [
["명 마", 'horse', function($v){return getHorseName($v);}, 7, 26, []],
["명 검", 'weap', function($v){return getWeapName($v);}, 7, 26, []],
["명 서", 'book', function($v){return getBookName($v);}, 7, 26, []],
["도 구", 'item', function($v){return displayItemInfo($v);}, 7, 26, []],
];
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
foreach($generals as $general){
foreach($itemTypes as $itemIdx=>[,$itemType, $itemFunc,,,]){
$itemCode = $general[$itemType];
if($itemCode <= 6){
continue;
}
$itemName = ($itemFunc)($itemCode);
$general['rankName'] = $itemName;
$general['value'] = $itemCode;
$itemTypes[$itemIdx][5][$itemCode] = $general;
}
}
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),
];
$itemRanker[$itemCode] = $emptyCard;
continue;
}
$general = $itemOwners[$itemCode];
$itemRanker[$itemCode] = $general;
}
echo $templates->render('hallOfFrame', [
'typeName'=>$itemNameType,
'generals'=>$itemRanker
]);
}
?>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+65 -153
View File
@@ -4,203 +4,115 @@ namespace sammo;
include "lib.php";
include "func.php";
$select = Util::getReq('select', 'int', 0);
extractMissingPostToGlobals();
$db = DB::db();
$connect=$db->get();
increaseRefresh("왕조일람", 2);
increaseRefresh("왕조일람", 1);
?>
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;color:white;background-color:black" id=bg0>
<table align=center width=1000 class="tb_layout bg0">
<tr><td> <br>
<input type=button value='창 닫기' onclick=window.close()><br>
<button onclick=window.close()> 닫기</button><br>
</td></tr>
</table>
<?php
if ($select == 0) {
$query = "select * from emperior order by no desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$empcount = MYDB_num_rows($result);
$showCurrentNation = true;
for ($i=0; $i < $empcount; $i++) {
$emperior = MYDB_fetch_array($result);
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
echo "
<form action=a_emperior.php method=post>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style='font-size:13px;word-break:break-all;color:white;' id=bg0>
if($emperiors){
$serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null);
if($serverID == UniqueConst::$serverID){
$showCurrentNation = false;
}
}
if ($showCurrentNation) {
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
?>
<table align=center width=1000 style="margin-top:10px;" 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 style="background-color:#333333;" align=center colspan=8>
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
<a href="a_emperior_detail.php"><button>자세히</button></a>
<a href="a_history.php"><button>역사 보기</button></a>
</td>
</tr>
<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=123> </td>
<td align=center width=123>{$emperior['power']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['gennum']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['citynum']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['type']}</td>
</tr>
<tr>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l12name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l11name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l10name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l9name']}</td>
</tr>
</table>
</form>";
}
} else {
$query = "select * from emperior where no='$select'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$emperior = MYDB_fetch_array($result);
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style='font-size:13px;word-break:break-all;color:white;' id=bg0>
<?php
}
foreach($emperiors as $emperior){
$serverID = $emperior['server_id']??($emperior['serverID']??null);
?>
<table align=center width=1000 style="margin-top:10px;" 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 bgcolor=skyblue align=center colspan=8>
<font size=5><?=$emperior['phase']?></font>
<a href="a_emperior_detail.php?select=<?=$emperior['no']?>"><button>자세히</button></a>
<?php if($emperior['server_id']): ?>
<a href="a_history.php?serverID=<?=$emperior['server_id']?>"><button>역사 보기</button></a>
<?php endif ?>
</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 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 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>
<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 width=64>&nbsp;</td>
<td width=332>{$emperior['l12name']}</td>
<td align=center><?=$emperior['l12name']?></td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l11name']}</td>
</tr>
<tr>
<td align=center><?=$emperior['l11name']?></td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l10name']}</td>
<td align=center><?=$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>
<td align=center><?=$emperior['l9name']?></td>
</tr>
</table>
";
<?php
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all;color:white; id=bg0>
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+25 -23
View File
@@ -17,15 +17,17 @@ increaseRefresh("왕조일람", 2);
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br>
<input type=button value='창 닫기' onclick=window.close()><br>
</td></tr>
@@ -43,7 +45,7 @@ if ($select == 0) {
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=8>
<font size=5>{$emperior['phase']}</font>
@@ -57,24 +59,24 @@ if ($select == 0) {
</td>
</tr>
<tr>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['power']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['gennum']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['citynum']}</td>
<td id=bg1 align=center width=123> </td>
<td align=center width=123>{$emperior['type']}</td>
<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 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l12name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l11name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l10name']}</td>
<td id=bg1 width=123 align=center> </td>
<td width=123 align=center>{$emperior['l9name']}</td>
<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>";
@@ -86,7 +88,7 @@ if ($select == 0) {
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=6>
<font size=5>{$emperior['phase']}</font>
@@ -198,7 +200,7 @@ if ($select == 0) {
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+210
View File
@@ -0,0 +1,210 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$select = Util::getReq('select', 'int', 0);
$db = DB::db();
$templates = new \League\Plates\Engine('templates');
$templates->registerFunction('ConvertLog', '\sammo\ConvertLog');
$templates->registerFunction('newColor', '\sammo\newColor');
increaseRefresh("왕조일람", 1);
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select);
$serverID = $emperior['server_id']??($emperior['serverID']??null);
?>
<!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::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class="tb_layout bg0">
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
<button onclick=window.close()> 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
</td></tr>
</table>
<?php
if($emperior):
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=6>
<font size=5><?=$emperior['phase']?></font>
</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>
<?php
endif;
$showServers = $serverID || (!$emperior);
if(!$serverID){
$serverID = UniqueConst::$serverID;
}
if($showServers){
$nations = $db->query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID);
foreach($nations as $nation){
if(!$nation['nation']??null){
continue;
}
$nation += Json::decode($nation['data']);
$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']);
if(count($generals) != $nation['generals'] && $serverID == UniqueConst::$serverID){
$liveGenerals = $nation['generals'];
foreach($generals as $general){
if(in_array($general['general_no'], $nation['generals'])){
unset($nation['generals'][$general['general_no']]);
}
}
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
$nation['generalsFull'] = array_merge($liveGenerals, $generals);
}
else{
$nation['generalsFull'] = $generals;
}
}
else{
$nation['generalsFull'] = [];
}
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
$nation += Json::decode($nation['aux']);
}
echo $templates->render('oldNation', $nation);
}
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
+54 -44
View File
@@ -13,19 +13,16 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("장수일람", 2);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$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);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -40,16 +37,22 @@ if ($type <= 0 || $type > 15) {
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 장수일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<script type="text/javascript" src="../e_lib/jquery-3.2.1.min.js"></script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select id='viewType' name='type' size=1>
@@ -82,44 +85,44 @@ foreach (getAllNationStaticInfo() as $nation) {
}
switch ($type) { //FIXME: $query 처리 조심.
case 1: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by nation"; break;
case 2: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by leader desc"; break;
case 3: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by power desc"; break;
case 4: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by intel desc"; break;
case 5: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 6: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by dedication desc"; break;
case 7: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by level desc"; break;
case 8: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by killturn"; break;
case 1: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by nation"; break;
case 2: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by leader desc"; break;
case 3: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by power desc"; break;
case 4: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by intel desc"; break;
case 5: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 6: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by dedication desc"; break;
case 7: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by level desc"; break;
case 8: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by killturn"; break;
default:
case 9: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by connect desc"; break;
case 10: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 11: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by personal"; break;
case 12: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special desc"; break;
case 13: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special2 desc"; break;
case 14: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by age desc"; break;
case 15: $query = "select picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by npc desc"; break;
case 9: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by connect desc"; break;
case 10: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by experience desc"; break;
case 11: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by personal"; break;
case 12: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special desc"; break;
case 13: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by special2 desc"; break;
case 14: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by age desc"; break;
case 15: $query = "select no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by npc desc"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
echo"
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=64 align=center id=bg1> </td>
<td width=100 align=center id=bg1> </td>
<td width=50 align=center id=bg1>연령</td>
<td width=50 align=center id=bg1>성격</td>
<td width=90 align=center id=bg1>특기</td>
<td width=50 align=center id=bg1> </td>
<td width=100 align=center id=bg1> </td>
<td width=60 align=center id=bg1> </td>
<td width=60 align=center id=bg1> </td>
<td width=80 align=center id=bg1> </td>
<td width=140 align=center id=bg1> </td>
<td width=45 align=center id=bg1>연령</td>
<td width=45 align=center id=bg1>성격</td>
<td width=80 align=center id=bg1>특기</td>
<td width=45 align=center id=bg1> </td>
<td width=140 align=center id=bg1> </td>
<td width=55 align=center id=bg1> </td>
<td width=55 align=center id=bg1> </td>
<td width=75 align=center id=bg1> </td>
<td width=45 align=center id=bg1>통솔</td>
<td width=45 align=center id=bg1>무력</td>
<td width=45 align=center id=bg1>지력</td>
<td width=45 align=center id=bg1>삭턴</td>
<td width=84 align=center id=bg1>벌점</td>
<td width=70 align=center id=bg1>벌점</td>
</tr>";
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
@@ -133,20 +136,20 @@ for ($j=0; $j < $gencount; $j++) {
$lbonus = 0;
}
if ($lbonus > 0) {
$lbonus = "<font color=cyan>+{$lbonus}</font>";
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonus = "";
$lbonusText = "";
}
if ($general['injury'] > 0) {
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
$leader = "<font color=red>{$leader}</font>{$lbonus}";
$leader = "<font color=red>{$leader}</font>{$lbonusText}";
$power = "<font color=red>{$power}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leader = "{$general['leader']}{$lbonus}";
$leader = "{$general['leader']}{$lbonusText}";
$power = "{$general['power']}";
$intel = "{$general['intel']}";
}
@@ -163,12 +166,19 @@ for ($j=0; $j < $gencount; $j++) {
$imageTemp = GetImageURL($general['imgsvr']);
echo "
<tr>
<tr data-general-id='{$general['no']}'
data-general-wounded='{$general['injury']}'
data-general-leadership='{$general['leader']}'
data-general-leadership-bonus='{$lbonus}'
data-general-power='{$general['power']}'
data-general-intel='{$general['intel']}'
data-is-npc='".($general['npc']>=2?'true':'false')."'
>
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
<td align=center>$name</td>
<td align=center>{$general['age']}</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
<td align=center>{$nation}</td>
<td align=center>".getHonor($general['experience'])."</td>
@@ -190,7 +200,7 @@ echo "
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+112 -87
View File
@@ -4,117 +4,142 @@ namespace sammo;
include "lib.php";
include "func.php";
$session = Session::getInstance()->setReadOnly();
$scenarioIdx = Util::getReq('scenarioIdx', 'int', null);
$db = DB::db();
$connect=$db->get();
increaseRefresh("명예의전당", 1);
$scenarioList= [];
foreach($db->query('SELECT scenario_name as name, count(scenario) as cnt, scenario from ng_games group by scenario order by scenario asc') as $scenarioInfo){
$scenarioList[$scenarioInfo['scenario']] = $scenarioInfo;
}
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
$searchScenarioName = $scenarioList[$scenarioIdx]['name'];
$searchFilter = $db->sqleval('scenario = %i', $scenarioIdx);
}
else{
$searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval(true);
}
increaseRefresh("명예의전당", 2);
?>
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJs('js/hallOfFame.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=Font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1100 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<option value="" <?=$scenarioIdx?"selected='selected'":''?>>* 종합 *</option>
<?php foreach($scenarioList as $info): ?>
<option
value="<?=$info['scenario']?>"
<?=($info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?>
?>
</select>
</td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<div style="margin:auto;width=1100px;">
<?php
$type = array(
"명 성",
"계 급",
"계 략 성 공",
"전 투 횟 수",
"승 리",
"승 률",
"사 살",
"살 상 률",
"보 병 숙 련 도",
"궁 병 숙 련 도",
"기 병 숙 련 도",
"귀 병 숙 련 도",
"차 병 숙 련 도",
"전 력 전 승 률",
"통 솔 전 승 률",
"일 기 토 승 률",
"설 전 승 률",
"베 팅 투 자 액",
"베 팅 당 첨",
"베 팅 수 익 금",
"베 팅 수 익 률"
);
for ($i=0; $i < 21; $i++) {
$name = [];
$nation = [];
$data = [];
$color = [];
$pic = [];
$query = "select * from hall where type={$i} order by rank";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$types = [
["명 성", 'int'],
["계 급", 'int'],
["계 략 성 공", 'int'],
["전 투 횟 수", 'int'],
["승 리", 'int'],
["승 률", 'percent'],
["사 살", 'int'],
["살 상 률", 'percent'],
["보 병 숙 련 도", 'int'],
["궁 병 숙 련 도", 'int'],
["기 병 숙 련 도", 'int'],
["귀 병 숙 련 도", 'int'],
["차 병 숙 련 도", 'int'],
["전 력 전 승 률", 'percent'],
["통 솔 전 승 률", 'percent'],
["일 기 토 승 률", 'percent'],
["설 전 승 률", 'percent'],
["베 팅 투 자 액", 'int'],
["베 팅 당 첨", 'int'],
["베 팅 수 익 금", 'int'],
["베 팅 수 익 률", 'percent'],
];
echo "
<tr><td align=center colspan=10 id=bg1><font size=4>$type[$i]</font></td></tr>
<tr align=center id=bg2><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr>
<tr>";
$templates = new \League\Plates\Engine('templates');
for ($k=0; $k < 10; $k++) {
$gen = MYDB_fetch_array($result);
$name[$k] = $gen['name'];
$nation[$k] = $gen['nation'];
$data[$k] = $gen['data'];
$color[$k] = $gen['color'];
$pic[$k] = $gen['picture'];
if ($color[$k] == "") {
$color[$k] = GameConst::$basecolor4;
foreach($types as $idx=>[$typeName, $typeValue]) {
$hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
$hallResult = array_map(function($general)use($typeValue){
$aux = Json::decode($general['aux']);
$general += $aux;
if(!key_exists('bgColor', $general)){
if(!key_exists('color', $general)){
$general['bgColor'] = GameConst::$basecolor4;
}
else{
$general['bgColor'] = $general['color'];
}
}
if ($nation[$k] == "") {
$nation[$k] = "&nbsp;";
if(!key_exists('fgColor', $general)){
$general['fgColor'] = newColor($general['bgColor']);
}
/*
if($pic[$k] == "") {
echo "<td align=center>&nbsp;</td>";
} else {
$imageTemp = GetImageURL($gen['imgsvr']);
echo "<td align=center><img width='64' height='64' src={$imageTemp}/{$pic[$k]}></img></td>";
}
*/
}
// echo "</tr><tr>";
for ($k=0; $k < 10; $k++) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$nation[$k]}</td>";
}
echo "</tr><tr>";
for ($k=0; $k < 10; $k++) {
echo "<td align=center style=background-color:{$color[$k]};color:".newColor($color[$k]).">{$name[$k]}</td>";
}
echo "</tr><tr>";
for ($k=0; $k < 10; $k++) {
if ($i == 5 || $i == 7 || $i == 20) {
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
if(key_exists('picture', $general)){
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
}
if ($i >= 13 && $i <= 16) {
$data[$k] = intdiv($data[$k], 100).".".($data[$k]%100)." %";
else{
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
}
echo "<td align=center>{$data[$k]}</td>";
}
echo "</tr><tr><td colspan=10 height=5 id=bg1></td></tr>";
if(!key_exists('printValue', $general)){
$value = $general['value'];
if($typeValue == 'percent'){
$general['printValue'] = number_format($value*100, 2).'%';
}
else {
$general['printValue'] = number_format($value);
}
}
return $general;
}, $hallResult);
echo $templates->render('hallOfFrame', [
'typeName'=>$typeName,
'generals'=>$hallResult
]);
}
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+70 -49
View File
@@ -5,6 +5,7 @@ include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$yearmonth = Util::getReq('yearmonth', 'int');
$serverID = Util::getReq('serverID', 'string', null);
extractMissingPostToGlobals();
@@ -13,36 +14,52 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("연감", 2);
if(!$serverID){
$serverID = UniqueConst::$serverID;
}
$query = "select startyear,year,month,conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
if($serverID === UniqueConst::$serverID){
increaseRefresh("연감", 1);
}
$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);
$admin = $gameStor->getValues(['startyear','year','month','map_theme']);
$con = checkLimit($me['con'], $admin['conlimit']);
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$query = "select year,month from history order by no limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$history = MYDB_fetch_array($result);
$s = ($history['year']*12) + $history['month'];
$query = "select year,month from history order by no desc limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$history = MYDB_fetch_array($result);
$e = ($history['year']*12) + $history['month'];
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
$s = $s_year * 12 + $s_month;
if($s_year === null){
echo '인자 에러';
exit();
}
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
$e = $e_year * 12 + $e_month;
if($serverID !== UniqueConst::$serverID){
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID)?:'che';
}
else{
$mapTheme = $admin['map_theme']??'che';
}
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
if (!$yearmonth) {
if($serverID !== UniqueConst::$serverID && !$yearmonth){
$year = $s_year;
$month = $s_month;
}
else if (!$yearmonth) {
$year = $admin['year'];
$month = $admin['month'] - 1;
} else {
@@ -76,22 +93,26 @@ if ($month <= 0) {
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 연감</title>
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../d_shared/common_path.js"></script>
<script src="js/common.js"></script>
<script src="js/base_map.js"></script>
<script src="js/map.js"></script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
<?=WebUtil::printJS('js/map.js')?>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<link href="css/map.css" rel="stylesheet">
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
@@ -99,24 +120,19 @@ if ($month <= 0) {
<input type=submit name=btn value="◀◀ 이전달">
<select name=yearmonth size=1>
<?php
$query = "select year,month from history";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$histCount = MYDB_num_rows($result);
for ($i=0; $i < $histCount; $i++) {
$history = MYDB_fetch_array($result);
$value = "".$history['year'].StringUtil::padStringAlignRight($history['month'], 2, "0");
if ($history['year'] == $year && $history['month'] == $month) {
$dates = $db->queryAllLists('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC', $serverID);
foreach($dates as [$hYear, $hMonth]){
$value = "".$hYear.StringUtil::padStringAlignRight($hMonth, 2, "0");
if ($hYear == $year && $hMonth == $month) {
echo "
<option selected value={$value}>{$history['year']} {$history['month']}</option>";
<option selected value={$value}>{$hYear} {$hMonth}</option>";
} else {
echo "
<option value={$value}>{$history['year']} {$history['month']}</option>";
<option value={$value}>{$hYear} {$hMonth}</option>";
}
}
$query = "select log,genlog,nation,power,gen,city from history where year='$year' and month='$month'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$history = MYDB_fetch_array($result);
$history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
?>
</select>
<input type=submit name=btn value='조회하기'>
@@ -124,16 +140,16 @@ $history = MYDB_fetch_array($result);
</form>
</td></tr>
</table>
<table align=center width=1000 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 height=520 class='tb_layout bg0'>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<tr height=520>
<td width=698>
<?=getMapHtml();?>
<?=getMapHtml($mapTheme);?>
<td width=98 valign=top><?=$history['nation']?></td>
<td width=78 valign=top><?=$history['power']?></td>
<td width=58 valign=top><?=$history['gen']?></td>
<td width=58 valign=top><?=$history['city']?></td>
<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>
@@ -148,15 +164,20 @@ $history = MYDB_fetch_array($result);
</td>
</tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
reloadWorldMap({
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>',
targetJson:'j_map_history.php?year=<?=$year?>&month=<?=$month?>&serverID=<?=$serverID?>',
showMe:false,
neutralView:true
neutralView:true,
useCachedMap:false,
year:<?=$year?>,
month:<?=$month?>,
});
</script>
</body>
+21 -20
View File
@@ -8,34 +8,35 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력일람", 2);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$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);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
?>
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<?php
@@ -127,19 +128,19 @@ for($i=1; $i <= $count; $i++) {
else { $l5 = $level5['name']; }
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}> {$nation['name']} </td>
</tr>
<tr>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>".getNationLevel($nation['level'])."</td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>{$nation['power']}</td>
<td width=123 align=center id=bg1>장수 / 속령</td>
<td width=123 align=center>{$gencount} / {$citycount}</td>
<td width=80 align=center id=bg1> </td>
<td width=170 align=center><font color=yellow>".getNationType($nation['type'])."</font></td>
<td width=80 align=center id=bg1> </td>
<td width=170 align=center>".getNationLevel($nation['level'])."</td>
<td width=80 align=center id=bg1> </td>
<td width=170 align=center>{$nation['power']}</td>
<td width=80 align=center id=bg1>장수 / 속령</td>
<td width=170 align=center>{$gencount} / {$citycount}</td>
</tr>
<tr>
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
@@ -209,7 +210,7 @@ $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect
$citycount = MYDB_num_rows($cityresult);
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=5 align=center> </td>
</tr>
@@ -244,7 +245,7 @@ echo"
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+15 -8
View File
@@ -25,15 +25,22 @@ $sel[$type] = "selected";
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -71,7 +78,7 @@ $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect)
$gencount = MYDB_num_rows($genresult);
echo"
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=102 align=center id=bg1>희생된 장수</td>
<td width=102 align=center id=bg1>악령 이름</td>
@@ -104,8 +111,8 @@ for ($j=0; $j < $gencount; $j++) {
<td align=center>{$general['name2']}</td>
<td align=center>Lv {$general['explevel']}</td>
<td align=center>{$nation}</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>{$general['sum']}</td>
<td align=center>{$general['leader']}</td>
<td align=center>{$general['power']}</td>
@@ -120,7 +127,7 @@ echo "
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+23 -18
View File
@@ -8,20 +8,19 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력도", 2);
checkTurn();
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$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);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
?>
<!DOCTYPE html>
@@ -29,40 +28,46 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력도</title>
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../d_shared/common_path.js"></script>
<script src="js/common.js"></script>
<script src="js/base_map.js"></script>
<script src="js/map.js"></script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
$(function(){
reloadWorldMap({
neutralView:true,
showMe:true
showMe:true,
useCachedMap:true
});
});
</script>
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/normalize.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
</head>
<body>
<table align=center width=1200 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1200 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<table align=center width=1200 height=520 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1200 height=520 class='tb_layout bg0'>
<tr height=520>
<td width=498 valign=top>
<?=getGeneralPublicRecordRecent(34)?>
</td>
<td width=698>
<?=getMapHtml()?>
<?=getMapHtml($mapTheme)?>
</td>
</tr>
<tr>
@@ -71,7 +76,7 @@ $(function(){
</td>
</tr>
</table>
<table align=center width=1200 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1200 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+93 -166
View File
@@ -5,15 +5,14 @@ include "lib.php";
include "func.php";
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("갱신정보", 2);
$query = "select year,month,refresh,maxrefresh,maxonline from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$game = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
$log = getRawFileLogRecent(__dir__.'/logs/_traffic.txt', 11, 100);
$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
$date = [];
$year = [];
@@ -30,237 +29,165 @@ foreach($log as $i=>$value){
$refresh[$i] = $parse[3];
$online[$i] = $parse[4];
}
$year[] = $admin['year'];
$month[] = $admin['month'];
$date[] = date('Y-m-d H:i:s');
if ($game['maxrefresh'] == 0) {
$game['maxrefresh'] = 1;
if ($admin['maxrefresh'] == 0) {
$admin['maxrefresh'] = 1;
}
if ($game['maxrefresh'] < $game['refresh']) {
$game['maxrefresh'] = $game['refresh'];
if ($admin['maxrefresh'] < $admin['refresh']) {
$admin['maxrefresh'] = $admin['refresh'];
}
if ($game['maxonline'] == 0) {
$game['maxonline'] = 1;
if ($admin['maxonline'] == 0) {
$admin['maxonline'] = 1;
}
if ($game['maxonline'] < $curonline) {
$game['maxonline'] = $curonline;
if ($admin['maxonline'] < $curonline) {
$admin['maxonline'] = $curonline;
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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')?>
<style>
.big_bar{
float:left;
position:relative;
height:30px;
}
.big_bar span{
float:right;
padding:0;
margin:0;
line-height:30px;
padding-right:1ch;
}
.little_bar{
float:left;
position:relative;
height:17px;
}
span.out_bar{
line-height:30px;
margin-left:1ch;
}
</style>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<br>
<table align=center width=1016 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all;>
<table align=center width=1016>
<tr><td align=left>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5> </font></td></tr>
<?php
foreach($log as $i=>$value){
$w = round($refresh[$i] / $game['maxrefresh'] * 100, 1);
if ($w >= 100) {
$w -= 0.1;
}
if ($refresh[$i] < 10 && $w < 3) {
$w = 3;
} elseif ($refresh[$i] < 100 && $w < 6) {
$w = 6;
} elseif ($refresh[$i] < 1000 && $w < 9) {
$w = 9;
}
$w2 = round(100 - $w, 1);
$refresh[] = $admin['refresh'];
foreach($refresh as $i=>$value){
$w = round($value / $admin['maxrefresh'] * 100, 1);
$color = getTrafficColor($w);
$dt = substr($date[$i], 11, 5); ?>
<tr height=30>
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
<td width=60 align=center id=bg2><?=$dt?></td>
<td width=2 align=center id=bg1></td>
<td width=320 align=center>
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$refresh[$i]?>&nbsp;</td>
<td width=<?=$w2?>% id=bg0><font size=1>&nbsp;</font></td>
</tr>
</table>
<td width=320>
<?php if($w == 0): ?>
<span class="out_bar"><?=$value?></span>
<?php elseif($w < 10): ?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
<?php else:?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
<?php endif;?>
</td>
</tr>
<?php
}
$w = round($game['refresh'] / $game['maxrefresh'] * 100, 1);
if ($w >= 100) {
$w -= 0.1;
}
if ($game['refresh'] < 10 && $w < 3) {
$w = 3;
} elseif ($game['refresh'] < 100 && $w < 6) {
$w = 6;
} elseif ($game['refresh'] < 1000 && $w < 9) {
$w = 9;
}
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
$dt = date('H:i');
?>
<tr height=30>
<td width=100 align=center><?=$game['year']?>년 <?=$game['month']?>월</td>
<td width=60 align=center id=bg2><?=$dt?></td>
<td width=2 align=center id=bg1></td>
<td width=320 align=center>
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$game['refresh']?>&nbsp;</td>
<td width=<?=$w2?>% id=bg0><font size=1>&nbsp;</font></td>
</tr>
</table>
</td>
</tr>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$game['maxrefresh']?></td>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
</tr>
</table>
</td>
<td align=right>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5> </font></td></tr>
<?php
foreach($log as $i=>$value){
$w = round($online[$i] / $game['maxonline'] * 100, 1);
if ($w >= 100) {
$w -= 0.1;
}
if ($online[$i] < 10 && $w < 3) {
$w = 3;
} elseif ($online[$i] < 100 && $w < 6) {
$w = 6;
} elseif ($online[$i] < 1000 && $w < 9) {
$w = 9;
}
$w2 = round(100 - $w, 1);
$online[] = $curonline;
foreach($online as $i=>$value){
$w = round($value / $admin['maxonline'] * 100, 1);
$color = getTrafficColor($w);
$dt = substr($date[$i], 11, 5); ?>
<tr height=30>
<td width=100 align=center><?=$year[$i]?>년 <?=$month[$i]?>월</td>
<td width=60 align=center id=bg2><?=$dt?></td>
<td width=2 align=center id=bg1></td>
<td width=320 align=center>
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width=<?=$w?>% bgcolor=<?=$color?> align=right><?=$online[$i]?>&nbsp;</td>
<td width=<?=$w2?>% id=bg0><font size=1>&nbsp;</font></td>
</tr>
</table>
<td width=320>
<?php if($w == 0): ?>
<span class="out_bar"><?=$value?></span>
<?php elseif($w < 10): ?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div><span class="out_bar"><?=$value?></span>
<?php else:?>
<div class='big_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'><span><?=$value?></span></div>
<?php endif;?>
</td>
</tr>
<?php
}
$w = round($curonline / $game['maxonline'] * 100, 1);
if ($w >= 100) {
$w -= 0.1;
}
if ($curonline < 10 && $w < 3) {
$w = 3;
} elseif ($curonline < 100 && $w < 6) {
$w = 6;
} elseif ($curonline < 1000 && $w < 9) {
$w = 9;
}
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
$dt = date('H:i');
echo "
<tr height=30>
<td width=100 align=center>{$game['year']} {$game['month']}</td>
<td width=60 align=center id=bg2>{$dt}</td>
<td width=2 align=center id=bg1></td>
<td width=320 align=center>
<table align=center width=100% height=30 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width={$w}% bgcolor={$color} align=right>{$curonline}&nbsp;</td>
<td width={$w2}% id=bg0><font size=1>&nbsp;</font></td>
</tr>
</table>
</td>
</tr>
?>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: {$game['maxonline']}</td>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
</tr>
";
?>
</table>
</td></tr>
</table>
<br>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5> (순간과도갱신)</font></td></tr>
<?php
$query = "select sum(refresh) as refresh,sum(connect) as connect from general";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$user = MYDB_fetch_array($result);
$user['connect'] = round($user['connect'], 1);
$maxrefresh = $user['refresh'];
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합';
$w = round($maxrefresh / $maxrefresh * 100, 1);
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
echo "
<tr id=bg2>
<td width=98 align=center>주의대상자</td>
<td width=98 align=center>벌점(순간갱신)</td>
<td width=798 align=center>전체 대비</td>
</tr>
<tr>
<td align=center>접속자 총합</td>
<td align=center>{$user['connect']}({$maxrefresh})</td>
<td align=center>
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width={$w}% bgcolor={$color}>&nbsp;</td>
<td width={$w2}%>&nbsp;</td>
</tr>
</table>
</td>
</tr>
";
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
$query = "select name,refresh,connect from general order by refresh desc limit 0,5";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
for ($i=0; $i < $count; $i++) {
$user = MYDB_fetch_array($result);
$w = round($user['refresh'] / $maxrefresh * 100, 1);
foreach ($refresh_result as $i=>$user) {
$w = round($user['refresh'] / $max_refresh['refresh'] * 100, 1);
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
echo "
?>
<tr>
<td width=98 align=center>{$user['name']}</td>
<td width=98 align=center>{$user['connect']}({$user['refresh']})</td>
<td width=798 align=center>
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width={$w}% bgcolor={$color}>&nbsp;</td>
<td width={$w2}%>&nbsp;</td>
</tr>
</table>
<td width=98 align=center><?=$user['name']?></td>
<td width=98 align=center><?=$user['connect']?>(<?=$user['refresh']?>)</td>
<td width=798>
<?php if($w == 0): ?>
<?php elseif($w < 10): ?>
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
<?php else:?>
<div class='little_bar' style='width:<?=$w?>%;background-color:<?=$color?>;'></div>
<?php endif;?>
</td>
</tr>
";
<?php
}
?>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
@@ -273,7 +200,7 @@ function getTrafficColor($per)
$r = getHex($per);
$b = getHex(100 - $per);
$color = $r . "00" . $b;
return $color;
return '#'.$color;
}
function getHex($dec)
+101 -58
View File
@@ -7,31 +7,41 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("설문조사", 1);
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
$isVoteAdmin |= $session->userGrade >= 5;
$query = "select no,vote from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select develcost,voteopen,vote,votecomment from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$vote = explode("|", $admin['vote']);
if ($vote[0] == "") {
$vote[0] = "-";
}
$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']);
$vote_title = $admin['vote_title']??'-';
$vote = $admin['vote']?:['-'];
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 설문조사</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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')?>
<style>
.little_bar{
float:left;
position:relative;
height:17px;
line-height:17px;
text-align:center;
}
</style>
<script type="text/javascript">
function captureKey(e) {
if(e.keyCode == 13 && e.srcElement.type == 'text') {
@@ -44,15 +54,15 @@ function captureKey(e) {
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center id=bg2><font size=5> (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<?php
if ($session->userGrade >= 5) {
if ($isVoteAdmin) {
echo "
<tr>
<td width=48 align=center><input type=submit name=btn value='알림'></td>
@@ -62,11 +72,11 @@ if ($session->userGrade >= 5) {
";
}
$vote[0] = Tag2Code($vote[0]);
$vote_title = Tag2Code($vote_title);
echo "
<tr>
<td colspan=2 width=148 align=center id=bg1> </td>
<td width=848 align=left>&nbsp;{$vote[0]}</td>
<td width=848 align=left>&nbsp;{$vote_title}</td>
</tr>
";
@@ -91,7 +101,7 @@ for ($i=1; $i < $voteTypeCount; $i++) {
echo "
<input type=radio name=sel value={$i}>
";
} elseif ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
$query = "select no from general where vote='{$i}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$vCount = MYDB_num_rows($result);
@@ -127,7 +137,7 @@ echo "
</tr>
";
if ($session->userGrade >= 5) {
if ($isVoteAdmin) {
echo "
<tr>
<td align=center><input type=submit name=btn value='리셋'></td>
@@ -137,49 +147,49 @@ if ($session->userGrade >= 5) {
";
}
if ($admin['votecomment'] != "") {
$comment = explode("|", $admin['votecomment']);
if ($admin['votecomment']) {
$comment = $admin['votecomment'];
$commentCount = count($comment);
} else {
$commentCount = 0;
}
echo "
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=4 align=center id=bg1> </td>
</tr>
";
for ($i=0; $i < $commentCount; $i++) {
$cmt = explode(":", $comment[$i]);
$cmt = $comment[$i];
$cmt[2] = Tag2Code($cmt[2]);
$j = $i+1;
echo "
<tr>
<td width=28 align=center>{$j}.</td>
<td width=83 align=center>{$cmt[0]}</td>
<td width=83 align=center>{$cmt[1]}</td>
<td width=788 align=left>&nbsp;{$cmt[2]}</td>
<td width=130 align=center>{$cmt[0]}</td>
<td width=130 align=center>{$cmt[1]}</td>
<td width=712 align=left>&nbsp;{$cmt[2]}</td>
</tr>
";
}
if ($me['no'] > 0) {
echo "
<tr>
<td width=108 colspan=2 align=center>-</td>
<td width=83 align=center><input type=submit name=btn value='댓글'></td>
<td align=left><input type=text name=comment maxlength=60 style=width:798px; onkeydown='return captureKey(event)'></td>
<td width=158 colspan=2 align=center>-</td>
<td width=130 align=center><input type=submit name=btn value='댓글'></td>
<td align=left><input type=text name=comment maxlength=60 style=width:700px; onkeydown='return captureKey(event)'></td>
</tr>
";
}
?>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5>
<?php
if ($session->userGrade >= 5) {
if ($isVoteAdmin) {
echo "
<input type=submit name=btn value='숨김'>
<input type=submit name=btn value='전체통계만'>
@@ -188,14 +198,12 @@ if ($session->userGrade >= 5) {
echo "
</font></td></tr>";
if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
echo "
<tr>
<td width=98 align=center> </td>
<td width=130 align=center> </td>
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
<td width=768 align=center>
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width=742>
";
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
@@ -227,23 +235,35 @@ if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
$nationVote[$nation][$ownVote] += $cnt;
}
$totalPer = 0;
for ($i=0; $i < $voteTypeCount; $i++) {
$per = round(($totalVote[$i]??0) * 100 / $memCount, 1);
if($i == $voteTypeCount-1){
$per = 100-$totalPer;
}
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
echo "
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$totalVote[$i]}</td>
";
?>
<?php if($per == 0): ?>
<?php elseif($per < 10): ?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
<?php else:?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$totalVote[$i]?></div>
<?php endif;?>
<?php
}
echo "
</tr>
</table>
</td>
</tr>
";
}
if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$query = "select no from general where nation=0 and npc<2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$memCount = MYDB_num_rows($result);
@@ -260,22 +280,30 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
<tr>
<td align=center bgcolor=black> </td>
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</td>
<td align=center>
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td>
";
$totalPer = 0;
for ($i=0; $i < $voteTypeCount; $i++) {
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
if($i == $voteTypeCount-1){
$per = 100-$totalPer;
}
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
echo "
<td width={$per}% align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$nationVote[0][$i]}</td>
";
?>
<?php if($per == 0): ?>
<?php elseif($per < 10): ?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'></div>
<?php else:?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($i)?>;background-color:<?=getVoteColor($i)?>;'><?=$nationVote[0][$i]?></div>
<?php endif;?>
<?php
}
echo "
</tr>
</table>
</td>
</tr>
";
@@ -306,21 +334,36 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</td>
<td align=center>
<table align=center width=100% height=100% border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
";
$totalPer = 0;
for ($k=0; $k < $voteTypeCount; $k++) {
$per = round($nationVote[$nation['nation']][$k] / $memCount * 100, 1);
if($memCount == 0){
$per = 0;
continue;
}
$per = round($nationVote[$nation['nation']][$k]??0 / $memCount * 100, 1);
if($i == $voteTypeCount-1){
$per = 100-$totalPer;
}
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
echo "
<td width={$per}% align=center style=color:".getNewColor($k)."; bgcolor=".getVoteColor($k).">{$nationVote[$nation['nation']][$k]}</td>
";
?>
<?php if($per == 0): ?>
<?php elseif($per < 10): ?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'></div>
<?php else:?>
<div class='little_bar' style='width:<?=$per?>%;color:<?=getNewColor($k)?>;background-color:<?=getVoteColor($k)?>;'><?=$nationVote[$nation['nation']][$k]??0?></div>
<?php endif;?>
<?php
}
echo "
</tr>
</table>
</td>
</tr>
";
@@ -329,7 +372,7 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
?>
</form>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+12 -14
View File
@@ -14,6 +14,7 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("거래장", 2);
@@ -22,11 +23,7 @@ $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);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -59,17 +56,18 @@ if ($msg2 == "") {
<html>
<head>
<title><?=UniqueConst::$serverName?>: 거래장</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=orange><font size=5> </font></td></tr>
<tr align=center id=bg1>
@@ -167,7 +165,7 @@ for ($i=0; $i < $count; $i++) {
</form>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5> </font></td></tr>
<tr align=center id=bg1>
@@ -265,7 +263,7 @@ for ($i=0; $i < $count; $i++) {
</form>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td align=center id=bg2><font size=5> </font></td></tr>
<tr><td>
<?=getAuctionLogRecent(20)?>
@@ -284,7 +282,7 @@ for ($i=0; $i < $count; $i++) {
ㆍ악용 방지를 위해 50% ~ 200% 가격에서 거래시작이 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다. 거상 특기 소유자는 1인당 도합 3건입니다.<br>
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
ㆍ기본금쌀 1000 거래에 사용되지 못합니다.<br>
ㆍ유찰될 때는 거래 과실자에게 거래금의 1% 벌금으로 부과됩니다.<br>
<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
+11 -11
View File
@@ -23,15 +23,13 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("감찰부", 2);
//전투 추진을 위해 갱신
checkTurn();
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$gameStor->resetCache();
$query = "select nation from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -45,7 +43,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -76,14 +74,16 @@ $sel[$type] = "selected";
<head>
<title><?=UniqueConst::$serverName?>: 감찰부</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
@@ -131,7 +131,7 @@ for ($i=0; $i < $gencount; $i++) {
</form>
</td></tr>
</table>
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -170,7 +170,7 @@ for ($i=0; $i < $gencount; $i++) {
</tr>
<?php endif; ?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+26 -24
View File
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("베팅장", 1);
@@ -17,11 +18,13 @@ $query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+b
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select conlimit,tournament,phase,tnmt_type,develcost,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
$admin['bet'] =
$admin['bet0'] + $admin['bet1'] + $admin['bet2'] + $admin['bet3'] + $admin['bet4'] +
$admin['bet5'] + $admin['bet6'] + $admin['bet7'] + $admin['bet8'] + $admin['bet9'] +
$admin['bet10'] + $admin['bet11'] + $admin['bet12'] + $admin['bet13'] + $admin['bet14'] + $admin['bet15'];
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -52,31 +55,24 @@ if($str3){
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 베팅장</title>
<style>
body { color:white; background-color:black; border-width:1px; border-color:gray; }
table { font-family:'맑은 고딕';}
font { font-family:'맑은 고딕';}
input { font-family:'맑은 고딕';height:20px }
select { font-family:'굴림'; }
#bg0 { background-image:url(<?=ServConfig::$gameImagePath?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=ServConfig::$gameImagePath?>/back_green.jpg); }
#bg2 { background-image:url(<?=ServConfig::$gameImagePath?>/back_blue.jpg); }
</style>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1120 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10px;word-break:break-all; id=bg0>
<table align=center width=1120 class='tb_layout bg0'>
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr>
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16 상황</font><br><font color=orange size=3>(전체 금액 : <?=$admin['bet']?> / 내 투자 금액 : <?=$me['bet']?>)</font></td></tr>
</table>
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10px;word-break:break-all; id=bg0>
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
<tr align=center><td height=10 colspan=16></td></tr>
<tr align=center>
<?php
@@ -303,12 +299,18 @@ for ($i=0; $i < 16; $i++) {
}
for ($i=0; $i < 16; $i++) {
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
if(!is_numeric($bet[$i])){
$gold[$i] = 0;
}
else{
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
}
}
?>
</tr>
</table>
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=10 colspan=16></td></tr>
<?php
echo "
@@ -387,7 +389,7 @@ if ($admin['tournament'] == 6) {
</tr>
<tr align=center><td height=10 colspan=16></td></tr>
</table>
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=50 colspan=4 id=bg2><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
<tr align=center><td colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
<tr align=center>
@@ -402,7 +404,7 @@ for ($i=0; $i < 4; $i++) {
$grp = $i;
echo "
<td>
<table align=center width=280 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>";
@@ -429,7 +431,7 @@ for ($i=0; $i < 4; $i++) {
</td>
</tr>
</table>
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1120 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+9 -5
View File
@@ -26,14 +26,17 @@ if($me['level'] < 5) {
<html>
<head>
<title><?=UniqueConst::$serverName?>: 기밀실</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<div style='width:1000px;margin:auto'>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_chiefboard.php>
<tr><td align=center>
@@ -65,10 +68,11 @@ for($i=0; $i < 20; $i++) {
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</div>
</body>
</html>
+21 -24
View File
@@ -8,14 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("사령부", 1);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -24,7 +21,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
@@ -38,9 +35,7 @@ else { $btn = "hidden"; $btn2 = "hidden"; }
$date = date('Y-m-d H:i:s');
// 명령 목록
$query = "select year,month,turnterm from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['year','month','turnterm']);
$query = "
select nation,level,
@@ -82,10 +77,12 @@ for($i= $lv - 1; $i>=5; $i--){
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 사령부</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
function turn(type) {
if(type == 0) location.replace('turn_push_core.php');
@@ -96,10 +93,10 @@ function turn(type) {
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <input type=button value='갱신' onclick=location.replace('b_chiefcenter.php')><br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=10 align=center bgcolor=skyblue>수뇌부 일정</td></tr>
<tr><td colspan=10 align=center>
<?php
@@ -157,16 +154,16 @@ for($k=0; $k < 2; $k++) {
$tn1 = $turn[$l1][$i]??"-";
echo "
<tr>
<td width=28 align=center id=bg0><b>$j</b></td>
<td width=58 align=center bgcolor=black><b>$td4</b></td>
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn4</td>
<td width=58 align=center bgcolor=black><b>$td3</b></td>
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn3</td>
<td width=58 align=center bgcolor=black><b>$td2</b></td>
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn2</td>
<td width=58 align=center bgcolor=black><b>$td1</b></td>
<td width=173 align=center height=24 style=table-layout:fixed; id=bg2>$tn1</td>
<td width=28 align=center id=bg0><b>$j</b></td>
<td width=20 align=center id=bg0><b>$j</b></td>
<td width=43 align=center bgcolor=black><b>$td4</b></td>
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn4</td>
<td width=43 align=center bgcolor=black><b>$td3</b></td>
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn3</td>
<td width=43 align=center bgcolor=black><b>$td2</b></td>
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn2</td>
<td width=43 align=center bgcolor=black><b>$td1</b></td>
<td width=192 align=center height=24 style=table-layout:fixed; id=bg2>$tn1</td>
<td width=20 align=center id=bg0><b>$j</b></td>
</tr>
";
if($totaldate[$l4]??'') { $totaldate[$l4] = addTurn($totaldate[$l4], $admin['turnterm']); }
@@ -188,7 +185,7 @@ for($k=0; $k < 2; $k++) {
?>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+192 -104
View File
@@ -21,9 +21,7 @@ $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);
$query = "select nation,level,spy from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$myNation = MYDB_fetch_array($result);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
$templates = new \League\Plates\Engine('templates');
@@ -33,9 +31,11 @@ $templates = new \League\Plates\Engine('templates');
<head>
<title><?=UniqueConst::$serverName?>: 도시정보</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<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')?>
<style>
#general_list tr td{
text-align:center;
@@ -53,11 +53,11 @@ $templates = new \League\Plates\Engine('templates');
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=998>
<form name=cityselect method=get>도시선택 :
@@ -119,27 +119,34 @@ if($me['level'] == 0) {
if($myNation['level'] > 0) {
// 첩보도시도 목록에 추가
$where = 'city=0';
$cities = array_map('intval',explode("|", $myNation['spy']));
foreach($cities as $citySpy) {
$city = intdiv($citySpy, 10);
$where .= " or city='{$city}'";
$rawSpy = $myNation['spy'];
if($rawSpy == ''){
$spyCities = [];
}
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
$spyCities = array_map(function($val){
$val = intval($val);
return intdiv($val, 10);
}, 'intval',explode('|', $myNation['spy']));
}
else{
$spyCities = array_keys(Json::decode($rawSpy));
}
$query = "select city,name,nation from city where {$where}";
$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);
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "국==";
else echo "타국==";
echo "============================================</option>";
if($spyCities){
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
echo "<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "국==";
echo "============================================</option>";
}
}
}
@@ -163,7 +170,7 @@ if($valid == 0 && $session->userGrade < 5) {
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
$nation = getNationStaticInfo($city['nation']);
$cityNation = getNationStaticInfo($city['nation']);
//태수, 군사, 시중
$gen1 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen1']);
@@ -173,81 +180,7 @@ $gen3 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $cit
if($city['trade'] == 0) {
$city['trade'] = "- ";
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<tr><td><?=backButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg2>
<tr>
<td colspan=12 align=center style=color:"<?=newColor($nation['color'])?>"; bgcolor=<?=$nation['color']?>>【 <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
</tr>
<tr>
<td align=center width=48 class=bg1>주민</td>
<td align=center width=112><?=$city['pop']?>/<?=$city['pop2']?></td>
<td align=center width=48 class=bg1>농업</td>
<td align=center width=108><?=$city['agri']?>/<?=$city['agri2']?></td>
<td align=center width=48 class=bg1>상업</td>
<td align=center width=108><?=$city['comm']?>/<?=$city['comm2']?></td>
<td align=center width=48 class=bg1>치안</td>
<td align=center width=108><?=$city['secu']?>/<?=$city['secu2']?></td>
<td align=center width=48 class=bg1>수비</td>
<td align=center width=108><?=$city['def']?>/<?=$city['def2']?></td>
<td align=center width=48 class=bg1>성벽</td>
<td align=center width=108><?=$city['wall']?>/<?=$city['wall2']?></td>
</tr>
<tr>
<td align=center class=bg1>민심</td>
<td align=center><?=$city['rate']?></td>
<td align=center class=bg1>시세</td>
<td align=center><?=$city['trade']?>%</td>
<td align=center class=bg1>인구</td>
<td align=center><?=round($city['pop']/$city['pop2']*100, 2)?>%</td>
<td align=center class=bg1>태수</td>
<td align=center><?=$gen1['name']??'-'?></td>
<td align=center class=bg1>군사</td>
<td align=center><?=$gen2['name']??'-'?></td>
<td align=center class=bg1>시중</td>
<td align=center><?=$gen3['name']??'-'?></td>
</tr>
<tr>
<td align=center class=bg1>장수</td>
<td colspan=11>
<?php
$query = "select name, npc from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
if($gencount == 0) echo "-";
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($genresult);
echo "{$general['name']}, ";
}
?>
</td>
</tr>
</table>
<br>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<thead>
<tr>
<td width=64 align=center class=bg1> </td>
<td width=98 align=center class=bg1> </td>
<td width=48 align=center class=bg1>통솔</td>
<td width=48 align=center class=bg1>무력</td>
<td width=48 align=center class=bg1>지력</td>
<td width=78 align=center class=bg1> </td>
<td width=28 align=center class=bg1></td>
<td width=78 align=center class=bg1> </td>
<td width=78 align=center class=bg1> </td>
<td width=48 align=center class=bg1>훈련</td>
<td width=48 align=center class=bg1>사기</td>
<td width=310 align=center class=bg1> </td>
</tr></thead><tbody class='bg0' id='general_list'>
<?php
$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4,turn5 from general where city='{$city['city']}' order by dedication desc"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
@@ -259,6 +192,9 @@ foreach(getAllNationStaticInfo() as $nation){
$nationlevel[$nation['nation']] = $nation['level'];
}
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
$generalsFormat = [];
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
@@ -333,7 +269,7 @@ for($j=0; $j < $gencount; $j++) {
$turnText = '';
}
echo $templates->render('cityGeneral', [
$generalsFormat[] = [
'ourGeneral'=>$ourGeneral,
'isNPC'=>$isNPC,
'wounded'=>$wounded,
@@ -359,13 +295,165 @@ for($j=0; $j < $gencount; $j++) {
'nation'=>$nation,
'nationName'=>$nationName,
'turnText'=>$turnText
]);
];
}
$generalsName = array_map(function($gen){return $gen['name'];}, $generalsFormat);
$enemyCrew = 0;
$enemyCnt = 0;
$enemyArmedCnt = 0;
$crew90 = 0;
$gen90 = 0;
$crew80 = 0;
$gen80 = 0;
$crew60 = 0;
$gen60 = 0;
$crewDef = 0;
$genDef = 0 ;
$crewTotal = 0;
$armedGenTotal = 0;
$genTotal = 0;
foreach($generalsFormat as $general){
if($general['nation'] == 0){
continue;
}
if($general['nation'] != $myNation['nation']){
$enemyCnt += 1;
$enemyCrew += $general['crew'];
if($general['crew'] > 0){
$enemyArmedCnt += 1;
}
continue;
}
$crewTotal += $general['crew'];
$genTotal += 1;
if($general['crew'] == 0){
continue;
}
$armedGenTotal += 1;
if($general['train'] >= 90 && $general['atmos'] >= 90){
$crew90 += $general['crew'];
$gen90 += 1;
}
$chkDef = false;
if($general['train'] >= 80 && $general['atmos'] >= 80){
$crew80 += $general['crew'];
$gen80 += 1;
if($general['defenceMode'] == 2){
$crewDef += $general['crew'];
$genDef += 1;
$chkDef = true;
}
}
if($general['train'] >= 60 && $general['atmos'] >= 60){
$crew60 += $general['crew'];
$gen60 += 1;
if($general['defenceMode'] == 1 && !$chkDef){
$crewDef += $general['crew'];
$genDef += 1;
$chkDef = true;
}
}
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=11 align=center style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>'> <?=CityConst::$regionMap[$city['region']]?> | <?=CityConst::$levelMap[$city['level']]?> 】 <?=$city['name']?></td>
<td style='color:<?=newColor($cityNation['color'])?>; background:<?=$cityNation['color']?>' class='center'><?=date('m-d H:i:s')?></td>
</tr>
<tr>
<td align=center width=48 class=bg1>주민</td>
<td align=center width=112><?=$city['pop']?>/<?=$city['pop2']?></td>
<td align=center width=48 class=bg1>농업</td>
<td align=center width=108><?=$city['agri']?>/<?=$city['agri2']?></td>
<td align=center width=48 class=bg1>상업</td>
<td align=center width=108><?=$city['comm']?>/<?=$city['comm2']?></td>
<td align=center width=48 class=bg1>치안</td>
<td align=center width=108><?=$city['secu']?>/<?=$city['secu2']?></td>
<td align=center width=48 class=bg1>수비</td>
<td align=center width=108><?=$city['def']?>/<?=$city['def2']?></td>
<td align=center width=48 class=bg1>성벽</td>
<td align=center width=108><?=$city['wall']?>/<?=$city['wall2']?></td>
</tr>
<tr>
<td align=center class=bg1>민심</td>
<td align=center><?=$city['rate']?></td>
<td align=center class=bg1>시세</td>
<td align=center><?=$city['trade']?>%</td>
<td align=center class=bg1>인구</td>
<td align=center><?=round($city['pop']/$city['pop2']*100, 2)?>%</td>
<td align=center class=bg1>태수</td>
<td align=center><?=$gen1['name']??'-'?></td>
<td align=center class=bg1>군사</td>
<td align=center><?=$gen2['name']??'-'?></td>
<td align=center class=bg1>시중</td>
<td align=center><?=$gen3['name']??'-'?></td>
</tr>
<tr>
<td align=center class=bg1>도시명</td>
<td align=center><?=$city['name']?></td>
<td align=center class=bg1>적군</td>
<td align=center><?=number_format($enemyCrew)?>/<?=number_format($enemyArmedCnt)?>(<?=number_format($enemyCnt)?>)</td>
<td align=center class=bg1>병장()</td>
<td align=center><?=number_format($crewTotal)?>/<?=number_format($armedGenTotal)?>(<?=number_format($genTotal)?>)</td>
<td align=center class=bg1>90병장</td>
<td align=center><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
<td align=center class=bg1>60병장</td>
<td align=center><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
<td align=center class=bg1>수비○</td>
<td align=center><?=number_format($crewDef)?>/<?=number_format($genDef)?></td>
</tr>
<tr>
<td align=center class=bg1>장수</td>
<td colspan=11><?=join(', ', $generalsName)?></td>
</tr>
</table>
<br>
<table align=center class='tb_layout bg0'>
<thead>
<tr>
<td width=64 align=center class=bg1> </td>
<td width=128 align=center class=bg1> </td>
<td width=48 align=center class=bg1>통솔</td>
<td width=48 align=center class=bg1>무력</td>
<td width=48 align=center class=bg1>지력</td>
<td width=78 align=center class=bg1> </td>
<td width=28 align=center class=bg1></td>
<td width=78 align=center class=bg1> </td>
<td width=78 align=center class=bg1> </td>
<td width=48 align=center class=bg1>훈련</td>
<td width=48 align=center class=bg1>사기</td>
<td width=280 align=center class=bg1> </td>
</tr></thead>
<tbody class='bg0' id='general_list'>
<?php
foreach($generalsFormat as $general){
echo $templates->render('cityGeneral', $general);
}
?>
</tbody>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+23 -24
View File
@@ -8,14 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("내무부", 1);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
@@ -24,7 +21,7 @@ $query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -47,21 +44,27 @@ if ($me['level'] >= 5) {
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 내무부</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue> </td></tr>
<tr>
<td width=100 align=center class=bg1> </td>
<td width=130 align=center class=bg1> </td>
<td width=50 align=center class=bg1>국력</td>
<td width=40 align=center class=bg1>장수</td>
<td width=40 align=center class=bg1>속령</td>
@@ -71,9 +74,7 @@ if ($me['level'] >= 5) {
<td align=center class=bg1> </td>
</tr>
<?php
$query = "select year,month from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['year','month']);
$query = "select nation,name,color,power,gennum from nation order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -190,9 +191,7 @@ $query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutm
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$query = "select gold_rate,rice_rate from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
// 금 수지
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
@@ -220,18 +219,18 @@ if ($budgetricediff > 0) {
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<form name=form1 method=post action=c_dipcenter.php>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=orange> &amp; 임관 권유 </td></tr>
<tr><td colspan=2 class=bg1>국가 방침 <textarea <?=$read?> maxlength=1000 rows="5" style="color:white;background-color:black;width:830px;" name=msg><?=$nation['msg']?></textarea><input type=<?=$btn?> name=btn value=국가방침></td></tr>
<tr><td colspan=2 class=bg1>임관 권유 <input type=text <?=$read?> maxlength=500 style=color:white;background-color:black;width:830px; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
<tr><td colspan=2>900 x 200px 넘는 크기를 점유할 통보없이 제한될 습니다.</td></tr>
<tr><td colspan=2 align=center bgcolor=orange> &amp; 임관 권유 </td></tr>
<tr><td colspan=2 class=bg1>국가 방침 <textarea <?=$read?> maxlength=16000 rows="5" style="color:white;background-color:black;width:830px;" name=msg><?=$nation['msg']?></textarea><input type=<?=$btn?> name=btn value=국가방침></td></tr>
<tr><td colspan=2 class=bg1>임관 권유 <input type=text <?=$read?> maxlength=1000 style=color:white;background-color:black;width:830px; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
<tr><td colspan=2>870px x 200px를 어서 내용은 표시되지 습니다.</td></tr>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=green> &amp; </td></tr>
<tr>
<td colspan=2>
<table width=998 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table width=998 class='tb_layout bg0'>
<tr>
<td colspan=2 align=center class=bg1>자금 예산</td>
<td colspan=2 align=center class=bg1>병량 예산</td>
@@ -304,7 +303,7 @@ if ($nation['war'] == 0) {
<tr><td colspan=2 height=10></td></tr>
</form>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; class=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+36 -50
View File
@@ -8,13 +8,12 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("중원정보", 1);
$query = "select turnterm from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$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),"");
@@ -42,17 +41,17 @@ for($i=0; $i < $nationcount; $i++) {
$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>";
$powerStr .= "{$nation['power']}<br>";
$genStr .= "{$nation['gennum']}<br>";
$cityStr .= "$citycount<br>";
}
$realConflict = [];
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as list(
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
$cityID,
$cityName,
$rawConflict
))
])
{
$conflict = Json::decode($rawConflict);
if (count($conflict)<2) {
@@ -78,40 +77,45 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../d_shared/common_path.js"></script>
<script src="js/common.js"></script>
<script src="js/base_map.js"></script>
<script src="js/map.js"></script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
$(function(){
reloadWorldMap({
neutralView:true,
showMe:true
showMe:true,
useCachedMap:true
});
});
</script>
<link href="css/normalize.css" rel="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
<?php
echo "
<tr>
<td align=center width=108 style=background-color:".GameConst::$basecolor2.";>&nbsp;</td>";
<td align=center width=130 style=background-color:".GameConst::$basecolor2.";>&nbsp;</td>";
if($nationcount != 0) {
$width = intdiv(888, $nationcount);
@@ -179,35 +183,17 @@ for($i=0; $i < $nationcount; $i++) {
<?php if ($realConflict) : ?>
<br>
<table
align='center'
width=1000
border=1
cellspacing=0
cellpadding=0
bordercolordark='gray'
bordercolorlight='black'
style='font-size:13px;word-break:break-all;'
class='bg0'
>
<table align='center' width=1000 class='tb_layout bg0'>
<tr><td colspan=2 align=center bgcolor=magenta> </td></tr>
<?php foreach($realConflict as list($cityID, $cityName, $conflict)): ?>
<tr>
<td align=center width=48><?=$cityName?></td>
<td width=948>
<table
border=0
cellspacing=0
cellpadding=0
bordercolordark='gray'
bordercolorlight='black'
style='font-size:13px;word-break:break-all;width:100%;'
class='bg0'
>
<td style='width:948px;position:relative;'>
<table class='tb_layout bg0' style='width:100%;'>
<?php foreach($conflict as $item): ?>
<tr>
<td
width=98
width=130
align=right
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
><?=$item['name']?>&nbsp;</td>
@@ -228,23 +214,23 @@ for($i=0; $i < $nationcount; $i++) {
<?php endif; ?>
<br>
<table class="bg0" align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;">
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=5 align=center bgcolor=green><font size=3> </font></td>
</tr>
<tr>
<td width=698 height=420>
<?=getMapHtml()?>
<?=getMapHtml($mapTheme)?>
</td>
<td width=101 valign=top><?=$nationStr?></td>
<td width=78 valign=top><?=$powerStr?></td>
<td width=58 valign=top><?=$genStr?></td>
<td width=55 valign=top><?=$cityStr?></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>
</tr>
</table>
<br>
<table class="bg0" align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style="font-size:13px;word-break:break-all;">
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+122 -94
View File
@@ -9,20 +9,15 @@ if ($type <= 0 || $type > 8) {
$type = 7;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("암행부", 2);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
increaseRefresh("암행부", 1);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -32,7 +27,7 @@ $query = "select level,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -46,6 +41,8 @@ if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretli
$sel = [];
$sel[$type] = "selected";
$templates = new \League\Plates\Engine('templates');
?>
<!DOCTYPE html>
<html>
@@ -53,17 +50,22 @@ $sel[$type] = "selected";
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 암행부</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<tr><td><form name=form1 method=get>정렬순서 :
<select name=type size=1>
<option <?=$sel[1]??''?> value=1>자금</option>
<option <?=$sel[2]??''?> value=2>군량</option>
@@ -78,50 +80,28 @@ $sel[$type] = "selected";
</td></tr>
</table>
<?php
$query = "select troop,name from troop where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$troopCount = MYDB_num_rows($result);
$troopName = [];
for ($i=0; $i < $troopCount; $i++) {
$troop = MYDB_fetch_array($result);
$troopName[$troop['troop']] = $troop['name'];
foreach($db->queryAllLists('SELECT troop, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]){
$troopName[$troopID] = $tName;
}
$orderSQL = '';
switch ($type) {
case 1: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by gold desc"; break;
case 2: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by rice desc"; break;
case 3: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by city"; break;
case 4: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by crewtype desc"; break;
case 5: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by crew desc"; break;
case 6: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by killturn"; break;
case 7: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by turntime"; break;
case 8: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by troop desc"; break;
case 1: $orderSQL = "order by gold desc"; break;
case 2: $orderSQL = "order by rice desc"; break;
case 3: $orderSQL = "order by city"; break;
case 4: $orderSQL = "order by crewtype desc"; break;
case 5: $orderSQL = "order by crew desc"; break;
case 6: $orderSQL = "order by killturn"; break;
case 7: $orderSQL = "order by turntime"; break;
case 8: $orderSQL = "order by troop desc"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
echo"
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<tr>
<td width=98 align=center id=bg1> </td>
<td width=98 align=center id=bg1>통무지</td>
<td width=98 align=center id=bg1> </td>
<td width=58 align=center id=bg1> </td>
<td width=58 align=center id=bg1> </td>
<td width=48 align=center id=bg1>도시</td>
<td width=28 align=center id=bg1></td>
<td width=58 align=center id=bg1> </td>
<td width=68 align=center id=bg1> </td>
<td width=48 align=center id=bg1>훈련</td>
<td width=48 align=center id=bg1>사기</td>
<td width=148 align=center id=bg1> </td>
<td width=58 align=center id=bg1>삭턴</td>
<td width=58 align=center id=bg1></td>
</tr>";
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
$city = CityConst::byID($general['city'])->name;
$troop = $troopName[$general['troop']]??'-';
$generals = $db->query('SELECT npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general WHERE nation = %i %l', $me['nation'], $orderSQL);
foreach ($generals as &$general) {
$general['cityText'] = CityConst::byID($general['city'])->name;
$general['troopText'] = $troopName[$general['troop']]??'-';
if ($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
@@ -131,82 +111,130 @@ for ($j=0; $j < $gencount; $j++) {
$lbonus = 0;
}
if ($lbonus > 0) {
$lbonus = "<font color=cyan>+{$lbonus}</font>";
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonus = "";
$lbonusText = "";
}
$general['lbonus'] = $lbonus;
$general['lbonusText'] = $lbonusText;
if ($general['injury'] > 0) {
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
$leader = "<font color=red>{$leader}</font>{$lbonus}";
$leader = "<font color=red>{$leader}</font>{$lbonusText}";
$power = "<font color=red>{$power}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leader = "{$general['leader']}{$lbonus}";
$leader = "{$general['leader']}{$lbonusText}";
$power = "{$general['power']}";
$intel = "{$general['intel']}";
}
$general['leaderText'] = $leader;
$general['powerText'] = $power;
$general['intelText'] = $intel;
$general['expLevelText'] = getExpLevel($general['experience']);
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']}";
$name = $general['name'];
}
//TODO: npc 코드를 일원화
$general['nameText'] = $name;
switch ($general['mode']) {
case 0: $mode = "×"; break;
case 1: $mode = ""; break;
case 2: $mode = ""; break;
case 0: $mode = "×"; break;
case 1: $mode = ""; break;
case 2: $mode = ""; break;
}
$general['modeText'] = $mode;
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name;
echo "
<tr>
<td align=center>$name<br>Lv ".getExpLevel($general['experience'])."</td>
<td align=center>{$leader}{$power}{$intel}</td>
<td align=center>$troop</td>
<td align=center>{$general['gold']}</td>
<td align=center>{$general['rice']}</td>
<td align=center>$city</td>
<td align=center>$mode</td>
<td align=center>".GameUnitConst::byId($general['crewtype'])->name."</td>
<td align=center>{$general['crew']}</td>
<td align=center>{$general['train']}</td>
<td align=center>{$general['atmos']}</td>";
if ($general['npc'] >= 2) {
echo "
<td>
<font size=3>NPC 장수";
} else {
echo "
<td>
<font size=1>";
if ($general['npc'] < 2) {
$turntext = [];
$turn = getTurn($general, 1, 0);
for ($i=0; $i < 5; $i++) {
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 20);
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 41);
$k = $i+1;
echo "
&nbsp;$k : $turn[$i] <br>";
$turntext[] = "&nbsp;$k : $turn[$i]";
}
$general['turntext'] = join("<br>\n", $turntext);
}
echo "
</font>
</td>
<td align=center>{$general['killturn']}</td>
<td align=center>".substr($general['turntime'], 14, 5)."</td>
</tr>";
}
echo "
</table>
";
unset($general);
$genCnt = count($generals);
$totalGold = 0;
$totalRice = 0;
$crew90 = 0;
$gen90 = 0;
$crew80 = 0;
$gen80 = 0;
$crew60 = 0;
$gen60 = 0;
$crewTotal = 0;
//$genTotal = 0;
foreach($generals as $general){
$totalGold += $general['gold'];
$totalRice += $general['rice'];
$crewTotal += $general['crew'];
if($general['crew'] == 0){
continue;
}
if($general['train'] >= 90 && $general['atmos'] >= 90){
$crew90 += $general['crew'];
$gen90 += 1;
}
if($general['train'] >= 80 && $general['atmos'] >= 80){
$crew80 += $general['crew'];
$gen80 += 1;
}
if($general['train'] >= 60 && $general['atmos'] >= 60){
$crew60 += $general['crew'];
$gen60 += 1;
}
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
<thead>
<colgroup>
<col style="width:120px;"><col>
<col style="width:120px;"><col>
<col style="width:120px;"><col>
<col style="width:120px;"><col>
</colgroup>
</thead>
<tbody>
<tr>
<td class='bg1'>전체 </td><td><?=number_format($totalGold)?></td>
<td class='bg1'>전체 </td><td><?=number_format($totalRice)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalGold/$genCnt, 2)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalRice/$genCnt, 2)?></td>
</tr>
<tr>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCnt)?></td>
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td>
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
</tr>
</tbody>
</table>
<?=$templates->render('generalList', ['generals'=>$generals])?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+21 -19
View File
@@ -29,10 +29,12 @@ if($meLevel == 0) {
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 인사부</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
function out() {
return confirm('정말 추방하시겠습니까?');
@@ -42,7 +44,7 @@ function out() {
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<br>
@@ -72,7 +74,7 @@ $query = "select name,picture,firenum from general where nation='{$nation['natio
$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -131,7 +133,7 @@ echo "
</td>
</tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -144,14 +146,14 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) {
echo "
<select name=outlist size=1 style=color:white;background-color:black;>";
$query = "select no,name,level from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
$query = "select no,name,level,leader,power,intel,killturn from general where nation='{$me['nation']}' and level!='12' and no!='{$me['no']}' order by npc,binary(name)";
$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);
echo "
<option value={$general['no']}>{$general['name']}</option>";
<option value={$general['no']}>{$general['name']} <small>({$general['leader']}/{$general['power']}/{$general['intel']}, {$general['killturn']})</small></option>";
}
echo "
@@ -167,7 +169,7 @@ echo "
</tr>
</form>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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>
@@ -217,12 +219,12 @@ echo "
";
$queries = [];
$queries[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
$queries[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
$queries[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
$queries[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
$queries[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
$queries[5] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
$queries[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$chiefStatMin."' order by npc,binary(name)";
$queries[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>"; }
@@ -270,7 +272,7 @@ for($i=10; $i >= $lv; $i--) {
echo "
<tr><td colspan=4> <font color=red>빨간색</font> 현재 임명중인 장수, <font color=orange>노란색</font> 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=5 height=5></td></tr>
";
if($meLevel >= 5) {
@@ -309,7 +311,7 @@ if($meLevel >= 5) {
<option value=0>____공석____</option>
";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".GameConst::$goodgenpower."' order by npc,binary(name)";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='".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++) {
@@ -363,7 +365,7 @@ if($meLevel >= 5) {
<option value=0>____공석____</option>
";
$query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='".GameConst::$goodgenintel."' order by npc,binary(name)";
$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++) {
@@ -505,7 +507,7 @@ for($j=0; $j < $citycount; $j++) {
<tr><td colspan=5> <font color=orange>노란색</font> 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr>
</table>
<br>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+25 -19
View File
@@ -36,15 +36,21 @@ $sel = [$type => "selected"];
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력도시</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('../e_lib/jquery-ui.min.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery-ui.min.js')?>
<?=WebUtil::printJS('js/ext.expand_city.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
@@ -123,23 +129,23 @@ for ($j=0; $j < $citycount; $j++) {
}
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=12 style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}><font size=2> ".CityConst::$regionMap[$city['region']]." | ".CityConst::$levelMap[$city['level']]." {$city['name']}</font></td>
</tr>
<tr>
<td align=center width=48 id=bg1>주민</td>
<td align=center width=112>{$city['pop']}/{$city['pop2']}</td>
<td align=center width=48 id=bg1>농업</td>
<td align=center width=108>{$city['agri']}/{$city['agri2']}</td>
<td align=center width=48 id=bg1>상업</td>
<td align=center width=108>{$city['comm']}/{$city['comm2']}</td>
<td align=center width=48 id=bg1>치안</td>
<td align=center width=108>{$city['secu']}/{$city['secu2']}</td>
<td align=center width=48 id=bg1>수비</td>
<td align=center width=108>{$city['def']}/{$city['def2']}</td>
<td align=center width=48 id=bg1>성벽</td>
<td align=center width=108>{$city['wall']}/{$city['wall2']}</td>
<td align=center width=46 id=bg1>주민</td>
<td align=center width=140>{$city['pop']}/{$city['pop2']}</td>
<td align=center width=46 id=bg1>농업</td>
<td align=center width=140>{$city['agri']}/{$city['agri2']}</td>
<td align=center width=46 id=bg1>상업</td>
<td align=center width=140>{$city['comm']}/{$city['comm2']}</td>
<td align=center width=46 id=bg1>치안</td>
<td align=center width=140>{$city['secu']}/{$city['secu2']}</td>
<td align=center width=46 id=bg1>수비</td>
<td align=center width=140>{$city['def']}/{$city['def2']}</td>
<td align=center width=46 id=bg1>성벽</td>
<td align=center width=140>{$city['wall']}/{$city['wall2']}</td>
</tr>
<tr>
<td align=center id=bg1>민심</td>
@@ -188,11 +194,11 @@ for ($j=0; $j < $citycount; $j++) {
}
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0 anchor'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
<div id="helper_genlist" style="display:none;"></div>
</html>
+14 -8
View File
@@ -36,15 +36,21 @@ $sel = [$type => "selected"];
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력장수</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
@@ -114,7 +120,7 @@ $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect)
$gencount = MYDB_num_rows($genresult);
echo"
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<tr>
<td width=64 align=center id=bg1> </td>
<td width=98 align=center id=bg1> </td>
@@ -179,8 +185,8 @@ for($j=0; $j < $gencount; $j++) {
<td align=center>$intel</td>
<td align=center>{$general['gold']}</td>
<td align=center>{$general['rice']}</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>{$general['belong']}</td>
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
</tr>";
@@ -191,7 +197,7 @@ for($j=0; $j < $gencount; $j++) {
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+10 -9
View File
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력정보", 1);
@@ -25,15 +26,17 @@ if($me['level'] == 0) {
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력정보</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<br>
@@ -65,9 +68,7 @@ $query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general wh
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$query = "select gold_rate,rice_rate from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
// 금 수지
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
@@ -89,7 +90,7 @@ if($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; }
else { $budgetricediff = "$budgetricediff"; }
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}> ";echo $me['nation']==0?" ":"{$nation['name']}";echo " </td>
</tr>
@@ -156,7 +157,7 @@ echo"
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+46 -27
View File
@@ -7,6 +7,8 @@ include "func.php";
$btn = Util::getReq('btn');
$mode = Util::getReq('mode', 'int', 2);
$tnmt = Util::getReq('tnmt', 'int', 1);
//$detachNPC = Util::getReq('detachNPC', 'bool');
$detachNPC = false;
extractMissingPostToGlobals();
@@ -23,83 +25,100 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("내정보", 1);
$query = "select myset from general where owner='{$userID}'";
$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
if ($me['myset'] > 0) {
$submit = 'submit';
} else {
$submit = 'hidden';
}
if ($btn == "설정저장" && $me['myset'] > 0) {
if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) {
if ($me['myset'] > 1) {
$submit = 'submit';
} else {
$submit = 'hidden';
}
$me['myset'] -= 1;
$db->update('general', [
'myset'=>$db->sqleval('myset-1'),
'mode'=>$mode,
'tnmt'=>$tnmt
], 'owner=%i', $userID);
}
$query = "select no,mode,tnmt,myset from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
if($me['npc'] == 1 && $detachNPC){
$turnterm = $gameStor->turnterm;
if($turnterm < 10){
$targetKillTurn = 30 / $turnterm;
}
else{
$targetKillTurn = 60 / $turnterm;
}
$db->update('general', [
'killturn'=>$targetKillTurn
], 'owner=%i AND npc=1', $userID);
$me['killturn']=$targetKillTurn;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 내정보</title>
<link href="../d_shared/common.css" rel="stylesheet">
<link rel=stylesheet href="css/common.css">
<script type="text/javascript">
function go(type) {
if(type == 0){
location.replace('c_vacation.php');
}
}
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=50%>
<?php myInfo(); ?>
<?php myInfo2(); ?>
</td>
<td width=50% valign=top>
<td width=50% valign=top style="padding-left:4ch;">
<form name=form1 action=b_myPage.php method=post>
&nbsp;&nbsp;&nbsp;&nbsp;토너먼트
토너먼트
<input type=radio name=tnmt value=0 <?=$me['tnmt']==0?"checked":""; ?>>수동참여
<input type=radio name=tnmt value=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=orange>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</font><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;수비
<font color=orange>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</font><br><br>
수비
<input type=radio name=mode value=2 <?=$me['mode']==2?"checked":""; ?>>◎(훈사80)
<input type=radio name=mode value=1 <?=$me['mode']==1?"checked":""; ?>>○(훈사60)
<input type=radio name=mode value=0 <?=$me['mode']==0?"checked":""; ?>>×
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
</form>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=휴가신청 onclick='go(0)'>
<br>
<a href="c_vacation.php"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button></a><br><br>
<!--빙의 해제용 삭턴 조절<br>
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>-->
</td>
</tr>
<tr>
@@ -127,7 +146,7 @@ function go(type) {
</td>
</tr>
</table>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
+9 -5
View File
@@ -21,14 +21,17 @@ $me = MYDB_fetch_array($result);
<html>
<head>
<title><?=UniqueConst::$serverName?>: 회의실</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<div style='width:1000px;margin:auto'>
<table width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_nationboard.php>
<tr><td align=center>
@@ -60,10 +63,11 @@ for($i=0; $i < 20; $i++) {
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</div>
</body>
</html>
+6 -4
View File
@@ -16,14 +16,16 @@ increaseRefresh("국법", 1);
<html>
<head>
<title><?=UniqueConst::$serverName?>: 국법</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<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 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
<tr><td>
+20 -26
View File
@@ -8,6 +8,7 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("토너먼트", 1);
@@ -17,11 +18,9 @@ $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);
$query = "select conlimit,tournament,phase,tnmt_msg,tnmt_type,develcost,tnmt_trig from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']);
$con = checkLimit($me['con'], $admin['conlimit']);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
@@ -42,26 +41,19 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 토너먼트</title>
<style>
body { color:white; background-color:black; border-width:1px; border-color:gray; }
table { font-family:'맑은 고딕'; }
font { font-family:'맑은 고딕'; }
input { font-family:'맑은 고딕'; height:20px }
select { font-family:'굴림'; line-height:100%; }
#bg0 { background-image:url(<?=ServConfig::$gameImagePath?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=ServConfig::$gameImagePath?>/back_green.jpg); }
#bg2 { background-image:url(<?=ServConfig::$gameImagePath?>/back_blue.jpg); }
</style>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=2000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=2000 class='tb_layout bg0'>
<tr><td>삼모전 토너먼트<br><?=closeButton()?></td></tr>
</table>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center class='tb_layout bg0'>
<?php
if ($session->userGrade >= 5) {
$sel = [];
@@ -193,7 +185,7 @@ if($str3){
echo "
<tr>
<td colspan=8>
<table align=center width=2000 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<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";
@@ -403,12 +395,14 @@ for ($i=0; $i < 16; $i++) {
echo"
</tr>";
$query = "select tournament,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$betting = MYDB_fetch_array($result);
$betting = $gameStor->getValues(['tournament','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']);
$betting['bet'] = 0;
for($i=0;$i<16;$i+=1){
$betting['bet'] += $betting['bet'.$i];
}
$bet = [];
for ($i=0; $i < 16; $i++) {
if($betting['bet'] == 0){
if($betting["bet{$i}"] == 0){
$bet[$i] = '∞';
continue;
}
@@ -444,7 +438,7 @@ for ($i=0; $i < 8; $i++) {
$grp = $i + 10;
echo "
<td>
<table align=center width=250 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}</td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
@@ -470,7 +464,7 @@ for ($i=0; $i < 8; $i++) {
$grp = $i;
echo "
<td>
<table align=center width=250 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}</td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
@@ -506,7 +500,7 @@ if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
</font>
</td></tr>
</table>
<table align=center width=2000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table align=center width=2000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
+32 -21
View File
@@ -24,26 +24,33 @@ $troopcount = MYDB_num_rows($result);
<!DOCTYPE html>
<html>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 부대편성</title>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('js/ext.plugin_troop.js')?>
</head>
<body>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<div style="width:1000px;margin:auto;">
<table width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=c_troop.php>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table id="troop_list" class='tb_layout bg0'>
<thead>
<tr>
<td align=center width=64 id=bg1> </td>
<td align=center width=98 id=bg1> </td>
<td align=center width=64 id=bg1> </td>
<td align=center width=662 id=bg1 style=table-layout:fixed;word-break:break-all;> </td>
<td align=center width=98 id=bg1 style=table-layout:fixed;word-break:break-all;>부대장행동</td>
<td width=64 class='bg1 center'> </td>
<td width=130 class='bg1 center'> </td>
<td width=100 class='bg1 center'> </td>
<td width=576 class='bg1 center' style=table-layout:fixed;word-break:break-all;> </td>
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
</tr>
</thead>
<tbody>
<?php
for($i=0; $i < $troopcount; $i++) {
$troop = MYDB_fetch_array($result);
@@ -67,7 +74,8 @@ for($i=0; $i < $troopcount; $i++) {
$turn = "";
for($k=0; $k < 5; $k++) {
$m = $k+1;
if($general["turn{$k}"] == 26) {
$turnK = DecodeCommand($general["turn{$k}"]);
if($turnK[0] == 26) {
$turn .= "&nbsp;$m : 집합<br>";
} else {
$turn .= "&nbsp;$m : <br>";
@@ -83,7 +91,7 @@ for($i=0; $i < $troopcount; $i++) {
<td align=center rowspan=2><input "; echo $i==0?"checked ":""; echo "type=radio name=troop value='{$troop['troop']}'></td>
<td align=center >{$troop['name']}<br> $cityname </td>
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'>&nbsp;</td>
<td rowspan=2 width=662>$genlist</td>
<td rowspan=2 width=62>$genlist</td>
<td rowspan=2>$turn</td>
</tr>
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
@@ -94,7 +102,7 @@ for($i=0; $i < $troopcount; $i++) {
<td align=center rowspan=2>&nbsp;</td>
<td align=center >{$troop['name']}<br> $cityname </td>
<td height=64 style='background:no-repeat center url(\"{$imageTemp}/{$picture}\");background-size:64px;'>&nbsp;</td>
<td rowspan=2 width=662>$genlist</td>
<td rowspan=2 width=576>$genlist</td>
<td rowspan=2>";
if($troop['no'] == $me['no']) {
@@ -102,7 +110,7 @@ for($i=0; $i < $troopcount; $i++) {
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genresult);
echo "
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:98px;>";
<select name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>";
for($k=0; $k < $genCount; $k++) {
$general = MYDB_fetch_array($genresult);
echo "
@@ -110,7 +118,7 @@ for($i=0; $i < $troopcount; $i++) {
}
echo "
</select><br>
<input type=submit name=btn value='부 대 추 방' style=width:100px;height:25px;>";
<input type=submit name=btn value='부 대 추 방' style=width:130px;height:25px;>";
} else {
echo $turn;
}
@@ -119,10 +127,11 @@ for($i=0; $i < $troopcount; $i++) {
</td>
</tr>
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
<tr><td colspan=5>";
<tr><td colspan=5></td></tr>";
}
}
echo "</tbody>
<tfoot><tr><td>";
if ($troopcount == 0) {
}
else if($me['troop'] == 0) {
@@ -135,14 +144,15 @@ else if($me['troop'] == 0) {
echo "
</td></tr>
</tfoot>
</table>
<br>";
echo "
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table width=1000 class='tb_layout bg0'>
<tr>
<td width=80 id=bg1> </td>
<td width=100><input type=text style=color:white;background-color:black; size=12 maxlength=6 name=name></td>";
<td width=130><input type=text style=color:white;background-color:black; size=18 maxlength=9 name=name></td>";
if($me['troop'] == 0) {
echo "
<td><input type=submit name=btn value='부 대 창 설'></td>";
@@ -155,11 +165,12 @@ echo "
</table>";
?>
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</form>
</div>
</body>
</html>
+5 -6
View File
@@ -34,13 +34,12 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("입찰", 1);
$query = "select turnterm from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$turnterm = $gameStor->turnterm;
$query = "select no,name,gold,rice,special from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -56,7 +55,7 @@ $bidCount = MYDB_num_rows($result);
$btCount = $tradeCount + $bidCount;
$unit = $admin['turnterm'] * 60;
$unit = $turnterm * 60;
$amount = Util::round($amount / 10) * 10;
$cost = Util::round($cost / 10) * 10;
@@ -92,11 +91,11 @@ if ($btn == "판매") {
$msg = "ㆍ<span class='ev_warning'>시작판매가는 50% ~ 200% 이어야 합니다.</span>";
$valid = 0;
}
if ($topv < $amount*1.1 || $topv > $amount * 2) {
if ($topv * 10 < $amount * 11 || $topv > $amount * 2) {
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 110% ~ 200% 이어야 합니다.</span>";
$valid = 0;
}
if ($topv < $cost*1.1) {
if ($topv * 10 < $cost * 11) {
$msg = "ㆍ<span class='ev_warning'>즉시판매가는 시작판매가의 110% 이상이어야 합니다.</span>";
$valid = 0;
}
+4 -4
View File
@@ -38,10 +38,11 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("베팅", 1);
$tournament = $db->queryFirstField('SELECT tournament FROM game LIMIT 1');
$tournament = $gameStor->tournament;
if($tournament != 6) {
header('Location: b_betting.php');
exit();
@@ -59,9 +60,8 @@ if($betGold + 500 <= $myGold && $betGold + $oldBet <= 1000 && $betGold + $totalB
"bet{$betTarget}"=>$db->sqleval("bet{$betTarget} + %i", $betGold),
'betgold'=>$db->sqleval('betgold + %i', $betGold)
], 'owner = %i', $userID);
$db->update('game', [
"bet{$betTarget}"=>$db->sqleval("bet{$betTarget} + %i", $betGold)
], true);
$gameStor->setValue("bet{$betTarget}", $gameStor->getValue("bet{$betTarget}") + $betGold);//TODO: +로 증가하는 storage값은 별도로 분리
}
header('location: b_betting.php');
+12 -14
View File
@@ -19,11 +19,8 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT `no`,nation,`level` FROM general WHERE `owner`=%i', $userID);
//내가 수뇌부이어야함
if($me['level'] < 5) {
@@ -32,21 +29,21 @@ if($me['level'] < 5) {
}
if($btn == "국가방침") {
$msg == mb_substr($msg, 0, 1000);
$msg = mb_substr($msg, 0, 16384);
//$msg = StringUtil::
$db->update('nation', [
'msg'=>BadTag2Code($msg)
'msg'=>WebUtil::htmlPurify($msg)
], 'nation=%i',$me['nation']);
} elseif($btn == "임관권유") {
$scoutmsg == mb_substr($msg, 0, 500);
$scoutmsg = mb_substr($scoutmsg, 0, 1000);
$db->update('nation', [
'scoutmsg'=>BadTag2Code($scoutmsg)
'scoutmsg'=>WebUtil::htmlPurify($scoutmsg)
], 'nation=%i',$me['nation']);
} elseif($btn == "세율") {
if($rate < 5) { $rate = 5; }
if($rate > 30) { $rate = 30; }
$query = "update nation set rate='$rate' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$rate = Util::valueFit($rate, 5, 30);
$db->update('nation', [
'rate'=>$rate,
], 'nation=%i', $me['nation']);
} elseif($btn == "지급율") {
$bill = Util::valueFit($bill, 20, 200);
$db->update('nation', [
@@ -70,8 +67,9 @@ if($btn == "국가방침") {
'war'=>1
], 'nation=%i',$me['nation']);
} elseif($btn == "전쟁 허가") {
$query = "update nation set war='0' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('nation', [
'war'=>0
], 'nation=%i',$me['nation']);
}
header('location:b_dipcenter.php');
+7 -18
View File
@@ -44,12 +44,8 @@ $comStr = EncodeCommand($fourth, $third, $double, $command);
// 건국
if($command == 46) {
$name = addslashes(SQ2DQ($name));
$name = str_replace("|", "", $name);
$name = str_replace(" ", "", $name);
$name = str_replace(" ", "", $name);
$name = StringUtil::neutralize($name);
if($name == "") { $name = "무명"; }
$name = StringUtil::subStringForWidth($name, 0, 12);
$db->update('general', [
'makenation'=>$name
@@ -72,15 +68,12 @@ if($command == 53) {
$me = MYDB_fetch_array($result);
if($me['level'] >= 5) {
$nationname = addslashes(SQ2DQ($nationname));
$nationname = str_replace("|", "", $nationname);
$nationname = str_replace(" ", "", $nationname);
$nationname = str_replace(" ", "", $nationname);
$nationname = StringUtil::neutralize($nationname, 18);
if($nationname == "") { $nationname = "무명"; }
$nationname = StringUtil::subStringForWidth($nationname, 0, 12);
$query = "update general set makenation='{$nationname}' where level>=5 and nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('general', [
'makenation'=>$nationname
], 'level>=5 and nation=%i', $me['nation']);
$count = count($turn);
$str = "type=type";
@@ -101,11 +94,7 @@ if($command == 61) {
$me = MYDB_fetch_array($result);
if($me['level'] >= 5) {
$note = addslashes(SQ2DQ($note));
$note = str_replace("|", "", $note);
$note = str_replace(" ", "", $note);
$note = str_replace(" ", "", $note);
$note = StringUtil::subStringForWidth($note, 0, 90);
$note = StringUtil::neutralize($note, 90);
$query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+55 -36
View File
@@ -18,11 +18,10 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$query = "select startyear,year,month,scenario from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$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),"");
@@ -39,27 +38,29 @@ if($meLevel < 5){
exit();
}
if($btn == "임명") {
if($genlist !== 0){
$query = "select no,nation,level,leader,power,intel from general where no='$genlist'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($genlist==0){
$general = [];
}
else{
$general = $db->queryFirstRow('SELECT `no`,nation,`level`,leader,`power`,intel FROM general WHERE no = %i', $genlist);
}
if(!$general){
header('location:b_myBossInfo.php');
exit();
}
if($genlist != 0 && !$general){
header('location:b_myBossInfo.php');
exit();
}
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
if($meLevel < 5 || ($general['nation'] != $me['nation'] && $genlist != 0) || ($general['level'] == 12 && $genlist != 0)) {
if($meLevel < 5 || ($genlist != 0 && $general['nation'] != $me['nation']) || ($genlist != 0 && $general['level'] == 12)) {
header('location:b_myBossInfo.php');
exit();
}
} elseif($btn == "추방") {
if(!$outlist){
header('location:b_myBossInfo.php');
exit();
}
$query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr from general where no='$outlist'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
@@ -112,26 +113,46 @@ if($btn == "추방") {
}
if($dipcount1 > 0) {
$alllog[] = "<C>●</>{$admin['month']}월:통합에 반대하던 <Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
$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) {
$alllog[] = "<C>●</>{$admin['month']}월:합병에 반대하던 <Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>숙청</>당했습니다.";
$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 {
$alllog[] = "<C>●</>{$admin['month']}월:<Y>{$general['name']}</>(이)가 <D><b>{$nation['name']}</b></>에서 <R>추방</>당하였습니다.";
$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%감소
$query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if($admin['year'] <= $admin['startyear'] && $general['npc'] < 2){
$db->update('general', [
'level'=>0,
'nation'=>0,
'belong'=>0,
], 'no=%i', $general['no']);
}
else{
$db->update('general', [
'level'=>0,
'nation'=>0,
'belong'=>0,
'betray'=>$db->sqleval('betray + 1'),
'makelimit'=>12,
'gold'=>$general['gold'],
'rice'=>$general['rice'],
'dedication'=>$db->sqleval('dedication * (1 - 0.1*betray)'),
], 'no=%i', $general['no']);
}
}
// 부대 처리
$query = "select no from troop where troop='{$general['troop']}'";
@@ -159,7 +180,7 @@ if($btn == "추방") {
$query = "update city set gen3='0' where gen3='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if($general['npc'] >= 2 && ($admin['scenario'] == 0 || rand()%100 == 0)) {
if($general['npc'] >= 2 && ($admin['scenario'] < 100 || rand()%100 == 0)) {
switch(rand()%5) {
case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break;
case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break;
@@ -193,7 +214,7 @@ if($btn == "추방") {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
$gennum = $gencount;
if($gencount < 10) $gencount = 10;
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
$nation['chemi'] -= 1;
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
@@ -211,13 +232,11 @@ if($btn == "추방") {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
$query = "select year,month from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
pushGeneralHistory($general, "<C>●</>{$admin['year']}{$admin['month']}월:<D>{$nation['name']}</>에서 추방됨");
list($year, $month) = $gameStor->getValuesAsArray(['year','month']);
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:<D>{$nation['name']}</>에서 추방됨");
pushGenLog($general, $log);
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
pushGeneralPublicRecord($alllog, $year, $month);
}
header('location:b_myBossInfo.php');
die();
@@ -236,7 +255,7 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
$nation['chemi'] -= 1;
if($nation['chemi'] < 0) { $nation['chemi'] = 0; }
$query = "update nation set chemi='{$nation['chemi']}' where nation='{$general['nation']}'";
$query = "update nation set chemi='{$nation['chemi']}' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//기존 장수 일반으로
@@ -245,12 +264,12 @@ if($btn == "임명" && $level >= 5 && $level <= 11) {
if($genlist != 0) {
$valid = 0;
switch($level) {
case 10: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
case 9: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
case 8: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
case 7: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
case 6: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
case 5: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
case 10: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 9: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 8: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 7: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 6: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 5: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
default: $valid = 1; break;
}
if($valid == 1) {
@@ -302,8 +321,8 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
if($genlist != 0) {
$valid = 0;
switch($level) {
case 4: if($general['power'] >= GameConst::$goodgenpower) { $valid = 1; } break;
case 3: if($general['intel'] >= GameConst::$goodgenintel) { $valid = 1; } break;
case 4: if($general['power'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
case 3: if($general['intel'] >= GameConst::$chiefStatMin) { $valid = 1; } break;
default: $valid = 1; break;
}
+17 -21
View File
@@ -21,11 +21,10 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$query = "select tournament,phase,tnmt_type,develcost from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$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),"");
@@ -80,8 +79,8 @@ if($btn == '참가') {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$grpCount = MYDB_num_rows($result);
if($grpCount >= 8) {
$query = "update game set tournament=2, phase=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->tournament = 2;
$gameStor->phase = 0;
}
header('location:b_tournament.php');
die();
@@ -93,15 +92,13 @@ if($session->userGrade < 5) {
}
if($btn == "자동개최설정") {
$db->update('game', ['tnmt_trig'=>$trig], true);
$gameStor->tnmt_trig = $trig;
} elseif($btn == "개최") {
startTournament($auto, $type);
} elseif($btn == "중단") {
$db->update('game', [
'tnmt_auto'=>0,
'tournament'=>0,
'phase'=>0
], true);
$gameStor->tnmt_auto = 0;
$gameStor->tournament = 0;
$gameStor->phase = 0;
} elseif($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") {
if($btn == "투입") {
$query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'";
@@ -164,7 +161,7 @@ if($btn == "자동개최설정") {
}
$map = [];
for($i=0; $i < 8; $i++) {
if($occupied[$i] == 0) {
if(!isset($occupied[$i]) || $occupied[$i] == 0) {
$map[] = $i;
}
}
@@ -184,8 +181,8 @@ if($btn == "자동개최설정") {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$grpCount = MYDB_num_rows($result);
if($grpCount >= 8) {
$query = "update game set tournament=2, phase=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->tournament=2;
$gameStor->phase=0;
}
} elseif($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") {
@@ -241,8 +238,8 @@ if($btn == "자동개최설정") {
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
$query = "update game set tournament=2, phase=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->tournament = 2;
$gameStor->phase = 0;
} elseif($btn == "무명전부투입") {
fillLowGenAll();
} elseif($btn == "예선") {
@@ -261,8 +258,9 @@ if($btn == "자동개최설정") {
final16set();
} elseif($btn == "베팅마감") {
$dt = date("Y-m-d H:i:s", time() + 60);
$query = "update game set tournament='7',phase='0',tnmt_time='$dt'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->tournament=7;
$gameStor->phase=0;
$gameStor->tnmt_time = $dt;
} elseif($btn == "16강") {
finalFight($admin['tnmt_type'], $admin['tournament'], $admin['phase'], 16);
} elseif($btn == "8강") {
@@ -276,9 +274,7 @@ if($btn == "자동개최설정") {
} elseif($btn == "회수") {
setRefund();
} elseif($btn == "메시지") {
$msg = addslashes(SQ2DQ($msg));
$query = "update game set tnmt_msg='$msg'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->tnmt_msg = $msg;
}
header('location:b_tournament.php');
+3 -8
View File
@@ -8,16 +8,11 @@ $session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
$query = "select killturn from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$killturn = $gameStor->killturn;
$admin['killturn'] *= 3;
$query = "update general set killturn='{$admin['killturn']}' where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('general', ['killturn'=>$killturn*3], 'owner=%i', $userID);
header('location:b_myPage.php');
+25 -33
View File
@@ -16,12 +16,14 @@ extractMissingPostToGlobals();
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
$isVoteAdmin |= $session->userGrade >= 5;
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$query = "select develcost,vote,votecomment from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votecomment']);
$query = "select no,vote,name,nation,horse,weap,book,item,npc from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -36,25 +38,19 @@ if($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
$log = uniqueItem($me, $log, 1);
pushGenLog($me, $log);
}
else if($btn == "댓글" && $comment != "") {
$comment = str_replace("|", " ", $comment);
$comment = str_replace(":", " ", $comment);
else if($btn == "댓글" && trim($comment) != "") {
$comment = trim($comment);
$comment = addslashes(SQ2DQ($comment));
$nation = getNationStaticInfo($me['nation']);
if($admin['votecomment'] != "") { $admin['votecomment'] .= "|"; }
$admin['votecomment'] .= "{$nation['name']}:{$me['name']}:{$comment}";
$query = "update game set votecomment='{$admin['votecomment']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if(!$admin['votecomment']){
$admin['votecomment'] = [];
}
$admin['votecomment'][] = [$nation['name'],$me['name'],$comment];
$gameStor->votecomment = $admin['votecomment'];
}
if($session->userGrade < 5){
if(!$isVoteAdmin){
header('location:a_vote.php');
die();
}
@@ -62,22 +58,21 @@ if($session->userGrade < 5){
if($btn == "수정") {
if($title != "") {
$vote = explode("|", $admin['vote']);
$vote[0] = addslashes(SQ2DQ($title));
$admin['vote'] = implode("|", $vote);
$query = "update game set vote='{$admin['vote']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->vote_title = WebUtil::htmlPurify($title);
}
} elseif($btn == "추가") {
if($str != "") {
$str = addslashes(SQ2DQ($str));
$admin['vote'] .= "|{$str}";
$query = "update game set vote='{$admin['vote']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if(!$admin['vote']){
$admin['vote'] = [];
}
$admin['vote'][] = WebUtil::htmlPurify($str);
$gameStor->vote=$admin['vote'];
}
} elseif($btn == "리셋") {
$query = "update game set voteopen=1,vote='',votecomment=''";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->voteopen=1;
$gameStor->vote=['-'];
$gameStor->vote_title = '-';
$gameStor->votecomment=[];
$query = "update general set vote='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -85,14 +80,11 @@ if($btn == "수정") {
$query = "update general set newvote='1' where vote=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "숨김") {
$query = "update game set voteopen=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->voteopen = 0;
} elseif($btn == "전체통계만") {
$query = "update game set voteopen=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->voteopen = 1;
} elseif($btn == "전부") {
$query = "update game set voteopen=2";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gameStor->voteopen = 2;
}
header('location:a_vote.php');
+15 -18
View File
@@ -4,22 +4,23 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$session = Session::getInstance()->setReadOnly();
$db = DB::db();
$connect=$db->get();
?>
<!DOCTYPE html>
<html>
<head>
<title>커맨드리스트</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href='../d_shared/common.css' type='text/css'>
<link rel='stylesheet' href='css/common.css' type='text/css'>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
<?php
if(!$session->isLoggedIn()){
if(!$session->isGameLoggedIn()){
echo 'window.parent.location.href = "../";';
}
?>
@@ -67,26 +68,22 @@ myCommandList();
function myCommandList() {
$db = DB::db();
$connect=$db->get();
$gameStor = KVStorage::getStorage($db, 'game_env');
$userID = Session::getUserID();
$date = date('Y-m-d H:i:s');
// 명령 목록
$query = "select year,month,turnterm from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['year','month','turnterm']);
$query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$me = $db->queryFirstRow("SELECT `no`,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 FROM general WHERE `owner`=%s", $userID);
if(!$me){
echo "로그인 되어있지 않습니다.";
return;
}
$turn = getTurn($me, 2);
echo "<table width=300 height=700 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg2>
echo "<table width=300 height=700 class='tb_layout bg2'>
<form name=clock>
<tr>
<td colspan=4 align=center id=bg0><b>- 명령 목록 - <input value='$date' type=text name=clock size=19 style=background-color:black;color:white;border-style:none;></b></td>
@@ -109,10 +106,10 @@ function myCommandList() {
$turndate = substr($totaldate,11, 5);
echo "
<tr height=28>
<td width=30 align=center height=24 id=bg0><b>$j</b></td>
<td width=75 align=center height=24 id=bg1><b>{$year} {$month}</b></td>
<td width=45 align=center bgcolor=black><b>$turndate</b></td>
<td width=137 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
<td width=71 align=center height=24 id=bg1><b>{$year} {$month}</b></td>
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
</tr>";
$month++;
$totaldate = addTurn($totaldate, $admin['turnterm']);
+77 -1
View File
@@ -1,15 +1,75 @@
@charset "UTF-8";
/* font-boostring Block */
html * {max-height:1000000px;}
html, body{
background-color:black;
color:white;
line-height:1.3;
font-family:'맑은 고딕';
font-size:13px;
}
table { font-family:'맑은 고딕'; }
font { font-family:'맑은 고딕'; }
input { font-family:'맑은 고딕'; height:20px }
input { font-family:'맑은 고딕'; font-size:13px; }
select { font-family:'굴림'; line-height:100%; }
.center{
text-align:center;
}
table.mimic_flex{
border-collapse: collapse;
border:none;
padding:0;
}
.mimic_flex td, .mimic_flex th {
border:none !important;
padding: 0px;
word-break: break-all;
}
table.tb_layout {
border-collapse: collapse;
padding: 0px;
font-size: 13px;
word-break: break-all;
font-family: '맑은 고딕';
}
.tb_layout td, .tb_layout th {
border:solid 1px gray;
padding: 0px;
word-break: break-all;
font-family: '맑은 고딕';;
}
div.bar_out{
position:relative;
border-top:solid 1px #888888;
border-bottom:solid 1px #333333;
padding:0;
margin:0;
width:100%;
overflow: hidden;
}
div.bar_out div{
position:absolute;
left:0;
top:0;
height:100%;
}
div.bar_out div.bar_in{
width:100%;
}
/* */
.ev_warning{
@@ -76,6 +136,7 @@ select { font-family:'굴림'; line-height:100%; }
.small_war_log .crew_plate{
color:orangered;
font-size:90%;
}
.t_date{
@@ -126,3 +187,18 @@ select { font-family:'굴림'; line-height:100%; }
float:left;
}
.tooltip{
font-size:12px;
font-family: '맑은 고딕';
}
.tooltiptext {
display: none;
}
.btn-group-xs > .btn, .btn-xs {
padding : .25rem .4rem;
font-size : .875rem;
line-height : .5;
border-radius : .2rem;
}
+94
View File
@@ -0,0 +1,94 @@
.rankView {
width:1100px;
margin:auto;
position:relative;
font-size:13px;
}
.rankView h3{
text-align:center;
margin:0;
padding:2px;
border-bottom:1px solid gray;
}
.rankView ul{
list-style:none;
margin:0;
padding:0;
box-sizing: border-box;
margin-top:-1px;
margin-bottom:-1px;
}
.rankView li{
display:inline-block;
vertical-align: top;
width:110px;
height:149px;
text-align:center;
border-right:1px solid gray;
border-top:1px solid gray;
margin:0;
box-sizing: border-box;
}
.rankView li.no_value{
height:128px;
}
.rankView li.has_server {
height:168px;
}
.rankView li.no_value.has_server {
height:146px;
}
.rankView .hall_server{
border-top:1px solid gray;
}
.rankView .tooltip .tooltiptext{
width:220px;
margin-left: -110px;
}
.rankView .no_value .hall_value{
display:none;
}
.rankView .hall_nation{
font-size:11px;
border-top:1px solid gray;
border-bottom:1px solid gray;
}
.rankView .hall_name{
display: flex;
justify-content: center;
flex-direction: column;
resize: vertical;
font-size:11px;
height:28px;
}
.rankView .hall_name p{
padding:0;
margin:0;
}
.rankView .hall_owner{
font-size:95%;
}
.rankView .hall_value{
line-height:13px;
box-sizing: border-box;
border-top:1px solid gray;
padding-top:3px;
padding-bottom:3px;
}
+4
View File
@@ -63,4 +63,8 @@ color:white;
font-size:13px;
margin:0;
display:block;
}
.nation_info td{
height:18px;
}
+55 -2
View File
@@ -27,6 +27,44 @@
position:relative;
}
.map_body .map_bglayer1{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.map_body .map_bglayer2{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.map_body .map_bgroad{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.map_body .map_button_stack{
position:absolute;
right:0;
bottom:0;
}
.map_body .map_toggle_cityname::after{
content: "끄기"
}
.map_body .map_toggle_cityname.active::after{
content: "켜기"
}
.world_map .city_tooltip{
position: absolute;
z-index:6;
@@ -63,13 +101,26 @@
.world_map.map_detail .city_filler{
position:absolute;
width:100%;
height:100%;
width:calc(100% + 2px);
height:calc(100% + 2px);
left:-1px;
top:-1px;
background:transparent;
}
.world_map .city_detail_name{
background-color:rgba(0,0,0,0.5);
font-size:10px;
position:absolute;
white-space:nowrap;
left:70%;
bottom:-10px;
color:white;
}
.world_map.hide_cityname .city_detail_name{
display:none;
}
.city_base{
position:absolute;
@@ -314,6 +365,8 @@
/* Basic */
.world_map.map_basic .city_filler{
position:absolute;
width:100%;
+25 -12
View File
@@ -17,15 +17,14 @@
#message_board section{
overflow-y:auto;
overflow-x:hidden;
max-width:498px;
}
.msg_plate{
width:100%;
border-bottom:groove 0.1em;
border-left:groove 0.1em;
border-right:groove 0.1em;
height:64px;
outline-style:solid;
outline-width:1px;
outline-color: gray;
min-height:64px;
font-size:12px;
word-break:break-all;
color:white;
@@ -35,6 +34,10 @@
background-color:#5d1e1a;
}
.msg_plate_private.msg_plate_dest{
background-color:#5d461a;
}
.msg_plate_public{
background-color:#141c65;
@@ -42,7 +45,14 @@
.msg_plate_national, .msg_plate_diplomacy{
background-color:#00582c;
}
.msg_plate_national.msg_plate_dest, .msg_plate_diplomacy.msg_plate_dest {
background-color:#704615;
}
.msg_plate_national.msg_plate_src, .msg_plate_diplomacy.msg_plate_src {
background-color:#70153b;
}
.public_message{
@@ -61,7 +71,7 @@
float:left;
width:64px;
height:64px;
border-right:groove 0.1em;
border-right:solid 1px gray;
}
.msg_time{
@@ -85,7 +95,8 @@
font-size:12px;
width:715px;
margin:0 2px;
height:15px;
height:20px;
border:solid 1px gray;
}
#msg_submit{
@@ -105,17 +116,19 @@
.board_header{
color:white;
border:groove 0.1em;
outline-style:solid;
outline-width:1px;
outline-color: gray;
}
.board_side{
position:absolute;
height:1370px;
width:498px;
width:50%;
overflow-y: hidden;
border-left:groove 1px;
border-right:groove 1px;
border-bottom:groove 1px;
outline-style:solid;
outline-width:1px;
outline-color: gray;
}
.msg_body{
+48
View File
@@ -0,0 +1,48 @@
.container{
width:1000px;
margin:0 auto;
}
.card_holder{
text-align:center;
}
.general_card{
width:125px;
display:inline-block;
}
.general_card h4 {
margin:0;
}
.general_card p {
margin:0;
}
.general_card .select_btn {
width:100%;
}
.general_card label {
display: block;
padding-left: 15px;
text-indent: -15px;
}
.general_card input {
width: 13px;
height: 13px;
padding: 0;
margin:0;
vertical-align: bottom;
position: relative;
top: -1px;
*overflow: hidden;
}
#outdate_token{
color:red;
display:none;
}
+7
View File
@@ -0,0 +1,7 @@
<?php
namespace sammo;
class CityConst extends CityConstBase{
}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace sammo;
class GameConst extends GameConstBase
{
}

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