Compare commits

..
130 Commits
Author SHA1 Message Date
Hide_D 08891b36aa 증축, 감축 커맨드 수정 2020-01-30 02:17:59 +09:00
Hide_D 455d68d2b4 내특, 전특 초기화 구현 2020-01-30 02:14:01 +09:00
Hide_D 37ea64346c 자동 모병, 자동 징병을 자동 무작위 모병, 자동 무작위 징병으로 변경 2020-01-30 01:39:47 +09:00
Hide_D 09e693cb74 무작위 징병, 무작위 모병 추가, 테스트용 시나리오 추가 2020-01-30 01:24:30 +09:00
Hide_D 8394c9780c 테스트 기수용 맵 추가, 증축 비용 상수값 추가 2020-01-28 02:59:06 +09:00
Hide_D a5b404298b 징병에서는 기능 안뜨는 문제 수정 2020-01-28 02:18:58 +09:00
Hide_D ab48082bb8 징병 불가능한 병종도 표기 2020-01-28 02:15:51 +09:00
Hide_D 9094434c16 {} 참조 제거 2020-01-28 01:25:52 +09:00
Hide_D ddb971e41e 재 업데이트 2020-01-28 01:17:00 +09:00
Hide_D a8b3befca9 composer update 2020-01-28 01:16:04 +09:00
Hide_D e5bed62ca9 Medoo 수정 2020-01-28 01:11:59 +09:00
Hide_D 76b8a59f39 Revert "medoo only"
This reverts commit 2c31de1d6a2cf8cf404daff6ae1d060bb1181b00.
2020-01-28 00:56:16 +09:00
Hide_D 4dbe30bb2b medoo only 2020-01-28 00:55:57 +09:00
Hide_D adcfcaa1ef Revert "composer reinstall"
This reverts commit d16736132c972e2b5c5029dc4bcea497f2ab2174.
2020-01-28 00:44:38 +09:00
Hide_D da32f0067a composer reinstall 2020-01-28 00:43:48 +09:00
Hide_D 19be0c4560 Revert "package update 재도전"
This reverts commit 595ab6d7e5675490afea91d5367b24c76d05fbe8.
2020-01-28 00:31:53 +09:00
Hide_D f6e53746b2 package update 재도전 2020-01-28 00:30:41 +09:00
Hide_D 9cd40b213d Revert "composer package update"
This reverts commit e979959219e95fc6435ad40f7e60b602f8bbd208.
2020-01-28 00:23:38 +09:00
Hide_D ed69eb5d7b composer package update 2020-01-28 00:22:43 +09:00
Hide_D ed95d5e933 버그 수정 2020-01-04 04:40:27 +09:00
Hide_D 53f3083b73 npc 워프 기준을 태수, 군사, 시중 모두 따르도록 변경. 워프 버그 수정 2020-01-04 04:00:15 +09:00
Hide_D 61df5ed809 버그 수정 2020-01-04 03:28:31 +09:00
Hide_D 7c1baa6cf1 공백지를 고려하지 않는 버그 수정 2020-01-04 03:26:50 +09:00
Hide_D 800d4f6cc9 출병에서 1칸 떨어진 도시를 제거 2020-01-04 01:25:29 +09:00
Hide_D 1ab45af036 출병을 '어택땅'으로 변경 2020-01-04 01:23:07 +09:00
Hide_D e9b5e4d4d1 같은 병종 숙련전환하면 늘어나기만 하는 버그 수정 2019-11-26 18:49:40 +09:00
Hide_D 65aa4c29a4 NPC 버그 수정, NPC 징병 룰 변경
징병시 최대 통솔 반영
발령 시 인구 바닥난 곳 고려 안하던 것 보정
징병 기준을 통솔과 관계없이 40000명인 경우에 시도하던 버그 수정
NPC는 30000 + 20000 일 경우에만 징병함.
2019-11-10 04:08:48 +09:00
Hide_D e75b6f2d5b miniche_b js 등록 2019-10-25 18:40:32 +09:00
Hide_D dbc758095f miniche_b 추가 2019-10-24 02:19:46 +09:00
Hide_D 57a94e4a7d 연감 버그 수정 2019-10-16 02:34:46 +09:00
Hide_D 50526383f9 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-10-16 02:32:51 +09:00
Hide_D 639b1dcac7 연감 출력 개선 2019-10-16 02:32:44 +09:00
Hide_D a984651888 포켓몬 맵 js 등록 2019-10-04 01:18:45 +09:00
Hide_D a8befe5478 찐 유저무쌍 추가 2019-10-03 23:39:47 +09:00
Hide_D 43ba732aad 기본 증축량 버그 수정 2019-10-03 21:15:52 +09:00
Hide_D 158068273e 포켓몬스터 전콘 안뜨는 문제 수정 2019-10-03 20:52:51 +09:00
Hide_D 94a00dbdac 포켓몬 v1 추가 2019-10-03 19:50:22 +09:00
Hide_D fedc7e5ef5 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-10-03 15:12:35 +09:00
Hide_D 78ff016def 감축 조건 변경, 증/감축시 변화량을 지정가능하도록 변경 2019-10-03 15:12:25 +09:00
Hide_D 30d8324a0a 핫픽스 2019-10-02 13:37:30 +09:00
Hide_D de1fa34922 병력없을 때 공격 루틴 타는 것 방지 2019-10-01 22:06:38 +09:00
Hide_D a74b9a5e80 서신전달 빈칸 입력 테스트 2019-09-28 11:54:19 +09:00
Hide_D 79a199cbd3 자동 진행 모드일 때 모반이 거의 항상 가능해지는 버그 수정 2019-09-28 07:56:32 +09:00
Hide_D 2f2062c9e5 랜임코드 버그 수정 2019-09-26 18:42:51 +09:00
Hide_D 1dcace7a62 자율행동 항상 유효 변경 2019-09-25 02:17:27 +09:00
Hide_D 8f107b56b3 서버에서 자율행동란에 시간 추가, tooltip에 copyable_info 추가 2019-09-25 02:14:49 +09:00
Hide_D 8c6afee7c9 부대장 사망의 경우도 고려 2019-09-24 07:34:55 +09:00
Hide_D d4982f3ed9 README.md 변경 2019-09-23 01:19:49 +09:00
Hide_D f2a785f2fc imagePull 기능 추가, 인스톨러 완성 2019-09-23 00:28:15 +09:00
Hide_D 6fafcfae4e 훈사 분리 2019-09-21 23:27:43 +09:00
Hide_D 33e075f669 훈사를 분리 2019-09-21 21:29:20 +09:00
Hide_D e5fc467c4e 버그 수정 2019-09-21 21:04:17 +09:00
Hide_D b7a5de49c6 표기 일부 변경 2019-09-21 18:09:37 +09:00
Hide_D 3f145abd6f 모훈사 기준을 징병 6회로 변경 2019-09-21 17:39:13 +09:00
Hide_D 4612834870 워프 기준, 쌀 삼팜 기준 변경 2019-09-21 14:41:23 +09:00
Hide_D 83c5609fad 징병 버그 수정 2 2019-09-21 11:42:10 +09:00
Hide_D d142056098 징병 안되는 버그 수정 2019-09-21 11:39:51 +09:00
Hide_D 4d8ecf4191 진짜로 삭턴 버그 수정 2019-09-21 02:44:00 +09:00
Hide_D af6c3f466d 삭턴 버그 수정 2019-09-21 02:38:06 +09:00
Hide_D 033a2d8674 삭턴 버그 수정 2019-09-21 02:35:15 +09:00
Hide_D 9079788b2b 삭턴 기준 변경 2019-09-21 02:33:39 +09:00
Hide_D 44ddb2e480 git fetch에도 -q 2019-09-21 02:28:49 +09:00
Hide_D 295ba84071 자동 행동 세부를 툴팁으로 2019-09-21 02:27:05 +09:00
Hide_D 8773250aab 초기 병종이 보병일 때 고정되는 버그 수정 2019-09-21 02:14:25 +09:00
Hide_D c5a4602fe1 옵션 표기 버그 수정 2019-09-21 02:11:54 +09:00
Hide_D 5f4c43baf6 Merge branch 'devel' into autorun 2019-09-21 02:07:26 +09:00
Hide_D 0ef3921e17 update 서버 변경 2019-09-21 02:06:49 +09:00
Hide_D efcf0f772e server checkout 추가2 2019-09-21 01:50:36 +09:00
Hide_D ccabe847bb 루트도 git tree-ish 지정 가능 2019-09-21 01:42:21 +09:00
Hide_D 45ed63ffe3 버그 수정 2019-09-21 01:38:29 +09:00
Hide_D 7bebbe3a16 징병, 모병 추가 2019-09-21 01:09:17 +09:00
Hide_D 53ba1db79f autorun_user 초기 세팅 2019-09-20 02:12:42 +09:00
Hide_D 76c306a122 npc AI를 '사전 턴' 수행 이후에 처리하도록 변경 2019-09-20 00:41:38 +09:00
Hide_D 89c2c163cb 서버 정보에 자동행동 표기 2019-09-20 00:35:13 +09:00
Hide_D 8826061266 autorun_user 인자 세팅 2019-09-20 00:05:40 +09:00
Hide_D e684877c94 리셋 화면에서 '휴식 턴 시 장수 턴' 추가 2019-09-19 02:21:51 +09:00
Hide_D 12c8152901 docker 메시지 수정 2019-09-19 01:16:21 +09:00
Hide_D 8ba20bf4d2 Docker를 이용한 설치 안내 2019-09-15 23:25:11 +09:00
Hide_D 0bc1ad09d1 년도 변경 2019-09-15 23:19:04 +09:00
Hide_D 231c79132a run_daemon 1분 유지 수정 2019-09-15 20:59:35 +09:00
Hide_D 089803c599 cron 수정 2019-09-15 20:53:23 +09:00
Hide_D 4ea373aff6 gitignore change 2019-09-15 20:08:57 +09:00
Hide_D 0d94b8c742 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-09-15 19:49:32 +09:00
Hide_D d444f19043 date_default_timezone_set 해제 2019-09-15 19:49:24 +09:00
Hide_D 87a0e73c96 인스톨러 버그 수정 2019-09-15 02:59:38 +09:00
Hide_D b5922095f0 인스톨러 임시 트윅 2019-09-15 02:50:10 +09:00
Hide_D 3fee29e9e9 setup_db에서 global_salt 추가 2019-09-15 00:55:57 +09:00
Hide_D 4e351b3be8 Merge branch 'devel' of ssh://storage.hided.net:2525/devsam/core into devel 2019-09-15 00:38:00 +09:00
Hide_D 3432b900df 설치 직후 기본 gitpath 변경 2019-09-15 00:37:46 +09:00
Hide_D fb7c67f317 빙의 안되는 버그 수정, 가입/빙의 시 락 2019-08-18 18:01:11 +09:00
Hide_D 28d5a5c39a 장수 생성시 빠르게 쿼리를 날려 중복 생성하는 것이 불가능하도록 2019-08-18 17:50:38 +09:00
Hide_D e2754511d9 부대탈퇴 시 propergation 처리 실수 수정 2019-08-18 00:46:39 +09:00
Hide_D 71d179de76 서버 시간을 더 정교하게 반영하도록 수정 2019-08-16 23:42:46 +09:00
Hide_D 08523852da 마지막 남은 iframe 안녕!!! 2019-08-16 23:27:28 +09:00
Hide_D 3dd52942d2 부대 명령을 json api로 변경 2019-08-16 22:16:28 +09:00
Hide_D bb24e45028 서버가 오픈되지 않으면 벌점이 늘지 않도록 변경 2019-08-15 19:37:03 +09:00
Hide_D f8c72a6a0a NPC기술연구 관련 마저 고침 2019-08-15 16:10:39 +09:00
Hide_D fa246ff810 단순 건국 상품 롤백 2019-08-15 00:37:49 +09:00
Hide_D 1a1d384a3e 최종 보정 수정 2019-08-14 01:36:41 +09:00
Hide_D 6d85c609fd 동시에 관직이 여러번 뛸때에도 관직 보상 많이 줌 2019-08-14 01:33:50 +09:00
Hide_D e1b8dde60a 보정 롤백 2019-08-14 01:27:37 +09:00
Hide_D e8d32eef4e 작위보상의 수뇌 보정을 낮춤 2019-08-14 01:26:05 +09:00
Hide_D ec0fa686a9 여유를 '절대 시간' 으로 변경 2019-08-14 01:00:10 +09:00
Hide_D 7604273c1a 삭턴에 조금 여유를 줌 2019-08-14 00:58:56 +09:00
Hide_D 00db927ce7 작위 보상 추가 2019-08-14 00:55:45 +09:00
Hide_D 9fea24f0f6 건국 즉시 얻는 템 삭제, 유니크 복권 리팩토링, '고정된 한개'를 주는 유니크 복권 추가 2019-08-14 00:27:36 +09:00
Hide_D c903ce929f 서버 정보 추가 제공 2019-08-13 23:37:46 +09:00
Hide_D d48d9f85b3 가오픈시 별도 표기 추가 2019-08-13 23:24:05 +09:00
Hide_D 5bdf7ba316 가오픈시 삭제는 유저장만 가능하도록 변경 2019-08-13 02:24:58 +09:00
Hide_D 518c74736f 가 오픈기간내 장수 삭제/빙의해제 가능 2019-08-13 02:23:27 +09:00
Hide_D 223d2cf786 서버 가오픈시 대비 넉넉하게 시간 제공 2019-08-13 01:30:41 +09:00
Hide_D cfa2cff34a NPC의 기술 연구 기준을 '기술제한이 아니면'으로 변경 2019-08-13 00:20:07 +09:00
Hide_D 26eacfe795 랜임 버그 핫픽스 2019-07-18 21:21:58 +09:00
Hide_D b1b937ee31 (6턴 제외) 삭턴사시 본닉 공개 2019-07-17 23:32:59 +09:00
Hide_D 122479158c '장수를 따라' 임관하는 기능 추가 2019-07-17 23:06:20 +09:00
Hide_D 0af5e9ec84 외교권자 임명 시 내부적으로 warning뜨는 버그 수정 2019-07-17 21:19:34 +09:00
Hide_D cb5414f789 youtube, vimeo iframe 가능하도록 변경 2019-07-17 21:12:25 +09:00
sars 224cb1b913 server_title id 추가 2019-07-10 19:52:29 -07:00
sars 8bd84cc701 serverCnt 변수로 지정 2019-07-10 19:39:25 -07:00
sars a14dcf8b3e 깃수 출력 2019-07-10 15:27:44 -07:00
Hide_D a1a26bf8fe 훈련,사기템 효과 두배 증가, 철벽서 버그 수정 2019-06-21 10:06:05 +09:00
Hide_D fea229c4ad 사령부 턴 높이 늘림 2019-06-21 09:58:17 +09:00
Hide_D 7040d940ac 왕조 일람 정보 추가 2019-06-21 09:55:40 +09:00
Hide_D a576d72335 메인 페이지 부대 이름 관련 보조정보 추가 2019-06-21 09:51:39 +09:00
Hide_D 5aab373d20 발령, 포상, 몰수에서 보조 데이터 추가 2019-06-21 09:29:33 +09:00
Hide_D 32f8160eb2 시즌 값 추가 2019-06-18 03:32:14 +09:00
Hide_D 701355beb3 시즌 별 검색 기능 추가, 기본 값으로 현재 시즌 표기 2019-06-18 03:30:09 +09:00
Hide_D 28de7c517b UniqueConst와 game_env에 seasonIdx 추가 2019-06-18 03:12:36 +09:00
Hide_D 7365ca7a64 숙련전환 커맨드 추가 2019-06-16 04:42:43 +09:00
Hide_D 2a61813b67 스1 시나리오 업데이트 2019-06-14 23:55:43 +09:00
4177 changed files with 79477 additions and 573589 deletions
-15
View File
@@ -1,15 +0,0 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3,
"modules": false
}
]
],
"plugins": [
"lodash"
]
}
-42
View File
@@ -1,42 +0,0 @@
module.exports = {
root: true,
parser: "vue-eslint-parser",
"env": {
"browser": true,
"es2021": true
},
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'],
overrides: [{
files: ['*.ts', '*.tsx', "*.vue"],
}],
plugins: [
"@typescript-eslint"
],
extends: [
"eslint:recommended",
"plugin:vue/vue3-essential",
"plugin:@typescript-eslint/recommended"
],
parserOptions: {
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaVersion": 2021,
"parser": "@typescript-eslint/parser",
extraFileExtensions: ['.vue']
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
},
settings: {
'import/resolver': {
alias: {
map: [
['@', './hwe/ts'],
['@util', './hwe/ts/util'],
['@scss', './hwe/scss'],
]
}
}
},
};
+44 -68
View File
@@ -1,68 +1,44 @@
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
/node_modules
package-lock.json
# 체섭 ignore
*.log
logs/*.txt
d_log/*.txt
d_log/*.zip
sess_*
*/logs/*.txt
*/logs/*/*.txt
*/logs/preserved
err.txt
che/.htaccess
kwe/.htaccess
pwe/.htaccess
twe/.htaccess
hwe/.htaccess
d_shared
/d_pic
d_pic/*.jpg
d_pic/*.gif
d_pic/*.png
d_pic/*.webp
d_pic/uploaded_image
*/dist_misc/*
*/dist_js/*
*/dist_css/*
/dist_misc/*
/dist_js/*
/dist_css/*
d_setting/*.php
*/d_setting/*.php
*/d_setting/templates/*.php
!*.orig.php
*/data/file_cache
**/old/*
test.php
/che
/kwe
/pwe
/nya
/pya
/twe
phpinfo.php
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
*.sqlite3
ingame/js/*
ingame/css/*
gateway/js/*
gateway/css/*
.vscode/*
# 체섭 ignore
*.log
logs/*.txt
d_log/*.txt
d_log/*.zip
sess_*
*/logs/*.txt
*/logs/*/*.txt
*/logs/preserved
err.txt
che/.htaccess
kwe/.htaccess
pwe/.htaccess
twe/.htaccess
hwe/.htaccess
d_shared
d_pic/*.jpg
d_pic/*.gif
d_pic/*.png
d_pic/uploaded_image
d_setting/*.php
*/d_setting/*.php
*/d_setting/templates/*.php
**/old/*
test.php
/che
/kwe
/pwe
/nya
/pya
/twe
phpinfo.php
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
*.sqlite3
+21 -132
View File
@@ -2,150 +2,44 @@
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command-line arguments will be applied
* default configuration. Command line arguments will be applied
* after this file is read.
*/
return [
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
// `'7.4'`, `'8.0'`, `'8.1'`, `null`.
// If this is set to `null`,
// Supported values: '7.0', '7.1', '7.2', null.
// If this is set to null,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute Phan.
//
// Note that the **only** effect of choosing `'5.6'` is to infer
// that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
"target_php_version" => '8.0',
'backward_compatibility_checks ' => true,
'minimum_severity' => \Phan\Issue::SEVERITY_NORMAL,
// of the php executable used to execute phan.
"target_php_version" => '7.0',
'backward_compatibility_checks ' => false,
'ignore_undeclared_variables_in_global_scope' => false,
'minimum_severity'=>\Phan\Issue::SEVERITY_LOW,
'file_list' => [
'f_config/config.php',
'hwe/_119_b.php',
'hwe/_119.php',
'hwe/a_bestGeneral.php',
'hwe/_admin1.php',
'hwe/_admin1_submit.php',
'hwe/_admin2.php',
'hwe/_admin2_submit.php',
'hwe/_admin4.php',
'hwe/_admin4_submit.php',
'hwe/_admin5.php',
'hwe/_admin5_submit.php',
'hwe/_admin7.php',
'hwe/_admin8.php',
'hwe/_admin_force_rehall.php',
'hwe/a_emperior_detail.php',
'hwe/a_emperior.php',
'hwe/a_genList.php',
'hwe/a_hallOfFame.php',
'hwe/a_history.php',
'hwe/a_kingdomList.php',
'hwe/a_npcList.php',
'hwe/api.php',
'hwe/a_status.php',
'hwe/a_traffic.php',
'hwe/a_vote.php',
'hwe/battle_simulator.php',
'hwe/b_auction.php',
'hwe/b_battleCenter.php',
'hwe/b_betting.php',
'hwe/b_chiefcenter.php',
'hwe/b_currentCity.php',
'hwe/b_dipcenter.php',
'hwe/b_diplomacy.php',
'hwe/b_genList.php',
'hwe/b_myBossInfo.php',
'hwe/b_myCityInfo.php',
'hwe/b_myGenInfo.php',
'hwe/b_myKingdomInfo.php',
'hwe/b_myPage.php',
'hwe/b_processing.php',
'hwe/b_tournament.php',
'hwe/b_troop.php',
'hwe/c_auction.php',
'hwe/c_dipcenter.php',
'hwe/c_tournament.php',
'hwe/c_vote.php',
'hwe/MYDB.php',
'hwe/lib.php',
'hwe/func_auction.php',
'hwe/func_command.php',
'hwe/func_converter.php',
'hwe/func_diplomacy.php',
'hwe/func_gamerule.php',
'hwe/func_history.php',
'hwe/func_legacy.php',
'hwe/func_map.php',
'hwe/func_message.php',
'hwe/func.php',
'hwe/func_npc.php',
'hwe/func_process_chief.php',
'hwe/func_process_personnel.php',
'hwe/func_process_sabotage.php',
'hwe/func_process.php',
'hwe/func_string.php',
'hwe/func_template.php',
'hwe/func_time_event.php',
'hwe/func_tournament.php',
'hwe/index.php',
'hwe/install_db.php',
'hwe/install.php',
'hwe/j_adjust_icon.php',
'hwe/j_autoreset.php',
'hwe/j_basic_info.php',
'hwe/j_betting.php',
'hwe/j_board_article_add.php',
'hwe/j_board_comment_add.php',
'hwe/j_board_get_articles.php',
'hwe/j_chief_turn.php',
'hwe/j_die_immediately.php',
'hwe/j_diplomacy_destroy_letter.php',
'hwe/j_diplomacy_get_letter.php',
'hwe/j_diplomacy_respond_letter.php',
'hwe/j_diplomacy_rollback_letter.php',
'hwe/j_diplomacy_send_letter.php',
'hwe/j_export_simulator_object.php',
'hwe/j_general_log_old.php',
'hwe/j_general_set_permission.php',
'hwe/j_get_basic_general_list.php',
'hwe/j_getChiefTurn.php',
'hwe/j_get_city_list.php',
'hwe/j_get_general_list.php',
'hwe/j_get_nation_general_list.php',
'hwe/j_get_select_npc_token.php',
'hwe/j_get_select_pool.php',
'hwe/j_image_upload.php',
'hwe/j_install_db.php',
'hwe/j_install.php',
'hwe/j_load_scenarios.php',
'hwe/j_map_history.php',
'hwe/j_map.php',
'hwe/j_map_recent.php',
'hwe/j_msg_contact_list.php',
'hwe/j_msg_decide_opt.php',
'hwe/j_msg_delete.php',
'hwe/j_msg_get_old.php',
'hwe/j_msg_get_recent.php',
'hwe/j_msg_submit.php',
'hwe/j_myBossInfo.php',
'hwe/j_raise_event.php',
'hwe/j_select_npc.php',
'hwe/j_select_picked_general.php',
'hwe/j_server_basic_info.php',
'hwe/j_set_chief_command.php',
'hwe/j_set_general_command.php',
'hwe/j_set_my_setting.php',
'hwe/j_set_npc_control.php',
'hwe/j_simulate_battle.php',
'hwe/j_troop.php',
'hwe/j_update_picked_general.php',
'hwe/j_vacation.php',
'hwe/lib.php',
'hwe/process_war.php',
'hwe/proc.php',
'hwe/readme.php',
'hwe/recent_map.php',
'hwe/select_general_from_pool.php',
'hwe/select_npc.php',
'hwe/t_diplomacy.php',
'hwe/v_board.php',
'hwe/v_inheritPoint.php',
'hwe/v_join.php',
'hwe/v_NPCControl.php',
'hwe/func.php'
],
// A list of directories that should be parsed for class and
@@ -156,9 +50,9 @@ return [
// Thus, both first-party and third-party code being used by
// your application should be included in this list.
'directory_list' => [
'hwe/d_setting',
'hwe/sammo',
'd_setting',
'hwe/d_setting',
'hwe/sammo',
'd_setting',
'src/sammo',
'src/kakao',
'vendor'
@@ -180,11 +74,6 @@ return [
'vendor/'
],
'suppress_issue_types' => [
'PhanUnreferencedUseNormal',
'PhanTypeArraySuspiciousNullable',
],
// A list of plugin files to execute.
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
// (Pass these in as relative paths.
@@ -199,4 +88,4 @@ return [
'PregRegexCheckerPlugin',
'PrintfCheckerPlugin',
],
];
];
+1 -5
View File
@@ -24,9 +24,5 @@
"/nya":true,
"/pya":true,
"/twe":true,
},
"cSpell.words": [
"josa",
"sammo"
],
},
}
-23
View File
@@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>닫혀 있습니다.</title>
<script>
setTimeout(function(){
window.location.href = '../';
}, 5000);
</script>
<style>
html, body{
background-color:black;
color:yellow;
}
</style>
</head>
<body>
서버가 닫혀있습니다.<br>
잠시 뒤에 입구로 이동합니다.
</body>
</html>
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2021 Hide_D, 62che
Copyright (c) 2020 Hide_D, 62che
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+10 -13
View File
@@ -5,24 +5,21 @@
## 요구사항
* Apache2 또는 nginx
* Apache2인 경우 `mpm_event` 권장
* PHP 8.0 이상
* `php-fpm` 권장
* php에서 curl, pdo-sqlite을 실행가능해야 합니다.
* mysqli, mysqlnd
* Apache2
* <code>mpm_event</code> 권장
* PHP 7.2 이상
* <code>php-fpm</code> 권장
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
* mysqlnd가 지원되어야합니다. (기본값: 지원)
* mysqli
* gd
* mbstring
* NodeJS 14 이상
* 내부의 git을 통해 upgrade 때 `webpack build` 용도로 필요합니다.
* MariaDB 10.2.1 이상
* 현재 MySQL은 지원하지 않습니다.
* `git`
* `curl`
* <code>git</code>
* <code>curl</code>
Linux는 Ubuntu 18.04, 20.04, Windows는 WSL2를 사용한 환경에서 테스트되었습니다.
Linux는 Ubuntu 16.04, 18.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
Docker를 이용한 설치도 제공하고 있습니다.
## Docker를 이용한 설치
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace sammo;
require(__DIR__ . '/vendor/autoload.php');
if (!class_exists('\\sammo\\RootDB')) {
Json::dieWithReason('No DB');
}
APIHelper::launch(dirname(__FILE__));
+50 -54
View File
@@ -1,54 +1,50 @@
{
"name":"sammo-hid/sammo",
"description":"삼국지 모의전투 HiDCHe",
"license": [
"MIT",
"GPL-2.0-or-later",
"proprietary"
],
"config": {
"platform": {
"php": "8.0"
}
},
"require": {
"brandonwamboldt/utilphp": "^1.1",
"sergeytsalkov/meekrodb": "^2.3",
"league/plates": "^3.3",
"guzzlehttp/guzzle": "^6.3",
"monolog/monolog": "^1.23",
"firephp/firephp-core": "^0.4.0",
"vlucas/valitron": "^1.4",
"php-extended/php-tail": "^2.1",
"pguardiario/phpuri": "^1.0",
"symfony/lock": "^4.1",
"ezyang/htmlpurifier": "^4.10",
"xemlock/htmlpurifier-html5": "^0.1.7",
"catfan/medoo": "^1.5",
"phan/phan": "*",
"erusev/parsedown-extra": "^0.8.1",
"nette/caching": "^3.0",
"illuminate/database": "^8.61",
"illuminate/events": "^8.61"
},
"autoload": {
"psr-4": {
"sammo\\": [
"src/sammo"
],
"kakao\\": [
"src/kakao"
]
},
"classmap": [
"d_setting/"
],
"exclude-from-classmap": [
"**/*.orig.php"
],
"files":[
"f_config/config.php"
]
}
}
{
"name":"sammo-hid/sammo",
"description":"삼국지 모의전투 HiDCHe",
"license": [
"MIT",
"GPL-2.0-or-later",
"proprietary"
],
"config": {
"platform": {
"php": "7.3"
}
},
"require": {
"brandonwamboldt/utilphp": "^1.1",
"sergeytsalkov/meekrodb": "^2.3",
"league/plates": "^3.3",
"guzzlehttp/guzzle": "^6.3",
"scssphp/scssphp": "^1.0",
"monolog/monolog": "^1.23",
"firephp/firephp-core": "^0.4.0",
"vlucas/valitron": "^1.4",
"php-extended/php-tail": "^2.1",
"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": {
"sammo\\": [
"src/sammo"
],
"kakao\\": [
"src/kakao"
]
},
"classmap": [
"d_setting/"
],
"exclude-from-classmap": [
"**/*.orig.php"
],
"files":[
"f_config/config.php"
]
}
}
Generated
+128 -3261
View File
File diff suppressed because it is too large Load Diff
Executable → Regular
BIN
View File
Binary file not shown.
+181 -234
View File
@@ -1,235 +1,182 @@
@charset "utf-8";
body {
color: white;
background-color: black;
font-family: 'Pretendard';
}
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: 14px;
word-break: break-all;
text-align: center;
}
th,
td {
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
padding: 0px;
font-size: 14px;
word-break: break-all;
text-align: center;
}
a.just_link {
text-decoration: none;
}
.with_border {
margin: 0;
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
}
.section_title {
height: 50px;
line-height: 50px;
font-size: 30px;
font-weight: bold;
text-align: center;
color: white;
padding: 0;
}
.legacy_layout div {
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
padding: 0px;
font-size: 14px;
word-break: break-all;
text-align: center;
}
.obj_fill {
display: block;
width: 100%;
height: 100%;
}
button.with_skin {
padding: 0 4px;
background-color: black;
color: white;
font-size: 14px;
}
button.with_skin:disabled {
background-color: #333333;
}
input.with_skin {
background-color: black;
color: white;
font-size: 14px;
}
input.with_skin:disabled {
background-color: #333333;
}
.font0 {
font-size: 10px;
}
.font1 {
font-size: 14px;
}
.font2 {
font-size: 15px;
}
.font3 {
font-size: 20px;
}
.font4 {
font-size: 30px;
}
.font5 {
font-size: 50px;
}
caption.section_title {
caption-side: top;
}
.samButton {
float: left;
display: block;
padding: 0;
margin: 0;
text-decoration: none;
position: relative;
}
a.samButton.disabled {
pointer-events: none;
cursor: default;
}
.samButtonOuter {
display: table;
border: outset 2px white;
box-sizing: border-box;
font-weight: bold;
padding: 1px 6px;
width: 125px;
height: 30px;
background-color: #000000;
color: #ffffff;
}
.samButtonOuter:active {
border: inset 2px white;
}
.samButtonInner {
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
text-align: center;
user-select: none;
}
.samToolbarButton>.samButtonOuter {
width: 125px;
height: 30px;
background-color: #225500;
color: white;
}
.samToolbarButton2>.samButtonOuter {
width: 125px;
height: 30px;
background-color: #225500;
color: magenta;
}
.samCommandButton>.samButtonOuter {
width: 111px;
height: 30px;
}
.samCommandButton.disabled>.samButtonOuter {
background-color: transparent !important;
color: gray !important;
border-color: transparent !important;
}
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::before {
content: '【'
}
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::after {
content: '】'
}
.tooltip_copyable_info .tooltiptext {
display: inline;
color: rgba(0, 0, 0, 0);
font-size: 0;
}
.tooltiptext {
display: none;
}
.hidden_but_copyable {
color: rgba(0, 0, 0, 0);
font-size: 0;
}
.vertical_flex {
height: 100%;
display: flex;
align-content: center;
flex-direction: column;
align-items: stretch;
}
.vertical_flex .item {
display: block;
flex-grow: 1;
}
.fill_box {
display: block;
width: 100%;
height: 100%;
@charset "utf-8";
body {
color:white; background-color:black; font-family: '맑은 고딕';
}
table {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
th, td {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';
}
a.just_link {
text-decoration: none;
}
.with_border{
margin:0;
border: solid 1px;
border-spacing: 0px;
border-collapse: separate;
border-top-color: gray;
border-left-color: gray;
border-right-color: black;
border-bottom-color: black;
}
.section_title {
height:50px;
line-height:50px;
font-size: 30px; font-weight: bold;
text-align: center;
color:white;
padding:0;
}
.legacy_layout div {
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
padding: 0px;
font-size: 13px;
word-break: break-all;
text-align: center;
font-family: '맑은 고딕';;
}
.obj_fill{
display:block;
width:100%;
height:100%;
}
button.with_skin {
padding:0 4px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
button.with_skin:disabled {
background-color:#333333;
}
input.with_skin {
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
}
input.with_skin:disabled {
background-color: #333333;
}
.font0 { font-size: 10px; }
.font1 { font-size: 13px; }
.font2 { font-size: 15px; }
.font3 { font-size: 20px; }
.font4 { font-size: 30px; }
.font5 { font-size: 50px; }
caption.section_title {
caption-side:top;
}
.samButton{
float:left;
display:block;
padding:0;
margin:0;
text-decoration: none;
position:relative;
}
a.samButton.disabled {
pointer-events: none;
cursor: default;
}
.samButtonOuter{
display: table;
border: outset 2px white;
box-sizing: border-box;
font-weight:bold;
padding: 1px 6px;
width:125px;
height:30px;
background-color:#000000;
color:#ffffff;
}
.samButtonOuter:active{
border: inset 2px white;
}
.samButtonInner{
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
text-align: center;
user-select: none;
}
.samToolbarButton > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:white;
}
.samToolbarButton2 > .samButtonOuter{
width:125px;
height:30px;
background-color:#225500;
color:magenta;
}
.samCommandButton > .samButtonOuter{
width:111px;
height:30px;
}
.samCommandButton.disabled > .samButtonOuter{
background-color:transparent !important;
color:gray !important;
border-color:transparent !important;
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
content:'【'
}
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
content:'】'
}
.tooltip_copyable_info .tooltiptext{
display: inline;
color: rgba(0,0,0,0);
font-size: 0;
}
.tooltiptext {
display: none;
}
.hidden_but_copyable{
color: rgba(0,0,0,0);
font-size: 0;
}
+140 -155
View File
@@ -1,156 +1,141 @@
@charset "utf-8";
body {
line-height: 1.3;
}
#server_notice {
margin: 10px 0;
border: none;
text-align: center;
}
#server_list_container {
width: 800px;
position: absolute;
left: 50%;
margin-left: -400px;
}
#server_list_table {
width: 100%;
}
#server_list tr {
height: 66px;
}
.ignore_border {
border: 0;
margin: 0;
padding: 0;
}
#user_info {
margin-top: 20px;
width: 800px;
height: 130px;
}
#user_info button {
width: 200px;
height: 50px;
margin: 10px 50px;
}
.center_ordered_items {
text-align: center;
}
.Entrance_ServerList {
width: 800px;
height: 64px;
border: none;
float: left;
}
.Entrance_ServerListServer {
width: 98px;
height: 64px;
float: left;
}
.Entrance_ServerListDown {
width: 698px;
height: 64px;
float: left;
}
.Entrance_ServerListInfo {
width: 398px;
height: 64px;
float: left;
}
.Entrance_ServerListBlock {
width: 298px;
height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListCharacter {
width: 64px;
height: 64px;
float: left;
}
.Entrance_ServerListName {
width: 112px;
height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListSelect {
width: 120px;
height: 32px;
float: left;
}
#Entrance_000003 {
width: 798px;
height: 155px;
text-align: left;
}
.Entrance_Alert {
color: red;
font-size: 15px;
font-weight: bold;
}
.Entrance_Che {
color: white;
font-size: 15px;
font-weight: bold;
}
.Entrance_Kwe {
color: yellow;
font-size: 15px;
font-weight: bold;
}
.Entrance_Pwe {
color: orange;
font-size: 15px;
font-weight: bold;
}
.Entrance_Twe {
color: magenta;
font-size: 15px;
font-weight: bold;
}
.Entrance_Nya {
color: #e67e22;
font-size: 15px;
font-weight: bold;
}
.Entrance_Pya {
color: #9b59b6;
font-size: 15px;
font-weight: bold;
}
.Entrance_Hwe {
color: red;
font-size: 15px;
font-weight: bold;
}
.BtnPlate {
height: inherit;
@charset "utf-8";
body{
line-height: 1.3;
}
#server_notice {
margin:10px 0;
border: none;
text-align:center;
}
#server_list_container{
width:800px;
position:absolute;
left:50%;
margin-left:-400px;
}
#server_list_table{
width:100%;
}
#server_list tr{
height:66px;
}
#server_list .server_create_and_select .general_create,
#server_list .server_create_and_select .general_select {
width: 120px; height: 33px;
float: left;
}
#server_list .general_create,
#server_list .general_login {
width: 120px; height: 66px;
float: left;
}
.ignore_border{
border:0;
margin:0;
padding:0;
}
#user_info {
margin-top:20px;
width: 800px; height: 130px;
}
#user_info button{
width: 200px;
height: 50px;
margin: 10px 50px;
}
.center_ordered_items{
text-align:center;
}
.Entrance_ServerList {
width: 800px; height: 64px;
border: none;
float: left;
}
.Entrance_ServerListServer {
width: 98px; height: 64px;
float: left;
}
.Entrance_ServerListDown {
width: 698px; height: 64px;
float: left;
}
.Entrance_ServerListInfo {
width: 398px; height: 64px;
float: left;
}
.Entrance_ServerListBlock {
width: 298px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListCharacter {
width: 64px; height: 64px;
float: left;
}
.Entrance_ServerListName {
width: 112px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListSelect {
width: 120px; height: 32px;
float: left;
}
#Entrance_000003 {
width: 798px; height: 155px;
text-align: left;
}
.Entrance_Alert {
color: red; font-size: 15px; font-weight: bold;
}
.Entrance_Che {
color: white; font-size: 15px; font-weight: bold;
}
.Entrance_Kwe {
color: yellow; font-size: 15px; font-weight: bold;
}
.Entrance_Pwe {
color: orange; font-size: 15px; font-weight: bold;
}
.Entrance_Twe {
color: magenta; font-size: 15px; font-weight: bold;
}
.Entrance_Nya {
color: #e67e22; font-size: 15px; font-weight: bold;
}
.Entrance_Pya {
color: #9b59b6; font-size: 15px; font-weight: bold;
}
.Entrance_Hwe {
color: red; font-size: 15px; font-weight: bold;
}
+3 -3
View File
@@ -7,10 +7,10 @@ body, html{
margin-top: 70px;
}
h1.title {
h1.title {
font-size: 50px;
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
font-weight: 400;
font-family: 'Passion One', cursive;
font-weight: 400;
}
hr{
+3 -3
View File
@@ -7,10 +7,10 @@
margin-top: 70px;
}
h1.title {
h1.title {
font-size: 50px;
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
font-weight: 400;
font-family: 'Passion One', cursive;
font-weight: 400;
}
hr{
+131
View File
@@ -0,0 +1,131 @@
body, html{
height: 100%;
background-repeat: no-repeat;
}
.main{
margin-top: 70px;
}
h1.title {
font-size: 50px;
font-family: 'Passion One', cursive;
font-weight: 400;
}
hr{
width: 10%;
/*color: #fff;*/
}
.form-group{
margin-bottom: 15px;
}
label{
margin-bottom: 15px;
}
input,
input::-webkit-input-placeholder {
font-size: 11px;
padding-top: 3px;
}
.main-login{
/*background-color: #fff;*/
/* shadows and rounded borders */
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.main-center{
margin-top: 30px;
margin: 0 auto;
max-width: 330px;
padding: 40px 40px;
}
.login_btn_group{
margin-top: 5px;
}
.login-register{
font-size: 11px;
text-align: center;
}
.col-form-label{
text-align:center;
}
.terms{
max-height: 200px; overflow-y: auto;
}
.terms pre{
width:100%;
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
.vertical-center {
min-height: 100%; /* Fallback for browsers do NOT support vh unit */
min-height: 100vh; /* These two lines are counted as one :-) */
display: flex;
align-items: center;
}
.full-content {
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
margin:0;
padding:0;
z-index:800;
}
#login_card{
z-index:801;
}
#btn_kakao_login{
cursor: pointer;
height:46px;
width:116px;
background-color: transparent;
color:transparent;
border:0;
background-size: 100%; /* To fill the dimensions of container (button), or */
background-repeat: no-repeat;
background-position: bottom center;
margin-top:5px;
background-image:url('../oauth_kakao/kakao_login_join.png');
}
#btn_kakao_login:hover {
background-image:url('../oauth_kakao/kakao_login_join_ov.png');
}
#bottom_box{
position:fixed;
bottom:0;
width:100%;
left:0;
}
#bottom_box .container{
text-align:center;
}
-2
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -6
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 443 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 631 KiB

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

Before

Width:  |  Height:  |  Size: 699 KiB

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

Before

Width:  |  Height:  |  Size: 141 KiB

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

Before

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
-76
View File
@@ -1,76 +0,0 @@
(function (factory) {
"use strict";
var sortable,
jq,
_this = this
;
if (typeof define === "function" && define.amd) {
try {
define(["sortablejs", "jquery"], function(Sortable, $) {
sortable = Sortable;
jq = $;
checkErrors();
factory(Sortable, $);
});
} catch(err) {
checkErrors();
}
return;
} else if (typeof exports === 'object') {
try {
sortable = require('sortablejs');
jq = require('jquery');
} catch(err) { }
}
if (typeof jQuery === 'function' || typeof $ === 'function') {
jq = jQuery || $;
}
if (typeof Sortable !== 'undefined') {
sortable = Sortable;
}
function checkErrors() {
if (!jq) {
throw new Error('jQuery is required for jquery-sortablejs');
}
if (!sortable) {
throw new Error('SortableJS is required for jquery-sortablejs (https://github.com/SortableJS/Sortable)');
}
}
checkErrors();
factory(sortable, jq);
})(function (Sortable, $) {
"use strict";
$.fn.sortable = function (options) {
var retVal,
args = arguments;
this.each(function () {
var $el = $(this),
sortable = $el.data('sortable');
if (!sortable && (options instanceof Object || !options)) {
sortable = new Sortable(this, options);
$el.data('sortable', sortable);
} else if (sortable) {
if (options === 'destroy') {
sortable.destroy();
$el.removeData('sortable');
} else if (options === 'widget') {
retVal = sortable;
} else if (typeof sortable[options] === 'function') {
retVal = sortable[options].apply(sortable, [].slice.call(args, 1));
} else if (options in sortable.options) {
retVal = sortable.option.apply(sortable, args);
}
}
});
return (retVal === void 0) ? this : retVal;
};
});
+3 -3
View File
File diff suppressed because one or more lines are too long
-28
View File
@@ -1,28 +0,0 @@
/**
* @author Script47 (https://github.com/Script47/Toast)
* @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component
* @version 0.7.1
**/
.toast-container {
position: sticky;
z-index: 1055;
top: 0
}
.toast-wrapper {
position: absolute;
z-index: 1055;
top: 0;
right: 0;
margin: 5px
}
.toast-container>.toast-wrapper>.toast {
min-width: 150px;
background-color: rgb(50, 50, 50);
border-top: none;
}
.toast-container>.toast-wrapper>.toast>.toast-header strong {
padding-right: 20px;
}
-136
View File
@@ -1,136 +0,0 @@
/**
* @author Script47 (https://github.com/Script47/Toast)
* @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component
* @version 0.7.1
**/
(function ($) {
var TOAST_CONTAINER_HTML = '<div class="toast-container" aria-live="polite" aria-atomic="true"></div>';
var TOAST_WRAPPER_HTML = '<div class="toast-wrapper"></div>';
$.toast = function (opts) {
// If container is not set in opts use body
var general_container = $('body');
if (opts.container && opts.container.length === 1)
general_container = opts.container;
// if toast container and wrapper are not present in container create them
if (!general_container.children('.toast-container').length) {
general_container.prepend(TOAST_CONTAINER_HTML);
general_container.children('.toast-container').append(TOAST_WRAPPER_HTML);
general_container.on('hidden.bs.toast', '.toast', function () {
$(this).remove();
});
}
var toast_wrapper = general_container.children('.toast-container').children('.toast-wrapper');
var id = 'toast-' + ($('.toast').length + 1),
html = '',
bg_header_class = '',
fg_header_class = '',
fg_subtitle_class = 'text-muted',
fg_dismiss_class = '',
title = opts.title || 'Notice!',
subtitle = opts.subtitle || '',
content = opts.content || '',
type = opts.type || 'info',
delay = opts.delay || -1,
img = opts.img,
pause_on_hover = opts.pause_on_hover || false,
pause = false,
delay_or_autohide = '';
switch (type) {
case 'info':
bg_header_class = 'bg-info';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'success':
bg_header_class = 'bg-success';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'warning':
case 'warn':
bg_header_class = 'bg-warning';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
case 'error':
case 'danger':
bg_header_class = 'bg-danger';
fg_header_class = 'text-white';
fg_subtitle_class = 'text-white';
fg_dismiss_class = 'text-white';
break;
}
if (pause_on_hover !== false) {
var hide_timestamp = Math.floor(Date.now() / 1000) + (delay / 1000);
delay_or_autohide = 'data-autohide="false"';
pause_on_hover = 'data-hide-timestamp="' + hide_timestamp + '"';
} else {
if (delay === -1) {
delay_or_autohide = 'data-autohide="false"';
} else {
delay_or_autohide = 'data-delay="' + delay + '"';
}
}
html = '<div id="' + id + '" class="toast" role="alert" aria-live="assertive" aria-atomic="true" ' + delay_or_autohide + ' ' + pause_on_hover + '>';
html += '<div class="toast-header ' + bg_header_class + ' ' + fg_header_class + '">';
if (typeof img !== 'undefined') {
html += '<img src="' + img.src + '" class="' + (img.class || '') + ' mr-2" alt="' + (img.alt || 'Image') + '" ' + (typeof img.title !== 'undefined' ? 'data-toggle="tooltip" title="' + img.title + '"' : '') + '>';
}
html += '<strong class="mr-auto">' + title + '</strong>';
html += '<small class="' + fg_subtitle_class + '">' + subtitle + '</small>';
html += '<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">';
html += '<span aria-hidden="true" class="' + fg_dismiss_class + '">&times;</span>';
html += '</button>';
html += '</div>';
if (content !== '') {
html += '<div class="toast-body">'
html += content
html += '</div>';
}
html += '</div>';
toast_wrapper.append(html);
toast_wrapper.find('.toast:last').toast('show');
if (pause_on_hover !== false) {
setTimeout(function () {
if (!pause) {
$('#' + id).toast('hide');
}
}, delay);
$(document).on('mouseover', '#' + id, function () {
pause = true;
});
$(document).on('mouseleave', '#' + id, function () {
var current = Math.floor(Date.now() / 1000),
future = parseInt($(this).data('hide-timestamp'));
pause = false;
if (current >= future) {
$(this).toast('hide');
}
});
}
}
}(jQuery));
+2 -2
View File
@@ -1,3 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
+188 -553
View File
@@ -1,553 +1,188 @@
/* select2-bootstrap4 with Darkly */
.select2-container--bootstrap4 {
color: black;
}
.select2-container--bootstrap4 .select2-selection {
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
color: #495057;
font-size: 1rem;
outline: 0;
}
.select2-container--bootstrap4 .select2-selection.form-control {
border-radius: 0.25rem;
}
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
color: #495057;
font-size: 1rem;
}
.select2-container--bootstrap4 .select2-search__field {
outline: 0;
}
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder {
color: #6c757d;
}
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder {
color: #6c757d;
}
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder {
color: #6c757d;
opacity: 1;
}
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder {
color: #6c757d;
}
.select2-container--bootstrap4 .select2-results__option {
padding: 0.75rem 0.375rem;
font-size: 1rem;
}
.select2-container--bootstrap4 .select2-results__option[role=group] {
padding: 0;
}
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] {
color: #6c757d;
cursor: not-allowed;
}
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] {
background-color: #f8f9fa;
color: #16181b;
}
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
background-color: #007bff;
color: #fff;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option {
padding: 0.75rem 0.375rem;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group {
padding-left: 0;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option {
margin-left: -0.375rem;
padding-left: 0.75rem;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -0.75rem;
padding-left: 1.125rem;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -1.125rem;
padding-left: 1.5rem;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -1.5rem;
padding-left: 1.875rem;
}
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -1.875rem;
padding-left: 2.25rem;
}
.select2-container--bootstrap4 .select2-results__group {
color: #6c757d;
display: block;
padding: 0.75rem 0.375rem;
font-size: 75%;
line-height: 1;
white-space: nowrap;
}
.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
border-color: #80bdff;
}
@media screen and (prefers-reduced-motion: reduce) {
.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
transition: none;
}
}
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b {
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.25rem 0.25rem 0.25rem;
}
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-color: transparent;
}
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top-color: transparent;
}
.select2-container--bootstrap4 .select2-selection__clear {
color: #6c757d;
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px;
}
.select2-container--bootstrap4 .select2-selection__clear:hover {
color: #343a40;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection {
border-color: #ced4da;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection,
.select2-container--bootstrap4.select2-container--disabled .select2-search__field {
cursor: not-allowed;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection,
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
background-color: #e9ecef;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear,
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove {
display: none;
}
.select2-container--bootstrap4 .select2-dropdown {
border-color: #80bdff;
border-width: 1px;
overflow-x: hidden;
margin-top: -1px;
}
.select2-container--bootstrap4 .select2-dropdown--above {
margin-top: 1px;
}
.select2-container--bootstrap4 .select2-results>.select2-results__options {
max-height: 200px;
overflow-y: auto;
}
.select2-container--bootstrap4 .select2-selection--single {
height: calc(2.25rem + 2px);
line-height: 1;
padding: 0.75rem 1.125rem 0.75rem 0.375rem;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
position: absolute;
bottom: 0;
right: 0.375rem;
top: 0;
width: 0.25rem;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
border-color: #6c757d transparent transparent transparent;
border-style: solid;
border-width: 0.25rem 0.25rem 0 0.25rem;
height: 0;
left: 0;
margin-left: -0.25rem;
margin-top: -0.125rem;
position: absolute;
top: 50%;
width: 0;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
color: #495057;
padding: 0;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
color: #6c757d;
}
.select2-container--bootstrap4 .select2-selection--multiple {
min-height: calc(2.25rem + 2px);
padding: 0;
height: auto;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
box-sizing: border-box;
display: block;
line-height: 1;
list-style: none;
margin: 0;
overflow: hidden;
padding: 0.75rem 0.375rem 0 0.75rem;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder {
color: #6c757d;
float: left;
margin-top: 5px;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
color: #495057;
background: transparent;
border: 1px solid #343a40;
border-radius: 0.25rem;
cursor: default;
float: left;
margin: -0.25rem 0 0 0.1875rem;
padding: 0 0.75rem;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
background: transparent;
padding: 0 0.375rem;
height: calc(2.25rem + 2px)-2;
line-height: 1;
margin-top: 0;
min-width: 5em;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
color: #6c757d;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 0.375rem;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #343a40;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
margin-top: 0.75rem;
}
.select2-container--bootstrap4 .select2-selection--single.input-sm,
.input-group-sm .select2-container--bootstrap4 .select2-selection--single,
.form-group-sm .select2-container--bootstrap4 .select2-selection--single {
border-radius: 0.2rem;
font-size: 75%;
height: calc(1.8125rem + 2px);
line-height: 1;
padding: 0.5rem 1rem 0.5rem 0.25rem;
}
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b,
.input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b,
.form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
margin-left: -0.5rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-sm,
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple,
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple {
min-height: calc(1.8125rem + 2px);
border-radius: 0.2rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered,
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered,
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
padding: 0.5rem 0.25rem 0 0.5rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice,
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
font-size: 75%;
line-height: 1;
margin: 0 0 0 0.125rem;
padding: 0 0.5rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field,
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field,
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
padding: 0 0.25rem;
font-size: 75%;
height: calc(1.8125rem + 2px)-2;
line-height: 1;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear,
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear,
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
margin-top: 0.5rem;
}
.select2-container--bootstrap4 .select2-selection--single.input-lg,
.input-group-lg .select2-container--bootstrap4 .select2-selection--single,
.form-group-lg .select2-container--bootstrap4 .select2-selection--single {
border-radius: 0.3rem;
font-size: 1.25rem;
height: calc(2.875rem + 2px);
line-height: 1;
padding: 1rem 1.4375rem 1rem 0.5rem;
}
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow,
.input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
.form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
width: 0.3125rem;
}
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b,
.input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b,
.form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
border-width: 0.3125rem 0.3125rem 0 0.3125rem;
margin-left: -0.3125rem;
margin-left: -1rem;
margin-top: -0.15625rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-lg,
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple,
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple {
min-height: calc(2.875rem + 2px);
border-radius: 0.3rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice,
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
font-size: 1.25rem;
line-height: 1;
border-radius: 0.25rem;
margin: 0rem 0 0 0.25rem;
padding: 0 1rem;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field,
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field,
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
padding: 0 0.5rem;
font-size: 1.25rem;
height: calc(2.875rem + 2px)-2;
line-height: 1;
}
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear,
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear,
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
margin-top: 1rem;
}
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
}
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single {
padding-left: 1.125rem;
padding-right: 0.375rem;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered {
padding-right: 0;
padding-left: 0;
text-align: right;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear {
float: left;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow {
left: 0.375rem;
right: auto;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b {
margin-left: 0;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice,
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline {
float: right;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 0;
margin-right: 0.1875rem;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
margin-left: 2px;
margin-right: auto;
}
.has-warning .select2-dropdown,
.has-warning .select2-selection {
border-color: #ffc107;
}
.has-warning .select2-container--focus .select2-selection,
.has-warning .select2-container--open .select2-selection {
border-color: #d39e00;
}
.has-warning.select2-drop-active {
border-color: #d39e00;
}
.has-warning.select2-drop-active.select2-drop.select2-drop-above {
border-top-color: #d39e00;
}
.has-error .select2-dropdown,
.has-error .select2-selection {
border-color: #dc3545;
}
.has-error .select2-container--focus .select2-selection,
.has-error .select2-container--open .select2-selection {
border-color: #bd2130;
}
.has-error.select2-drop-active {
border-color: #bd2130;
}
.has-error.select2-drop-active.select2-drop.select2-drop-above {
border-top-color: #bd2130;
}
.has-success .select2-dropdown,
.has-success .select2-selection {
border-color: #28a745;
}
.has-success .select2-container--focus .select2-selection,
.has-success .select2-container--open .select2-selection {
border-color: #1e7e34;
}
.has-success.select2-drop-active {
border-color: #1e7e34;
}
.has-success.select2-drop-active.select2-drop.select2-drop-above {
border-top-color: #1e7e34;
}
.input-group>.select2-hidden-accessible:first-child+.select2-container--bootstrap4>.selection>.select2-selection,
.input-group>.select2-hidden-accessible:first-child+.select2-container--bootstrap4>.selection>.select2-selection.form-control {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group>.select2-hidden-accessible:not(:first-child)+.select2-container--bootstrap4:not(:last-child)>.selection>.select2-selection,
.input-group>.select2-hidden-accessible:not(:first-child)+.select2-container--bootstrap4:not(:last-child)>.selection>.select2-selection.form-control {
border-radius: 0;
}
.input-group>.select2-hidden-accessible:not(:first-child):not(:last-child)+.select2-container--bootstrap4:last-child>.selection>.select2-selection,
.input-group>.select2-hidden-accessible:not(:first-child):not(:last-child)+.select2-container--bootstrap4:last-child>.selection>.select2-selection.form-control {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group>.select2-container--bootstrap4 {
display: table;
table-layout: fixed;
position: relative;
z-index: 2;
width: 100%;
margin-bottom: 0;
}
.input-group>.select2-container--bootstrap4>.selection>.select2-selection.form-control {
float: none;
}
.input-group>.select2-container--bootstrap4.select2-container--open,
.input-group>.select2-container--bootstrap4.select2-container--focus {
z-index: 3;
}
.input-group>.select2-container--bootstrap4,
.input-group>.select2-container--bootstrap4 .input-group-btn,
.input-group>.select2-container--bootstrap4 .input-group-btn .btn {
vertical-align: top;
}
.form-control.select2-hidden-accessible {
position: absolute !important;
width: 1px !important;
}
@media (min-width: 576px) {
.form-inline .select2-container--bootstrap4 {
display: inline-block;
}
}
/* select2-bootstrap4 with Darkly */
.select2-container--bootstrap4 { color: black; }
.select2-container--bootstrap4 .select2-selection { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; outline: 0; }
.select2-container--bootstrap4 .select2-selection.form-control { border-radius: 0.25rem; }
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; }
.select2-container--bootstrap4 .select2-search__field { outline: 0; }
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder { color: #6c757d; opacity: 1; }
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-results__option { padding: 0.75rem 0.375rem; font-size: 1rem; }
.select2-container--bootstrap4 .select2-results__option[role=group] { padding: 0; }
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] { color: #6c757d; cursor: not-allowed; }
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] { background-color: #f8f9fa; color: #16181b; }
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] { background-color: #007bff; color: #fff; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option { padding: 0.75rem 0.375rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group { padding-left: 0; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.375rem; padding-left: 0.75rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.75rem; padding-left: 1.125rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.125rem; padding-left: 1.5rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.5rem; padding-left: 1.875rem; }
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.875rem; padding-left: 2.25rem; }
.select2-container--bootstrap4 .select2-results__group { color: #6c757d; display: block; padding: 0.75rem 0.375rem; font-size: 75%; line-height: 1; white-space: nowrap; }
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; border-color: #80bdff; }
@media screen and (prefers-reduced-motion: reduce) { .select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: none; } }
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.25rem 0.25rem 0.25rem; }
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection { border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-color: transparent; }
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent; }
.select2-container--bootstrap4 .select2-selection__clear { color: #6c757d; cursor: pointer; float: right; font-weight: bold; margin-right: 10px; }
.select2-container--bootstrap4 .select2-selection__clear:hover { color: #343a40; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection { border-color: #ced4da; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-search__field { cursor: not-allowed; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice { background-color: #e9ecef; }
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove { display: none; }
.select2-container--bootstrap4 .select2-dropdown { border-color: #80bdff; border-width: 1px; overflow-x: hidden; margin-top: -1px; }
.select2-container--bootstrap4 .select2-dropdown--above { margin-top: 1px; }
.select2-container--bootstrap4 .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
.select2-container--bootstrap4 .select2-selection--single { height: calc(2.25rem + 2px); line-height: 1; padding: 0.75rem 1.125rem 0.75rem 0.375rem; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { position: absolute; bottom: 0; right: 0.375rem; top: 0; width: 0.25rem; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-color: #6c757d transparent transparent transparent; border-style: solid; border-width: 0.25rem 0.25rem 0 0.25rem; height: 0; left: 0; margin-left: -0.25rem; margin-top: -0.125rem; position: absolute; top: 50%; width: 0; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { color: #495057; padding: 0; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder { color: #6c757d; }
.select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.25rem + 2px); padding: 0; height: auto; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { box-sizing: border-box; display: block; line-height: 1; list-style: none; margin: 0; overflow: hidden; padding: 0.75rem 0.375rem 0 0.75rem; width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder { color: #6c757d; float: left; margin-top: 5px; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { color: #495057; background: transparent; border: 1px solid #343a40; border-radius: 0.25rem; cursor: default; float: left; margin: -0.25rem 0 0 0.1875rem; padding: 0 0.75rem; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { background: transparent; padding: 0 0.375rem; height: calc(2.25rem + 2px)-2; line-height: 1; margin-top: 0; min-width: 5em; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove { color: #6c757d; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 0.375rem; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover { color: #343a40; }
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.75rem; }
.select2-container--bootstrap4 .select2-selection--single.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--single, .form-group-sm .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.2rem; font-size: 75%; height: calc(1.8125rem + 2px); line-height: 1; padding: 0.5rem 1rem 0.5rem 0.25rem; }
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b, .input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { margin-left: -0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(1.8125rem + 2px); border-radius: 0.2rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { padding: 0.5rem 0.25rem 0 0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 75%; line-height: 1; margin: 0 0 0 0.125rem; padding: 0 0.5rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.25rem; font-size: 75%; height: calc(1.8125rem + 2px)-2; line-height: 1; }
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.5rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--single, .form-group-lg .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.3rem; font-size: 1.25rem; height: calc(2.875rem + 2px); line-height: 1; padding: 1rem 1.4375rem 1rem 0.5rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { width: 0.3125rem; }
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-width: 0.3125rem 0.3125rem 0 0.3125rem; margin-left: -0.3125rem; margin-left: -1rem; margin-top: -0.15625rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.875rem + 2px); border-radius: 0.3rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 1.25rem; line-height: 1; border-radius: 0.25rem; margin: 0rem 0 0 0.25rem; padding: 0 1rem; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.5rem; font-size: 1.25rem; height: calc(2.875rem + 2px)-2; line-height: 1; }
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 1rem; }
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single { padding-left: 1.125rem; padding-right: 0.375rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 0; padding-left: 0; text-align: right; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 0.375rem; right: auto; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b { margin-left: 0; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline { float: right; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 0; margin-right: 0.1875rem; }
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
.has-warning .select2-dropdown, .has-warning .select2-selection { border-color: #ffc107; }
.has-warning .select2-container--focus .select2-selection, .has-warning .select2-container--open .select2-selection { border-color: #d39e00; }
.has-warning.select2-drop-active { border-color: #d39e00; }
.has-warning.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #d39e00; }
.has-error .select2-dropdown, .has-error .select2-selection { border-color: #dc3545; }
.has-error .select2-container--focus .select2-selection, .has-error .select2-container--open .select2-selection { border-color: #bd2130; }
.has-error.select2-drop-active { border-color: #bd2130; }
.has-error.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #bd2130; }
.has-success .select2-dropdown, .has-success .select2-selection { border-color: #28a745; }
.has-success .select2-container--focus .select2-selection, .has-success .select2-container--open .select2-selection { border-color: #1e7e34; }
.has-success.select2-drop-active { border-color: #1e7e34; }
.has-success.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #1e7e34; }
.input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection, .input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection.form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection.form-control { border-radius: 0; }
.input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection.form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .select2-container--bootstrap4 { display: table; table-layout: fixed; position: relative; z-index: 2; width: 100%; margin-bottom: 0; }
.input-group > .select2-container--bootstrap4 > .selection > .select2-selection.form-control { float: none; }
.input-group > .select2-container--bootstrap4.select2-container--open, .input-group > .select2-container--bootstrap4.select2-container--focus { z-index: 3; }
.input-group > .select2-container--bootstrap4, .input-group > .select2-container--bootstrap4 .input-group-btn, .input-group > .select2-container--bootstrap4 .input-group-btn .btn { vertical-align: top; }
.form-control.select2-hidden-accessible { position: absolute !important; width: 1px !important; }
@media (min-width: 576px) { .form-inline .select2-container--bootstrap4 { display: inline-block; } }
+11 -8
View File
@@ -118,14 +118,12 @@
.select2-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important; }
width: 1px !important; }
.select2-container--default .select2-selection--single {
background-color: #fff;
@@ -188,13 +186,16 @@
width: 100%; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
list-style: none; }
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
color: #999;
margin-top: 5px;
float: left; }
.select2-container--default .select2-selection--multiple .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-top: 5px;
margin-right: 10px;
padding: 1px; }
margin-right: 10px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
@@ -213,7 +214,7 @@
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #333; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
float: right; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
@@ -419,7 +420,9 @@
color: #555; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
float: right;
float: right; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 5px;
margin-right: auto; }
+220 -583
View File
@@ -1,11 +1,11 @@
/*!
* Select2 4.0.13
* Select2 4.0.5
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
;(function (factory) {
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
@@ -574,10 +574,10 @@ S2.define('select2/utils',[
DecoratedClass.prototype = new ctr();
for (var m = 0; m < superMethods.length; m++) {
var superMethod = superMethods[m];
var superMethod = superMethods[m];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
}
var calledMethod = function (methodName) {
@@ -772,70 +772,6 @@ S2.define('select2/utils',[
$element.append($nodes);
};
// Cache objects in Utils.__cache instead of $.data (see #4346)
Utils.__cache = {};
var id = 0;
Utils.GetUniqueElementId = function (element) {
// Get a unique element Id. If element has no id,
// creates a new unique number, stores it in the id
// attribute and returns the new id.
// If an id already exists, it simply returns it.
var select2Id = element.getAttribute('data-select2-id');
if (select2Id == null) {
// If element has id, use it.
if (element.id) {
select2Id = element.id;
element.setAttribute('data-select2-id', select2Id);
} else {
element.setAttribute('data-select2-id', ++id);
select2Id = id.toString();
}
}
return select2Id;
};
Utils.StoreData = function (element, name, value) {
// Stores an item in the cache for a specified element.
// name is the cache key.
var id = Utils.GetUniqueElementId(element);
if (!Utils.__cache[id]) {
Utils.__cache[id] = {};
}
Utils.__cache[id][name] = value;
};
Utils.GetData = function (element, name) {
// Retrieves a value from the cache by its key (name)
// name is optional. If no name specified, return
// all cache items for the specified element.
// and for a specified element.
var id = Utils.GetUniqueElementId(element);
if (name) {
if (Utils.__cache[id]) {
if (Utils.__cache[id][name] != null) {
return Utils.__cache[id][name];
}
return $(element).data(name); // Fallback to HTML5 data attribs.
}
return $(element).data(name); // Fallback to HTML5 data attribs.
} else {
return Utils.__cache[id];
}
};
Utils.RemoveData = function (element) {
// Removes all cached items for a specified element.
var id = Utils.GetUniqueElementId(element);
if (Utils.__cache[id] != null) {
delete Utils.__cache[id];
}
element.removeAttribute('data-select2-id');
};
return Utils;
});
@@ -855,7 +791,7 @@ S2.define('select2/results',[
Results.prototype.render = function () {
var $results = $(
'<ul class="select2-results__options" role="listbox"></ul>'
'<ul class="select2-results__options" role="tree"></ul>'
);
if (this.options.get('multiple')) {
@@ -878,7 +814,7 @@ S2.define('select2/results',[
this.hideLoading();
var $message = $(
'<li role="alert" aria-live="assertive"' +
'<li role="treeitem" aria-live="assertive"' +
' class="select2-results__option"></li>'
);
@@ -971,7 +907,7 @@ S2.define('select2/results',[
$options.each(function () {
var $option = $(this);
var item = Utils.GetData(this, 'data');
var item = $.data(this, 'data');
// id needs to be converted to a string when comparing
var id = '' + item.id;
@@ -1012,16 +948,11 @@ S2.define('select2/results',[
option.className = 'select2-results__option';
var attrs = {
'role': 'option',
'role': 'treeitem',
'aria-selected': 'false'
};
var matches = window.Element.prototype.matches ||
window.Element.prototype.msMatchesSelector ||
window.Element.prototype.webkitMatchesSelector;
if ((data.element != null && matches.call(data.element, ':disabled')) ||
(data.element == null && data.disabled)) {
if (data.disabled) {
delete attrs['aria-selected'];
attrs['aria-disabled'] = 'true';
}
@@ -1081,7 +1012,7 @@ S2.define('select2/results',[
this.template(data, option);
}
Utils.StoreData(option, 'data', data);
$.data(option, 'data', data);
return option;
};
@@ -1122,10 +1053,7 @@ S2.define('select2/results',[
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
self.highlightFirstItem();
});
container.on('unselect', function () {
@@ -1134,10 +1062,7 @@ S2.define('select2/results',[
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
self.highlightFirstItem();
});
container.on('open', function () {
@@ -1173,7 +1098,7 @@ S2.define('select2/results',[
return;
}
var data = Utils.GetData($highlighted[0], 'data');
var data = $highlighted.data('data');
if ($highlighted.attr('aria-selected') == 'true') {
self.trigger('close', {});
@@ -1191,9 +1116,8 @@ S2.define('select2/results',[
var currentIndex = $options.index($highlighted);
// If we are already at the top, don't move further
// If no options, currentIndex will be -1
if (currentIndex <= 0) {
// If we are already at te top, don't move further
if (currentIndex === 0) {
return;
}
@@ -1286,7 +1210,7 @@ S2.define('select2/results',[
function (evt) {
var $this = $(this);
var data = Utils.GetData(this, 'data');
var data = $this.data('data');
if ($this.attr('aria-selected') === 'true') {
if (self.options.get('multiple')) {
@@ -1309,7 +1233,7 @@ S2.define('select2/results',[
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
function (evt) {
var data = Utils.GetData(this, 'data');
var data = $(this).data('data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted');
@@ -1424,15 +1348,14 @@ S2.define('select2/selection/base',[
this._tabindex = 0;
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
if (this.$element.data('old-tabindex') != null) {
this._tabindex = this.$element.data('old-tabindex');
} else if (this.$element.attr('tabindex') != null) {
this._tabindex = this.$element.attr('tabindex');
}
$selection.attr('title', this.$element.attr('title'));
$selection.attr('tabindex', this._tabindex);
$selection.attr('aria-disabled', 'false');
this.$selection = $selection;
@@ -1442,6 +1365,7 @@ S2.define('select2/selection/base',[
BaseSelection.prototype.bind = function (container, $container) {
var self = this;
var id = container.id + '-container';
var resultsId = container.id + '-results';
this.container = container;
@@ -1484,19 +1408,17 @@ S2.define('select2/selection/base',[
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.trigger('focus');
self.$selection.focus();
self._detachCloseHandler(container);
});
container.on('enable', function () {
self.$selection.attr('tabindex', self._tabindex);
self.$selection.attr('aria-disabled', 'false');
});
container.on('disable', function () {
self.$selection.attr('tabindex', '-1');
self.$selection.attr('aria-disabled', 'true');
});
};
@@ -1519,6 +1441,7 @@ S2.define('select2/selection/base',[
};
BaseSelection.prototype._attachCloseHandler = function (container) {
var self = this;
$(document.body).on('mousedown.select2.' + container.id, function (e) {
var $target = $(e.target);
@@ -1528,11 +1451,13 @@ S2.define('select2/selection/base',[
var $all = $('.select2.select2-container--open');
$all.each(function () {
var $this = $(this);
if (this == $select[0]) {
return;
}
var $element = Utils.GetData(this, 'element');
var $element = $this.data('element');
$element.select2('close');
});
@@ -1556,27 +1481,6 @@ S2.define('select2/selection/base',[
throw new Error('The `update` method must be defined in child classes.');
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
BaseSelection.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
BaseSelection.prototype.isDisabled = function () {
return this.options.get('disabled');
};
return BaseSelection;
});
@@ -1614,10 +1518,7 @@ S2.define('select2/selection/single',[
var id = container.id + '-container';
this.$selection.find('.select2-selection__rendered')
.attr('id', id)
.attr('role', 'textbox')
.attr('aria-readonly', 'true');
this.$selection.find('.select2-selection__rendered').attr('id', id);
this.$selection.attr('aria-labelledby', id);
this.$selection.on('mousedown', function (evt) {
@@ -1641,15 +1542,17 @@ S2.define('select2/selection/single',[
container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.trigger('focus');
self.$selection.focus();
}
});
container.on('selection:update', function (params) {
self.update(params.data);
});
};
SingleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title'); // clear tooltip on empty
this.$selection.find('.select2-selection__rendered').empty();
};
SingleSelection.prototype.display = function (data, container) {
@@ -1675,14 +1578,7 @@ S2.define('select2/selection/single',[
var formatted = this.display(selection, $rendered);
$rendered.empty().append(formatted);
var title = selection.title || selection.text;
if (title) {
$rendered.attr('title', title);
} else {
$rendered.removeAttr('title');
}
$rendered.prop('title', selection.title || selection.text);
};
return SingleSelection;
@@ -1727,14 +1623,14 @@ S2.define('select2/selection/multiple',[
'.select2-selection__choice__remove',
function (evt) {
// Ignore the event if it is disabled
if (self.isDisabled()) {
if (self.options.get('disabled')) {
return;
}
var $remove = $(this);
var $selection = $remove.parent();
var data = Utils.GetData($selection[0], 'data');
var data = $selection.data('data');
self.trigger('unselect', {
originalEvent: evt,
@@ -1745,9 +1641,7 @@ S2.define('select2/selection/multiple',[
};
MultipleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
this.$selection.find('.select2-selection__rendered').empty();
};
MultipleSelection.prototype.display = function (data, container) {
@@ -1785,14 +1679,9 @@ S2.define('select2/selection/multiple',[
var formatted = this.display(selection, $selection);
$selection.append(formatted);
$selection.prop('title', selection.title || selection.text);
var title = selection.title || selection.text;
if (title) {
$selection.attr('title', title);
}
Utils.StoreData($selection[0], 'data', selection);
$selection.data('data', selection);
$selections.push($selection);
}
@@ -1857,9 +1746,8 @@ S2.define('select2/selection/placeholder',[
S2.define('select2/selection/allowClear',[
'jquery',
'../keys',
'../utils'
], function ($, KEYS, Utils) {
'../keys'
], function ($, KEYS) {
function AllowClear () { }
AllowClear.prototype.bind = function (decorated, container, $container) {
@@ -1888,7 +1776,7 @@ S2.define('select2/selection/allowClear',[
AllowClear.prototype._handleClear = function (_, evt) {
// Ignore the event if it is disabled
if (this.isDisabled()) {
if (this.options.get('disabled')) {
return;
}
@@ -1901,22 +1789,10 @@ S2.define('select2/selection/allowClear',[
evt.stopPropagation();
var data = Utils.GetData($clear[0], 'data');
var previousVal = this.$element.val();
this.$element.val(this.placeholder.id);
var unselectData = {
data: data
};
this.trigger('clear', unselectData);
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
var data = $clear.data('data');
for (var d = 0; d < data.length; d++) {
unselectData = {
var unselectData = {
data: data[d]
};
@@ -1926,12 +1802,11 @@ S2.define('select2/selection/allowClear',[
// If the event was prevented, don't clear it out.
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
}
this.$element.trigger('input').trigger('change');
this.$element.val(this.placeholder.id).trigger('change');
this.trigger('toggle', {});
};
@@ -1954,14 +1829,12 @@ S2.define('select2/selection/allowClear',[
return;
}
var removeAll = this.options.get('translations').get('removeAllItems');
var $remove = $(
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
'<span class="select2-selection__clear">' +
'&times;' +
'</span>'
);
Utils.StoreData($remove[0], 'data', data);
$remove.data('data', data);
this.$selection.find('.select2-selection__rendered').prepend($remove);
};
@@ -1983,7 +1856,7 @@ S2.define('select2/selection/search',[
'<li class="select2-search select2-search--inline">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
'</li>'
);
@@ -2000,18 +1873,14 @@ S2.define('select2/selection/search',[
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
container.on('open', function () {
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
});
container.on('close', function () {
self.$search.val('');
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
@@ -2031,11 +1900,7 @@ S2.define('select2/selection/search',[
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
self.$search.attr('aria-activedescendant', params.id);
});
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
@@ -2060,7 +1925,7 @@ S2.define('select2/selection/search',[
.prev('.select2-selection__choice');
if ($previousChoice.length > 0) {
var item = Utils.GetData($previousChoice[0], 'data');
var item = $previousChoice.data('data');
self.searchRemoveChoice(item);
@@ -2069,12 +1934,6 @@ S2.define('select2/selection/search',[
}
});
this.$selection.on('click', '.select2-search--inline', function (evt) {
if (self.$search.val()) {
evt.stopPropagation();
}
});
// Try to detect the IE version should the `documentMode` property that
// is stored on the document. This is only implemented in IE and is
// slightly cleaner than doing a user agent check.
@@ -2160,7 +2019,7 @@ S2.define('select2/selection/search',[
this.resizeSearch();
if (searchHadFocus) {
this.$search.trigger('focus');
this.$search.focus();
}
};
@@ -2193,7 +2052,7 @@ S2.define('select2/selection/search',[
var width = '';
if (this.$search.attr('placeholder') !== '') {
width = this.$selection.find('.select2-selection__rendered').width();
width = this.$selection.find('.select2-selection__rendered').innerWidth();
} else {
var minimumWidth = this.$search.val().length + 1;
@@ -2217,13 +2076,10 @@ S2.define('select2/selection/eventRelay',[
'open', 'opening',
'close', 'closing',
'select', 'selecting',
'unselect', 'unselecting',
'clear', 'clearing'
'unselect', 'unselecting'
];
var preventableEvents = [
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
];
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
decorated.call(this, container, $container);
@@ -2556,7 +2412,6 @@ S2.define('select2/diacritics',[
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u0152': 'OE',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
@@ -2966,7 +2821,6 @@ S2.define('select2/diacritics',[
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u0153': 'oe',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
@@ -3135,9 +2989,8 @@ S2.define('select2/diacritics',[
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03CE': '\u03C9',
'\u03C2': '\u03C3',
'\u2019': '\''
'\u03C9': '\u03C9',
'\u03C2': '\u03C3'
};
return diacritics;
@@ -3222,7 +3075,7 @@ S2.define('select2/data/select',[
if ($(data.element).is('option')) {
data.element.selected = true;
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
return;
}
@@ -3243,13 +3096,13 @@ S2.define('select2/data/select',[
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
self.$element.trigger('change');
});
} else {
var val = data.id;
this.$element.val(val);
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
}
};
@@ -3265,7 +3118,7 @@ S2.define('select2/data/select',[
if ($(data.element).is('option')) {
data.element.selected = false;
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
return;
}
@@ -3283,7 +3136,7 @@ S2.define('select2/data/select',[
self.$element.val(val);
self.$element.trigger('input').trigger('change');
self.$element.trigger('change');
});
};
@@ -3305,7 +3158,7 @@ S2.define('select2/data/select',[
// Remove anything added to child elements
this.$element.find('*').each(function () {
// Remove any custom data set by Select2
Utils.RemoveData(this);
$.removeData(this, 'data');
});
};
@@ -3378,7 +3231,7 @@ S2.define('select2/data/select',[
normalizedData.element = option;
// Override the option's data with the combined data
Utils.StoreData(option, 'data', normalizedData);
$.data(option, 'data', normalizedData);
return $option;
};
@@ -3386,7 +3239,7 @@ S2.define('select2/data/select',[
SelectAdapter.prototype.item = function ($option) {
var data = {};
data = Utils.GetData($option[0], 'data');
data = $.data($option[0], 'data');
if (data != null) {
return data;
@@ -3424,13 +3277,13 @@ S2.define('select2/data/select',[
data = this._normalizeItem(data);
data.element = $option[0];
Utils.StoreData($option[0], 'data', data);
$.data($option[0], 'data', data);
return data;
};
SelectAdapter.prototype._normalizeItem = function (item) {
if (item !== Object(item)) {
if (!$.isPlainObject(item)) {
item = {
id: item,
text: item
@@ -3476,19 +3329,15 @@ S2.define('select2/data/array',[
'jquery'
], function (SelectAdapter, Utils, $) {
function ArrayAdapter ($element, options) {
this._dataToConvert = options.get('data') || [];
var data = options.get('data') || [];
ArrayAdapter.__super__.constructor.call(this, $element, options);
this.addOptions(this.convertToOptions(data));
}
Utils.Extend(ArrayAdapter, SelectAdapter);
ArrayAdapter.prototype.bind = function (container, $container) {
ArrayAdapter.__super__.bind.call(this, container, $container);
this.addOptions(this.convertToOptions(this._dataToConvert));
};
ArrayAdapter.prototype.select = function (data) {
var $option = this.$element.find('option').filter(function (i, elm) {
return elm.value == data.id.toString();
@@ -3638,8 +3487,7 @@ S2.define('select2/data/ajax',[
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ('status' in $request &&
($request.status === 0 || $request.status === '0')) {
if ($request.status && $request.status === '0') {
return;
}
@@ -3778,6 +3626,8 @@ S2.define('select2/data/tags',[
};
Tags.prototype._removeOldTags = function (_) {
var tag = this._lastTag;
var $options = this.$element.find('option[data-select2-tag]');
$options.each(function () {
@@ -3852,7 +3702,7 @@ S2.define('select2/data/tokenizer',[
// Replace the search term if we have the search box
if (this.$search.length) {
this.$search.val(tokenData.term);
this.$search.trigger('focus');
this.$search.focus();
}
params.term = tokenData.term;
@@ -3981,30 +3831,10 @@ S2.define('select2/data/maximumSelectionLength',[
decorated.call(this, $e, options);
}
MaximumSelectionLength.prototype.bind =
function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('select', function () {
self._checkIfMaximumSelected();
});
};
MaximumSelectionLength.prototype.query =
function (decorated, params, callback) {
var self = this;
this._checkIfMaximumSelected(function () {
decorated.call(self, params, callback);
});
};
MaximumSelectionLength.prototype._checkIfMaximumSelected =
function (_, successCallback) {
var self = this;
this.current(function (currentData) {
var count = currentData != null ? currentData.length : 0;
if (self.maximumSelectionLength > 0 &&
@@ -4017,10 +3847,7 @@ S2.define('select2/data/maximumSelectionLength',[
});
return;
}
if (successCallback) {
successCallback();
}
decorated.call(self, params, callback);
});
};
@@ -4059,7 +3886,7 @@ S2.define('select2/dropdown',[
};
Dropdown.prototype.position = function ($dropdown, $container) {
// Should be implemented in subclasses
// Should be implmented in subclasses
};
Dropdown.prototype.destroy = function () {
@@ -4083,7 +3910,7 @@ S2.define('select2/dropdown/search',[
'<span class="select2-search select2-search--dropdown">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
' spellcheck="false" role="textbox" />' +
'</span>'
);
@@ -4098,8 +3925,6 @@ S2.define('select2/dropdown/search',[
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
this.$search.on('keydown', function (evt) {
@@ -4122,27 +3947,23 @@ S2.define('select2/dropdown/search',[
container.on('open', function () {
self.$search.attr('tabindex', 0);
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
self.$search.focus();
window.setTimeout(function () {
self.$search.trigger('focus');
self.$search.focus();
}, 0);
});
container.on('close', function () {
self.$search.attr('tabindex', -1);
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.val('');
self.$search.trigger('blur');
});
container.on('focus', function () {
if (!container.isOpen()) {
self.$search.trigger('focus');
self.$search.focus();
}
});
@@ -4157,14 +3978,6 @@ S2.define('select2/dropdown/search',[
}
}
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
});
};
Search.prototype.handleSearch = function (evt) {
@@ -4249,7 +4062,6 @@ S2.define('select2/dropdown/infiniteScroll',[
if (this.showLoadingMore(data)) {
this.$results.append(this.$loadingMore);
this.loadMoreIfNeeded();
}
};
@@ -4268,27 +4080,25 @@ S2.define('select2/dropdown/infiniteScroll',[
self.loading = true;
});
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
};
this.$results.on('scroll', function () {
var isLoadMoreVisible = $.contains(
document.documentElement,
self.$loadingMore[0]
);
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
var isLoadMoreVisible = $.contains(
document.documentElement,
this.$loadingMore[0]
);
if (self.loading || !isLoadMoreVisible) {
return;
}
if (this.loading || !isLoadMoreVisible) {
return;
}
var currentOffset = self.$results.offset().top +
self.$results.outerHeight(false);
var loadingMoreOffset = self.$loadingMore.offset().top +
self.$loadingMore.outerHeight(false);
var currentOffset = this.$results.offset().top +
this.$results.outerHeight(false);
var loadingMoreOffset = this.$loadingMore.offset().top +
this.$loadingMore.outerHeight(false);
if (currentOffset + 50 >= loadingMoreOffset) {
this.loadMore();
}
if (currentOffset + 50 >= loadingMoreOffset) {
self.loadMore();
}
});
};
InfiniteScroll.prototype.loadMore = function () {
@@ -4309,7 +4119,7 @@ S2.define('select2/dropdown/infiniteScroll',[
var $option = $(
'<li ' +
'class="select2-results__option select2-results__option--load-more"' +
'role="option" aria-disabled="true"></li>'
'role="treeitem" aria-disabled="true"></li>'
);
var message = this.options.get('translations').get('loadingMore');
@@ -4327,7 +4137,7 @@ S2.define('select2/dropdown/attachBody',[
'../utils'
], function ($, Utils) {
function AttachBody (decorated, $element, options) {
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
decorated.call(this, $element, options);
}
@@ -4335,14 +4145,27 @@ S2.define('select2/dropdown/attachBody',[
AttachBody.prototype.bind = function (decorated, container, $container) {
var self = this;
var setupResultsEvents = false;
decorated.call(this, container, $container);
container.on('open', function () {
self._showDropdown();
self._attachPositioningHandler(container);
// Must bind after the results handlers to ensure correct sizing
self._bindContainerResultHandlers(container);
if (!setupResultsEvents) {
setupResultsEvents = true;
container.on('results:all', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function () {
self._positionDropdown();
self._resizeDropdown();
});
}
});
container.on('close', function () {
@@ -4391,44 +4214,6 @@ S2.define('select2/dropdown/attachBody',[
this.$dropdownContainer.detach();
};
AttachBody.prototype._bindContainerResultHandlers =
function (decorated, container) {
// These should only be bound once
if (this._containerResultsHandlersBound) {
return;
}
var self = this;
container.on('results:all', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:message', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('select', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('unselect', function () {
self._positionDropdown();
self._resizeDropdown();
});
this._containerResultsHandlersBound = true;
};
AttachBody.prototype._attachPositioningHandler =
function (decorated, container) {
var self = this;
@@ -4439,14 +4224,14 @@ S2.define('select2/dropdown/attachBody',[
var $watchers = this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function () {
Utils.StoreData(this, 'select2-scroll-position', {
$(this).data('select2-scroll-position', {
x: $(this).scrollLeft(),
y: $(this).scrollTop()
});
});
$watchers.on(scrollEvent, function (ev) {
var position = Utils.GetData(this, 'select2-scroll-position');
var position = $(this).data('select2-scroll-position');
$(this).scrollTop(position.y);
});
@@ -4505,26 +4290,16 @@ S2.define('select2/dropdown/attachBody',[
top: container.bottom
};
// Determine what the parent element is to use for calculating the offset
// Determine what the parent element is to use for calciulating the offset
var $offsetParent = this.$dropdownParent;
// For statically positioned elements, we need to get the element
// For statically positoned elements, we need to get the element
// that is determining the offset
if ($offsetParent.css('position') === 'static') {
$offsetParent = $offsetParent.offsetParent();
}
var parentOffset = {
top: 0,
left: 0
};
if (
$.contains(document.body, $offsetParent[0]) ||
$offsetParent[0].isConnected
) {
parentOffset = $offsetParent.offset();
}
var parentOffset = $offsetParent.offset();
css.top -= parentOffset.top;
css.left -= parentOffset.left;
@@ -4621,8 +4396,8 @@ S2.define('select2/dropdown/minimumResultsForSearch',[
});
S2.define('select2/dropdown/selectOnClose',[
'../utils'
], function (Utils) {
], function () {
function SelectOnClose () { }
SelectOnClose.prototype.bind = function (decorated, container, $container) {
@@ -4653,7 +4428,7 @@ S2.define('select2/dropdown/selectOnClose',[
return;
}
var data = Utils.GetData($highlightedResults[0], 'data');
var data = $highlightedResults.data('data');
// Don't re-select already selected resulte
if (
@@ -4694,7 +4469,7 @@ S2.define('select2/dropdown/closeOnSelect',[
var originalEvent = evt.originalEvent;
// Don't close if the control key is being held
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
if (originalEvent && originalEvent.ctrlKey) {
return;
}
@@ -4748,9 +4523,6 @@ S2.define('select2/i18n/en',[],function () {
},
searching: function () {
return 'Searching…';
},
removeAllItems: function () {
return 'Remove all items';
}
};
});
@@ -4989,29 +4761,66 @@ S2.define('select2/defaults',[
);
}
// If the defaults were not previously applied from an element, it is
// possible for the language option to have not been resolved
options.language = this._resolveLanguage(options.language);
if (typeof options.language === 'string') {
// Check if the language is specified with a region
if (options.language.indexOf('-') > 0) {
// Extract the region information if it is included
var languageParts = options.language.split('-');
var baseLanguage = languageParts[0];
// Always fall back to English since it will always be complete
options.language.push('en');
var uniqueLanguages = [];
for (var l = 0; l < options.language.length; l++) {
var language = options.language[l];
if (uniqueLanguages.indexOf(language) === -1) {
uniqueLanguages.push(language);
options.language = [options.language, baseLanguage];
} else {
options.language = [options.language];
}
}
options.language = uniqueLanguages;
if ($.isArray(options.language)) {
var languages = new Translation();
options.language.push('en');
options.translations = this._processTranslations(
options.language,
options.debug
);
var languageNames = options.language;
for (var l = 0; l < languageNames.length; l++) {
var name = languageNames[l];
var language = {};
try {
// Try to load it with the original name
language = Translation.loadPath(name);
} catch (e) {
try {
// If we couldn't load it, check if it wasn't the full path
name = this.defaults.amdLanguageBase + name;
language = Translation.loadPath(name);
} catch (ex) {
// The translation could not be loaded at all. Sometimes this is
// because of a configuration problem, other times this can be
// because of how Select2 helps load all possible translation files.
if (options.debug && window.console && console.warn) {
console.warn(
'Select2: The language file for "' + name + '" could not be ' +
'automatically loaded. A fallback will be used instead.'
);
}
continue;
}
}
languages.extend(language);
}
options.translations = languages;
} else {
var baseTranslation = Translation.loadPath(
this.defaults.amdLanguageBase + 'en'
);
var customTranslation = new Translation(options.language);
customTranslation.extend(baseTranslation);
options.translations = customTranslation;
}
return options;
};
@@ -5078,14 +4887,13 @@ S2.define('select2/defaults',[
debug: false,
dropdownAutoWidth: false,
escapeMarkup: Utils.escapeMarkup,
language: {},
language: EnglishTranslation,
matcher: matcher,
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: false,
scrollAfterSelect: false,
sorter: function (data) {
return data;
},
@@ -5100,103 +4908,6 @@ S2.define('select2/defaults',[
};
};
Defaults.prototype.applyFromElement = function (options, $element) {
var optionLanguage = options.language;
var defaultLanguage = this.defaults.language;
var elementLanguage = $element.prop('lang');
var parentLanguage = $element.closest('[lang]').prop('lang');
var languages = Array.prototype.concat.call(
this._resolveLanguage(elementLanguage),
this._resolveLanguage(optionLanguage),
this._resolveLanguage(defaultLanguage),
this._resolveLanguage(parentLanguage)
);
options.language = languages;
return options;
};
Defaults.prototype._resolveLanguage = function (language) {
if (!language) {
return [];
}
if ($.isEmptyObject(language)) {
return [];
}
if ($.isPlainObject(language)) {
return [language];
}
var languages;
if (!$.isArray(language)) {
languages = [language];
} else {
languages = language;
}
var resolvedLanguages = [];
for (var l = 0; l < languages.length; l++) {
resolvedLanguages.push(languages[l]);
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
// Extract the region information if it is included
var languageParts = languages[l].split('-');
var baseLanguage = languageParts[0];
resolvedLanguages.push(baseLanguage);
}
}
return resolvedLanguages;
};
Defaults.prototype._processTranslations = function (languages, debug) {
var translations = new Translation();
for (var l = 0; l < languages.length; l++) {
var languageData = new Translation();
var language = languages[l];
if (typeof language === 'string') {
try {
// Try to load it with the original name
languageData = Translation.loadPath(language);
} catch (e) {
try {
// If we couldn't load it, check if it wasn't the full path
language = this.defaults.amdLanguageBase + language;
languageData = Translation.loadPath(language);
} catch (ex) {
// The translation could not be loaded at all. Sometimes this is
// because of a configuration problem, other times this can be
// because of how Select2 helps load all possible translation files
if (debug && window.console && console.warn) {
console.warn(
'Select2: The language file for "' + language + '" could ' +
'not be automatically loaded. A fallback will be used instead.'
);
}
}
}
} else if ($.isPlainObject(language)) {
languageData = new Translation(language);
} else {
languageData = language;
}
translations.extend(languageData);
}
return translations;
};
Defaults.prototype.set = function (key, value) {
var camelKey = $.camelCase(key);
@@ -5205,7 +4916,7 @@ S2.define('select2/defaults',[
var convertedData = Utils._convertData(data);
$.extend(true, this.defaults, convertedData);
$.extend(this.defaults, convertedData);
};
var defaults = new Defaults();
@@ -5226,10 +4937,6 @@ S2.define('select2/options',[
this.fromElement($element);
}
if ($element != null) {
this.options = Defaults.applyFromElement(this.options, $element);
}
this.options = Defaults.apply(this.options);
if ($element && $element.is('input')) {
@@ -5253,6 +4960,14 @@ S2.define('select2/options',[
this.options.disabled = $e.prop('disabled');
}
if (this.options.language == null) {
if ($e.prop('lang')) {
this.options.language = $e.prop('lang').toLowerCase();
} else if ($e.closest('[lang]').prop('lang')) {
this.options.language = $e.closest('[lang]').prop('lang');
}
}
if (this.options.dir == null) {
if ($e.prop('dir')) {
this.options.dir = $e.prop('dir');
@@ -5266,7 +4981,7 @@ S2.define('select2/options',[
$e.prop('disabled', this.options.disabled);
$e.prop('multiple', this.options.multiple);
if (Utils.GetData($e[0], 'select2Tags')) {
if ($e.data('select2Tags')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-select2-tags` attribute has been changed to ' +
@@ -5275,11 +4990,11 @@ S2.define('select2/options',[
);
}
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
Utils.StoreData($e[0], 'tags', true);
$e.data('data', $e.data('select2Tags'));
$e.data('tags', true);
}
if (Utils.GetData($e[0], 'ajaxUrl')) {
if ($e.data('ajaxUrl')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-ajax-url` attribute has been changed to ' +
@@ -5288,45 +5003,21 @@ S2.define('select2/options',[
);
}
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
$e.attr('ajax--url', $e.data('ajaxUrl'));
$e.data('ajax--url', $e.data('ajaxUrl'));
}
var dataset = {};
function upperCaseLetter(_, letter) {
return letter.toUpperCase();
}
// Pre-load all of the attributes which are prefixed with `data-`
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
var attributeName = $e[0].attributes[attr].name;
var prefix = 'data-';
if (attributeName.substr(0, prefix.length) == prefix) {
// Get the contents of the attribute after `data-`
var dataName = attributeName.substring(prefix.length);
// Get the data contents from the consistent source
// This is more than likely the jQuery data helper
var dataValue = Utils.GetData($e[0], dataName);
// camelCase the attribute name to match the spec
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
// Store the data attribute contents into the dataset since
dataset[camelDataName] = dataValue;
}
}
// Prefer the element's `dataset` attribute if it exists
// jQuery 1.x does not correctly handle data attributes with multiple dashes
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
dataset = $.extend(true, {}, $e[0].dataset, dataset);
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
} else {
dataset = $e.data();
}
// Prefer our internal data cache if it exists
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
var data = $.extend(true, {}, dataset);
data = Utils._convertData(data);
@@ -5363,8 +5054,8 @@ S2.define('select2/core',[
'./keys'
], function ($, Options, Utils, KEYS) {
var Select2 = function ($element, options) {
if (Utils.GetData($element[0], 'select2') != null) {
Utils.GetData($element[0], 'select2').destroy();
if ($element.data('select2') != null) {
$element.data('select2').destroy();
}
this.$element = $element;
@@ -5380,7 +5071,7 @@ S2.define('select2/core',[
// Set up the tabindex
var tabindex = $element.attr('tabindex') || 0;
Utils.StoreData($element[0], 'old-tabindex', tabindex);
$element.data('old-tabindex', tabindex);
$element.attr('tabindex', '-1');
// Set up containers and adapters
@@ -5441,9 +5132,6 @@ S2.define('select2/core',[
// Synchronize any monitored attributes
this._syncAttributes();
Utils.StoreData($element[0], 'select2', this);
// Ensure backwards compatibility with $element.data('select2').
$element.data('select2', this);
};
@@ -5520,12 +5208,6 @@ S2.define('select2/core',[
return null;
}
if (method == 'computedstyle') {
var computedStyle = window.getComputedStyle($element[0]);
return computedStyle.width;
}
return method;
};
@@ -5566,8 +5248,8 @@ S2.define('select2/core',[
if (observer != null) {
this._observer = new observer(function (mutations) {
self._syncA();
self._syncS(null, mutations);
$.each(mutations, self._syncA);
$.each(mutations, self._syncS);
});
this._observer.observe(this.$element[0], {
attributes: true,
@@ -5689,7 +5371,7 @@ S2.define('select2/core',[
if (self.isOpen()) {
if (key === KEYS.ESC || key === KEYS.TAB ||
(key === KEYS.UP && evt.altKey)) {
self.close(evt);
self.close();
evt.preventDefault();
} else if (key === KEYS.ENTER) {
@@ -5723,7 +5405,7 @@ S2.define('select2/core',[
Select2.prototype._syncAttributes = function () {
this.options.set('disabled', this.$element.prop('disabled'));
if (this.isDisabled()) {
if (this.options.get('disabled')) {
if (this.isOpen()) {
this.close();
}
@@ -5734,7 +5416,7 @@ S2.define('select2/core',[
}
};
Select2.prototype._isChangeMutation = function (evt, mutations) {
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = false;
var self = this;
@@ -5762,22 +5444,7 @@ S2.define('select2/core',[
}
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
changed = true;
} else if ($.isArray(mutations)) {
$.each(mutations, function(evt, mutation) {
if (self._isChangeMutation(evt, mutation)) {
// We've found a change mutation.
// Let's escape from the loop and continue
changed = true;
return false;
}
});
}
return changed;
};
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = this._isChangeMutation(evt, mutations);
var self = this;
// Only re-pull the data if we think there is a change
if (changed) {
@@ -5799,8 +5466,7 @@ S2.define('select2/core',[
'open': 'opening',
'close': 'closing',
'select': 'selecting',
'unselect': 'unselecting',
'clear': 'clearing'
'unselect': 'unselecting'
};
if (args === undefined) {
@@ -5828,7 +5494,7 @@ S2.define('select2/core',[
};
Select2.prototype.toggleDropdown = function () {
if (this.isDisabled()) {
if (this.options.get('disabled')) {
return;
}
@@ -5844,40 +5510,15 @@ S2.define('select2/core',[
return;
}
if (this.isDisabled()) {
return;
}
this.trigger('query', {});
};
Select2.prototype.close = function (evt) {
Select2.prototype.close = function () {
if (!this.isOpen()) {
return;
}
this.trigger('close', { originalEvent : evt });
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
Select2.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
Select2.prototype.isDisabled = function () {
return this.options.get('disabled');
this.trigger('close', {});
};
Select2.prototype.isOpen = function () {
@@ -5954,7 +5595,7 @@ S2.define('select2/core',[
});
}
this.$element.val(newVal).trigger('input').trigger('change');
this.$element.val(newVal).trigger('change');
};
Select2.prototype.destroy = function () {
@@ -5980,12 +5621,10 @@ S2.define('select2/core',[
this._syncS = null;
this.$element.off('.select2');
this.$element.attr('tabindex',
Utils.GetData(this.$element[0], 'old-tabindex'));
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
this.$element.removeClass('select2-hidden-accessible');
this.$element.attr('aria-hidden', 'false');
Utils.RemoveData(this.$element[0]);
this.$element.removeData('select2');
this.dataAdapter.destroy();
@@ -6013,7 +5652,7 @@ S2.define('select2/core',[
this.$container.addClass('select2-container--' + this.options.get('theme'));
Utils.StoreData($container[0], 'element', this.$element);
$container.data('element', this.$element);
return $container;
};
@@ -6223,9 +5862,8 @@ S2.define('select2/compat/initSelection',[
});
S2.define('select2/compat/inputData',[
'jquery',
'../utils'
], function ($, Utils) {
'jquery'
], function ($) {
function InputData (decorated, $element, options) {
this._currentData = [];
this._valueSeparator = options.get('valueSeparator') || ',';
@@ -6289,13 +5927,13 @@ S2.define('select2/compat/inputData',[
});
this.$element.val(data.id);
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
} else {
var value = this.$element.val();
value += this._valueSeparator + data.id;
this.$element.val(value);
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
}
};
@@ -6318,7 +5956,7 @@ S2.define('select2/compat/inputData',[
}
self.$element.val(values.join(self._valueSeparator));
self.$element.trigger('input').trigger('change');
self.$element.trigger('change');
});
};
@@ -6342,7 +5980,7 @@ S2.define('select2/compat/inputData',[
InputData.prototype.addOptions = function (_, $options) {
var options = $.map($options, function ($option) {
return Utils.GetData($option[0], 'data');
return $.data($option[0], 'data');
});
this._currentData.push.apply(this._currentData, options);
@@ -6745,9 +6383,8 @@ S2.define('jquery.select2',[
'jquery-mousewheel',
'./select2/core',
'./select2/defaults',
'./select2/utils'
], function ($, _, Select2, Defaults, Utils) {
'./select2/defaults'
], function ($, _, Select2, Defaults) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];
@@ -6768,7 +6405,7 @@ S2.define('jquery.select2',[
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = Utils.GetData(this, 'select2');
var instance = $(this).data('select2');
if (instance == null && window.console && console.error) {
console.error(
+1 -2
View File
File diff suppressed because one or more lines are too long
+214 -576
View File
@@ -1,11 +1,11 @@
/*!
* Select2 4.0.13
* Select2 4.0.5
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
;(function (factory) {
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
@@ -574,10 +574,10 @@ S2.define('select2/utils',[
DecoratedClass.prototype = new ctr();
for (var m = 0; m < superMethods.length; m++) {
var superMethod = superMethods[m];
var superMethod = superMethods[m];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
}
var calledMethod = function (methodName) {
@@ -772,70 +772,6 @@ S2.define('select2/utils',[
$element.append($nodes);
};
// Cache objects in Utils.__cache instead of $.data (see #4346)
Utils.__cache = {};
var id = 0;
Utils.GetUniqueElementId = function (element) {
// Get a unique element Id. If element has no id,
// creates a new unique number, stores it in the id
// attribute and returns the new id.
// If an id already exists, it simply returns it.
var select2Id = element.getAttribute('data-select2-id');
if (select2Id == null) {
// If element has id, use it.
if (element.id) {
select2Id = element.id;
element.setAttribute('data-select2-id', select2Id);
} else {
element.setAttribute('data-select2-id', ++id);
select2Id = id.toString();
}
}
return select2Id;
};
Utils.StoreData = function (element, name, value) {
// Stores an item in the cache for a specified element.
// name is the cache key.
var id = Utils.GetUniqueElementId(element);
if (!Utils.__cache[id]) {
Utils.__cache[id] = {};
}
Utils.__cache[id][name] = value;
};
Utils.GetData = function (element, name) {
// Retrieves a value from the cache by its key (name)
// name is optional. If no name specified, return
// all cache items for the specified element.
// and for a specified element.
var id = Utils.GetUniqueElementId(element);
if (name) {
if (Utils.__cache[id]) {
if (Utils.__cache[id][name] != null) {
return Utils.__cache[id][name];
}
return $(element).data(name); // Fallback to HTML5 data attribs.
}
return $(element).data(name); // Fallback to HTML5 data attribs.
} else {
return Utils.__cache[id];
}
};
Utils.RemoveData = function (element) {
// Removes all cached items for a specified element.
var id = Utils.GetUniqueElementId(element);
if (Utils.__cache[id] != null) {
delete Utils.__cache[id];
}
element.removeAttribute('data-select2-id');
};
return Utils;
});
@@ -855,7 +791,7 @@ S2.define('select2/results',[
Results.prototype.render = function () {
var $results = $(
'<ul class="select2-results__options" role="listbox"></ul>'
'<ul class="select2-results__options" role="tree"></ul>'
);
if (this.options.get('multiple')) {
@@ -878,7 +814,7 @@ S2.define('select2/results',[
this.hideLoading();
var $message = $(
'<li role="alert" aria-live="assertive"' +
'<li role="treeitem" aria-live="assertive"' +
' class="select2-results__option"></li>'
);
@@ -971,7 +907,7 @@ S2.define('select2/results',[
$options.each(function () {
var $option = $(this);
var item = Utils.GetData(this, 'data');
var item = $.data(this, 'data');
// id needs to be converted to a string when comparing
var id = '' + item.id;
@@ -1012,16 +948,11 @@ S2.define('select2/results',[
option.className = 'select2-results__option';
var attrs = {
'role': 'option',
'role': 'treeitem',
'aria-selected': 'false'
};
var matches = window.Element.prototype.matches ||
window.Element.prototype.msMatchesSelector ||
window.Element.prototype.webkitMatchesSelector;
if ((data.element != null && matches.call(data.element, ':disabled')) ||
(data.element == null && data.disabled)) {
if (data.disabled) {
delete attrs['aria-selected'];
attrs['aria-disabled'] = 'true';
}
@@ -1081,7 +1012,7 @@ S2.define('select2/results',[
this.template(data, option);
}
Utils.StoreData(option, 'data', data);
$.data(option, 'data', data);
return option;
};
@@ -1122,10 +1053,7 @@ S2.define('select2/results',[
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
self.highlightFirstItem();
});
container.on('unselect', function () {
@@ -1134,10 +1062,7 @@ S2.define('select2/results',[
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
self.highlightFirstItem();
});
container.on('open', function () {
@@ -1173,7 +1098,7 @@ S2.define('select2/results',[
return;
}
var data = Utils.GetData($highlighted[0], 'data');
var data = $highlighted.data('data');
if ($highlighted.attr('aria-selected') == 'true') {
self.trigger('close', {});
@@ -1191,9 +1116,8 @@ S2.define('select2/results',[
var currentIndex = $options.index($highlighted);
// If we are already at the top, don't move further
// If no options, currentIndex will be -1
if (currentIndex <= 0) {
// If we are already at te top, don't move further
if (currentIndex === 0) {
return;
}
@@ -1286,7 +1210,7 @@ S2.define('select2/results',[
function (evt) {
var $this = $(this);
var data = Utils.GetData(this, 'data');
var data = $this.data('data');
if ($this.attr('aria-selected') === 'true') {
if (self.options.get('multiple')) {
@@ -1309,7 +1233,7 @@ S2.define('select2/results',[
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
function (evt) {
var data = Utils.GetData(this, 'data');
var data = $(this).data('data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted');
@@ -1424,15 +1348,14 @@ S2.define('select2/selection/base',[
this._tabindex = 0;
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
if (this.$element.data('old-tabindex') != null) {
this._tabindex = this.$element.data('old-tabindex');
} else if (this.$element.attr('tabindex') != null) {
this._tabindex = this.$element.attr('tabindex');
}
$selection.attr('title', this.$element.attr('title'));
$selection.attr('tabindex', this._tabindex);
$selection.attr('aria-disabled', 'false');
this.$selection = $selection;
@@ -1442,6 +1365,7 @@ S2.define('select2/selection/base',[
BaseSelection.prototype.bind = function (container, $container) {
var self = this;
var id = container.id + '-container';
var resultsId = container.id + '-results';
this.container = container;
@@ -1484,19 +1408,17 @@ S2.define('select2/selection/base',[
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.trigger('focus');
self.$selection.focus();
self._detachCloseHandler(container);
});
container.on('enable', function () {
self.$selection.attr('tabindex', self._tabindex);
self.$selection.attr('aria-disabled', 'false');
});
container.on('disable', function () {
self.$selection.attr('tabindex', '-1');
self.$selection.attr('aria-disabled', 'true');
});
};
@@ -1519,6 +1441,7 @@ S2.define('select2/selection/base',[
};
BaseSelection.prototype._attachCloseHandler = function (container) {
var self = this;
$(document.body).on('mousedown.select2.' + container.id, function (e) {
var $target = $(e.target);
@@ -1528,11 +1451,13 @@ S2.define('select2/selection/base',[
var $all = $('.select2.select2-container--open');
$all.each(function () {
var $this = $(this);
if (this == $select[0]) {
return;
}
var $element = Utils.GetData(this, 'element');
var $element = $this.data('element');
$element.select2('close');
});
@@ -1556,27 +1481,6 @@ S2.define('select2/selection/base',[
throw new Error('The `update` method must be defined in child classes.');
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
BaseSelection.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
BaseSelection.prototype.isDisabled = function () {
return this.options.get('disabled');
};
return BaseSelection;
});
@@ -1614,10 +1518,7 @@ S2.define('select2/selection/single',[
var id = container.id + '-container';
this.$selection.find('.select2-selection__rendered')
.attr('id', id)
.attr('role', 'textbox')
.attr('aria-readonly', 'true');
this.$selection.find('.select2-selection__rendered').attr('id', id);
this.$selection.attr('aria-labelledby', id);
this.$selection.on('mousedown', function (evt) {
@@ -1641,15 +1542,17 @@ S2.define('select2/selection/single',[
container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.trigger('focus');
self.$selection.focus();
}
});
container.on('selection:update', function (params) {
self.update(params.data);
});
};
SingleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title'); // clear tooltip on empty
this.$selection.find('.select2-selection__rendered').empty();
};
SingleSelection.prototype.display = function (data, container) {
@@ -1675,14 +1578,7 @@ S2.define('select2/selection/single',[
var formatted = this.display(selection, $rendered);
$rendered.empty().append(formatted);
var title = selection.title || selection.text;
if (title) {
$rendered.attr('title', title);
} else {
$rendered.removeAttr('title');
}
$rendered.prop('title', selection.title || selection.text);
};
return SingleSelection;
@@ -1727,14 +1623,14 @@ S2.define('select2/selection/multiple',[
'.select2-selection__choice__remove',
function (evt) {
// Ignore the event if it is disabled
if (self.isDisabled()) {
if (self.options.get('disabled')) {
return;
}
var $remove = $(this);
var $selection = $remove.parent();
var data = Utils.GetData($selection[0], 'data');
var data = $selection.data('data');
self.trigger('unselect', {
originalEvent: evt,
@@ -1745,9 +1641,7 @@ S2.define('select2/selection/multiple',[
};
MultipleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
this.$selection.find('.select2-selection__rendered').empty();
};
MultipleSelection.prototype.display = function (data, container) {
@@ -1785,14 +1679,9 @@ S2.define('select2/selection/multiple',[
var formatted = this.display(selection, $selection);
$selection.append(formatted);
$selection.prop('title', selection.title || selection.text);
var title = selection.title || selection.text;
if (title) {
$selection.attr('title', title);
}
Utils.StoreData($selection[0], 'data', selection);
$selection.data('data', selection);
$selections.push($selection);
}
@@ -1857,9 +1746,8 @@ S2.define('select2/selection/placeholder',[
S2.define('select2/selection/allowClear',[
'jquery',
'../keys',
'../utils'
], function ($, KEYS, Utils) {
'../keys'
], function ($, KEYS) {
function AllowClear () { }
AllowClear.prototype.bind = function (decorated, container, $container) {
@@ -1888,7 +1776,7 @@ S2.define('select2/selection/allowClear',[
AllowClear.prototype._handleClear = function (_, evt) {
// Ignore the event if it is disabled
if (this.isDisabled()) {
if (this.options.get('disabled')) {
return;
}
@@ -1901,22 +1789,10 @@ S2.define('select2/selection/allowClear',[
evt.stopPropagation();
var data = Utils.GetData($clear[0], 'data');
var previousVal = this.$element.val();
this.$element.val(this.placeholder.id);
var unselectData = {
data: data
};
this.trigger('clear', unselectData);
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
var data = $clear.data('data');
for (var d = 0; d < data.length; d++) {
unselectData = {
var unselectData = {
data: data[d]
};
@@ -1926,12 +1802,11 @@ S2.define('select2/selection/allowClear',[
// If the event was prevented, don't clear it out.
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
}
this.$element.trigger('input').trigger('change');
this.$element.val(this.placeholder.id).trigger('change');
this.trigger('toggle', {});
};
@@ -1954,14 +1829,12 @@ S2.define('select2/selection/allowClear',[
return;
}
var removeAll = this.options.get('translations').get('removeAllItems');
var $remove = $(
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
'<span class="select2-selection__clear">' +
'&times;' +
'</span>'
);
Utils.StoreData($remove[0], 'data', data);
$remove.data('data', data);
this.$selection.find('.select2-selection__rendered').prepend($remove);
};
@@ -1983,7 +1856,7 @@ S2.define('select2/selection/search',[
'<li class="select2-search select2-search--inline">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
'</li>'
);
@@ -2000,18 +1873,14 @@ S2.define('select2/selection/search',[
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
container.on('open', function () {
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
});
container.on('close', function () {
self.$search.val('');
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
@@ -2031,11 +1900,7 @@ S2.define('select2/selection/search',[
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
self.$search.attr('aria-activedescendant', params.id);
});
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
@@ -2060,7 +1925,7 @@ S2.define('select2/selection/search',[
.prev('.select2-selection__choice');
if ($previousChoice.length > 0) {
var item = Utils.GetData($previousChoice[0], 'data');
var item = $previousChoice.data('data');
self.searchRemoveChoice(item);
@@ -2069,12 +1934,6 @@ S2.define('select2/selection/search',[
}
});
this.$selection.on('click', '.select2-search--inline', function (evt) {
if (self.$search.val()) {
evt.stopPropagation();
}
});
// Try to detect the IE version should the `documentMode` property that
// is stored on the document. This is only implemented in IE and is
// slightly cleaner than doing a user agent check.
@@ -2160,7 +2019,7 @@ S2.define('select2/selection/search',[
this.resizeSearch();
if (searchHadFocus) {
this.$search.trigger('focus');
this.$search.focus();
}
};
@@ -2193,7 +2052,7 @@ S2.define('select2/selection/search',[
var width = '';
if (this.$search.attr('placeholder') !== '') {
width = this.$selection.find('.select2-selection__rendered').width();
width = this.$selection.find('.select2-selection__rendered').innerWidth();
} else {
var minimumWidth = this.$search.val().length + 1;
@@ -2217,13 +2076,10 @@ S2.define('select2/selection/eventRelay',[
'open', 'opening',
'close', 'closing',
'select', 'selecting',
'unselect', 'unselecting',
'clear', 'clearing'
'unselect', 'unselecting'
];
var preventableEvents = [
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
];
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
decorated.call(this, container, $container);
@@ -2556,7 +2412,6 @@ S2.define('select2/diacritics',[
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u0152': 'OE',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
@@ -2966,7 +2821,6 @@ S2.define('select2/diacritics',[
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u0153': 'oe',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
@@ -3135,9 +2989,8 @@ S2.define('select2/diacritics',[
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03CE': '\u03C9',
'\u03C2': '\u03C3',
'\u2019': '\''
'\u03C9': '\u03C9',
'\u03C2': '\u03C3'
};
return diacritics;
@@ -3222,7 +3075,7 @@ S2.define('select2/data/select',[
if ($(data.element).is('option')) {
data.element.selected = true;
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
return;
}
@@ -3243,13 +3096,13 @@ S2.define('select2/data/select',[
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
self.$element.trigger('change');
});
} else {
var val = data.id;
this.$element.val(val);
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
}
};
@@ -3265,7 +3118,7 @@ S2.define('select2/data/select',[
if ($(data.element).is('option')) {
data.element.selected = false;
this.$element.trigger('input').trigger('change');
this.$element.trigger('change');
return;
}
@@ -3283,7 +3136,7 @@ S2.define('select2/data/select',[
self.$element.val(val);
self.$element.trigger('input').trigger('change');
self.$element.trigger('change');
});
};
@@ -3305,7 +3158,7 @@ S2.define('select2/data/select',[
// Remove anything added to child elements
this.$element.find('*').each(function () {
// Remove any custom data set by Select2
Utils.RemoveData(this);
$.removeData(this, 'data');
});
};
@@ -3378,7 +3231,7 @@ S2.define('select2/data/select',[
normalizedData.element = option;
// Override the option's data with the combined data
Utils.StoreData(option, 'data', normalizedData);
$.data(option, 'data', normalizedData);
return $option;
};
@@ -3386,7 +3239,7 @@ S2.define('select2/data/select',[
SelectAdapter.prototype.item = function ($option) {
var data = {};
data = Utils.GetData($option[0], 'data');
data = $.data($option[0], 'data');
if (data != null) {
return data;
@@ -3424,13 +3277,13 @@ S2.define('select2/data/select',[
data = this._normalizeItem(data);
data.element = $option[0];
Utils.StoreData($option[0], 'data', data);
$.data($option[0], 'data', data);
return data;
};
SelectAdapter.prototype._normalizeItem = function (item) {
if (item !== Object(item)) {
if (!$.isPlainObject(item)) {
item = {
id: item,
text: item
@@ -3476,19 +3329,15 @@ S2.define('select2/data/array',[
'jquery'
], function (SelectAdapter, Utils, $) {
function ArrayAdapter ($element, options) {
this._dataToConvert = options.get('data') || [];
var data = options.get('data') || [];
ArrayAdapter.__super__.constructor.call(this, $element, options);
this.addOptions(this.convertToOptions(data));
}
Utils.Extend(ArrayAdapter, SelectAdapter);
ArrayAdapter.prototype.bind = function (container, $container) {
ArrayAdapter.__super__.bind.call(this, container, $container);
this.addOptions(this.convertToOptions(this._dataToConvert));
};
ArrayAdapter.prototype.select = function (data) {
var $option = this.$element.find('option').filter(function (i, elm) {
return elm.value == data.id.toString();
@@ -3638,8 +3487,7 @@ S2.define('select2/data/ajax',[
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ('status' in $request &&
($request.status === 0 || $request.status === '0')) {
if ($request.status && $request.status === '0') {
return;
}
@@ -3778,6 +3626,8 @@ S2.define('select2/data/tags',[
};
Tags.prototype._removeOldTags = function (_) {
var tag = this._lastTag;
var $options = this.$element.find('option[data-select2-tag]');
$options.each(function () {
@@ -3852,7 +3702,7 @@ S2.define('select2/data/tokenizer',[
// Replace the search term if we have the search box
if (this.$search.length) {
this.$search.val(tokenData.term);
this.$search.trigger('focus');
this.$search.focus();
}
params.term = tokenData.term;
@@ -3981,30 +3831,10 @@ S2.define('select2/data/maximumSelectionLength',[
decorated.call(this, $e, options);
}
MaximumSelectionLength.prototype.bind =
function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('select', function () {
self._checkIfMaximumSelected();
});
};
MaximumSelectionLength.prototype.query =
function (decorated, params, callback) {
var self = this;
this._checkIfMaximumSelected(function () {
decorated.call(self, params, callback);
});
};
MaximumSelectionLength.prototype._checkIfMaximumSelected =
function (_, successCallback) {
var self = this;
this.current(function (currentData) {
var count = currentData != null ? currentData.length : 0;
if (self.maximumSelectionLength > 0 &&
@@ -4017,10 +3847,7 @@ S2.define('select2/data/maximumSelectionLength',[
});
return;
}
if (successCallback) {
successCallback();
}
decorated.call(self, params, callback);
});
};
@@ -4059,7 +3886,7 @@ S2.define('select2/dropdown',[
};
Dropdown.prototype.position = function ($dropdown, $container) {
// Should be implemented in subclasses
// Should be implmented in subclasses
};
Dropdown.prototype.destroy = function () {
@@ -4083,7 +3910,7 @@ S2.define('select2/dropdown/search',[
'<span class="select2-search select2-search--dropdown">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
' spellcheck="false" role="textbox" />' +
'</span>'
);
@@ -4098,8 +3925,6 @@ S2.define('select2/dropdown/search',[
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
this.$search.on('keydown', function (evt) {
@@ -4122,27 +3947,23 @@ S2.define('select2/dropdown/search',[
container.on('open', function () {
self.$search.attr('tabindex', 0);
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
self.$search.focus();
window.setTimeout(function () {
self.$search.trigger('focus');
self.$search.focus();
}, 0);
});
container.on('close', function () {
self.$search.attr('tabindex', -1);
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.val('');
self.$search.trigger('blur');
});
container.on('focus', function () {
if (!container.isOpen()) {
self.$search.trigger('focus');
self.$search.focus();
}
});
@@ -4157,14 +3978,6 @@ S2.define('select2/dropdown/search',[
}
}
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
});
};
Search.prototype.handleSearch = function (evt) {
@@ -4249,7 +4062,6 @@ S2.define('select2/dropdown/infiniteScroll',[
if (this.showLoadingMore(data)) {
this.$results.append(this.$loadingMore);
this.loadMoreIfNeeded();
}
};
@@ -4268,27 +4080,25 @@ S2.define('select2/dropdown/infiniteScroll',[
self.loading = true;
});
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
};
this.$results.on('scroll', function () {
var isLoadMoreVisible = $.contains(
document.documentElement,
self.$loadingMore[0]
);
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
var isLoadMoreVisible = $.contains(
document.documentElement,
this.$loadingMore[0]
);
if (self.loading || !isLoadMoreVisible) {
return;
}
if (this.loading || !isLoadMoreVisible) {
return;
}
var currentOffset = self.$results.offset().top +
self.$results.outerHeight(false);
var loadingMoreOffset = self.$loadingMore.offset().top +
self.$loadingMore.outerHeight(false);
var currentOffset = this.$results.offset().top +
this.$results.outerHeight(false);
var loadingMoreOffset = this.$loadingMore.offset().top +
this.$loadingMore.outerHeight(false);
if (currentOffset + 50 >= loadingMoreOffset) {
this.loadMore();
}
if (currentOffset + 50 >= loadingMoreOffset) {
self.loadMore();
}
});
};
InfiniteScroll.prototype.loadMore = function () {
@@ -4309,7 +4119,7 @@ S2.define('select2/dropdown/infiniteScroll',[
var $option = $(
'<li ' +
'class="select2-results__option select2-results__option--load-more"' +
'role="option" aria-disabled="true"></li>'
'role="treeitem" aria-disabled="true"></li>'
);
var message = this.options.get('translations').get('loadingMore');
@@ -4327,7 +4137,7 @@ S2.define('select2/dropdown/attachBody',[
'../utils'
], function ($, Utils) {
function AttachBody (decorated, $element, options) {
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
decorated.call(this, $element, options);
}
@@ -4335,14 +4145,27 @@ S2.define('select2/dropdown/attachBody',[
AttachBody.prototype.bind = function (decorated, container, $container) {
var self = this;
var setupResultsEvents = false;
decorated.call(this, container, $container);
container.on('open', function () {
self._showDropdown();
self._attachPositioningHandler(container);
// Must bind after the results handlers to ensure correct sizing
self._bindContainerResultHandlers(container);
if (!setupResultsEvents) {
setupResultsEvents = true;
container.on('results:all', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function () {
self._positionDropdown();
self._resizeDropdown();
});
}
});
container.on('close', function () {
@@ -4391,44 +4214,6 @@ S2.define('select2/dropdown/attachBody',[
this.$dropdownContainer.detach();
};
AttachBody.prototype._bindContainerResultHandlers =
function (decorated, container) {
// These should only be bound once
if (this._containerResultsHandlersBound) {
return;
}
var self = this;
container.on('results:all', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:message', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('select', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('unselect', function () {
self._positionDropdown();
self._resizeDropdown();
});
this._containerResultsHandlersBound = true;
};
AttachBody.prototype._attachPositioningHandler =
function (decorated, container) {
var self = this;
@@ -4439,14 +4224,14 @@ S2.define('select2/dropdown/attachBody',[
var $watchers = this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function () {
Utils.StoreData(this, 'select2-scroll-position', {
$(this).data('select2-scroll-position', {
x: $(this).scrollLeft(),
y: $(this).scrollTop()
});
});
$watchers.on(scrollEvent, function (ev) {
var position = Utils.GetData(this, 'select2-scroll-position');
var position = $(this).data('select2-scroll-position');
$(this).scrollTop(position.y);
});
@@ -4505,26 +4290,16 @@ S2.define('select2/dropdown/attachBody',[
top: container.bottom
};
// Determine what the parent element is to use for calculating the offset
// Determine what the parent element is to use for calciulating the offset
var $offsetParent = this.$dropdownParent;
// For statically positioned elements, we need to get the element
// For statically positoned elements, we need to get the element
// that is determining the offset
if ($offsetParent.css('position') === 'static') {
$offsetParent = $offsetParent.offsetParent();
}
var parentOffset = {
top: 0,
left: 0
};
if (
$.contains(document.body, $offsetParent[0]) ||
$offsetParent[0].isConnected
) {
parentOffset = $offsetParent.offset();
}
var parentOffset = $offsetParent.offset();
css.top -= parentOffset.top;
css.left -= parentOffset.left;
@@ -4621,8 +4396,8 @@ S2.define('select2/dropdown/minimumResultsForSearch',[
});
S2.define('select2/dropdown/selectOnClose',[
'../utils'
], function (Utils) {
], function () {
function SelectOnClose () { }
SelectOnClose.prototype.bind = function (decorated, container, $container) {
@@ -4653,7 +4428,7 @@ S2.define('select2/dropdown/selectOnClose',[
return;
}
var data = Utils.GetData($highlightedResults[0], 'data');
var data = $highlightedResults.data('data');
// Don't re-select already selected resulte
if (
@@ -4694,7 +4469,7 @@ S2.define('select2/dropdown/closeOnSelect',[
var originalEvent = evt.originalEvent;
// Don't close if the control key is being held
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
if (originalEvent && originalEvent.ctrlKey) {
return;
}
@@ -4748,9 +4523,6 @@ S2.define('select2/i18n/en',[],function () {
},
searching: function () {
return 'Searching…';
},
removeAllItems: function () {
return 'Remove all items';
}
};
});
@@ -4989,29 +4761,66 @@ S2.define('select2/defaults',[
);
}
// If the defaults were not previously applied from an element, it is
// possible for the language option to have not been resolved
options.language = this._resolveLanguage(options.language);
if (typeof options.language === 'string') {
// Check if the language is specified with a region
if (options.language.indexOf('-') > 0) {
// Extract the region information if it is included
var languageParts = options.language.split('-');
var baseLanguage = languageParts[0];
// Always fall back to English since it will always be complete
options.language.push('en');
var uniqueLanguages = [];
for (var l = 0; l < options.language.length; l++) {
var language = options.language[l];
if (uniqueLanguages.indexOf(language) === -1) {
uniqueLanguages.push(language);
options.language = [options.language, baseLanguage];
} else {
options.language = [options.language];
}
}
options.language = uniqueLanguages;
if ($.isArray(options.language)) {
var languages = new Translation();
options.language.push('en');
options.translations = this._processTranslations(
options.language,
options.debug
);
var languageNames = options.language;
for (var l = 0; l < languageNames.length; l++) {
var name = languageNames[l];
var language = {};
try {
// Try to load it with the original name
language = Translation.loadPath(name);
} catch (e) {
try {
// If we couldn't load it, check if it wasn't the full path
name = this.defaults.amdLanguageBase + name;
language = Translation.loadPath(name);
} catch (ex) {
// The translation could not be loaded at all. Sometimes this is
// because of a configuration problem, other times this can be
// because of how Select2 helps load all possible translation files.
if (options.debug && window.console && console.warn) {
console.warn(
'Select2: The language file for "' + name + '" could not be ' +
'automatically loaded. A fallback will be used instead.'
);
}
continue;
}
}
languages.extend(language);
}
options.translations = languages;
} else {
var baseTranslation = Translation.loadPath(
this.defaults.amdLanguageBase + 'en'
);
var customTranslation = new Translation(options.language);
customTranslation.extend(baseTranslation);
options.translations = customTranslation;
}
return options;
};
@@ -5078,14 +4887,13 @@ S2.define('select2/defaults',[
debug: false,
dropdownAutoWidth: false,
escapeMarkup: Utils.escapeMarkup,
language: {},
language: EnglishTranslation,
matcher: matcher,
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: false,
scrollAfterSelect: false,
sorter: function (data) {
return data;
},
@@ -5100,103 +4908,6 @@ S2.define('select2/defaults',[
};
};
Defaults.prototype.applyFromElement = function (options, $element) {
var optionLanguage = options.language;
var defaultLanguage = this.defaults.language;
var elementLanguage = $element.prop('lang');
var parentLanguage = $element.closest('[lang]').prop('lang');
var languages = Array.prototype.concat.call(
this._resolveLanguage(elementLanguage),
this._resolveLanguage(optionLanguage),
this._resolveLanguage(defaultLanguage),
this._resolveLanguage(parentLanguage)
);
options.language = languages;
return options;
};
Defaults.prototype._resolveLanguage = function (language) {
if (!language) {
return [];
}
if ($.isEmptyObject(language)) {
return [];
}
if ($.isPlainObject(language)) {
return [language];
}
var languages;
if (!$.isArray(language)) {
languages = [language];
} else {
languages = language;
}
var resolvedLanguages = [];
for (var l = 0; l < languages.length; l++) {
resolvedLanguages.push(languages[l]);
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
// Extract the region information if it is included
var languageParts = languages[l].split('-');
var baseLanguage = languageParts[0];
resolvedLanguages.push(baseLanguage);
}
}
return resolvedLanguages;
};
Defaults.prototype._processTranslations = function (languages, debug) {
var translations = new Translation();
for (var l = 0; l < languages.length; l++) {
var languageData = new Translation();
var language = languages[l];
if (typeof language === 'string') {
try {
// Try to load it with the original name
languageData = Translation.loadPath(language);
} catch (e) {
try {
// If we couldn't load it, check if it wasn't the full path
language = this.defaults.amdLanguageBase + language;
languageData = Translation.loadPath(language);
} catch (ex) {
// The translation could not be loaded at all. Sometimes this is
// because of a configuration problem, other times this can be
// because of how Select2 helps load all possible translation files
if (debug && window.console && console.warn) {
console.warn(
'Select2: The language file for "' + language + '" could ' +
'not be automatically loaded. A fallback will be used instead.'
);
}
}
}
} else if ($.isPlainObject(language)) {
languageData = new Translation(language);
} else {
languageData = language;
}
translations.extend(languageData);
}
return translations;
};
Defaults.prototype.set = function (key, value) {
var camelKey = $.camelCase(key);
@@ -5205,7 +4916,7 @@ S2.define('select2/defaults',[
var convertedData = Utils._convertData(data);
$.extend(true, this.defaults, convertedData);
$.extend(this.defaults, convertedData);
};
var defaults = new Defaults();
@@ -5226,10 +4937,6 @@ S2.define('select2/options',[
this.fromElement($element);
}
if ($element != null) {
this.options = Defaults.applyFromElement(this.options, $element);
}
this.options = Defaults.apply(this.options);
if ($element && $element.is('input')) {
@@ -5253,6 +4960,14 @@ S2.define('select2/options',[
this.options.disabled = $e.prop('disabled');
}
if (this.options.language == null) {
if ($e.prop('lang')) {
this.options.language = $e.prop('lang').toLowerCase();
} else if ($e.closest('[lang]').prop('lang')) {
this.options.language = $e.closest('[lang]').prop('lang');
}
}
if (this.options.dir == null) {
if ($e.prop('dir')) {
this.options.dir = $e.prop('dir');
@@ -5266,7 +4981,7 @@ S2.define('select2/options',[
$e.prop('disabled', this.options.disabled);
$e.prop('multiple', this.options.multiple);
if (Utils.GetData($e[0], 'select2Tags')) {
if ($e.data('select2Tags')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-select2-tags` attribute has been changed to ' +
@@ -5275,11 +4990,11 @@ S2.define('select2/options',[
);
}
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
Utils.StoreData($e[0], 'tags', true);
$e.data('data', $e.data('select2Tags'));
$e.data('tags', true);
}
if (Utils.GetData($e[0], 'ajaxUrl')) {
if ($e.data('ajaxUrl')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-ajax-url` attribute has been changed to ' +
@@ -5288,45 +5003,21 @@ S2.define('select2/options',[
);
}
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
$e.attr('ajax--url', $e.data('ajaxUrl'));
$e.data('ajax--url', $e.data('ajaxUrl'));
}
var dataset = {};
function upperCaseLetter(_, letter) {
return letter.toUpperCase();
}
// Pre-load all of the attributes which are prefixed with `data-`
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
var attributeName = $e[0].attributes[attr].name;
var prefix = 'data-';
if (attributeName.substr(0, prefix.length) == prefix) {
// Get the contents of the attribute after `data-`
var dataName = attributeName.substring(prefix.length);
// Get the data contents from the consistent source
// This is more than likely the jQuery data helper
var dataValue = Utils.GetData($e[0], dataName);
// camelCase the attribute name to match the spec
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
// Store the data attribute contents into the dataset since
dataset[camelDataName] = dataValue;
}
}
// Prefer the element's `dataset` attribute if it exists
// jQuery 1.x does not correctly handle data attributes with multiple dashes
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
dataset = $.extend(true, {}, $e[0].dataset, dataset);
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
} else {
dataset = $e.data();
}
// Prefer our internal data cache if it exists
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
var data = $.extend(true, {}, dataset);
data = Utils._convertData(data);
@@ -5363,8 +5054,8 @@ S2.define('select2/core',[
'./keys'
], function ($, Options, Utils, KEYS) {
var Select2 = function ($element, options) {
if (Utils.GetData($element[0], 'select2') != null) {
Utils.GetData($element[0], 'select2').destroy();
if ($element.data('select2') != null) {
$element.data('select2').destroy();
}
this.$element = $element;
@@ -5380,7 +5071,7 @@ S2.define('select2/core',[
// Set up the tabindex
var tabindex = $element.attr('tabindex') || 0;
Utils.StoreData($element[0], 'old-tabindex', tabindex);
$element.data('old-tabindex', tabindex);
$element.attr('tabindex', '-1');
// Set up containers and adapters
@@ -5441,9 +5132,6 @@ S2.define('select2/core',[
// Synchronize any monitored attributes
this._syncAttributes();
Utils.StoreData($element[0], 'select2', this);
// Ensure backwards compatibility with $element.data('select2').
$element.data('select2', this);
};
@@ -5520,12 +5208,6 @@ S2.define('select2/core',[
return null;
}
if (method == 'computedstyle') {
var computedStyle = window.getComputedStyle($element[0]);
return computedStyle.width;
}
return method;
};
@@ -5566,8 +5248,8 @@ S2.define('select2/core',[
if (observer != null) {
this._observer = new observer(function (mutations) {
self._syncA();
self._syncS(null, mutations);
$.each(mutations, self._syncA);
$.each(mutations, self._syncS);
});
this._observer.observe(this.$element[0], {
attributes: true,
@@ -5689,7 +5371,7 @@ S2.define('select2/core',[
if (self.isOpen()) {
if (key === KEYS.ESC || key === KEYS.TAB ||
(key === KEYS.UP && evt.altKey)) {
self.close(evt);
self.close();
evt.preventDefault();
} else if (key === KEYS.ENTER) {
@@ -5723,7 +5405,7 @@ S2.define('select2/core',[
Select2.prototype._syncAttributes = function () {
this.options.set('disabled', this.$element.prop('disabled'));
if (this.isDisabled()) {
if (this.options.get('disabled')) {
if (this.isOpen()) {
this.close();
}
@@ -5734,7 +5416,7 @@ S2.define('select2/core',[
}
};
Select2.prototype._isChangeMutation = function (evt, mutations) {
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = false;
var self = this;
@@ -5762,22 +5444,7 @@ S2.define('select2/core',[
}
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
changed = true;
} else if ($.isArray(mutations)) {
$.each(mutations, function(evt, mutation) {
if (self._isChangeMutation(evt, mutation)) {
// We've found a change mutation.
// Let's escape from the loop and continue
changed = true;
return false;
}
});
}
return changed;
};
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = this._isChangeMutation(evt, mutations);
var self = this;
// Only re-pull the data if we think there is a change
if (changed) {
@@ -5799,8 +5466,7 @@ S2.define('select2/core',[
'open': 'opening',
'close': 'closing',
'select': 'selecting',
'unselect': 'unselecting',
'clear': 'clearing'
'unselect': 'unselecting'
};
if (args === undefined) {
@@ -5828,7 +5494,7 @@ S2.define('select2/core',[
};
Select2.prototype.toggleDropdown = function () {
if (this.isDisabled()) {
if (this.options.get('disabled')) {
return;
}
@@ -5844,40 +5510,15 @@ S2.define('select2/core',[
return;
}
if (this.isDisabled()) {
return;
}
this.trigger('query', {});
};
Select2.prototype.close = function (evt) {
Select2.prototype.close = function () {
if (!this.isOpen()) {
return;
}
this.trigger('close', { originalEvent : evt });
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
Select2.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
Select2.prototype.isDisabled = function () {
return this.options.get('disabled');
this.trigger('close', {});
};
Select2.prototype.isOpen = function () {
@@ -5954,7 +5595,7 @@ S2.define('select2/core',[
});
}
this.$element.val(newVal).trigger('input').trigger('change');
this.$element.val(newVal).trigger('change');
};
Select2.prototype.destroy = function () {
@@ -5980,12 +5621,10 @@ S2.define('select2/core',[
this._syncS = null;
this.$element.off('.select2');
this.$element.attr('tabindex',
Utils.GetData(this.$element[0], 'old-tabindex'));
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
this.$element.removeClass('select2-hidden-accessible');
this.$element.attr('aria-hidden', 'false');
Utils.RemoveData(this.$element[0]);
this.$element.removeData('select2');
this.dataAdapter.destroy();
@@ -6013,7 +5652,7 @@ S2.define('select2/core',[
this.$container.addClass('select2-container--' + this.options.get('theme'));
Utils.StoreData($container[0], 'element', this.$element);
$container.data('element', this.$element);
return $container;
};
@@ -6033,9 +5672,8 @@ S2.define('jquery.select2',[
'jquery-mousewheel',
'./select2/core',
'./select2/defaults',
'./select2/utils'
], function ($, _, Select2, Defaults, Utils) {
'./select2/defaults'
], function ($, _, Select2, Defaults) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];
@@ -6056,7 +5694,7 @@ S2.define('jquery.select2',[
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = Utils.GetData(this, 'select2');
var instance = $(this).data('select2');
if (instance == null && window.console && console.error) {
console.error(
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -2
View File
File diff suppressed because one or more lines are too long
+69 -101
View File
@@ -1,56 +1,54 @@
<?php
namespace sammo;
define('ROOT', realpath(__DIR__ . '/..'));
define('ROOT', realpath(__dir__.'/..'));
setlocale(LC_ALL, 'ko_KR.UTF-8');
date_default_timezone_set('Asia/Seoul');
mb_internal_encoding("UTF-8");
mb_http_output('UTF-8');
mb_regex_encoding('UTF-8');
mb_regex_encoding('UTF-8');
ini_set("session.cache_expire", '10080'); // minutes
ini_set("session.gc_maxlifetime", '604800'); // seconds
ini_set("session.cache_expire", 10080); // minutes
ini_set("session.gc_maxlifetime", 604800); // seconds
function getFriendlyErrorType($type)
{
switch ($type) {
case E_ERROR: // 1 //
return 'E_ERROR';
case E_WARNING: // 2 //
return 'E_WARNING';
case E_PARSE: // 4 //
return 'E_PARSE';
case E_NOTICE: // 8 //
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "{$type}";
function getFriendlyErrorType($type)
{
switch($type)
{
case E_ERROR: // 1 //
return 'E_ERROR';
case E_WARNING: // 2 //
return 'E_WARNING';
case E_PARSE: // 4 //
return 'E_PARSE';
case E_NOTICE: // 8 //
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "{$type}";
}
function getExceptionTraceAsString($exception)
{
function getExceptionTraceAsString($exception) {
//https://gist.github.com/abtris/1437966
$rtn = "";
$count = 0;
@@ -74,105 +72,75 @@ function getExceptionTraceAsString($exception)
$args[] = get_resource_type($arg);
} else {
$args[] = $arg;
}
}
}
}
$args = join(", ", $args);
}
$rtn[] = sprintf(
"#%s %s:%s %s(%s)",
$count,
isset($frame['file']) ? $frame['file'] : 'unknown file',
isset($frame['line']) ? $frame['line'] : 'unknown line',
(isset($frame['class'])) ? $frame['class'] . $frame['type'] . $frame['function'] : $frame['function'],
$args
);
$rtn[] = sprintf( "#%s %s:%s %s(%s)",
$count,
isset($frame['file']) ? $frame['file'] : 'unknown file',
isset($frame['line']) ? $frame['line'] : 'unknown line',
(isset($frame['class'])) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'],
$args );
$count++;
}
return $rtn;
}
function logError(string $err, string $errstr, string $errpath, array $trace)
{
$fdb = FileDB::db(ROOT . '/d_log/err_log.sqlite3', ROOT . '/f_install/sql/err_log.sql');
function logError(string $err, string $errstr, string $errpath, array $trace){
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
$date = date("Ymd_His");
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
$trace = array_map(function (string $text) {
$trace = array_map(function(string $text){
return str_replace(ROOT, '{ROOT}', $text);
}, $trace);
$owner = Util::get_client_ip();
$session = Session::getInstance();
if ($session->isLoggedIn(true)) {
$owner .= '(' . $session->getUserID() . ',' . $session->userName . ')';
if($session->isLoggedIn(true)){
$owner .= '('.$session->getUserID().','.$session->userName.')';
}
$fdb->insert('err_log', [
'date' => $date,
'err' => $err,
'errstr' => $errstr,
'errpath' => $errpath,
'trace' => Json::encode($trace),
'webuser' => $owner
'date'=>$date,
'err'=>$err,
'errstr'=>$errstr,
'errpath'=>$errpath,
'trace'=>Json::encode($trace),
'webuser'=>$owner
]);
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext=null)
{
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
// through to the standard PHP error handler
return false;
}
$e = new \Exception();
logError(
getFriendlyErrorType($errno),
$errstr,
$errfile . ':' . $errline,
$errfile.':'.$errline,
getExceptionTraceAsString($e)
);
}
set_error_handler("\\sammo\\logErrorByCustomHandler");
set_error_handler("\sammo\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e)
{
function logExceptionByCustomHandler(\Throwable $e){
logError(
get_class($e),
$e->getMessage(),
$e->getFile() . ':' . $e->getLine(),
$e->getFile().':'.$e->getLine(),
getExceptionTraceAsString($e)
);
echo $e->getTraceAsString();
throw $e;
}
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
function getAPIExecutorClass($path){
static $basePath = __NAMESPACE__.'\\API\\';
if(is_string($path)){
}
else if(is_array($path)){
$path = join('\\', $path);
}
else{
throw new \InvalidArgumentException("{$path}는 올바른 API 지시자가 아님");
}
$classPath = str_replace('/', '\\', $basePath.$path);
if(class_exists($classPath)){
return $classPath;
}
throw new \InvalidArgumentException("{$path}는 올바른 API 경로가 아님");
}
function buildAPIExecutorClass($type, string $rootPath, array $args):\sammo\BaseAPI{
$class = getAPIExecutorClass($type);
return new $class($rootPath, $args);
}
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
+175 -164
View File
@@ -1,191 +1,202 @@
<?php
namespace sammo;
require(__DIR__ . '/../vendor/autoload.php');
require(__dir__.'/../vendor/autoload.php');
?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>설치</title>
<?php /* NOTE: 설치 이전에는 ServConfig가 준비되어있지 않으므로 예외로 수동 지정 */ ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/gateway/vendors.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/vendor.css') ?>
<?= WebUtil::printJS('../dist_js/gateway/common_ts.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/common_ts.css') ?>
<?= WebUtil::printJS('../dist_js/gateway/install.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/install.css') ?>
<?= WebUtil::printCSS('../css/install.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.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">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
<div class="row justify-content-md-center">
<div class="col col-12 col-md-10 col-lg-7">
<div class="card" id="db_form_card" style="display:none">
<h3 class="card-header">
설치(DB 설정)
</h3>
<div class="card-body">
<form id="db_form" method="post" action="#">
<div class="form-group row">
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
</div>
</div>
<div class="form-group row">
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
</div>
</div>
<div class="form-group row">
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정" />
</div>
</div>
<div class="form-group row">
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호" />
</div>
</div>
<div class="form-group row">
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo)" />
</div>
</div>
<div class="form-group row">
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="serv_host" id="serv_host" placeholder="접속경로(예:http://www.example.com)" />
</div>
</div>
<div class="form-group row">
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path" placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/icons" />
</div>
</div>
<div class="form-group row">
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="game_image_path" id="game_image_path" placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/game" />
</div>
</div>
<div class="form-group row">
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 </label>
<div class="input-group col-sm-8">
<input type="text" class="form-control" name="image_request_key" id="image_request_key" placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게" value="" />
<div class="input-group-text">
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
</div>
</div>
</div>
<hr style="width:100%; border-top: 1px solid lightgray;">
<div class="form-group row">
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key" placeholder="카카오톡 API의 Rest Key" value="" />
</div>
</div>
<div class="form-group row">
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key" placeholder="카카오톡 API의 Admin Key" value="" />
</div>
</div>
<div class="form-group row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
</div>
</div>
</form>
<div class="col col-12 col-md-10 col-lg-7">
<div class="card" id="db_form_card" style="display:none">
<h3 class="card-header">
설치(DB 설정)
</h3>
<div class="card-body">
<form id="db_form" method="post" action="#">
<div class="form-group row">
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_host" id="db_host"
placeholder="호스트" value="localhost" />
</div>
</div>
</div>
<!--DB -->
<div class="card" id="admin_form_card" style="display:none">
<h3 class="card-header">
설치(관리자 생성)
</h3>
<div class="card-body">
<form id="admin_form" method="post" action="#">
<div class="form-group row">
<label for="username" class="col-sm-3 col-form-label">계정명</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="username" id="username" placeholder="계정명" />
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="password" id="password" placeholder="비밀번호" />
</div>
</div>
<div class="form-group row">
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="비밀번호 확인" />
</div>
</div>
<div class="form-group row">
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nickname" id="nickname" placeholder="닉네임" value="운영자" />
</div>
</div>
<input type="hidden" id="global_salt" name="global_salt">
<div class="form-group row">
<div class="col-sm-3"></div>
<div class="col-sm-9">
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
</div>
</div>
</form>
<div class="form-group row">
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_port" id="db_port"
placeholder="접속 포트" value="3306" />
</div>
</div>
<div class="form-group row">
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
</div>
</div>
</div>
<!--ADMIN -->
<!-- TODO: conf_kakao.php -->
<div class="form-group row">
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="db_pw" id="db_pw"
placeholder="DB비밀번호"/>
</div>
</div>
<div class="form-group row">
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="db_name" id="db_name"
placeholder="DB명(예:sammo)"/>
</div>
</div>
<div class="form-group row">
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="serv_host" id="serv_host"
placeholder="접속경로(예:http://www.example.com)"/>
</div>
</div>
<div class="form-group row">
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/icons" />
</div>
</div>
<div class="form-group row">
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/game" />
</div>
</div>
<div class="form-group row">
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 </label>
<div class="input-group col-sm-8">
<input type="text" class="form-control" name="image_request_key" id="image_request_key"
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게"
value="" />
<div class="input-group-append">
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
</div>
</div>
</div>
<hr style="width:100%; border-top: 1px solid lightgray;">
<div class="form-group row">
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key"
placeholder="카카오톡 API의 Rest Key"
value="" />
</div>
</div>
<div class="form-group row">
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key"
placeholder="카카오톡 API의 Admin Key"
value="" />
</div>
</div>
<div class="form-group row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<button type="submit"
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
</div>
</div>
</form>
</div>
</div><!--DB -->
<div class="card" id="admin_form_card" style="display:none">
<h3 class="card-header">
설치(관리자 생성)
</h3>
<div class="card-body">
<form id="admin_form" method="post" action="#">
<div class="form-group row">
<label for="username" class="col-sm-3 col-form-label">계정명</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="username" id="username"
placeholder="계정명"/>
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="password" id="password"
placeholder="비밀번호"/>
</div>
</div>
<div class="form-group row">
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
placeholder="비밀번호 확인"/>
</div>
</div>
<div class="form-group row">
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nickname" id="nickname"
placeholder="닉네임" value="운영자"/>
</div>
</div>
<input type="hidden" id="global_salt" name="global_salt">
<div class="form-group row">
<div class="col-sm-3"></div>
<div class="col-sm-9">
<button type="submit"
class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
</div>
</div>
</form>
</div>
</div><!--ADMIN -->
<!-- TODO: conf_kakao.php -->
</div>
</div>
</div>
</body>
</html>
</html>
+33 -34
View File
@@ -1,34 +1,33 @@
<?php
namespace sammo;
require(__DIR__ . '/../vendor/autoload.php');
require(__dir__.'/../vendor/autoload.php');
session_start();
session_destroy();
$username = mb_strtolower(Util::getPost('username'), 'utf-8');
$password = Util::getPost('password', 'string');
$nickname = Util::getPost('nickname');
$username = mb_strtolower(Util::getReq('username'), 'utf-8');
$password = Util::getReq('password', 'string');
$nickname = Util::getReq('nickname');
if (!$username || !$password || !$nickname) {
if(!$username || !$password || !$nickname){
Json::die([
'result' => false,
'reason' => '입력값이 설정되지 않았습니다.'
'result'=>false,
'reason'=>'입력값이 설정되지 않았습니다.'
]);
}
if (strlen((string) $password) != 128) {
if(strlen((string)$password)!=128){
Json::die([
'result' => false,
'reason' => '올바르지 않은 비밀번호 해시 포맷입니다.'
'result'=>false,
'reason'=>'올바르지 않은 비밀번호 해시 포맷입니다.'
]);
}
if (!class_exists('\\sammo\\RootDB')) {
if(!class_exists('\\sammo\\RootDB')){
Json::die([
'result' => false,
'reason' => 'DB 설정이 완료되지 않았습니다.'
'result'=>false,
'reason'=>'DB 설정이 완료되지 않았습니다.'
]);
}
@@ -38,43 +37,43 @@ $rootDB = RootDB::db();
$rootDB->query('LOCK TABLES member WRITE, member_log WRITE');
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
if ($memberCnt > 0) {
if($memberCnt > 0){
Json::die([
'result' => 'false',
'reason' => '이미 계정이 생성되어 있습니다'
'result'=>'false',
'reason'=>'이미 계정이 생성되어 있습니다'
]);
}
$userSalt = bin2hex(random_bytes(8));
$finalPassword = Util::hashPassword($userSalt, $password);
$nowDate = TimeUtil::now();
$nowDate = TimeUtil::DatetimeNow();
$rootDB->insert('member', [
$rootDB->insert('member',[
'oauth_type' => 'NONE',
'id' => $username,
'email' => null,
'token_valid_until' => '2999-01-01 00:00:00',
'token_valid_until'=>'2999-01-01 00:00:00',
'pw' => $finalPassword,
'salt' => $userSalt,
'grade' => 6,
'name' => $nickname,
'reg_date' => $nowDate
'grade'=> 6,
'name'=>$nickname,
'reg_date'=>$nowDate
]);
$userID = $rootDB->insertId();
$rootDB->insert('member_log', [
'member_no' => $userID,
'date' => $nowDate,
'action_type' => 'reg',
'action' => Json::encode([
'type' => 'none',
'aux' => 'admin',
'id' => $username,
'name' => $nickname
'member_no'=>$userID,
'date'=>$nowDate,
'action_type'=>'reg',
'action'=>Json::encode([
'type'=>'none',
'aux'=>'admin',
'id'=>$username,
'name'=>$nickname
])
]);
Json::die([
'result' => true,
'reason' => 'success'
]);
'result'=>true,
'reason'=>'success'
]);
+12 -13
View File
@@ -1,39 +1,38 @@
<?php
namespace sammo;
require(__DIR__ . '/../vendor/autoload.php');
require(__dir__.'/../vendor/autoload.php');
if (!class_exists('\\sammo\\RootDB')) {
if(!class_exists('\\sammo\\RootDB')){
Json::die([
'step' => 'config'
'step'=>'config'
]);
}
$rootDB = RootDB::db();
$rootDB->throw_exception_on_nonsql_error = false;
$rootDB->nonsql_error_handler = function ($params) {
$rootDB->nonsql_error_handler = function($params){
Json::die([
'step' => 'conn_fail'
'step'=>'conn_fail'
]);
};
$rootDB->error_handler = function ($params) {
$rootDB->error_handler = function($params){
Json::die([
'step' => 'sql_fail'
'step'=>'sql_fail'
]);
};
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
if ($memberCnt == 0) {
if($memberCnt == 0){
Json::die([
'step' => 'admin',
'globalSalt' => RootDB::getGlobalSalt()
'step'=>'admin',
'globalSalt'=>RootDB::getGlobalSalt()
]);
}
Json::die([
'step' => 'done'
]);
'step'=>'done'
]);
+303 -313
View File
@@ -1,313 +1,303 @@
<?php
namespace sammo;
require(__DIR__ . '/../vendor/autoload.php');
$host = Util::getPost('db_host');
$port = Util::getPost('db_port', 'int');
$username = Util::getPost('db_id');
$password = Util::getPost('db_pw');
$dbName = Util::getPost('db_name');
$servHost = Util::getPost('serv_host');
$sharedIconPath = Util::getPost('shared_icon_path');
$gameImagePath = Util::getPost('game_image_path');
$imageRequestKey = Util::getPost('image_request_key');
$kakaoRESTKey = Util::getPost('kakao_rest_key', 'string', '');
$kakaoAdminKey = Util::getPost('kakao_admin_key', 'string', '');
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
Json::die([
'result' => false,
'reason' => '입력 값이 올바르지 않습니다'
]);
}
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
Json::die([
'result' => false,
'reason' => '접속 경로가 올바르지 않습니다.'
]);
}
if (file_exists(ROOT . '/d_setting/RootDB.php') && is_dir(ROOT . '/d_setting/RootDB.php')) {
Json::die([
'result' => false,
'reason' => 'd_setting/RootDB.php 가 디렉토리입니다'
]);
}
if (class_exists('\\sammo\\RootDB')) {
Json::die([
'result' => false,
'reason' => '이미 RootDB.php 파일이 있습니다'
]);
}
//파일 권한 검사
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
Json::die([
'result' => false,
'reason' => AppConf::$userIconPath . ' 이 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT . '/d_log') && !is_dir(ROOT . '/d_log')) {
Json::die([
'result' => false,
'reason' => 'd_log 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT . '/d_shared') && !is_dir(ROOT . '/d_shared')) {
Json::die([
'result' => false,
'reason' => 'd_shared 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT . '/d_setting') && !is_dir(ROOT . '/d_setting')) {
Json::die([
'result' => false,
'reason' => 'd_shared 가 디렉토리가 아닙니다'
]);
}
if (
!file_exists(ROOT . '/d_log')
|| !file_exists(ROOT . '/d_shared')
|| !file_exists(ROOT . '/d_setting')
|| !file_exists(AppConf::getUserIconPathFS())
) {
if (!is_writable(ROOT)) {
Json::die([
'result' => false,
'reason' => '하위 디렉토리 생성 권한이 없습니다'
]);
}
//기본 파일 생성
if (!file_exists(AppConf::getUserIconPathFS())) {
mkdir(AppConf::getUserIconPathFS());
}
if (!file_exists(ROOT . '/d_log')) {
mkdir(ROOT . '/d_log');
}
if (!file_exists(ROOT . '/d_setting')) {
mkdir(ROOT . '/d_setting');
}
if (!file_exists(ROOT . '/d_shared')) {
mkdir(ROOT . '/d_shared');
}
}
if (!is_writable(AppConf::getUserIconPathFS())) {
Json::die([
'result' => false,
'reason' => AppConf::$userIconPath . ' 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT . '/d_log')) {
Json::die([
'result' => false,
'reason' => 'd_log 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT . '/d_shared')) {
Json::die([
'result' => false,
'reason' => 'd_shared 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT . '/d_setting')) {
Json::die([
'result' => false,
'reason' => 'd_setting 디렉토리의 쓰기 권한이 없습니다.'
]);
}
if (!file_exists(ROOT . '/d_log/.htaccess')) {
@file_put_contents(ROOT . '/d_log/.htaccess', 'Deny from all');
}
if (!file_exists(ROOT . '/d_setting/.htaccess')) {
@file_put_contents(ROOT . '/d_setting/.htaccess', 'Deny from all');
}
//DB 접근 권한 검사
$rootDB = new \MeekroDB($host, $username, $password, $dbName, $port, 'utf8mb4');
$rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
$rootDB->throw_exception_on_nonsql_error = false;
$rootDB->nonsql_error_handler = function ($params) {
Json::die([
'result' => false,
'reason' => 'DB 접속에 실패했습니다.'
]);
};
$rootDB->error_handler = function ($params) {
Json::die([
'result' => false,
'reason' => 'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
]);
};
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
if ($mysqli_obj->multi_query(file_get_contents(__DIR__ . '/sql/common_schema.sql'))) {
while (true) {
if (!$mysqli_obj->more_results()) {
break;
}
if (!$mysqli_obj->next_result()) {
break;
}
}
}
$rootDB->insert('system', array(
'REG' => 'N',
'LOGIN' => 'N',
'CRT_DATE' => TimeUtil::now(),
'MDF_DATE' => TimeUtil::now()
));
$globalSalt = bin2hex(random_bytes(16));
'@phan-var-force string $servHost';
'@phan-var-force string $sharedIconPath';
'@phan-var-force string $gameImagePath';
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$imageRequestPath = WebUtil::resolveRelativePath($gameImagePath . '/../hook/git_pull.php', $servHost);
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath . '/../hook/InstallKey.php', $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath,
'imageRequestPath' => $imageRequestPath,
'imageRequestKey' => $imageRequestKey,
'serverList' => [
['che', '체', 'white'],
['kwe', '퀘', 'yellow'],
['pwe', '풰', 'orange'],
['twe', '퉤', 'magenta'],
['nya', '냐', '#e67e22'],
['pya', '퍄', '#9b59b6']
]
],
true
);
if ($imageRequestKey) {
@file_get_contents($imageKeyInstallPath . '?key=' . $imageRequestKey);
}
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/common_path.orig.js',
ROOT . '/d_shared/common_path.js',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/menu.orig.json',
ROOT . '/d_shared/menu.json',
[],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/common.orig.css',
ROOT . '/d_shared/common.css',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/RootDB.orig.php',
ROOT . '/d_setting/RootDB.php',
[
'host' => $host,
'user' => $username,
'password' => $password,
'dbName' => $dbName,
'port' => $port,
'globalSalt' => $globalSalt,
]
);
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost . '/');
Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/KakaoKey.orig.php',
ROOT . '/d_setting/KakaoKey.php',
[
'REST_API_KEY' => $kakaoRESTKey,
'ADMIN_KEY' => $kakaoAdminKey,
'REDIRECT_URI' => $kakaoRedirectURI
],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
]);
}
Json::die([
'result' => true,
'reason' => 'success',
'globalSalt' => $globalSalt
]);
<?php
namespace sammo;
require(__dir__.'/../vendor/autoload.php');
$host = Util::getReq('db_host');
$port = Util::getReq('db_port', 'int');
$username = Util::getReq('db_id');
$password = Util::getReq('db_pw');
$dbName = Util::getReq('db_name');
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
$imageRequestKey = Util::getReq('image_request_key');
$kakaoRESTKey = Util::getReq('kakao_rest_key', 'string', '');
$kakaoAdminKey = Util::getReq('kakao_admin_key', 'string', '');
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
Json::die([
'result'=>false,
'reason'=>'입력 값이 올바르지 않습니다'
]);
}
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
Json::die([
'result'=>false,
'reason'=>'접속 경로가 올바르지 않습니다.'
]);
}
if (file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')) {
Json::die([
'result'=>false,
'reason'=>'d_setting/RootDB.php 가 디렉토리입니다'
]);
}
if (class_exists('\\sammo\\RootDB')) {
Json::die([
'result'=>false,
'reason'=>'이미 RootDB.php 파일이 있습니다'
]);
}
//파일 권한 검사
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
Json::die([
'result'=>false,
'reason'=>AppConf::$userIconPath.' 이 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')) {
Json::die([
'result'=>false,
'reason'=>'d_log 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 가 디렉토리가 아닙니다'
]);
}
if (file_exists(ROOT.'/d_setting') && !is_dir(ROOT.'/d_setting')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 가 디렉토리가 아닙니다'
]);
}
if (!file_exists(ROOT.'/d_log')
|| !file_exists(ROOT.'/d_shared')
|| !file_exists(ROOT.'/d_setting')
|| !file_exists(AppConf::getUserIconPathFS())
) {
if (!is_writable(ROOT)) {
Json::die([
'result'=>false,
'reason'=>'하위 디렉토리 생성 권한이 없습니다'
]);
}
//기본 파일 생성
if (!file_exists(AppConf::getUserIconPathFS())) {
mkdir(AppConf::getUserIconPathFS());
}
if (!file_exists(ROOT.'/d_log')) {
mkdir(ROOT.'/d_log');
}
if (!file_exists(ROOT.'/d_setting')) {
mkdir(ROOT.'/d_setting');
}
if (!file_exists(ROOT.'/d_shared')) {
mkdir(ROOT.'/d_shared');
}
}
if (!is_writable(AppConf::getUserIconPathFS())) {
Json::die([
'result'=>false,
'reason'=>AppConf::$userIconPath.' 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_log')) {
Json::die([
'result'=>false,
'reason'=>'d_log 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_shared')) {
Json::die([
'result'=>false,
'reason'=>'d_shared 디렉토리의 쓰기 권한이 없습니다'
]);
}
if (!is_writable(ROOT.'/d_setting')) {
Json::die([
'result'=>false,
'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다.'
]);
}
if (!file_exists(ROOT.'/d_log/.htaccess')) {
@file_put_contents(ROOT.'/d_log/.htaccess', 'Deny from all');
}
if (!file_exists(ROOT.'/d_setting/.htaccess')) {
@file_put_contents(ROOT.'/d_setting/.htaccess', 'Deny from all');
}
//DB 접근 권한 검사
$rootDB = new \MeekroDB($host, $username, $password, $dbName, $port, 'utf8mb4');
$rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
$rootDB->throw_exception_on_nonsql_error = false;
$rootDB->nonsql_error_handler = function ($params) {
Json::die([
'result'=>false,
'reason'=>'DB 접속에 실패했습니다.'
]);
};
$rootDB->error_handler = function ($params) {
Json::die([
'result'=>false,
'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
]);
};
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) {
while (true) {
if (!$mysqli_obj->more_results()) {
break;
}
if (!$mysqli_obj->next_result()) {
break;
}
}
}
$rootDB->insert('system', array(
'REG' => 'N',
'LOGIN' => 'N',
'CRT_DATE' => TimeUtil::DatetimeNow(),
'MDF_DATE' => TimeUtil::DatetimeNow()
));
$globalSalt = bin2hex(random_bytes(16));
'@phan-var-force string $servHost';
'@phan-var-force string $sharedIconPath';
'@phan-var-force string $gameImagePath';
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$imageRequestPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/git_pull.php', $servHost);
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/InstallKey.php', $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath,
'imageRequestPath'=>$imageRequestPath,
'imageRequestKey'=>$imageRequestKey
],
true
);
if($imageRequestKey){
@file_get_contents($imageKeyInstallPath.'?key='.$imageRequestKey);
}
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/menu.orig.json',
ROOT.'/d_shared/menu.json',
[],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
[
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
$result = Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/RootDB.orig.php',
ROOT.'/d_setting/RootDB.php',
[
'host'=>$host,
'user'=>$username,
'password'=>$password,
'dbName'=>$dbName,
'port'=>$port,
'globalSalt'=>$globalSalt,
]
);
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost.'/');
Util::generateFileUsingSimpleTemplate(
__dir__.'/templates/KakaoKey.orig.php',
ROOT.'/d_setting/KakaoKey.php',
[
'REST_API_KEY'=>$kakaoRESTKey,
'ADMIN_KEY'=>$kakaoAdminKey,
'REDIRECT_URI'=>$kakaoRedirectURI
],
true
);
if ($result !== true) {
Json::die([
'result'=>false,
'reason'=>$result
]);
}
Json::die([
'result'=>true,
'reason'=>'success',
'globalSalt'=>$globalSalt
]);
+47 -44
View File
@@ -1,26 +1,25 @@
<?php
namespace sammo;
require(__DIR__ . '/../vendor/autoload.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::requireLogin([])->setReadOnly();
if ($session->userGrade < 6) {
if($session->userGrade < 6){
Json::die([
'result' => false,
'reason' => '관리자 아님'
'result'=>false,
'reason'=>'관리자 아님'
]);
}
$servHost = Util::getPost('serv_host');
$sharedIconPath = Util::getPost('shared_icon_path');
$gameImagePath = Util::getPost('game_image_path');
$servHost = Util::getReq('serv_host');
$sharedIconPath = Util::getReq('shared_icon_path');
$gameImagePath = Util::getReq('game_image_path');
if ($servHost) {
if (!$sharedIconPath || $gameImagePath) {
if($servHost){
if(!$sharedIconPath || $gameImagePath){
Json::die([
'result' => false,
'reason' => 'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
'result'=>false,
'reason'=>'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
]);
}
@@ -28,54 +27,58 @@ if ($servHost) {
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
__dir__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
'result'=>false,
'reason'=>$result
]);
}
} else if ($sharedIconPath || $gameImagePath) {
}
else if($sharedIconPath || $gameImagePath){
$servHost = ServConfig::$serverWebPath;
if ($sharedIconPath) {
if($sharedIconPath){
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
} else {
}
else{
$sharedIconPath = ServConfig::$sharedIconPath;
}
if ($gameImagePath) {
if($gameImagePath){
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
} else {
}
else{
$gameImagePath = ServConfig::$gameImagePath;
}
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/ServConfig.orig.php',
ROOT . '/d_setting/ServConfig.php',
__dir__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
'result'=>false,
'reason'=>$result
]);
}
} else {
}
else{
$servHost = ServConfig::$serverWebPath;
$sharedIconPath = ServConfig::$sharedIconPath;
$gameImagePath = ServConfig::$gameImagePath;
@@ -84,31 +87,31 @@ if ($servHost) {
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/common_path.orig.js',
ROOT . '/d_shared/common_path.js',
__dir__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
$result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/templates/common.orig.css',
ROOT . '/d_shared/common.css',
__dir__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
[
'serverBasePath' => $servHost,
'sharedIconPath' => $sharedIconPath,
'gameImagePath' => $gameImagePath
'serverBasePath'=>$servHost,
'sharedIconPath'=>$sharedIconPath,
'gameImagePath'=>$gameImagePath
],
true
);
if ($result !== true) {
Json::die([
'result' => false,
'reason' => $result
'result'=>false,
'reason'=>$result
]);
}
+4 -19
View File
@@ -14,7 +14,7 @@ CREATE TABLE `system` (
`MDF_DATE` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`NO`)
)
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 회원 테이블
CREATE TABLE `member` (
@@ -45,7 +45,7 @@ CREATE TABLE `member` (
UNIQUE INDEX `kauth_id` (`oauth_id`),
INDEX `delete_after` (`delete_after`)
)
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 로그인 로그 테이블
CREATE TABLE `member_log` (
@@ -58,7 +58,7 @@ CREATE TABLE `member_log` (
INDEX `action` (`member_no`, `action_type`, `date`),
INDEX `member` (`member_no`, `date`)
)
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
###################
# KV storage
@@ -72,19 +72,4 @@ CREATE TABLE if not exists `storage` (
UNIQUE INDEX `key` (`namespace`, `key`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=Aria;
CREATE TABLE `login_token` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_id` INT(11) NOT NULL,
`base_token` VARCHAR(20) NOT NULL COLLATE 'utf8mb4_general_ci',
`reg_ip` VARCHAR(40) NOT NULL COLLATE 'utf8mb4_general_ci',
`reg_date` DATETIME NOT NULL,
`expire_date` DATETIME NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `by_token` (`base_token`),
INDEX `by_date` (`user_id`, `expire_date`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=Aria
;
ENGINE=MyISAM
-1
View File
@@ -1,7 +1,6 @@
<?php
namespace kakao;
// @suppress PhanRedefineClass
class KakaoKey{
const REST_KEY = '_tK_REST_API_KEY_';
const ADMIN_KEY = '_tK_ADMIN_KEY_';
+1 -34
View File
@@ -1,16 +1,9 @@
<?php
namespace sammo;
//https://hub.packtpub.com/eloquent-without-laravel/
use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
class RootDB
{
private static $uDB = null;
private static ?Capsule $uIlluminate = null;
private static $host = '_tK_host_';
private static $user = '_tK_user_';
@@ -18,8 +11,6 @@ class RootDB
private static $dbName = '_tK_dbName_';
private static $port = _tK_port_;
private static $encoding = 'utf8mb4';
private static $collation = 'utf8mb4_general_ci';
private static $globalSalt = '_tK_globalSalt_';
@@ -27,29 +18,6 @@ class RootDB
{
}
public static function illuminate(): Capsule
{
if(self::$uIlluminate !== null){
return self::$uIlluminate;
}
$capsule = new Capsule;
$capsule->addConnection([
'driver' => 'mysql',
'host' => self::$host,
'database' => self::$dbName,
'username' => self::$user,
'password' => self::$password,
'charset' => self::$encoding,
'collation' => self::$collation,
], 'root');
$capsule->setEventDispatcher(new Dispatcher(new Container));
$capsule->bootEloquent();
self::$uIlluminate = $capsule;
return $capsule;
}
/**
* DB 객체 생성
*
@@ -62,8 +30,7 @@ class RootDB
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
self::$uDB->error_handler = function () {
};
self::$uDB->error_handler= function(){};
self::$uDB->throw_exception_on_error = true;
self::$uDB->throw_exception_on_nonsql_error = true;
}
+54 -74
View File
@@ -1,74 +1,54 @@
<?php
namespace sammo;
class ServConfig
{
private function __construct()
{
}
public static $serverWebPath = '_tK_serverBasePath_';
public static $sharedIconPath = '_tK_sharedIconPath_';
public static $gameImagePath = "_tK_gameImagePath_";
public static $imageRequestPath = "_tK_imageRequestPath_";
public static $imageRequestKey = '_tK_imageRequestKey_';
private static $serverList = null;
public static function getSharedIconPath(string $filepath = ''): string
{
if ($filepath) {
return static::$sharedIconPath . "/{$filepath}";
}
return static::$sharedIconPath;
}
public static function getUserIconPath(string $filepath = ''): string
{
return AppConf::getUserIconPathWeb($filepath);
}
public static function getGameImagePath(string $filepath = ''): string
{
if ($filepath) {
return static::$gameImagePath . "/{$filepath}";
}
return static::$gameImagePath;
}
public static function getImagePullURI(): string
{
$now = time();
$req_hash = Util::hashPassword(sprintf("%016x", $now), static::$imageRequestKey);
return static::$imageRequestPath . "?req={$req_hash}&time={$now}";
}
/**
* 서버 설정 반환
*
* @return \sammo\Setting[]
*/
public static function getServerList(): array{
$servKeyList = [/*_tK_serverList_*/];
$servKeyList[] = ['hwe', '훼', 'red'];
if (self::$serverList === null) {
self::$serverList = [];
foreach($servKeyList as [$servKey, $servNick, $servColor]){
self::$serverList[$servKey] = new Setting(ROOT.'/'.$servKey, $servNick, $servColor);
}
}
return self::$serverList;
}
/**
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
*
* @return string
*/
public static function getServerBasepath(): string
{
return self::$serverWebPath;
}
}
<?php
namespace sammo;
class ServConfig
{
private function __construct()
{
}
public static $serverWebPath = '_tK_serverBasePath_';
public static $sharedIconPath = '_tK_sharedIconPath_';
public static $gameImagePath = "_tK_gameImagePath_";
public static $imageRequestPath = "_tK_imageRequestPath_";
public static $imageRequestKey = '_tK_imageRequestKey_';
public static function getSharedIconPath(string $filepath='') : string
{
if($filepath){
return static::$sharedIconPath."/{$filepath}";
}
return static::$sharedIconPath;
}
public static function getUserIconPath(string $filepath='') : string
{
return AppConf::getUserIconPathWeb($filepath);
}
public static function getGameImagePath(string $filepath='') : string
{
if($filepath){
return static::$gameImagePath."/{$filepath}";
}
return static::$gameImagePath;
}
public static function getImagePullURI() : string
{
$now = time();
$req_hash = Util::hashPassword(sprintf("%016x",$now), static::$imageRequestKey);
return static::$imageRequestPath."?req={$req_hash}&time={$now}";
}
/**
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
*
* @return string
*/
public static function getServerBasepath() : string
{
return self::$serverWebPath;
}
}
+10 -5
View File
@@ -6,33 +6,38 @@
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
/* 레거시. */
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
.map_detail .map_title{
background:
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
url('_tK_gameImagePath_/rtitle.jpg') no-repeat right;
}
.map_detail.map_spring .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/spring.gif') no-repeat right;
}
.map_detail.map_summer .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/summer.gif') no-repeat right;
}
.map_detail.map_fall .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/fall.gif') no-repeat right;
}
.map_detail.map_winter .map_title_text{
background:
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/ad.gif') no-repeat left,
url('_tK_gameImagePath_/winter.gif') no-repeat right;
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace sammo;
function MYDB_query($query, $connect)
{
return mysqli_query($connect, $query);
}
function MYDB_num_rows(\mysqli_result $result) : int
{
return mysqli_num_rows($result);
}
/**
* @return mixed[]
*/
function MYDB_fetch_array(\mysqli_result $result)
{
return mysqli_fetch_array($result);
}
function MYDB_fetch_row(\mysqli_result $result)
{
return mysqli_fetch_row($result);
}
function MYDB_error($connect)
{
return mysqli_error($connect);
}
+25 -5
View File
@@ -6,15 +6,35 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 4) {
die(requireAdminPermissionHTML());
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
$plock = $db->queryFirstField('SELECT plock FROM plock');
$query = "select plock from plock";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$plock = MYDB_fetch_array($result);
?>
<!DOCTYPE html>
<html>
@@ -24,15 +44,15 @@ $plock = $db->queryFirstField('SELECT plock FROM plock');
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.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='분지연'> 최종갱신 : <?=$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>0?"동결중":"가동중"?><br>
: <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
</form>
</body>
</html>
+61 -89
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,7 +6,7 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 4) {
if($session->userGrade < 4){
header('location:_119.php');
die();
}
@@ -17,102 +16,75 @@ $v->rule('integer', [
'minute',
'minutes2'
]);
if (!$v->validate()) {
if(!$v->validate()){
Error($v->errorStr());
}
$btn = Util::getPost('btn');
$minute = Util::getPost('minute', 'int');
$minute2 = Util::getPost('minute2', 'int');
$btn = Util::getReq('btn');
$minute = Util::getReq('minute', 'int');
$minute2 = Util::getReq('minute2', 'int');
extractMissingPostToGlobals();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
switch ($btn) {
case "분당김":
$locked = false;
for ($i = 0; $i < 10; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
switch($btn) {
case "분당김":
$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->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');
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$db->update('general', [
'turntime'=>$db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire'=>$db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
], true);
break;
case "분지연":
$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"));
$db->update('general', [
'turntime' => $db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire' => $db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
], true);
if ($locked) {
unlock();
}
break;
case "분지연":
$locked = false;
for ($i = 0; $i < 5; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
$db->update('general', [
'turntime' => $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
], true);
$db->update('auction', [
'expire' => $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
], true);
if ($locked) {
unlock();
}
break;
case "토너분당김":
$tnmt_time = new \DateTime($gameStor->tnmt_time);
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "토너분지연":
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "금지급":
processGoldIncome();
break;
case "쌀지급":
processRiceIncome();
break;
case "락걸기":
for ($i = 0; $i < 10; $i++) {
if (tryLock()) {
$locked = true;
break;
}
usleep(500000);
}
break;
case "락풀기":
unlock();
break;
$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 "토너분당김":
$tnmt_time = new \DateTime($gameStor->tnmt_time);
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "토너분지연":
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
break;
case "금지급":
processGoldIncome();
break;
case "쌀지급":
processRiceIncome();
break;
case "락걸기":
$db->update('plock', ['plock'=>1], true);
break;
case "락풀기":
$db->update('plock', ['plock'=>0], true);
break;
}
header('Location:_119.php', true, 303);
header('Location:_119.php', true, 303);
+27 -4
View File
@@ -7,10 +7,28 @@ include "func.php";
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
die(requireAdminPermissionHTML());
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
$admin = getAdmin();
?>
@@ -22,8 +40,7 @@ $admin = getAdmin();
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class="tb_layout bg0">
@@ -39,7 +56,7 @@ $admin = getAdmin();
</tr>
<tr>
<td width=110 align=right>시작시간변경</td>
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=substr($admin['starttime'], 0, 19)?>'><input type=submit name=btn value=변경1></td>
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=$admin['starttime']?>'><input type=submit name=btn value=변경1></td>
<td width=110 align=right>현재도시훈사</td>
<td width=285><?=$admin['city_rate']?></td>
</tr>
@@ -49,6 +66,12 @@ $admin = getAdmin();
<td width=110 align=right>최대 국가</td>
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation']?>><input type=submit name=btn value=변경3></td>
</tr>
<tr>
<td width=110 align=right></td>
<td width=285></td>
<td width=110 align=right>현재 수입률</td>
<td width=285><?=$admin['gold_rate']?>%</td>
</tr>
<tr>
<td width=110 align=right>시작 년도</td>
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=startyear value='<?=$admin['startyear']?>'><input type=submit name=btn value=변경4></td>
+45 -27
View File
@@ -22,16 +22,19 @@ if (!$v->validate()) {
Error($v->errorStr());
}
$msg = Util::getPost('msg');
$btn = Util::getPost('btn');
$log = Util::getPost('log');
$starttime = Util::getPost('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
$maxgeneral = Util::getPost('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
$maxnation = Util::getPost('maxnation', 'int', GameConst::$defaultMaxNation);
$startyear = Util::getPost('startyear', 'int', GameConst::$defaultStartYear);
$msg = Util::getReq('msg');
$btn = Util::getReq('btn');
$log = Util::getReq('log');
$starttime = Util::getReq('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
$maxgeneral = Util::getReq('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
$maxnation = Util::getReq('maxnation', 'int', GameConst::$defaultMaxNation);
$startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
extractMissingPostToGlobals();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$admin = getAdmin();
@@ -40,7 +43,11 @@ switch ($btn) {
$gameStor->msg = $msg;
break;
case "로그쓰기":
pushGlobalHistoryLog(["<R>★</><S>{$log}</>"]);
$lognum = $admin['historyindex'] + 1;
if ($lognum >= 29) {
$lognum = 0;
}
pushWorldHistory(["<R>★</><S>{$log}</>"]);
break;
case "변경1":
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
@@ -62,7 +69,6 @@ switch ($btn) {
case "30분턴":
case "60분턴":
case "120분턴":
$admin = $gameStor->getValues(['turntime', 'turnterm', 'year', 'startyear', 'month']);
switch ($btn) {
case "1분턴": $turnterm = 1; break;
case "2분턴": $turnterm = 2; break;
@@ -73,28 +79,40 @@ switch ($btn) {
case "60분턴": $turnterm = 60; break;
case "120분턴": $turnterm = 120; break;
}
$oldunit = $admin['turnterm'] * 60;
$unit = $turnterm * 60;
$unitDiff = $unit / $oldunit;
$servTurnTime = new \DateTimeImmutable($admin['turntime']);
foreach ($db->query('SELECT no,turntime FROM general') as $gen) {
$genTurnTime = new \DateTimeImmutable($gen['turntime']);
$timeDiff = TimeUtil::DateIntervalToSeconds($genTurnTime->diff($servTurnTime));
$timeDiff *= $unitDiff;
$newGenTurnTime = $servTurnTime->add(TimeUtil::secondsToDateInterval($timeDiff));
$db->update('general', [
'turntime'=>$newGenTurnTime->format('Y-m-d H:i:s.u')
], 'no=%i', $gen['no']);
}
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
$starttime = $servTurnTime->sub(TimeUtil::secondsToDateInterval($turn * $unit))->format('Y-m-d H:i:s');
$starttime = cutTurn($starttime, $turnterm, false);
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
$starttime = cutTurn($starttime, $turnterm);
$gameStor->turnterm = $turnterm;
$gameStor->starttime = $starttime;
pushGlobalHistoryLog(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
// 턴시간이 길어지는 경우 랜덤턴 배정
if ($turnterm < $admin['turnterm']) {
$query = "select no from general";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
for ($i=0; $i < $count; $i++) {
$gen = MYDB_fetch_array($result);
$turntime = getRandTurn($turnterm);
$query = "update general set turntime='$turntime' where no='{$gen['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
}
// 턴시간이 너무 멀리 떨어진 선수 제대로 보정
} else {
$query = "select no,turntime from general";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
for ($i=0; $i < $count; $i++) {
$gen = MYDB_fetch_array($result);
$num = intdiv((strtotime($gen['turntime']) - strtotime($admin['turntime'])), $unit);
if ($num > 0) {
$gen['turntime'] = date("Y-m-d H:i:s", strtotime($gen['turntime']) - $unit * $num);
$query = "update general set turntime='{$gen['turntime']}' where no='{$gen['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
}
}
}
pushWorldHistory(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
break;
}
+105 -119
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,8 +6,25 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
if($session->userGrade < 5) {
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
@@ -16,133 +32,103 @@ $db = DB::db();
?>
<!DOCTYPE html>
<html>
<head>
<title>회원관리</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<title>회원관리</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<form name=form1 method=post action=_admin2_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center>접속제한</td>
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=12>회원선택<br><br>
<font color=cyan>NPC</font><br>
<font color=skyblue>NPC유저</font><br>
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
</td>
<td width=105 rowspan=12>
<?php
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=_admin2_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center>접속제한</td>
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=12>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
<td width=105 rowspan=12>
<?php
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
foreach ($generalList as $general) {
$style = "style=;";
if ($general['block'] > 0) {
$style .= "background-color:red;";
}
if ($general['npc'] >= 2) {
$style .= "color:cyan;";
} elseif ($general['npc'] == 1) {
$style .= "color:skyblue;";
}
foreach($generalList as $general){
$style = "style=;";
if($general['block'] > 0) { $style .= "background-color:red;"; }
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
echo "
echo "
<option value={$general['no']} $style>{$general['name']}</option>";
}
}
echo "
echo "
</select>
</td>
<td width=100 align=center>아이템 지급</td>
<td width=504>
<select name=weapon size=1 style='color:white;background-color:black;font-size:14px'>";
foreach (GameConst::$allItems as $itemCategories) {
foreach ($itemCategories as $item => $cnt) {
if ($cnt == 0) {
continue;
}
$itemObj = buildItemClass($item);
if ($itemObj->isBuyable()) {
continue;
}
}
}
for ($i = 0; $i < 27; $i++) {
echo "
<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>";
}
?>
</select>
<input type=submit name=btn value='무기지급'>
<input type=submit name=btn value='책지급'>
<input type=submit name=btn value='말지급'>
<input type=submit name=btn value='도구지급'>
</td>
</tr>
<tr>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>이벤트</td>
<td><input type=submit name=btn value='특기 부여'><input type=submit name=btn value='공헌치1000'><input type=submit name=btn value='경험치1000'></td>
</tr>
<tr>
<td align=center>이벤트2</td>
<td><input type=submit name=btn value='보숙10000'><input type=submit name=btn value='궁숙10000'><input type=submit name=btn value='기숙10000'><input type=submit name=btn value='귀숙10000'><input type=submit name=btn value='차숙10000'></td>
</tr>
<tr>
<td align=center>접속제한</td>
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
</tr>
<tr>
<td align=center> 시각 설정</td>
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
</tr>
<tr>
<td align=center>명령 설정</td>
<td><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
}
?>
</select>
<input type=submit name=btn value='무기지급'>
<input type=submit name=btn value='책지급'>
<input type=submit name=btn value='말지급'>
<input type=submit name=btn value='도구지급'>
</td>
</tr>
<tr>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>이벤트</td>
<td><input type=submit name=btn value='특기 부여'><input type=submit name=btn value='공헌치1000'><input type=submit name=btn value='경험치1000'></td>
</tr>
<tr>
<td align=center>이벤트2</td>
<td><input type=submit name=btn value='보숙10000'><input type=submit name=btn value='궁숙10000'><input type=submit name=btn value='기숙10000'><input type=submit name=btn value='귀숙10000'><input type=submit name=btn value='차숙10000'></td>
</tr>
<tr>
<td align=center>접속제한</td>
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
</tr>
<tr>
<td align=center>턴설정</td>
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
</tr>
<tr>
<td align=center>NPC해제</td>
<td><input type=submit name=btn value='NPC해제'><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'><input type=submit name=btn value='NPC설정'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+143 -144
View File
@@ -1,355 +1,354 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getPost('btn');
$item = Util::getPost('item', 'string');
$genlist = Util::getPost('genlist', 'array_int');
$msg = Util::getPost('msg', 'string');
$btn = Util::getReq('btn');
$weap = Util::getReq('weap', 'int');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg', 'string');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireLogin()->loginGame()->setReadOnly();
if ($session->userGrade < 5) {
if($session->userGrade < 5) {
header('location:_admin2.php');
}
$generalID = $session->generalID;
if (!$generalID) {
if(!$generalID){
header('location:_admin2.php');
die();
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$src = MessageTarget::buildQuick($session->generalID);
$genObjList = [];
$env = [];
if ($genlist) {
$genObjList = General::createGeneralObjListFromDB($genlist);
$env = $gameStor->cacheAll();
}
switch ($btn) {
switch($btn) {
case "전체 접속허용":
$db->update('general', [
'con' => 0
'con'=>0
], true);
break;
case "전체 접속제한":
$db->update('general', [
'con' => 1000
'con'=>1000
], true);
break;
case "블럭 해제":
$db->update('general', [
'block' => 0
'block'=>0
], '`no` IN %li', $genlist);
DB::db()->query('update general set block=0 where no IN %li', $genlist);
break;
case "1단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db->update('general', [
'block' => 1,
'killturn' => 24
'block'=>1,
'killturn'=>24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('SELECT `owner` FROM general WHERE `no` IN %li', $genlist);
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
], 'id IN %li', $uid);
break;
case "2단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db->update('general', [
'gold' => 0,
'rice' => 0,
'block' => 2,
'killturn' => 24
'gold'=>0,
'rice'=>0,
'block'=>2,
'killturn'=>24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
], 'id IN %li', $uid);
break;
case "3단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db->update('general', [
'gold' => 0,
'rice' => 0,
'block' => 3,
'killturn' => 24
'gold'=>0,
'rice'=>0,
'block'=>3,
'killturn'=>24
], '`no` IN %li', $genlist);
$uid = $db->queryFirstColumn('SELECT `owner` from general where no IN %li', $genlist);
RootDB::db()->update('member', [
'block_num' => $db->sqleval('block_num+1'),
'block_date' => $date
RootDB::db()->update('member',[
'block_num'=>$db->sqleval('block_num+1'),
'block_date'=>$date
], 'id IN %li', $uid);
break;
case "무한삭턴":
$db->update('general', [
'killturn' => 8000
'killturn'=>8000
], '`no` IN %li', $genlist);
break;
case "강제 사망":
$date = TimeUtil::now(true);
$date = date('Y-m-d H:i:s');
$db->update('general', [
'killturn' => 0,
'turntime' => $date,
'turn0'=>EncodeCommand(0, 0, 0, 0),
'killturn'=>0,
'turntime'=>$date,
], '`no` IN %li', $genlist);
$db->update('general_turn', [
'action' => '휴식',
'arg' => '{}',
'brief' => '휴식',
], 'general_id IN %li AND turn_idx = 0', $genlist);
break;
case "특기 부여":
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$text = "특기 부여!";
foreach ($db->query("SELECT `no`,leadership,strength,intel,dex1,dex2,dex3,dex4,dex5 FROM general WHERE `no` IN %li", $genlist) as $general) {
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
$specialWar = SpecialityHelper::pickSpecialWar($general);
$specialWar = SpecialityConst::pickSpecialWar($general);
$db->update('general', [
'specage2' => $db->sqleval('age'),
'special2' => $specialWar
'specage2'=>$db->sqleval('age'),
'special2'=>$specialWar
], 'no=%i', $general['no']);
$specialWarName = buildGeneralSpecialWarClass($specialWar)->getName();
$specialWarName = SpecialityConst::WAR[$specialWar][0];
$josaUl = JosaUtil::pick($specialWarName, '을');
$logger = new ActionLogger($general['no'], 0, $year, $month);
$logger->pushGeneralHistoryLog("특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
$logger->pushGeneralActionLog("특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!",ActionLogger::PLAIN);
$logger->flush();
pushGeneralHistory($general, "<C>●</>{$year}{$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
}
break;
case "경험치1000":
$text = $btn . " 지급!";
foreach ($genlist as $generalID) {
$text = $btn." 지급!";
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'experience' => $db->sqleval('experience+1000')
$db->update('general',[
'experience'=>$db->sqleval('experience+1000')
], '`no` IN %li', $genlist);
break;
case "공헌치1000":
$text = $btn . " 지급!";
foreach ($genlist as $generalID) {
$text = $btn." 지급!";
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dedication' => $db->sqleval('dedication+1000')
$db->update('general',[
'dedication'=>$db->sqleval('dedication+1000')
], '`no` IN %li', $genlist);
break;
case "보숙10000":
$text = "보병숙련도+10000 지급!";
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dex1' => $db->sqleval('dex1+10000')
$db->update('general',[
'dex0'=>$db->sqleval('dex0+10000')
], '`no` IN %li', $genlist);
break;
case "궁숙10000":
$text = "궁병숙련도+10000 지급!";
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dex2' => $db->sqleval('dex2+10000')
$db->update('general',[
'dex10'=>$db->sqleval('dex10+10000')
], '`no` IN %li', $genlist);
break;
case "기숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "기병숙련도+10000 지급!";
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dex3' => $db->sqleval('dex3+10000')
$db->update('general',[
'dex20'=>$db->sqleval('dex20+10000')
], '`no` IN %li', $genlist);
break;
case "귀숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "귀병숙련도+10000 지급!";
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dex4' => $db->sqleval('dex4+10000')
$db->update('general',[
'dex30'=>$db->sqleval('dex30+10000')
], '`no` IN %li', $genlist);
break;
case "차숙10000":
$src = MessageTarget::buildQuick($session->generalID);
$text = "차병숙련도+10000 지급!";
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
$db->update('general', [
'dex5' => $db->sqleval('dex5+10000')
$db->update('general',[
'dex40'=>$db->sqleval('dex40+10000')
], '`no` IN %li', $genlist);
break;
case "접속 허용":
$db->update('general', [
'con' => 0
$db->update('general',[
'con'=>0
], '`no` IN %li', $genlist);
break;
case "접속 제한":
$db->update('general', [
'con' => 1000
$db->update('general',[
'con'=>1000
], '`no` IN %li', $genlist);
break;
case "메세지 전달":
$text = $msg ?? '';
foreach ($genlist as $generalID) {
$text = $msg;
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
break;
case "무기지급":
if ($item == 'None') {
if($weap == 0) {
$text = "무기 회수!";
} else {
$text = getItemName($item) . " 지급!";
}
else {
$text = getWeapName($weap)." 지급!";
}
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if ($item === 'None') {
if($weap == 0){
$db->update('general', [
'weapon' => 'None'
'weap'=>0
], '`no` IN %li', $genlist);
} else {
}
else{
$db->update('general', [
'weapon' => $item
], '`no` IN %li', $genlist, $item);
'weap'=>$weap
], '`no` IN %li AND weap < %i', $genlist, $weap);
}
break;
case "책지급":
if ($item == 'None') {
if($weap == 0) {
$text = "책 회수!";
} else {
$text = getItemName($item) . " 지급!";
}
else {
$text = getBookName($weap)." 지급!";
}
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if ($item == 'None') {
if($weap == 0){
$db->update('general', [
'book' => 'None'
'book'=>0
], '`no` IN %li', $genlist);
} else {
}
else{
$db->update('general', [
'book' => $item
], '`no` IN %li', $genlist);
'book'=>$weap
], '`no` IN %li AND book < %i', $genlist, $weap);
}
break;
case "말지급":
if ($item == 'None') {
if($weap == 0) {
$text = "말 회수!";
} else {
$text = getItemName($item) . " 지급!";
}
else {
$text = getHorseName($weap)." 지급!";
}
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if ($item == 'None') {
if($weap == 0){
$db->update('general', [
'horse' => 'None'
'horse'=>0
], '`no` IN %li', $genlist);
} else {
}
else{
$db->update('general', [
'horse' => $item
], '`no` IN %li', $genlist);
'horse'=>$weap
], '`no` IN %li AND horse < %i', $genlist, $weap);
}
break;
case "도구지급":
if ($item == 'None') {
if($weap == 0) {
$text = "특수도구 회수!";
} else {
$text = getItemName($item) . " 지급!";
}
else {
$text = getItemName($weap)." 지급!";
}
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
$msg->send(true);
}
if ($item == 'None') {
if($weap == 0){
$db->update('general', [
'item' => 'None'
'item'=>0
], '`no` IN %li', $genlist);
} else {
}
else{
$db->update('general', [
'item' => $item
], '`no` IN %li AND item < %i', $genlist, $item);
'item'=>$weap
], '`no` IN %li AND item < %i', $genlist, $weap);
}
break;
case "NPC해제":
$db->update('general', [
'npc'=>1
], '`no` IN %li', $genlist);
break;
case "하야입력":
$db->update('general_turn', [
'action' => 'che_하야',
'arg' => '{}',
'brief' => '하야',
], 'general_id IN %li AND turn_idx = 0', $genlist);
$db->update('general', [
'turn0'=>EncodeCommand(0, 0, 0, 45)
], '`no` IN %li', $genlist);
break;
case "방랑해산":
$db->update('general_turn', [
'action' => 'che_방랑',
'arg' => '{}',
'brief' => '방랑',
], 'general_id IN %li AND turn_idx = 0', $genlist);
$db->update('general_turn', [
'action' => 'che_해산',
'arg' => '{}',
'brief' => '해산',
], 'general_id IN %li AND turn_idx = 1', $genlist);
$db->update('general', [
'turn0'=>EncodeCommand(0, 0, 0, 47),
'turn1'=>EncodeCommand(0, 0, 0, 56)
], '`no` IN %li', $genlist);
break;
case "NPC설정":
$db->update('general', [
'npc'=>2
], '`no` IN %li', $genlist);
break;
case "00턴":
$turnterm = $gameStor->turnterm;
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$turntime = getRandTurn($turnterm);
$cutTurn = cutTurn($turntime, $turnterm);
$db->update('general', [
'turntime' => $cutTurn
'turntime'=>$curTurn
], '`no` IN %li', $genlist);
}
break;
case "랜덤턴":
$turnterm = $gameStor->turnterm;
foreach ($genlist as $generalID) {
foreach($genlist as $generalID){
$turntime = getRandTurn($turnterm);
$db->update('general', [
'turntime' => $turntime
'turntime'=>$turntime
], '`no` IN %li', $genlist);
}
break;
}
header('location:_admin2.php');
header('location:_admin2.php');
+115 -108
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,129 +6,137 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
if($session->userGrade < 5) {
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$conlimit = $gameStor->conlimit;
$ipGroupList = Util::arrayGroupBy(
$db->query(
'SELECT name,ip,lastconnect,owner,block,substring_index(ip,".",3) as ip_c from general WHERE ip!="" and npc<2'
),
'ip_c'
);
function colorBlockedName($general)
{
if (!$general['blocked']) {
return $general['name'];
}
return "<span style='color:magenta;'>{$general['name']}</span>";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>멀티관리</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<title>멀티관리</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<form name=form1 method=post action=_admin4_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=3>회원선택<br><br>
<font color=cyan>NPC</font><br>
<font color=skyblue>NPC유저</font><br>
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
</td>
<td width=105 rowspan=3>
<?php
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<form name=form1 method=post action=_admin4_submit.php>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
<td width=105 rowspan=3>
<?php
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
foreach ($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general) {
$style = "style=;";
if ($general['block'] > 0) {
$style .= "background-color:red;";
}
if ($general['npc'] >= 2) {
$style .= "color:cyan;";
} elseif ($general['npc'] == 1) {
$style .= "color:skyblue;";
}
if ($general['con'] > $conlimit) {
$style .= "color:red;";
}
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
$style = "style=;";
if($general['block'] > 0) { $style .= "background-color:red;"; }
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
if($general['con'] > $conlimit) { $style .= "color:red;"; }
echo "
echo "
<option value={$general['no']} $style>{$general['name']}</option>";
}
}
echo "
echo "
</select>";
?>
</td>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center width=100>장수명</td>
<td align=center width=180>최근로그인</td>
<td align=center width=129>IP</td>
<td align=center width=100>ID</td>
</tr>
<?php foreach ($ipGroupList as $ipGroupC => $users) : ?>
<tr>
<td><?= join('<br>', array_map('\sammo\colorBlockedName', $users)) ?></td>
<td><?= join('<br>', array_column($users, 'lastconnect')) ?></td>
<td><?= join('<br>', array_column($users, 'ip')) ?></td>
<td><?= join('<br>', array_column($users, 'owner')) ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
?>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
?>
</td>
<td width=100 align=center>블럭</td>
<td width=504>
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
1단계:발언권, 2단계:턴블럭
</td>
</tr>
<tr>
<td align=center>강제 사망</td>
<td><input type=submit name=btn value='강제 사망'></td>
</tr>
<tr>
<td align=center>메세지 전달</td>
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center width=100>장수명</td>
<td align=center width=180>최근로그인</td>
<td align=center width=129>IP</td>
<td align=center width=100>ID</td>
</tr>
<tr>
<?php
$query = "select substring_index(ip,'.',3) as ip2 from general where ip!='' and npc<2 group by ip2 having count(*)>1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$ipCount = MYDB_num_rows($result);
$genName = "";
$genDate = "";
$genIP = "";
$genID = "";
for($i=0; $i < $ipCount; $i++) {
$ip = MYDB_fetch_array($result);
</html>
$query = "select name,ip,lastconnect,owner,block from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($genResult);
for($k=0; $k < $genCount; $k++) {
$gen = MYDB_fetch_array($genResult);
if($gen['block'] > 0) $genName .= "<font color=magenta>{$gen['name']}</font><br>";
else $genName .= $gen['name']."<br>";
$genDate .= $gen['lastconnect']."<br>";
$genIP .= $gen['ip']."<br>";
$genID .= $gen['owner']."<br>";
}
$genName .= "<br>";
$genDate .= "<br>";
$genIP .= "<br>";
$genID .= "<br>";
}
echo "
<td align=right>$genName</td>
<td>$genDate</td>
<td>$genIP</td>
<td>$genID</td>";
?>
</tr>
</table>
<?php
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
?>
</form>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
+23 -28
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,74 +6,69 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
if($session->userGrade < 5) {
header('location:_admin4.php');
die();
}
$btn = Util::getPost('btn');
$genlist = Util::getPost('genlist', 'array_int');
$msg = Util::getPost('msg', 'string', '메시지');
$btn = Util::getReq('btn');
$genlist = Util::getReq('genlist', 'array_int');
$msg = Util::getReq('msg','string', '메시지');
extractMissingPostToGlobals();
$db = DB::db();
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
switch ($btn) {
switch($btn) {
case "블럭 해제":
DB::db()->query('update general set block=0 where no IN %li', $genlist);
break;
case "1단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db = DB::db();
$db->query('update general set block=1,killturn=24 where no IN %li', $genlist);
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
//FIXME: subquery로 하는게 더 빠를 듯.
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
break;
case "2단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db = DB::db();
$db->query('update general set block=2,killturn=24 where no IN %li', $genlist);
$db->query('update general set block=2,killturn=24 where no IN %li',$genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
break;
case "3단계 블럭":
$date = TimeUtil::now();
$date = date('Y-m-d H:i:s');
$db = DB::db();
$db->query('update general set block=3,killturn=24 where no IN %li', $genlist);
$db->query('update general set block=3,killturn=24 where no IN %li',$genlist);
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
break;
case "무한삭턴":
DB::db()->query('update general set killturn=8000 where no IN %li', $genlist);
DB::db()->query('update general set killturn=8000 where no IN %li',$genlist);
break;
case "강제 사망":
$date = TimeUtil::now(true);
$db->update('general', [
'killturn' => 0,
'turntime' => $date,
], '`no` IN %li', $genlist);
$db->update('general_turn', [
'action' => '휴식',
'arg' => '{}',
'brief' => '휴식'
], 'general_id IN %li AND turn_idx = 0', $genlist);
$date = date('Y-m-d H:i:s');
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 "메세지 전달":
$date = TimeUtil::now();
//TODO:새 갠메 시스템으로 변경
$date = date('Y-m-d H:i:s');
$src = MessageTarget::buildQuick($session->generalID);
foreach($genlist as $generalID){
for($i=0; $i < count($genlist); $i++) {
$msgObj = new Message(
Message::MSGTYPE_PRIVATE,
$src,
MessageTarget::buildQuick($generalID),
MessageTarget::buildQuick($genlist[$i]),
$msg,
new \DateTime(),
new DateTime(),
new \DateTime('9999-12-31'),
[]
);
if ($msgObj) {
if($msgObj){
$msgObj->send(true);
}
}
@@ -82,3 +76,4 @@ switch ($btn) {
}
header('location:_admin4.php');
+247 -287
View File
@@ -1,28 +1,47 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getPost('type', 'int', 0);
$type2 = Util::getPost('type2', 'int', 0);
$type = Util::getReq('type', 'int', 0);
$type2 = Util::getReq('type2', 'int', 0);
if ($type < 0 || $type > 17) {
if($type < 0 || $type > 17){
$type = 0;
}
if ($type2 < 0 || $type2 > 6) {
if($type2 < 0 || $type2 > 6){
$type2 = 0;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
if($session->userGrade < 5) {
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
$sel = [];
$sel2 = [];
@@ -32,334 +51,275 @@ $sel2[$type2] = "selected";
?>
<!DOCTYPE html>
<html>
<head>
<title>일제정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<title>일제정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?= $sel[0] ?? '' ?> value=0>국</option>
<option <?= $sel[1] ?? '' ?> value=1>장수</option>
<option <?= $sel[2] ?? '' ?> value=2>기술</option>
<option <?= $sel[3] ?? '' ?> value=3>국고</option>
<option <?= $sel[4] ?? '' ?> value=4>병량</option>
<option <?= $sel[5] ?? '' ?> value=5>평</option>
<option <?= $sel[6] ?? '' ?> value=6>평</option>
<option <?= $sel[7] ?? '' ?> value=7>평통</option>
<option <?= $sel[8] ?? '' ?> value=8>평무</option>
<option <?= $sel[9] ?? '' ?> value=9>평지</option>
<option <?= $sel[10] ?? '' ?> value=10>평Lv</option>
<option <?= $sel[11] ?? '' ?> value=11>접속률</option>
<option <?= $sel[12] ?? '' ?> value=12>단기접</option>
<option <?= $sel[13] ?? '' ?> value=13>보숙</option>
<option <?= $sel[14] ?? '' ?> value=14>궁숙</option>
<option <?= $sel[15] ?? '' ?> value=15>기숙</option>
<option <?= $sel[16] ?? '' ?> value=16>귀숙</option>
<option <?= $sel[17] ?? '' ?> value=17>차숙</option>
</select>
<select name=type2 size=1>
<option <?= $sel2[0] ?? '' ?> value=0>국력</option>
<option <?= $sel2[1] ?? '' ?> value=1>국가별성향</option>
<option <?= $sel2[2] ?? '' ?> value=2>국가성향</option>
<option <?= $sel2[3] ?? '' ?> value=3>장수성격</option>
<option <?= $sel2[4] ?? '' ?> value=4>장수특기</option>
<option <?= $sel2[5] ?? '' ?> value=5>병종수</option>
<option <?= $sel2[6] ?? '' ?> value=6>기타</option>
</select>
<input type=submit value='정렬하기'>
</form>
<form name=form2 method=post action=_admin5_submit.php>
<select name=nation size=1 style=color:white;background-color:black>";
<option value=0>재야</option>";
<?php
foreach ($db->query('SELECT nation,name,color,scout,gennum from nation order by power DESC') as $nation) {
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>국력</option>
<option <?=$sel[1]??''?> value=1>장수</option>
<option <?=$sel[2]??''?> value=2>기술</option>
<option <?=$sel[3]??''?> value=3>국</option>
<option <?=$sel[4]??''?> value=4>병량</option>
<option <?=$sel[5]??''?> value=5>평금</option>
<option <?=$sel[6]??''?> value=6>평쌀</option>
<option <?=$sel[7]??''?> value=7>평통</option>
<option <?=$sel[8]??''?> value=8>평</option>
<option <?=$sel[9]??''?> value=9>평</option>
<option <?=$sel[10]??''?> value=10>평Lv</option>
<option <?=$sel[11]??''?> value=11>접속률</option>
<option <?=$sel[12]??''?> value=12>단기접</option>
<option <?=$sel[13]??''?> value=13>보숙</option>
<option <?=$sel[14]??''?> value=14>궁숙</option>
<option <?=$sel[15]??''?> value=15>기숙</option>
<option <?=$sel[16]??''?> value=16>귀숙</option>
<option <?=$sel[17]??''?> value=17>차숙</option>
</select>
<select name=type2 size=1>
<option <?=$sel2[0]??''?> value=0>국력</option>
<option <?=$sel2[1]??''?> value=1>국가별성향</option>
<option <?=$sel2[2]??''?> value=2>국가성향</option>
<option <?=$sel2[3]??''?> value=3>장수성격</option>
<option <?=$sel2[4]??''?> value=4>장수특기</option>
<option <?=$sel2[5]??''?> value=5>병종수</option>
<option <?=$sel2[6]??''?> value=6>기타</option>
</select>
<input type=submit value='정렬하기'>
</form>
<form name=form2 method=post action=_admin5_submit.php>
<select name=nation size=1 style=color:white;background-color:black>";
<option value=0>재야</option>";
<?php
$query = "select nation,name,color,scout,scoutmsg,gennum from nation order by power";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=1; $i <= $count; $i++) {
$nation = MYDB_fetch_array($result);
echo "
echo "
<option value={$nation['nation']}>{$nation['name']}</option>";
}
?>
</select>
<input type=submit name=btn value='국가변경'>
</form>
</td>
</tr>
</table>
}
?>
</select>
<input type=submit name=btn value='국가변경'>
</form>
</td></tr>
</table>
<table align=center width=1600 class="tb_layout bg0">
<tr class='bg1'>
<td align=center>국명</td>
<td align=center>접률</td>
<td align=center>단접</td>
<td align=center>국력</td>
<td align=center>장수</td>
<td align=center>속령</td>
<td align=center>기술</td>
<td align=center>전략</td>
<td align=center>국고</td>
<td align=center>병량</td>
<td align=center>평금</td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center>Lv</td>
<td align=center>보숙</td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center>총병</td>
<td align=center>인구</td>
<td align=center>인구</td>
<td align=center>농업</td>
<td align=center></td>
<td align=center>치안</td>
<td align=center>성벽</td>
<td align=center>수비</td>
<td align=center>국명</td>
</tr>
<?php
$query = "
<table align=center width=1600 class="tb_layout bg0">
<tr id=bg1>
<td align=center>국명</td>
<td align=center>접률</td>
<td align=center>단접</td>
<td align=center>국력</td>
<td align=center>단합</td>
<td align=center>장수</td>
<td align=center>속령</td>
<td align=center>기술</td>
<td align=center>전략</td>
<td align=center>국고</td>
<td align=center>병량</td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center>평Lv</td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center>차숙</td>
<td align=center>총병</td>
<td align=center>인구</td>
<td align=center>인구율</td>
<td align=center></td>
<td align=center>상업</td>
<td align=center>치안</td>
<td align=center>성벽</td>
<td align=center>수비</td>
<td align=center>국명</td>
</tr>
<?php
$query = "
SELECT
A.nation,
A.name,
A.power,
A.chemi,
A.color,
A.tech,
A.strategic_cmd_limit,
A.sabotagelimit,
A.gold,
A.rice,
COUNT(B.nation) AS gennum,
ROUND(AVG(B.connect), 1) AS connect,
ROUND(AVG(B.con), 1) AS con,
ROUND(AVG(B.dex1)) AS dex1,
ROUND(AVG(B.dex2)) AS dex2,
ROUND(AVG(B.dex3)) AS dex3,
ROUND(AVG(B.dex4)) AS dex4,
ROUND(AVG(B.dex5)) AS dex5
ROUND(AVG(B.dex0)) AS dex0,
ROUND(AVG(B.dex10)) AS dex10,
ROUND(AVG(B.dex20)) AS dex20,
ROUND(AVG(B.dex30)) AS dex30,
ROUND(AVG(B.dex40)) AS dex40
FROM nation A, general B
WHERE A.nation=B.nation
GROUP BY B.nation
";
switch ($type) {
case 0:
$query .= " order by power desc";
break;
case 1:
$query .= " order by gennum desc";
break;
case 2:
$query .= " order by A.tech desc";
break;
case 3:
$query .= " order by A.gold desc";
break;
case 4:
$query .= " order by A.rice desc";
break;
case 5:
$query .= " order by avg(B.gold) desc";
break;
case 6:
$query .= " order by avg(B.rice) desc";
break;
case 7:
$query .= " order by avg(B.leadership) desc";
break;
case 8:
$query .= " order by avg(B.strength) desc";
break;
case 9:
$query .= " order by avg(B.intel) desc";
break;
case 10:
$query .= " order by avg(B.explevel) desc";
break;
case 11:
$query .= " order by avg(B.connect) desc";
break;
case 12:
$query .= " order by avg(B.con) desc";
break;
case 13:
$query .= " order by avg(B.dex1) desc";
break;
case 14:
$query .= " order by avg(B.dex2) desc";
break;
case 15:
$query .= " order by avg(B.dex3) desc";
break;
case 16:
$query .= " order by avg(B.dex4) desc";
break;
case 17:
$query .= " order by avg(B.dex5) desc";
break;
}
foreach ($db->query($query) as $nation) {
$gen = $db->queryFirstRow('SELECT COUNT(*) as cnt,
ROUND(AVG(gold)) as avgg,
ROUND(AVG(rice)) as avgr,
SUM(leadership) as leadership, ROUND(AVG(leadership), 1) as avgl,
ROUND(AVG(strength), 1) as avgs,
ROUND(AVG(intel), 1) as avgi,
ROUND(AVG(explevel), 1) as avge,
SUM(crew) as crew
from general where nation=%i', $nation['nation']);
switch($type) {
case 0: $query .= " order by power desc"; break;
case 1: $query .= " order by gennum desc"; break;
case 2: $query .= " order by A.tech desc"; break;
case 3: $query .= " order by A.gold desc"; break;
case 4: $query .= " order by A.rice desc"; break;
case 5: $query .= " order by avg(B.gold) desc"; break;
case 6: $query .= " order by avg(B.rice) desc"; break;
case 7: $query .= " order by avg(B.leader) desc"; break;
case 8: $query .= " order by avg(B.power) desc"; break;
case 9: $query .= " order by avg(B.intel) desc"; break;
case 10: $query .= " order by avg(B.explevel) desc"; break;
case 11: $query .= " order by avg(B.connect) desc"; break;
case 12: $query .= " order by avg(B.con) desc"; break;
case 13: $query .= " order by avg(B.dex0) desc"; break;
case 14: $query .= " order by avg(B.dex10) desc"; break;
case 15: $query .= " order by avg(B.dex20) desc"; break;
case 16: $query .= " order by avg(B.dex30) desc"; break;
case 17: $query .= " order by avg(B.dex40) desc"; break;
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationCount = MYDB_num_rows($result);
for($i=0; $i < $nationCount; $i++) {
$nation = MYDB_fetch_array($result);
$city = $db->queryFirstRow('SELECT COUNT(*) as cnt,
SUM(pop) as pop, SUM(pop_max) as pop_max,
ROUND(SUM(pop)/SUM(pop_max)*100, 2) as rate,
trust,
ROUND(SUM(agri)/SUM(agri_max)*100, 2) as agri,
ROUND(SUM(comm)/SUM(comm_max)*100, 2) as comm,
ROUND(SUM(secu)/SUM(secu_max)*100, 2) as secu,
ROUND(SUM(wall)/SUM(wall_max)*100, 2) as wall,
ROUND(SUM(def)/SUM(def_max)*100, 2) as def
from city where nation=%i', $nation['nation']);
$query = "select COUNT(*) as cnt,
ROUND(AVG(gold)) as avgg,
ROUND(AVG(rice)) as avgr,
SUM(leader) as leader, ROUND(AVG(leader), 1) as avgl,
ROUND(AVG(power), 1) as avgp,
ROUND(AVG(intel), 1) as avgi,
ROUND(AVG(explevel), 1) as avge,
SUM(crew) as crew
from general where nation='{$nation['nation']}'";
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gen = MYDB_fetch_array($genResult);
echo "
$query = "select COUNT(*) as cnt,
SUM(pop) as pop, SUM(pop2) as pop2,
ROUND(SUM(pop)/SUM(pop2)*100, 2) as rate,
ROUND(SUM(agri)/SUM(agri2)*100, 2) as agri,
ROUND(SUM(comm)/SUM(comm2)*100, 2) as comm,
ROUND(SUM(secu)/SUM(secu2)*100, 2) as secu,
ROUND(SUM(wall)/SUM(wall2)*100, 2) as wall,
ROUND(SUM(def)/SUM(def2)*100, 2) as def
from city where nation='{$nation['nation']}'";
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityResult);
echo "
<tr>
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
<td align=center>&nbsp;{$nation['connect']}&nbsp;</td>
<td align=center>&nbsp;{$nation['con']}&nbsp;</td>
<td align=center>&nbsp;{$nation['power']}&nbsp;</td>
<td align=center>&nbsp;{$nation['chemi']}&nbsp;</td>
<td align=center>&nbsp;{$gen['cnt']}&nbsp;</td>
<td align=center>&nbsp;{$city['cnt']}&nbsp;</td>
<td align=right>&nbsp;" . sprintf('%.1f', $nation['tech']) . "&nbsp;</td>
<td align=center>&nbsp;{$nation['strategic_cmd_limit']}&nbsp;</td>
<td align=center>&nbsp;{$nation['tech']}&nbsp;</td>
<td align=center>&nbsp;{$nation['sabotagelimit']}&nbsp;</td>
<td align=center>&nbsp;{$nation['gold']}&nbsp;</td>
<td align=center>&nbsp;{$nation['rice']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgg']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgr']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgl']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgs']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avgi']}&nbsp;</td>
<td align=right>&nbsp;{$gen['avge']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex1']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex2']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex3']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex4']}&nbsp;</td>
<td align=right>&nbsp;{$nation['dex5']}&nbsp;</td>
<td align=right>&nbsp;{$gen['crew']}/{$gen['leadership']}00&nbsp;</td>
<td align=center>&nbsp;{$city['pop']}/{$city['pop_max']}&nbsp;</td>
<td align=center>&nbsp;" . sprintf('%.1f', $city['pop'] / Util::valueFit($city['pop_max'], 1) * 100) . "%&nbsp;</td>
<td align=center>&nbsp;{$gen['avgg']}&nbsp;</td>
<td align=center>&nbsp;{$gen['avgr']}&nbsp;</td>
<td align=center>&nbsp;{$gen['avgl']}&nbsp;</td>
<td align=center>&nbsp;{$gen['avgp']}&nbsp;</td>
<td align=center>&nbsp;{$gen['avgi']}&nbsp;</td>
<td align=center>&nbsp;{$gen['avge']}&nbsp;</td>
<td align=center>&nbsp;{$nation['dex0']}&nbsp;</td>
<td align=center>&nbsp;{$nation['dex10']}&nbsp;</td>
<td align=center>&nbsp;{$nation['dex20']}&nbsp;</td>
<td align=center>&nbsp;{$nation['dex30']}&nbsp;</td>
<td align=center>&nbsp;{$nation['dex40']}&nbsp;</td>
<td align=center>&nbsp;{$gen['crew']}/{$gen['leader']}00&nbsp;</td>
<td align=center>&nbsp;{$city['pop']}/{$city['pop2']}&nbsp;</td>
<td align=center>&nbsp;{$city['rate']}%&nbsp;</td>
<td align=center>&nbsp;{$city['agri']}%&nbsp;</td>
<td align=center>&nbsp;{$city['comm']}%&nbsp;</td>
<td align=center>&nbsp;{$city['secu']}%&nbsp;</td>
<td align=center>&nbsp;{$city['wall']}%&nbsp;</td>
<td align=center>&nbsp;{$city['def']}%&nbsp;</td>
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
</tr>
";
}
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= getSabotageLogRecent(20) ?></td>
</tr>
</table>
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
</table>
<table align=center width=1760 class="tb_layout bg0">
<tr class='bg1'>
<td width=30 align=center></td>
<td width=30 align=center></td>
<td width=50 align=center>국가수</td>
<td width=50 align=center>장수수</td>
<?php
switch ($type2) {
default:
case 0:
echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>";
break;
case 1:
echo "<td width=1600>국가별성향</td>";
break;
case 2:
echo "<td width=1600>국가성향</td>";
break;
case 3:
echo "<td width=1600>장수성격</td>";
break;
case 4:
echo "<td width=1600>장수특기</td>";
break;
case 5:
echo "<td width=1600>병종수</td>";
break;
case 6:
echo "<td width=1600>기타</td>";
break;
}
?>
</tr>
<?php
foreach ($db->query('SELECT * from statistic where month=1 or no=1') as $stat) {
echo "
<table align=center width=1760 class="tb_layout bg0">
<tr id=bg1>
<td width=30 align=center></td>
<td width=30 align=center></td>
<td width=50 align=center>국가수</td>
<td width=50 align=center>장수수</td>
<?php
switch($type2) {
default:
case 0: echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>"; break;
case 1: echo "<td width=1600>국가별성향</td>"; break;
case 2: echo "<td width=1600>국가성향</td>"; break;
case 3: echo "<td width=1600>장수성격</td>"; break;
case 4: echo "<td width=1600>장수특기</td>"; break;
case 5: echo "<td width=1600>병종수</td>"; break;
case 6: echo "<td width=1600>기타</td>"; break;
}
?>
</tr>
<?php
$query = "select * from statistic where month=1 or no=1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
for($i=0; $i < $count; $i++) {
$stat = MYDB_fetch_array($result);
echo "
<tr>
<td align=center>{$stat['year']}</td>
<td align=center>{$stat['month']}</td>
<td align=center>{$stat['nation_count']}</td>
<td align=center>{$stat['gen_count']}</td>
";
switch ($type2) {
default:
case 0:
echo "<td>{$stat['power_hist']}</td>";
break;
case 1:
echo "<td>{$stat['nation_name']}</td>";
break;
case 2:
echo "<td>{$stat['nation_hist']}</td>";
break;
case 3:
echo "<td>{$stat['personal_hist']}</td>";
break;
case 4:
echo "<td>{$stat['special_hist']}</td>";
break;
case 5:
echo "<td>{$stat['crewtype']}</td>";
break;
case 6:
echo "<td>{$stat['etc']}</td>";
break;
}
echo "
switch($type2) {
default:
case 0: echo "<td>{$stat['power_hist']}</td>"; break;
case 1: echo "<td>{$stat['nation_name']}</td>"; break;
case 2: echo "<td>{$stat['nation_hist']}</td>"; break;
case 3: echo "<td>{$stat['personal_hist']}</td>"; break;
case 4: echo "<td>{$stat['special_hist']}</td>"; break;
case 5: echo "<td>{$stat['crewtype']}</td>"; break;
case 6: echo "<td>{$stat['etc']}</td>"; break;
}
echo "
</tr>
";
}
?>
</table>
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+14 -21
View File
@@ -1,49 +1,42 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getPost('btn');
$nation = Util::getPost('nation', 'int');
$btn = Util::getReq('btn');
$nation = Util::getReq('nation', 'int');
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
if ($session->userGrade < 5) {
if($session->userGrade < 5) {
header('location:_admin5.php');
die();
}
$db = DB::db();
$connect=$db->get();
switch ($btn) {
switch($btn) {
case "국가변경":
$oldNation = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
if ($nation == 0) {
if($nation == 0) {
$db->update('general', [
'nation' => 0,
'officer_level' => 0,
'officer_city' => 0
'nation'=>0,
'level'=>0,
], 'owner=%i', $userID);
} else {
$db->update('general', [
'nation' => $nation,
'officer_level' => 1,
'officer_city' => 0
'nation'=>$nation,
'level'=>1,
], 'owner=%i', $userID);
$db->update('nation', [
'gennum' => $db->sqleval('gennum + 1')
], 'nation=%i', $oldNation);
}
if ($oldNation != 0) {
$db->update('nation', [
'gennum' => $db->sqleval('gennum - 1')
], 'nation=%i', $oldNation);
}
break;
}
header('location:_admin5.php');
+111
View File
@@ -0,0 +1,111 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getReq('type', 'int', 0);
if($type < 0 || $type > 4){
$type = 0;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if($session->userGrade < 5) {
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
$sel[$type] = "selected";
?>
<!DOCTYPE html>
<html>
<head>
<title>접속정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>접속률</option>
<option <?=$sel[1]??''?> value=1>총갱신</option>
<option <?=$sel[2]??''?> value=2>갱신/턴</option>
<option <?=$sel[3]??''?> value=3>총로그인</option>
<option <?=$sel[4]??''?> value=4>갱신/로그인</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<table align=center class='tb_layout bg0'>
<tr id=bg1>
<td align=center width=120>장수명</td>
<td align=center width=50>접속률</td>
<td align=center width=40>시작연령</td>
<td align=center width=40>연령</td>
<td align=center width=80>총갱신</td>
<td align=center width=80>갱신/</td>
<td align=center width=80>총로그인</td>
<td align=center width=100>갱신/로그인</td>
</tr>
<?php
switch($type) {
case 0: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by connect desc limit 0,30"; break;
case 1: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by refcnt desc limit 0,30"; break;
case 2: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by ref desc limit 0,30"; break;
case 3: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by logcnt desc limit 0,30"; break;
case 4: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by log desc limit 0,30"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
for($i=0; $i < $gencount; $i++) {
$gen = MYDB_fetch_array($genresult);
echo "
<tr>
<td align=center>{$gen['name']}</td>
<td align=center>{$gen['connect']}</td>
<td align=center>{$gen['startage']}</td>
<td align=center>{$gen['age']}</td>
<td align=center>".round($gen['refcnt']/2, 1)."</td>
<td align=center>".round($gen['ref']/2,1)."</td>
<td align=center>{$gen['logcnt']}</td>
<td align=center>".round($gen['log']/2,1)."</td>
</tr>";
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
+127 -159
View File
@@ -1,179 +1,147 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getPost('btn');
$gen = Util::getPost('gen', 'int', 0);
$reqQueryType = Util::getPost('query_type', 'string', null);
$btn = Util::getReq('btn');
$gen = Util::getReq('gen', 'int', 0);
$type = Util::getReq('type', 'int', 0);
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
$queryMap = [
'turntime' => ['최근턴', 0, function ($lhs, $rhs) {
return - ($lhs['turntime'] <=> $rhs['turntime']);
}],
'recent_war' => ['최근전투', 1, function ($lhs, $rhs) {
return - ($lhs['recent_war'] <=> $rhs['recent_war']);
}],
'name' => ['장수명', 0, function ($lhs, $rhs) {
if ($lhs['npc'] !== $rhs['npc']) {
return $lhs['npc'] <=> $rhs['npc'];
}
return $lhs['name'] <=> $rhs['name'];
}],
'warnum' => ['전투수', 2, function ($lhs, $rhs) {
return - ($lhs['warnum'] <=> $rhs['warnum']);
}]
];
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
$reqQueryType = Util::array_first_key($queryMap);
if($type < 0 || $type > 3){
$type = 0;
}
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
}
$db = DB::db();
if ($btn == '정렬하기') {
$gen = 0;
}
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime FROM general');
} else if ($reqArgType === 1) {
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
} else if ($reqArgType === 2) {
$generalBasicList = $db->query(
'SELECT no, name, nation, npc, turntime, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %s',
$reqQueryType,
$reqQueryType
);
} else if ($reqArgType === 3) {
$generalBasicList = array_map(function ($arr) {
$arr['aux'] = Json::decode($arr['aux']);
return $arr;
}, $db->query('SELECT no, name, nation, npc, turntime, aux FROM general'));
} else {
throw new \sammo\MustNotBeReachedException();
}
usort($generalBasicList, $comp);
if (!$gen) {
$gen = $generalBasicList[0]['no'];
}
$generalObj = General::createGeneralObjFromDB($gen);
if($session->userGrade < 5) {
?>
<!DOCTYPE html>
<html>
<head>
<title>로그정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>
정렬순서 :
<select name='query_type' size=1>
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
<option <?= $queryType == $reqQueryType ? 'selected' : '' ?> value='<?= $queryType ?>'><?= $queryTypeText ?></option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php foreach ($generalBasicList as $general) : ?>
<option <?= $gen == $general['no'] ? 'selected' : '' ?> value='<?= $general['no'] ?>'><?= $general['name'] ?> (<?= substr($general['turntime'], 14, 5) ?>)</option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td>
</tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center class='bg1'>
<font color=skyblue size=3> </font>
</td>
<td width=50% align=center class='bg1'>
<font color=orange size=3>-</font>
</td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($generalObj);
generalInfo2($generalObj); ?>
</td>
<td valign=top>&nbsp;
</td>
</tr>
<tr>
<td align=center class='bg1'>
<font color=skyblue size=3>개인 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 기록</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getGeneralActionLogRecent($gen, 24)) ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getBattleDetailLogRecent($gen, 24)) ?>
</td>
</tr>
<tr>
<td align=center class='bg1'>
<font color=skyblue size=3>장수 열전</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getBattleResultRecent($gen, 24)) ?>
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
</html>
$db = DB::db();
$connect=$db->get();
if($btn == '정렬하기') {
$gen = 0;
}
$sel[$type] = "selected";
?>
<!DOCTYPE html>
<html>
<head>
<title>로그정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>최근턴</option>
<option <?=$sel[1]??''?> value=1>최근전투</option>
<option <?=$sel[2]??''?> value=2>장수명</option>
<option <?=$sel[3]??''?> value=3>전투수</option>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php
switch($type) {
case 0: $query = "select no,name from general order by turntime desc"; break;
case 1: $query = "select no,name from general order by recwar desc"; break;
case 2: $query = "select no,name from general order by npc,binary(name)"; break;
case 3: $query = "select no,name from general order by warnum desc"; break;
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($result);
for($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
// 선택 없으면 맨 처음 장수
if($gen == 0) {
$gen = $general['no'];
}
if($gen == $general['no']) {
echo "
<option selected value={$general['no']}>{$general['name']}</option>";
} else {
echo "
<option value={$general['no']}>{$general['name']}</option>";
}
}
?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td></tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1><font color=skyblue size=3> </font></td>
<td width=50% align=center id=bg1><font color=orange size=3>-</font></td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($gen); generalInfo2($gen); ?>
</td>
<td valign=top>&nbsp;
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
</tr>
<tr>
<td valign=top>
<?=getGenLogRecent($gen, 24)?>
</td>
<td valign=top>
<?=getBatLogRecent($gen, 24)?>
</td>
</tr>
<tr>
<td align=center id=bg1><font color=skyblue size=3>장수 열전</font></td>
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
</tr>
<tr>
<td valign=top>
<?=getGeneralHistoryAll($gen)?>
</td>
<td valign=top>
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
+97 -90
View File
@@ -1,22 +1,41 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$btn = Util::getPost('btn');
$gen = Util::getPost('gen', 'int', 0);
$btn = Util::getReq('btn');
$gen = Util::getReq('gen', 'int', 0);
$type = 0;
extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
die(requireAdminPermissionHTML());
?>
<!DOCTYPE html>
<html>
<head>
<title>관리메뉴</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
관리자가 아닙니다.<br>
<?=banner()?>
</body>
</html>
<?php
exit();
}
$db = DB::db();
$connect=$db->get();
if ($btn == '정렬하기') {
$gen = 0;
@@ -26,97 +45,85 @@ $sel[$type] = "selected";
?>
<!DOCTYPE html>
<html>
<head>
<title>외교정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<title>외교정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<option <?= $sel[0] ?? '' ?> value=0>상태</option>
</select>
<input type=submit name=btn value='정렬하기'>
</form>
</td>
</tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td colspan=9 align=center bgcolor=blue> </td>
</tr>
<tr>
<td width=130 align=center class='bg1'> </td>
<td width=130 align=center class='bg1'> </td>
<td width=80 align=center class='bg1'> </td>
<td width=60 align=center class='bg1'> </td>
</tr>
<?php
$nationName = [];
$nationColor = [];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
foreach ($db->query('SELECT * from diplomacy where me < you order by state desc') as $dip) {
$me = $dip['me'];
$you = $dip['you'];
if ($dip['state'] == 2) {
continue;
}
switch ($dip['state']) {
case 0:
$state = "<font color=red>교 전</font>";
break;
case 1:
$state = "<font color=magenta>선포중</font>";
break;
case 2:
$state = "통 상";
break;
case 7:
$state = "<font color=green>불가침</font>";
break;
}
$date = TimeUtil::now();
echo "
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>상태</option>
</select>
<input type=submit name=btn value='정렬하기'>
</form>
</td></tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue> </td></tr>
<tr>
<td align=center style=color:" . newColor($nationColor[$me]) . ";background-color:{$nationColor[$me]};>$nationName[$me]</td>
<td align=center style=color:" . newColor($nationColor[$you]) . ";background-color:{$nationColor[$you]};>$nationName[$you]</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>
</tr>
<?php
$nationName = [];
$nationColor = [];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
$query = "select * from diplomacy where me < you order by state desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dipcount = MYDB_num_rows($result);
for ($i=0; $i < $dipcount; $i++) {
$dip = MYDB_fetch_array($result);
$me = $dip['me'];
$you = $dip['you'];
if ($dip['state'] == 2) {
continue;
}
switch ($dip['state']) {
case 0: $state = "<font color=red>교 전</font>"; break;
case 1: $state = "<font color=magenta>선포중</font>"; break;
case 2: $state = "통 상"; break;
case 3: $state = "<font color=cyan>통합수락중</font>"; break;
case 4: $state = "<font color=cyan>통합제의중</font>"; break;
case 5: $state = "<font color=cyan>합병수락중</font>"; break;
case 6: $state = "<font color=cyan>합병제의중</font>"; break;
case 7: $state = "<font color=green>불가침</font>"; break;
}
$date = date('Y-m-d H:i:s');
echo "
<tr>
<td align=center style=color:".newColor($nationColor[$me]).";background-color:{$nationColor[$me]};>$nationName[$me]</td>
<td align=center style=color:".newColor($nationColor[$you]).";background-color:{$nationColor[$you]};>$nationName[$you]</td>
<td align=center>$state</td>
<td align=center>{$dip['term']} 개월</td>
</tr>";
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+6 -13
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,26 +6,20 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
if ($session->userGrade < 5) {
if($session->userGrade < 5) {
die('권한 부족');
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if (!$gameStor->isunited) {
if(!$gameStor->isunited){
die('아직 천통하지 않았습니다');
}
foreach ($db->queryFirstColumn(
'SELECT no FROM general WHERE npc < 2 and age >= %i',
40
) as $generalNo) {
foreach($db->queryFirstColumn(
'SELECT no FROM general WHERE npc != 0 and age >= %i',
GameConst::$retirementYear
) as $generalNo){
CheckHall($generalNo);
}
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
$genObj->mergeTotalInheritancePoint(true);
applyInheritanceUser($genObj->getVar('owner'));
$genObj->clearInheritancePoint();
}
+245 -347
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -15,369 +14,268 @@ $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("명장일람", 1);
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명장일람</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', 'common') ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명장일람</title>
<?=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=1100 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<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='유저 보기'>
<input type=submit name=btn value='NPC 보기'>
</td>
</tr>
</form>
</table>
<div style="margin:auto;width:1100px;">
<?php
<table align=center width=1100 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<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='유저 보기'>
<input type=submit name=btn value='NPC 보기'>
</td></tr>
</form>
</table>
<div style="margin:auto;width=1000px;">
<?php
$ownerNameList = [];
if ($gameStor->isunited) {
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
$ownerNameList[$ownerID] = $ownerName;
}
$ownerNameList = [];
if($gameStor->isunited){
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
}
$nationName = [0=>'재야'];
$nationColor = [0=>'#000000'];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
$types = [
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }],
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }],
["계 략 성 공", "int", function($v) use ($gameStor){
$v['value'] = $v['firenum'];
if($gameStor->isunited){
return $v;
}
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0)."/default.jpg";
$v['name'] = '???';
$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;
}],
];
$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']}";
}
else{
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
}
return $general;
}, $db->query(
"SELECT nation,no,name,name2 as owner_name, owner, picture, imgsvr,
experience, dedication, firenum, warnum, killnum, killcrew, deathcrew,
dex0, dex10, dex20, dex30, dex40,
ttw, ttd, ttl, tlw, tld, tll, tpw, tpd, tpl, tiw, tid, til,
betgold, betwin, betwingold,
horse, weap, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2"));
$templates = new \League\Plates\Engine('templates');
foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
$validCnt = 0;
$typeGenerals = array_map(function($general) use($typeValue, $typeFunc, &$validCnt, $ownerNameList){
$general['owner_name'] = $ownerNameList[$general['owner']]??null;
$general = ($typeFunc)($general);
$value = $general['value'];
if($value > 0){
$validCnt+=1;
}
$nationName = [0 => '재야'];
$nationColor = [0 => '#000000'];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
if($typeValue == 'percent'){
$general['printValue'] = number_format($value*100, 2).'%';
}
else {
$general['printValue'] = number_format($value);
}
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))
]);
}
?>
</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;
}
$types = [
["명 성", "int", function ($v) {
$v['value'] = $v['experience'];
return $v;
}],
["계 급", "int", function ($v) {
$v['value'] = $v['dedication'];
return $v;
}],
["계 략 성 공", "int", function ($v) use ($gameStor) {
$v['value'] = $v['firenum'];
if ($gameStor->isunited) {
return $v;
}
$v['nationName'] = '???';
$v['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
$v['name'] = '???';
$v['ownerName'] = 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['occupied'];
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['killcrew_person'];
return $v;
}],
["대 인 살 상 률", "percent", function ($v) {
if ($v['warnum'] < 10) {
$v['value'] = 0;
} else {
$v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']);
}
return $v;
}],
["보 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex1'];
return $v;
}],
["궁 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex2'];
return $v;
}],
["기 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex3'];
return $v;
}],
["귀 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex4'];
return $v;
}],
["차 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex5'];
return $v;
}],
["전 력 전 승 률", "percent", function ($v) {
$totalCnt = $v['ttw'] + $v['ttd'] + $v['ttl'];
if ($totalCnt < 50) {
$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['tsw'] + $v['tsd'] + $v['tsl'];
if ($totalCnt < 50) {
$v['value'] = 0;
} else {
$v['value'] = $v['tsw'] / 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);
}
$itemName = ($itemFunc)($itemCode);
$general['rankName'] = $itemName;
$general['value'] = $itemCode;
$itemTypes[$itemIdx][5][$itemCode] = $general;
}
}
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'] < GameConst::$defaultGold) {
$v['value'] = 0;
} else {
$v['value'] = $v['betwingold'] / max(1, $v['betgold']);
}
return $v;
}],
];
$generals = [];
foreach ($db->query(
"SELECT nation,no,name,owner_name as ownerName, owner, picture, imgsvr,
experience, dedication,
dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item
FROM general WHERE %l",
$btn == "NPC 보기" ? "npc>=2" : "npc<2"
) as $general) {
$generalID = $general['no'];
$general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4;
$general['fgColor'] = newColor($general['bgColor']);
$general['nationName'] = $nationName[$general['nation']];
if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} else {
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
}
$generals[$generalID] = $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;
}
foreach ($db->queryAllLists('SELECT general_id, `type`, `value` FROM rank_data') as [$generalID, $typeKey, $value]) {
if (!key_exists($generalID, $generals)) {
continue;
}
$generals[$generalID][$typeKey] = $value;
}
$general = $itemOwners[$itemCode];
$itemRanker[$itemCode] = $general;
}
$templates = new \League\Plates\Engine('templates');
foreach ($types as $idx => [$typeName, $typeValue, $typeFunc]) {
$validCnt = 0;
$typeGenerals = array_map(function ($general) use ($typeValue, $typeFunc, &$validCnt, $ownerNameList) {
$general['ownerName'] = $ownerNameList[$general['owner']] ?? null;
$general = ($typeFunc)($general);
$value = $general['value'];
if ($value > 0) {
$validCnt += 1;
}
if ($typeValue == 'percent') {
$general['printValue'] = number_format($value * 100, 2) . '%';
} else {
$general['printValue'] = number_format($value);
}
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))
]);
}
?>
</div>
<div style="margin:auto;width:1100px;margin-top:5px;">
<?php
//유니크 아이템 소유자
$itemTypes = [
'horse' => '명 마',
'weapon' => '명 검',
'book' => '명 서',
'item' => '도 구'
];
$simpleItemTypes = array_keys($itemTypes);
array_map(function ($itemType) {
return $itemType[1];
}, $itemTypes);
$itemOwners = [];
foreach ($generals as $general) {
foreach ($itemTypes as $itemType => $itemTypeName) {
$itemClassName = $general[$itemType];
$itemClass = buildItemClass($itemClassName);
if ($itemClass->isBuyable()) {
continue;
}
if (key_exists($itemClassName, $itemOwners)) {
$itemOwners[$itemClassName][] = $general;
} else {
$itemOwners[$itemClassName] = [$general];
}
}
}
foreach (GameConst::$allItems as $itemType => $itemList) {
$itemNameType = $itemTypes[$itemType];
$itemList = array_reverse($itemList, true);
$itemRanker = [];
foreach ($itemList as $itemClassName => $itemCnt) {
if ($itemCnt == 0) {
continue;
}
$itemClass = buildItemClass($itemClassName);
if ($itemClass->isBuyable()) {
continue;
}
$info = $itemClass->getInfo();
$name = $itemClass->getName();
if ($info) {
$name = $templates->render('tooltip', [
'text' => $name,
'info' => $info,
]);
}
foreach (Util::range($itemCnt) as $itemIdx) {
if (($itemOwners[$itemClassName][$itemIdx] ?? null) === null) {
$emptyCard = [
'rankName' => $name,
'pictureFullPath' => GetImageURL(0) . "/default.jpg",
'value' => $itemClassName,
'name' => '미발견',
'bgColor' => GameConst::$basecolor4,
'fgColor' => newColor(GameConst::$basecolor4),
];
$itemRanker[] = $emptyCard;
continue;
}
$general = $itemOwners[$itemClassName][$itemIdx];
$card = [
'rankName' => $name,
'pictureFullPath' => $general['pictureFullPath'],
'value' => $itemClassName,
'nationName' => $general['nationName'],
'name' => $general['name'],
'bgColor' => $general['bgColor'],
'fgColor' => $general['fgColor'],
];
$itemRanker[] = $card;
}
}
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>
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>
</body>
</html>
</html>
+95 -101
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -13,123 +12,118 @@ increaseRefresh("왕조일람", 1);
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 왕조일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', 'common') ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class="tb_layout bg0">
<tr>
<td> <br>
<button onclick=window.close()> 닫기</button><br>
</td>
</tr>
</table>
<table align=center width=1000 class="tb_layout bg0">
<tr><td> <br>
<button onclick=window.close()> 닫기</button><br>
</td></tr>
</table>
<?php
<?php
$showCurrentNation = true;
$showCurrentNation = true;
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC');
if ($emperiors) {
$serverID = $emperior[0]['server_id'] ?? ($emperior[0]['serverID'] ?? null);
if ($serverID == UniqueConst::$serverID) {
$showCurrentNation = false;
}
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']);
?>
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 style="background-color:#333333;" align=center colspan=8>
<font size=5>현재 (<?= $year ?>年 <?= $month ?>月)</font>
<a href="a_history.php"><button type='button'>역사 보기</button></a>
</td>
</tr>
</table>
<table align=center width=1000 style="margin-top:10px;" class='tb_layout bg0'>
<tr>
<td style="background-color:#333333;" align=center colspan=8>
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
<a href="a_history.php"><button>역사 보기</button></a>
</td>
</tr>
</table>
<?php
}
<?php
}
foreach ($emperiors as $emperior) {
$serverID = $emperior['server_id'] ?? ($emperior['serverID'] ?? null);
?>
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=8>
<font size=5><?= $emperior['phase'] ?></font>
<a href="a_emperior_detail.php?select=<?= $emperior['no'] ?>"><button type='button'>자세히</button></a>
<?php if ($emperior['server_id']) : ?>
<a href="a_history.php?serverID=<?= $emperior['server_id'] ?>"><button type='button'>역사 보기</button></a>
<?php endif ?>
</td>
</tr>
<tr>
<td align=center style='color:<?= newColor($emperior['color']) ?>;background-color:<?= $emperior['color'] ?>' colspan=8>
<font size=5><?= $emperior['name'] ?> (<?= $emperior['year'] ?>年 <?= $emperior['month'] ?>月)</font>
</td>
</tr>
<tr>
<td class='bg1' align=center width=80> </td>
<td align=center width=170><?= $emperior['power'] ?></td>
<td class='bg1' align=center width=80> </td>
<td align=center width=170><?= $emperior['gennum'] ?></td>
<td class='bg1' align=center width=80> </td>
<td align=center width=170><?= $emperior['citynum'] ?></td>
<td class='bg1' align=center width=80> </td>
<td align=center width=170><?= $emperior['type'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l12name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l11name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l10name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l9name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l8name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l7name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l6name'] ?></td>
<td class='bg1' align=center> </td>
<td align=center><?= $emperior['l5name'] ?></td>
</tr>
</table>
<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>
<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 align=center style=color:".newColor($emperior['color'])."; bgcolor=<?=$emperior['color']?> colspan=8>
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font>
</td>
</tr>
<tr>
<td id=bg1 align=center width=80> </td>
<td align=center width=170><?=$emperior['power']?></td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170><?=$emperior['gennum']?></td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170><?=$emperior['citynum']?></td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170><?=$emperior['type']?></td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l12name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l11name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l10name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l9name']?></td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l8name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l7name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l6name']?></td>
<td id=bg1 align=center> </td>
<td align=center><?=$emperior['l5name']?></td>
</tr>
</table>
<?php
}
?>
<?php
}
?>
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
<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>
+211
View File
@@ -0,0 +1,211 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$select = Util::getReq('select', 'int', 0);
$db = DB::db();
$connect=$db->get();
increaseRefresh("왕조일람", 2);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br>
<input type=button value='창 닫기' onclick=window.close()><br>
</td></tr>
</table>
<?php
if ($select == 0) {
$query = "select * from emperior_table order by no desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$empcount = MYDB_num_rows($result);
for ($i=0; $i < $empcount; $i++) {
$emperior = MYDB_fetch_array($result);
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=8>
<font size=5>{$emperior['phase']}</font>
<input type=submit value='자세히'>
<input type=hidden name=select value='{$emperior['no']}'>
</td>
</tr>
<tr>
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=8>
<font size=5>{$emperior['name']} ({$emperior['year']} {$emperior['month']})</font>
</td>
</tr>
<tr>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['power']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['gennum']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['citynum']}</td>
<td id=bg1 align=center width=80> </td>
<td align=center width=170>{$emperior['type']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l12name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l11name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l10name']}</td>
<td id=bg1 align=center> </td>
<td align=center>{$emperior['l9name']}</td>
</tr>
</table>
</form>";
}
} else {
$query = "select * from emperior_table where no='$select'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$emperior = MYDB_fetch_array($result);
echo "
<form action=a_emperior2.php method=post>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td bgcolor=skyblue align=center colspan=6>
<font size=5>{$emperior['phase']}</font>
<input type=submit value='전체보기'>
<input type=hidden name=select value='0'>
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2>{$emperior['nation_count']}</td>
<td id=bg1 width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2>{$emperior['gen_count']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['nation_name']}</td>
</tr>
<tr>
<td id=bg1 align=center>국가별 성향</td>
<td colspan=5>{$emperior['nation_hist']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['personal_hist']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['special_hist']}</td>
</tr>
<tr>
<td align=center style=color:".newColor($emperior['color'])."; bgcolor={$emperior['color']} colspan=6>
<font size=5>{$emperior['name']} ({$emperior['year']} {$emperior['month']})</font>
</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['power']}</td>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['type']}</td>
</tr>
<tr>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['gennum']}</td>
<td id=bg1 width=98 align=center> </td>
<td align=center width=398 colspan=2>{$emperior['citynum']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['pop']}</td>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['poprate']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['gold']}</td>
<td id=bg1 align=center> </td>
<td align=center colspan=2>{$emperior['rice']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l12name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l11name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l10name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l9name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l8name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l7name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l6name']}</td>
<td id=bg1 align=center> </td>
<td width=64>&nbsp;</td>
<td width=332>{$emperior['l5name']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['tiger']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>{$emperior['eagle']}</td>
</tr>
<tr>
<td id=bg1 align=center> <br>(공헌도 순서)</td>
<td colspan=5>{$emperior['gen']}</td>
</tr>
<tr>
<td id=bg1 align=center> </td>
<td colspan=5>".ConvertLog($emperior['history'], 1)."</td>
</tr>
</table>
</form>";
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
+174 -181
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -14,8 +13,8 @@ $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);
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select);
$serverID = $emperior['server_id']??($emperior['serverID']??null);
?>
@@ -23,199 +22,193 @@ $serverID = $emperior['server_id'] ?? ($emperior['serverID'] ?? null);
<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::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class="tb_layout bg0">
<tr>
<td> <br>
<button onclick=window.close()> 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a>
<div>
</td>
</tr>
<table align=center width=1000 class="tb_layout bg0">
<tr><td> <br>
<button onclick=window.close()> 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
</td></tr>
</table>
</table>
<?php
<?php
if ($emperior) :
?>
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 class='bg1' width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?= $emperior['nation_count'] ?></td>
<td class='bg1' width=98 align=center> <br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?= $emperior['gen_count'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td colspan=5><?= $emperior['nation_name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center>국가별 성향</td>
<td colspan=5><?= $emperior['nation_hist'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td colspan=5><?= $emperior['personal_hist'] ?></td>
</tr>
<tr>
<td class='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 class='bg1' width=98 align=center> </td>
<td align=center width=398 colspan=2><?= $emperior['power'] ?></td>
<td class='bg1' width=98 align=center> </td>
<td align=center width=398 colspan=2><?= $emperior['type'] ?></td>
</tr>
<tr>
<td class='bg1' width=98 align=center> </td>
<td align=center width=398 colspan=2><?= $emperior['gennum'] ?></td>
<td class='bg1' width=98 align=center> </td>
<td align=center width=398 colspan=2><?= $emperior['citynum'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td align=center colspan=2><?= $emperior['pop'] ?></td>
<td class='bg1' align=center> </td>
<td align=center colspan=2><?= $emperior['poprate'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td align=center colspan=2><?= $emperior['gold'] ?></td>
<td class='bg1' align=center> </td>
<td align=center colspan=2><?= $emperior['rice'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l12name'] ?></td>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l11name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l10name'] ?></td>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l9name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l8name'] ?></td>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l7name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l6name'] ?></td>
<td class='bg1' align=center> </td>
<td width=64>&nbsp;</td>
<td width=332><?= $emperior['l5name'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td colspan=5><?= $emperior['tiger'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td colspan=5><?= $emperior['eagle'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> <br>(공헌도 순서)</td>
<td colspan=5><?= $emperior['gen'] ?></td>
</tr>
<tr>
<td class='bg1' align=center> </td>
<td colspan=5><?= formatHistoryToHTML(Json::decode($emperior['history'])) ?></td>
</tr>
</table>
<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;
<?php
endif;
$showServers = $emperior;
$showServers = $emperior;
if (!$serverID) {
$serverID = UniqueConst::$serverID;
}
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']);
/** @var int[]|null $nationGenerals */
$nationGenerals = $nation['generals'];
if ($nationGenerals) {
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
if (count($generals) != count($nationGenerals) && $serverID == UniqueConst::$serverID) {
$liveGenerals = $nationGenerals;
foreach ($generals as $general) {
if (in_array($general['general_no'], $nationGenerals)) {
unset($nationGenerals[$general['general_no']]);
}
}
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
$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);
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) != count($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>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
+224 -223
View File
@@ -1,223 +1,224 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getReq('type', 'int', 9);
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("장수일람", 2);
$me = $db->queryFirstRow('SELECT con,turntime FROM general WHERE owner = %i', $userID);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if ($type <= 0 || $type > 15) {
$type = 9;
}
$ownerNameList = [];
if ($gameStor->isunited) {
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
$ownerNameList[$ownerID] = $ownerName;
}
}
?>
<!DOCTYPE html>
<html>
<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') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', 'common') ?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select id='viewType' name='type' size=1>
<option value=1>국가</option>
<option value=2>통솔</option>
<option value=3>무력</option>
<option value=4></option>
<option value=5>명성</option>
<option value=6>계급</option>
<option value=7>관직</option>
<option value=8>삭턴</option>
<option value=9>벌점</option>
<option value=10>Lv</option>
<option value=11>성격</option>
<option value=12>내특</option>
<option value=13></option>
<option value=14>연령</option>
<option value=15>NPC</option>
</select>
<input type=submit value='정렬하기'>
</form>
</td>
</tr>
</table>
<?php
$nationname = [];
$nationlevel = [];
$nationname[0] = "-";
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
$nationlevel[$nation['nation']] = $nation['level'];
}
[$orderKey, $orderDesc] = [
1 => ['nation', false],
2 => ['leadership', true],
3 => ['strength', true],
4 => ['intel', true],
5 => ['experience', true],
6 => ['dedication', true],
7 => ['officer_level', true],
8 => ['killturn', false],
9 => ['connect', true],
10 => ['experience', true],
11 => ['personal', true],
12 => ['special', true],
13 => ['special2', true],
14 => ['age', true],
15 => ['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leadership,strength,intel,experience,dedication,officer_level,killturn,connect from general order by %b %l', $orderKey, $orderDesc ? 'desc' : '');
echo "
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=64 align=center class='bg1'> </td>
<td width=140 align=center class='bg1'> </td>
<td width=45 align=center class='bg1'>연령</td>
<td width=45 align=center class='bg1'>성격</td>
<td width=80 align=center class='bg1'>특기</td>
<td width=45 align=center class='bg1'> </td>
<td width=140 align=center class='bg1'> </td>
<td width=55 align=center class='bg1'> </td>
<td width=55 align=center class='bg1'> </td>
<td width=75 align=center class='bg1'> </td>
<td width=45 align=center class='bg1'>통솔</td>
<td width=45 align=center class='bg1'></td>
<td width=45 align=center class='bg1'>지력</td>
<td width=45 align=center class='bg1'>삭턴</td>
<td width=70 align=center class='bg1'>벌점</td>
</tr>";
foreach ($generalList as $general) {
$nation = $nationname[$general['nation']];
$lbonus = calcLeadershipBonus($general['officer_level'], $nationlevel[$general['nation']] ?? 0);
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonusText = "";
}
if ($general['injury'] > 0) {
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
$strength = "<font color=red>{$strength}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leadership = "{$general['leadership']}{$lbonusText}";
$strength = "{$general['strength']}";
$intel = "{$general['intel']}";
}
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']}";
}
if (key_exists($general['owner'], $ownerNameList)) {
$name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>';
}
$general['connect'] = Util::round($general['connect'], -1);
$imageTemp = GetImageURL($general['imgsvr']);
echo "
<tr data-general-id='{$general['no']}'
data-general-wounded='{$general['injury']}'
data-general-leadership='{$general['leadership']}'
data-general-leadership-bonus='{$lbonus}'
data-general-strength='{$general['strength']}'
data-general-intel='{$general['intel']}'
data-is-npc='" . ($general['npc'] >= 2 ? 'true' : 'false') . "'
>
<td align=center><img class='generalIcon' width='64' height='64' src='{$imageTemp}/{$general['picture']}'></img></td>
<td align=center>$name</td>
<td align=center>{$general['age']}</td>
<td align=center>" . displayCharInfo($general['personal']) . "</td>
<td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td>
<td align=center>Lv " . getExpLevel($general['experience']) . "</td>
<td align=center>{$nation}</td>
<td align=center>" . getHonor($general['experience']) . "</td>
<td align=center>" . getDed($general['dedication']) . "</td>
<td align=center>";
echo getOfficerLevelText($general['officer_level']);
echo "</td>
<td align=center>$leadership</td>
<td align=center>$strength</td>
<td align=center>$intel</td>
<td align=center>{$general['killturn']}</td>
<td align=center>{$general['connect']}";
echo "<br>【" . getConnect($general['connect']) . "】</td>
</tr>";
}
echo "
</table>
";
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
$("#viewType").val("<?= $type ?>").attr("selected", "selected");
});
</script>
</body>
</html>
<?php
namespace sammo;
include "lib.php";
include "func.php";
$type = Util::getReq('type', 'int', 9);
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("장수일람", 2);
$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']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if ($type <= 0 || $type > 15) {
$type = 9;
}
$ownerNameList = [];
if($gameStor->isunited){
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
}
?>
<!DOCTYPE html>
<html>
<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('../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 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select id='viewType' name='type' size=1>
<option value=1>국가</option>
<option value=2>통솔</option>
<option value=3></option>
<option value=4>지력</option>
<option value=5>명성</option>
<option value=6>계급</option>
<option value=7>관직</option>
<option value=8>삭턴</option>
<option value=9>벌점</option>
<option value=10>Lv</option>
<option value=11>성격</option>
<option value=12></option>
<option value=13>전특</option>
<option value=14>연령</option>
<option value=15>NPC</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<?php
$nationname = [];
$nationlevel = [];
$nationname[0] = "-";
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
$nationlevel[$nation['nation']] = $nation['level'];
}
[$orderKey, $orderDesc] = [
1=>['nation', false],
2=>['leader', true],
3=>['power', true],
4=>['intel', true],
5=>['experience', true],
6=>['dedication', true],
7=>['level', true],
8=>['killturn', false],
9=>['connect', true],
10=>['experience', true],
11=>['personal', true],
12=>['special', true],
13=>['special2', true],
14=>['age', true],
15=>['npc', true],
][$type];
$generalList = $db->query('SELECT owner,no,picture,imgsvr,npc,age,nation,special,special2,personal,name,injury,leader,power,intel,experience,dedication,level,killturn,connect from general order by %b %l', $orderKey, $orderDesc?'desc':'');
echo"
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=64 align=center id=bg1> </td>
<td width=140 align=center id=bg1> </td>
<td width=45 align=center id=bg1>연령</td>
<td width=45 align=center id=bg1>성격</td>
<td width=80 align=center id=bg1>특기</td>
<td width=45 align=center id=bg1> </td>
<td width=140 align=center id=bg1> </td>
<td width=55 align=center id=bg1> </td>
<td width=55 align=center id=bg1> </td>
<td width=75 align=center id=bg1> </td>
<td width=45 align=center id=bg1>통솔</td>
<td width=45 align=center id=bg1>무력</td>
<td width=45 align=center id=bg1></td>
<td width=45 align=center id=bg1>삭턴</td>
<td width=70 align=center id=bg1>벌점</td>
</tr>";
foreach($generalList as $general){
$nation = $nationname[$general['nation']];
if ($general['level'] == 12) {
$lbonus = $nationlevel[$general['nation']] * 2;
} elseif ($general['level'] >= 5) {
$lbonus = $nationlevel[$general['nation']];
} else {
$lbonus = 0;
}
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$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>{$lbonusText}";
$power = "<font color=red>{$power}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leader = "{$general['leader']}{$lbonusText}";
$power = "{$general['power']}";
$intel = "{$general['intel']}";
}
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']}";
}
if(key_exists($general['owner'], $ownerNameList)){
$name = $name.'<br><small>('.$ownerNameList[$general['owner']].')</small>';
}
$general['connect'] = Util::round($general['connect'] / 10) * 10;
$imageTemp = GetImageURL($general['imgsvr']);
echo "
<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 class='generalIcon' width='64' height='64' src='{$imageTemp}/{$general['picture']}'></img></td>
<td align=center>$name</td>
<td align=center>{$general['age']}</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<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>
<td align=center>".getDed($general['dedication'])."</td>
<td align=center>";
echo getLevel($general['level']);
echo "</td>
<td align=center>$leader</td>
<td align=center>$power</td>
<td align=center>$intel</td>
<td align=center>{$general['killturn']}</td>
<td align=center>{$general['connect']}";
echo "<br>【".getConnect($general['connect'])."】</td>
</tr>";
}
echo "
</table>
";
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
$("#viewType").val("<?=$type?>").attr("selected", "selected");
});
</script>
</body>
</html>
+127 -125
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -13,13 +12,13 @@ $db = DB::db();
increaseRefresh("명예의전당", 1);
$scenarioList = (function () {
$scenarioList = (function(){
$db = DB::db();
$scenarioList = [];
foreach ($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo) {
$scenarioList= [];
foreach($db->query('SELECT season, scenario_name as name, count(scenario) as cnt, scenario from ng_games group by season, scenario order by season desc, scenario asc') as $scenarioInfo){
$seasonIdx = $scenarioInfo['season'];
$scenarioIdx = $scenarioInfo['scenario'];
if (!key_exists($seasonIdx, $scenarioList)) {
if(!key_exists($seasonIdx, $scenarioList)){
$scenarioList[$seasonIdx] = [];
}
$scenarioList[$seasonIdx][$scenarioIdx] = $scenarioInfo;
@@ -27,12 +26,11 @@ $scenarioList = (function () {
return $scenarioList;
})();
if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
} else {
}
else{
$searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval('season = %i', $seasonIdx);
}
@@ -42,129 +40,133 @@ if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명예의 전당</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common', 'hallOfFame']) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
<?=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=1100 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?>
<option data-season="<?= $iterSeasonIdx ?>" value="" <?= ($iterSeasonIdx == $seasonIdx && $scenarioIdx === null) ? "selected='selected'" : '' ?>>* 시즌 : <?= $iterSeasonIdx ?> 종합 *</option>
<?php foreach ($subScenarioList as $info) : ?>
<option data-season="<?= $iterSeasonIdx ?>" value="<?= $info['scenario'] ?>" <?= ($iterSeasonIdx == $seasonIdx && $info['scenario'] === $scenarioIdx) ? "selected='selected'" : '' ?>><?= $info['name'] ?>(<?= $info['cnt'] ?>회)</option>
<?php endforeach; ?>
<?php endforeach; ?>
?>
</select>
</td>
</tr>
</table>
<div style="margin:auto;width:1100px;">
<?php
$types = [
'experience' => ['명 성', 'int'],
'dedication' => ['계 급', 'int'],
'firenum' => ['계 략 성 공', 'int'],
'warnum' => ['전 투 횟 수', 'int'],
'killnum' => ['승 리', 'int'],
'winrate' => ['승 률', 'percent'],
'occupied' => ['점 령', 'int'],
'killcrew' => ['사 살', 'int'],
'killrate' => ['살 상 률', 'percent'],
'killcrew_person' => ['대 인 사 살', 'int'],
'killrate_person' => ['대 인 살 상 률', 'percent'],
'dex1' => ['보 병 숙 련 도', 'int'],
'dex2' => ['궁 병 숙 련 도', 'int'],
'dex3' => ['기 병 숙 련 도', 'int'],
'dex4' => ['귀 병 숙 련 도', 'int'],
'dex5' => ['차 병 숙 련 도', 'int'],
'ttrate' => ['전 력 전 승 률', 'percent'],
'tlrate' => ['통 솔 전 승 률', 'percent'],
'tsrate' => ['일 기 토 승 률', 'percent'],
'tirate' => ['설 전 승 률', 'percent'],
'betgold' => ['베 팅 투 자 액', 'int'],
'betwin' => ['베 팅 당 첨', 'int'],
'betwingold' => ['베 팅 수 익 금', 'int'],
'betrate' => ['베 팅 수 익 률', 'percent'],
];
<table align=center width=1100 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach($scenarioList as $iterSeasonIdx=>$subScenarioList): ?>
<option
data-season="<?=$iterSeasonIdx?>"
value=""
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
<?php foreach($subScenarioList as $info): ?>
<option
data-season="<?=$iterSeasonIdx?>"
value="<?=$info['scenario']?>"
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</td></tr>
</table>
<div style="margin:auto;width=1100px;">
<?php
$types = [
["명 성", 'int'],
["계 급", 'int'],
["계 략 성 공", 'int'],
["전 투 횟 수", 'int'],
["승 리", 'int'],
["승 률", 'percent'],
["사 살", 'int'],
["살 상 률", 'percent'],
["보 병 숙 련 도", 'int'],
["궁 병 숙 련 도", 'int'],
["기 병 숙 련 도", 'int'],
["귀 병 숙 련 도", 'int'],
["차 병 숙 련 도", 'int'],
["전 력 전 승 률", 'percent'],
["통 솔 전 승 률", 'percent'],
["일 기 토 승 률", 'percent'],
["설 전 승 률", 'percent'],
["베 팅 투 자 액", 'int'],
["베 팅 당 첨", 'int'],
["베 팅 수 익 금", 'int'],
["베 팅 수 익 률", 'percent'],
];
$templates = new \League\Plates\Engine('templates');
$templates = new \League\Plates\Engine('templates');
$ownerNameList = [];
foreach (RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]) {
$ownerNameList[$ownerID] = $ownerName;
$ownerNameList = [];
foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID, $ownerName]){
$ownerNameList[$ownerID] = $ownerName;
}
foreach($types as $idx=>[$typeName, $typeValue]) {
$hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
$hallResult = array_map(function($general)use($typeValue, $ownerNameList){
$aux = Json::decode($general['aux']);
$general += $aux;
if(key_exists($general['owner'], $ownerNameList)){
$general['owner_name'] = $ownerNameList[$general['owner']];
}
foreach ($types as $typeName => [$typeDescribe, $typeValue]) {
$hallResult = $db->query('SELECT * FROM hall WHERE `type`=%s AND %? ORDER BY `value` DESC LIMIT 10', $typeName, $searchFilter);
$hallResult = array_map(function ($general) use ($typeValue, $ownerNameList) {
$aux = Json::decode($general['aux']);
$general += $aux;
if (key_exists($general['owner'], $ownerNameList)) {
$general['ownerName'] = $ownerNameList[$general['owner']];
}
if (!key_exists('bgColor', $general)) {
if (!key_exists('color', $general)) {
$general['bgColor'] = GameConst::$basecolor4;
} else {
$general['bgColor'] = $general['color'];
}
}
if (!key_exists('fgColor', $general)) {
$general['fgColor'] = newColor($general['bgColor']);
}
if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} else {
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
}
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' => $typeDescribe,
'generals' => $hallResult
]);
if(!key_exists('bgColor', $general)){
if(!key_exists('color', $general)){
$general['bgColor'] = GameConst::$basecolor4;
}
else{
$general['bgColor'] = $general['color'];
}
}
?>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
if(!key_exists('fgColor', $general)){
$general['fgColor'] = newColor($general['bgColor']);
}
if(key_exists('picture', $general)){
$imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
}
else{
$general['pictureFullPath'] = GetImageURL(0)."/default.jpg";
}
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
]);
}
?>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+95 -132
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -15,15 +14,15 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if (!$serverID) {
if(!$serverID){
$serverID = UniqueConst::$serverID;
}
if ($serverID === UniqueConst::$serverID) {
if($serverID === UniqueConst::$serverID){
increaseRefresh("연감", 1);
}
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'map_theme']);
$admin = $gameStor->getValues(['startyear','year','month','map_theme']);
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID);
@@ -35,28 +34,30 @@ if ($con >= 2) {
[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
[$s_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) {
if($s_year === null){
echo '인자 에러';
exit();
}
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
[$e_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';
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 ($serverID !== UniqueConst::$serverID && !$yearmonth) {
if($serverID !== UniqueConst::$serverID && !$yearmonth){
$year = $s_year;
$month = $s_month;
} else if (!$yearmonth) {
}
else if (!$yearmonth) {
$year = $admin['year'];
$month = $admin['month'] - 1;
} else {
@@ -69,7 +70,7 @@ if ($serverID !== UniqueConst::$serverID && !$yearmonth) {
$month += 1;
}
}
$now = ($year * 12) + $month;
$now = ($year*12) + $month;
if ($now < $s) {
$now = $s;
@@ -85,131 +86,93 @@ if ($month <= 0) {
$month += 12;
}
$history = $db->queryFirstRow('SELECT * FROM ng_history WHERE server_id = %s AND year = %i AND month = %i', $serverID, $year, $month);
$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);
$nations = Json::decode($history['nations']);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 연감</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'history']) ?>
<script>
var startYear = <?= $s_year ?>;
var startMonth = <?= $s_month ?>;
var lastYear = <?= $e_year ?>;
var lastMonth = <?= $e_month ?>;
var selectYear = <?= $year ?>;
var selectMonth = <?= $month ?>;
var nations = <?= $nations ? $history['nations'] : '{}' ?>;
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 연감</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/history.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<script>
var startYear = <?=$s_year?>;
var startMonth = <?=$s_month?>;
var lastYear = <?=$e_year?>;
var lastMonth = <?=$e_month?>;
var selectYear = <?=$year?>;
var selectMonth = <?=$month?>;
</script>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>
연월 선택 :
<input type=submit name=btn value="◀◀ 이전달">
<select id='yearmonth' name=yearmonth size=1>
<option selected='selected'><?= $year ?>년 <?= $month ?>월</option>
<option><?= $e_year ?>년 12월</option>
</select>
<input type=submit name=btn value='조회하기'>
<input type=submit name=btn value="다음달 ▶▶">
</form>
</td>
</tr>
</table>
<table align=center width=1000 height=520 class='tb_layout bg0'>
<thead>
<tr>
<th colspan=5 align=center class='bg1'> </th>
</tr>
</thead>
<tbody>
<tr height=520>
<td width=698>
<?= getMapHtml($mapTheme) ?>
</td>
<td id='nation_list_frame'>
<table id='nation_list'>
<thead>
<tr>
<th width=130>국명</th>
<th width=70>국력</th>
<th width=45>장수</th>
<th width=45>속령</th>
</tr>
</thead>
<tbody>
<?php foreach ($nations as $nation) : ?>
<tr>
<td><span style='color:<?= newColor($nation['color']) ?>;background-color:<?= $nation['color'] ?>'><?= $nation['name'] ?></td>
<td style='text-align:right'><?= number_format($nation['power']) ?></td>
<td style='text-align:right'><?= number_format($nation['gennum']) ?></td>
<td style='text-align:right'><?= number_format(count($nation['cities'] ?? [])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot></tfoot>
</table>
</td>
</tr>
<tr>
<th colspan=5 align=center class='bg1'> </th>
</tr>
<tr>
<td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_history'])) ?>
</td>
</tr>
<tr>
<th colspan=5 align=center class='bg1'> </th>
</tr>
<tr>
<td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_action'])) ?>
</td>
</tr>
</tbody>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<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 ?>&serverID=<?= $serverID ?>',
showMe: false,
neutralView: true,
useCachedMap: false,
year: <?= $year ?>,
month: <?= $month ?>,
});
</script>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
년월 선택 :
<input type=submit name=btn value="◀◀ 이전달">
<select id='yearmonth' name=yearmonth size=1>
<option selected='selected'><?=$year?>년 <?=$month?>월</option>
<option><?=$e_year?>년 12월</option>
</select>
<input type=submit name=btn value='조회하기'>
<input type=submit name=btn value="다음달 ▶▶">
</form>
</td></tr>
</table>
<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($mapTheme);?>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$history['nation']?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$history['power']?></td>
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$history['gen']?></td>
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$history['city']?></td>
</tr>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<tr>
<td colspan=5 valign=top>
<?=$history['log']?>
</td>
</tr>
<tr><td colspan=5 align=center id=bg1> </td></tr>
<tr>
<td colspan=5 valign=top>
<?=$history['genlog']?>
</td>
</tr>
</table>
<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?>&serverID=<?=$serverID?>',
showMe:false,
neutralView:true,
useCachedMap:false,
year:<?=$year?>,
month:<?=$month?>,
});
</script>
</body>
</html>
</html>
+203 -134
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -10,197 +9,267 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력일람", 2);
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID);
$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']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'extKingdoms']) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/ext.kingdoms.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<?php
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<?php
$query = "select nation,name,color,level,type,power,gennum,capital from nation order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = MYDB_num_rows($result);
$nations = getAllNationStaticInfo();
uasort($nations, function ($lhs, $rhs) {
return $rhs['power'] <=> $lhs['power'];
});
for($i=1; $i <= $count; $i++) {
$nation = MYDB_fetch_array($result); //국가정보
$nations[0] = getNationStaticInfo(0);
$query = "select city,name from city where nation='{$nation['nation']}'"; // 도시 이름 목록
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
foreach ($db->query('SELECT npc,name,city,nation,officer_level,penalty,permission FROM general ORDER BY dedication DESC') as $general) {
$nationID = $general['nation'];
$query = "select npc,name,city from general where nation='{$nation['nation']}' and level='12'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level12 = MYDB_fetch_array($genresult);
if (!key_exists('generals', $nations[$nationID])) {
$nations[$nationID]['generals'] = [];
$query = "select npc,name from general where nation='{$nation['nation']}' and level='11'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level11 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='10'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level10 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='9'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level9 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='8'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level8 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='7'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level7 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='6'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level6 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' and level='5'";
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$level5 = MYDB_fetch_array($genresult);
$query = "select npc,name from general where nation='{$nation['nation']}' order by dedication desc"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
if($level12['name'] == "") { $l12 = "-"; }
elseif($level12['npc'] >= 2) { $l12 = "<font color=cyan>{$level12['name']}</font>"; }
elseif($level12['npc'] == 1) { $l12 = "<font color=skyblue>{$level12['name']}</font>"; }
else { $l12 = $level12['name']; }
if($level11['name'] == "") { $l11 = "-"; }
elseif($level11['npc'] >= 2) { $l11 = "<font color=cyan>{$level11['name']}</font>"; }
elseif($level11['npc'] == 1) { $l11 = "<font color=skyblue>{$level11['name']}</font>"; }
else { $l11 = $level11['name']; }
if($level10['name'] == "") { $l10 = "-"; }
elseif($level10['npc'] >= 2) { $l10 = "<font color=cyan>{$level10['name']}</font>"; }
elseif($level10['npc'] == 1) { $l10 = "<font color=skyblue>{$level10['name']}</font>"; }
else { $l10 = $level10['name']; }
if($level9['name'] == "") { $l9 = "-"; }
elseif($level9['npc'] >= 2) { $l9 = "<font color=cyan>{$level9['name']}</font>"; }
elseif($level9['npc'] == 1) { $l9 = "<font color=skyblue>{$level9['name']}</font>"; }
else { $l9 = $level9['name']; }
if($level8['name'] == "") { $l8 = "-"; }
elseif($level8['npc'] >= 2) { $l8 = "<font color=cyan>{$level8['name']}</font>"; }
elseif($level8['npc'] == 1) { $l8 = "<font color=skyblue>{$level8['name']}</font>"; }
else { $l8 = $level8['name']; }
if($level7['name'] == "") { $l7 = "-"; }
elseif($level7['npc'] >= 2) { $l7 = "<font color=cyan>{$level7['name']}</font>"; }
elseif($level7['npc'] == 1) { $l7 = "<font color=skyblue>{$level7['name']}</font>"; }
else { $l7 = $level7['name']; }
if($level6['name'] == "") { $l6 = "-"; }
elseif($level6['npc'] >= 2) { $l6 = "<font color=cyan>{$level6['name']}</font>"; }
elseif($level6['npc'] == 1) { $l6 = "<font color=skyblue>{$level6['name']}</font>"; }
else { $l6 = $level6['name']; }
if($level5['name'] == "") { $l5 = "-"; }
elseif($level5['npc'] >= 2) { $l5 = "<font color=cyan>{$level5['name']}</font>"; }
elseif($level5['npc'] == 1) { $l5 = "<font color=skyblue>{$level5['name']}</font>"; }
else { $l5 = $level5['name']; }
$generals = $db->query('SELECT no,nation,npc,name,level,penalty,permission FROM general WHERE nation=%i ORDER BY no ASC', $nation['nation']);
$ambassadors = [];
$auditors = [];
foreach($generals as $general){
$generalPermission = checkSecretPermission($general, false);
if($generalPermission == 4){
$ambassadors[] = $general['name'];
}
else if($generalPermission == 3){
$auditors[] = $general['name'];
}
$nations[$nationID]['generals'][] = $general;
}
foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, $cityName, $nationID]) {
if (!key_exists('cities', $nations[$nationID])) {
$nations[$nationID]['cities'] = [];
}
$nations[$nationID]['cities'][$cityID] = $cityName;
}
foreach ($nations as $nation) {
if ($nation['nation'] == 0) {
//재야 도시, 장수
continue;
}
$generals = $nation['generals'];
$chiefs = [];
$ambassadors = [];
$auditors = [];
foreach ($generals as $general) {
$officerLevel = $general['officer_level'];
if ($officerLevel >= 5) {
$chiefs[$officerLevel] = $general;
}
$generalPermission = checkSecretPermission($general, false);
if ($generalPermission == 4) {
$ambassadors[] = $general['name'];
} else if ($generalPermission == 3) {
$auditors[] = $general['name'];
}
}
echo "
echo "
<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>
<td colspan=8 align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}> {$nation['name']} </td>
</tr>
<tr>
<td width=80 align=center class='bg1'> </td>
<td width=170 align=center><font color=yellow>" . getNationType($nation['type']) . "</font></td>
<td width=80 align=center class='bg1'> </td>
<td width=170 align=center>" . getNationLevel($nation['level']) . "</td>
<td width=80 align=center class='bg1'> </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 class='bg1'>장수 / 속령</td>
<td width=170 align=center>{$nation['gennum']} / " . count($nation['cities'] ?? []) . "</td>
";
for ($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--) {
if ($chiefLevel % 4 == 0) {
echo '</tr><tr>';
}
$chief = $chiefs[$chiefLevel] ?? ['name' => '-', 'npc' => 0];
$officerLevelText = getOfficerLevelText($chiefLevel, $nation['level']);
$chiefText = getColoredName($chief['name'], $chief['npc']);
echo "<td class='center bg1'>{$officerLevelText}</td>
<td class='center'>{$chiefText}</td>";
}
echo "</tr>
<td width=80 align=center id=bg1>장수 / 속령</td>
<td width=170 align=center>".count($generals)." / {$citycount}</td>
</tr>
<tr>
<td align=center class='bg1'>외교권자</td><td colspan=5>";
echo join(', ', $ambassadors);
echo "</td><td align=center class='bg1'>조언자</td><td align=center >";
echo count($auditors) . '명';
echo "</td></tr>
<td align=center id=bg1>".getLevel(12, $nation['level'])."</td>
<td align=center>$l12</td>
<td align=center id=bg1>".getLevel(11, $nation['level'])."</td>
<td align=center>$l11</td>
<td align=center id=bg1>".getLevel(10, $nation['level'])."</td>
<td align=center>$l10</td>
<td align=center id=bg1>".getLevel( 9, $nation['level'])."</td>
<td align=center>$l9</td>
</tr>
<tr>
<td align=center id=bg1>".getLevel( 8, $nation['level'])."</td>
<td align=center>$l8</td>
<td align=center id=bg1>".getLevel( 7, $nation['level'])."</td>
<td align=center>$l7</td>
<td align=center id=bg1>".getLevel( 6, $nation['level'])."</td>
<td align=center>$l6</td>
<td align=center id=bg1>".getLevel( 5, $nation['level'])."</td>
<td align=center>$l5</td>
</tr>
<tr>
<td align=center id=bg1>외교권자</td><td colspan=5>";
echo join(', ', $ambassadors);
echo "</td><td align=center id=bg1>조언자</td><td align=center >";
echo count($auditors).'명';
echo "</td></tr>
<tr>
<td colspan=8>";
if ($nation['level'] > 0) {
echo "속령 일람 : ";
if($nation['level'] > 0) {
echo "속령 일람 : ";
foreach ($nation['cities'] as $cityID => $cityName) {
if ($cityID == $nation['capital']) {
echo "<font color=cyan>[{$cityName}]</font>, ";
} else {
echo "{$cityName}, ";
}
for($j=0; $j < $citycount; $j++) {
$city = MYDB_fetch_array($cityresult);
if($city['city'] == $nation['capital']) {
echo "<font color=cyan>[{$city['name']}]</font>, ";
} else {
echo "{$city['name']}, ";
}
} else {
$cityName = CityConst::byID($chiefs[12]['city'])->name;
echo "현재 위치 : <font color=yellow>{$cityName}</font>";
}
echo "
} else {
$query = "select name from city where city='{$level12['city']}'"; // 군주 위치 도시 이름
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityResult);
echo "현재 위치 : <font color=yellow>{$city['name']}</font>";
}
echo"
</td>
</tr>
<tr>
<td colspan=8> 장수 일람 : ";
foreach ($generals as $general) {
if ($general['npc'] >= 2) {
echo "<font color=cyan>{$general['name']}</font>, ";
} elseif ($general['npc'] == 1) {
echo "<font color=skyblue>{$general['name']}</font>, ";
} else {
echo "{$general['name']}, ";
}
}
echo "
foreach($generals as $general){
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; }
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; }
else { echo "{$general['name']}, "; }
}
echo"
</td>
</tr>
</table>
<br>";
}
}
//재야
echo "
//재야
$query = "select npc,name from general where nation='0'"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gencount = MYDB_num_rows($genresult);
$query = "select name from city where nation='0'"; // 도시 이름 목록
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
echo "
<table align=center width=1000 class='tb_layout bg2'>
<tr>
<td colspan=5 align=center> </td>
</tr>
<tr>
<td width=498 align=center>&nbsp;</td>
<td width=123 align=center class='bg1'> </td>
<td width=123 align=center>{$nations[0]['gennum']}</td>
<td width=123 align=center class='bg1'> </td>
<td width=123 align=center>" . count($nations[0]['cities'] ?? []) . "</td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>{$gencount}</td>
<td width=123 align=center id=bg1> </td>
<td width=123 align=center>{$citycount}</td>
</tr>
<tr>
<td colspan=5> 속령 일람 : ";
foreach ($nations[0]['cities'] ?? [] as $cityName) {
echo "{$cityName}, ";
}
echo "
for($j=0; $j < $citycount; $j++) {
$city = MYDB_fetch_array($cityresult);
echo "{$city['name']}, ";
}
echo"
</td>
</tr>
<tr>
<td colspan=5> 장수 일람 : ";
foreach ($nations[0]['generals'] as $general) {
$generalText = getColoredName($general['name'], $general['npc']);
echo "{$generalText}, ";
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; }
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; }
else { echo "{$general['name']}, "; }
}
echo "
echo"
</td>
</tr>
</table>";
?>
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+99 -105
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,11 +6,12 @@ include "func.php";
$type = Util::getReq('type', 'int', 1);
if ($type <= 0 || $type > 8) {
if($type <= 0 || $type > 8){
$type = 1;
}
$db = DB::db();
$connect=$db->get();
increaseRefresh("빙의일람", 2);
@@ -23,117 +23,111 @@ $sel[$type] = "selected";
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 빙의일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>이름</option>
<option <?= $sel[2] ?? '' ?> value=2>국가</option>
<option <?= $sel[3] ?? '' ?> value=3>종능</option>
<option <?= $sel[4] ?? '' ?> value=4>통솔</option>
<option <?= $sel[5] ?? '' ?> value=5>무력</option>
<option <?= $sel[6] ?? '' ?> value=6>지력</option>
<option <?= $sel[7] ?? '' ?> value=7>명성</option>
<option <?= $sel[8] ?? '' ?> value=8>계급</option>
</select>
<input type=submit value='정렬하기'>
</form>
</td>
</tr>
</table>
<?php
$nationName = [];
$nationName[0] = "-";
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
}
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[1]??''?> value=1>이름</option>
<option <?=$sel[2]??''?> value=2>국가</option>
<option <?=$sel[3]??''?> value=3>종능</option>
<option <?=$sel[4]??''?> value=4>통솔</option>
<option <?=$sel[5]??''?> value=5>무력</option>
<option <?=$sel[6]??''?> value=6>지력</option>
<option <?=$sel[7]??''?> value=7>명성</option>
<option <?=$sel[8]??''?> value=8>계급</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<?php
$nationname = [];
$nationname[0] = "-";
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
}
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
switch ($type) {//FIXME: $query 처리 부실
default:
case 1: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by binary(name)"; break;
case 2: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by nation"; break;
case 3: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by sum desc"; break;
case 4: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by leader"; break;
case 5: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by power"; break;
case 6: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by intel"; break;
case 7: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by experience"; break;
case 8: $query = "select npc,nation,name,name2,special,special2,personal,leader,power,intel,leader+power+intel as sum,explevel,experience,dedication from general where npc=1 order by dedication"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
if ($generalListFromPool) {
$generalList = array_merge($generalListFromPool, $generalList);
}
echo"
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=102 align=center id=bg1>희생된 장수</td>
<td width=102 align=center id=bg1>악령 이름</td>
<td width=68 align=center id=bg1>레벨</td>
<td width=118 align=center id=bg1>국가</td>
<td width=68 align=center id=bg1>성격</td>
<td width=88 align=center id=bg1>특기</td>
<td width=68 align=center id=bg1>종능</td>
<td width=68 align=center id=bg1>통솔</td>
<td width=68 align=center id=bg1>무력</td>
<td width=68 align=center id=bg1>지력</td>
<td width=78 align=center id=bg1>명성</td>
<td width=78 align=center id=bg1>계급</td>
</tr>";
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
$nation = $nationname[$general['nation']];
$sortType = [
1 => ['name', true],
2 => ['nation', true],
3 => ['sum', false],
4 => ['leadership', false],
5 => ['strength', false],
6 => ['intel', false],
7 => ['experience', false],
8 => ['dedication', false],
];
[$sortKey, $isAsc] = $sortType[$type];
if ($isAsc) {
usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $lhs[$sortKey] <=> $rhs[$sortKey];
});
if ($general['npc'] >= 2) {
$name = "<font color=cyan>{$general['name']}</font>";
} elseif ($general['npc'] == 1) {
$name = "<font color=skyblue>{$general['name']}</font>";
} else {
usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $rhs[$sortKey] <=> $lhs[$sortKey];
});
$name = "{$general['name']}";
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=102 align=center class='bg1'>희생된 장수</td>
<td width=102 align=center class='bg1'>악령 이름</td>
<td width=68 align=center class='bg1'>레벨</td>
<td width=118 align=center class='bg1'>국가</td>
<td width=68 align=center class='bg1'>성격</td>
<td width=88 align=center class='bg1'>특기</td>
<td width=68 align=center class='bg1'>종능</td>
<td width=68 align=center class='bg1'>통솔</td>
<td width=68 align=center class='bg1'>무력</td>
<td width=68 align=center class='bg1'>지력</td>
<td width=78 align=center class='bg1'>명성</td>
<td width=78 align=center class='bg1'>계급</td>
</tr>
<?php foreach ($generalList as $general) : ?>
<tr>
<td align=center><?= getColoredName($general['name'], $general['npc']) ?></td>
<td align=center><?= $general['owner_name'] ?></td>
<td align=center>Lv <?= $general['explevel'] ?></td>
<td align=center><?= $nationName[$general['nation']] ?></td>
<td align=center><?= displayCharInfo($general['personal']) ?></td>
<td align=center><?= displaySpecialDomesticInfo($general['special']) ?> / <?= displaySpecialWarInfo($general['special2']) ?></td>
<td align=center><?= $general['sum'] ?></td>
<td align=center><?= $general['leadership'] ?></td>
<td align=center><?= $general['strength'] ?></td>
<td align=center><?= $general['intel'] ?></td>
<td align=center><?= $general['experience'] ?></td>
<td align=center><?= $general['dedication'] ?></td>
</tr>
<?php endforeach; ?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
echo "
<tr>
<td align=center>{$name}</td>
<td align=center>{$general['name2']}</td>
<td align=center>Lv {$general['explevel']}</td>
<td align=center>{$nation}</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".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>
<td align=center>{$general['intel']}</td>
<td align=center>{$general['experience']}</td>
<td align=center>{$general['dedication']}</td>
</tr>";
}
echo "
</table>
";
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+58 -60
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -10,79 +9,78 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("세력도", 2);
TurnExecutionHelper::executeAllCommand();
checkTurn();
$mapTheme = $gameStor->map_theme ?? 'che';
$mapTheme = $gameStor->map_theme??'che';
$me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID);
$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']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
?>
<!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/normalize.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script>
window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>';
$(function() {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력도</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../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,
useCachedMap: true
});
reloadWorldMap({
neutralView:true,
showMe:true,
useCachedMap:true
});
});
</script>
<?=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')?>
});
</script>
</head>
<body>
<table align=center width=1200 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<table align=center width=1200 height=520 class='tb_layout bg0'>
<tr height=520>
<td width=498 valign=top>
<?= formatHistoryToHTML(getGlobalActionLogRecent(34)) ?>
</td>
<td width=698>
<?= getMapHtml($mapTheme) ?>
</td>
</tr>
<tr>
<td colspan=2 valign=top>
<?= formatHistoryToHTML(getGlobalHistoryLogRecent(34)) ?>
</td>
</tr>
</table>
<table align=center width=1200 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
<table align=center width=1200 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<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($mapTheme)?>
</td>
</tr>
<tr>
<td colspan=2 valign=top>
<?=getWorldHistoryRecent(34)?>
</td>
</tr>
</table>
<table align=center width=1200 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+150 -204
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,12 +6,13 @@ include "func.php";
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("갱신정보", 2);
$admin = $gameStor->getValues(['year', 'month', 'refresh', 'maxrefresh', 'maxonline']);
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
$log = getRawFileLogRecent(__DIR__ . '/logs/' . UniqueConst::$serverID . '/_traffic.txt', 11, 100);
$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
$date = [];
$year = [];
@@ -21,7 +21,7 @@ $refresh = [];
$online = [];
$curonline = getOnlineNum();
foreach ($log as $i => $value) {
foreach($log as $i=>$value){
$parse = Json::decode($value);
$date[$i] = $parse[0];
$year[$i] = $parse[1];
@@ -31,7 +31,7 @@ foreach ($log as $i => $value) {
}
$year[] = $admin['year'];
$month[] = $admin['month'];
$date[] = TimeUtil::now();
$date[] = date('Y-m-d H:i:s');
if ($admin['maxrefresh'] == 0) {
$admin['maxrefresh'] = 1;
@@ -48,180 +48,154 @@ if ($admin['maxonline'] < $curonline) {
?>
<!DOCTYPE html>
<html>
<head>
<title><?= UniqueConst::$serverName ?>: 트래픽정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style>
.big_bar {
float: left;
position: relative;
height: 30px;
}
<title><?=UniqueConst::$serverName?>: 트래픽정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
.big_bar{
float:left;
position:relative;
height:30px;
}
.big_bar span{
float:right;
padding:0;
margin:0;
line-height:30px;
padding-right:1ch;
}
.big_bar span {
float: right;
padding: 0;
margin: 0;
line-height: 30px;
padding-right: 1ch;
}
.little_bar{
float:left;
position:relative;
height:17px;
}
.little_bar {
float: left;
position: relative;
height: 17px;
}
span.out_bar {
line-height: 30px;
margin-left: 1ch;
}
</style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
span.out_bar{
line-height:30px;
margin-left:1ch;
}
</style>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<br>
<table align=center width=1016>
<tr>
<td align=left>
<table align=center class='tb_layout bg0'>
<tr>
<td colspan=4 align=center class='bg2'>
<font size=5> </font>
</td>
</tr>
<?php
$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 class='bg2'><?= $dt ?></td>
<td width=2 align=center class='bg1'></td>
<td width=320>
<?php if ($w == 0) : ?>
<span class="out_bar"><?= $value ?></span>
<?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
}
?>
<tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td>
</tr>
</table>
</td>
<td align=right>
<table align=center class='tb_layout bg0'>
<tr>
<td colspan=4 align=center class='bg2'>
<font size=5> </font>
</td>
</tr>
<?php
$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 class='bg2'><?= $dt ?></td>
<td width=2 align=center class='bg1'></td>
<td width=320>
<?php if ($w == 0) : ?>
<span class="out_bar"><?= $value ?></span>
<?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
}
?>
<tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table align=center class='tb_layout bg0'>
<tr>
<td colspan=3 align=center class='bg2'>
<font size=5> (순간과도갱신)</font>
</td>
</tr>
<?php
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합';
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
foreach ($refresh_result as $i => $user) {
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
?>
<tr>
<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; ?>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<br>
<table align=center width=1016>
<tr><td align=left>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5> </font></td></tr>
<?php
$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>
<?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
}
?>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
<?php
}
?>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxrefresh']?></td>
</tr>
</table>
</td>
<td align=right>
<table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center id=bg2><font size=5> </font></td></tr>
<?php
$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>
<?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
}
?>
<tr><td colspan=4 height=5 align=center id=bg1></td></tr>
<tr>
<td colspan=4 height=30 align=center id=bg0>최고기록: <?=$admin['maxonline']?></td>
</tr>
</table>
</td></tr>
</table>
<br>
<table align=center class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5> (순간과도갱신)</font></td></tr>
<?php
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합';
$refresh_result = array_merge([$max_refresh], $db->query('SELECT `name`,refresh,`connect` FROM general ORDER BY refresh DESC LIMIT 5'));
foreach ($refresh_result as $i=>$user) {
$w = round($user['refresh'] / max(1, $max_refresh['refresh']) * 100, 1);
$w2 = round(100 - $w, 1);
$color = getTrafficColor($w);
?>
<tr>
<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 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
<?php
@@ -230,7 +204,7 @@ function getTrafficColor($per)
$r = getHex($per);
$b = getHex(100 - $per);
$color = $r . "00" . $b;
return '#' . $color;
return '#'.$color;
}
function getHex($dec)
@@ -244,37 +218,9 @@ function getHex($dec)
function getHexCode($hex)
{
switch ($hex) {
case 0:
return "0";
case 1:
return "1";
case 2:
return "2";
case 3:
return "3";
case 4:
return "4";
case 5:
return "5";
case 6:
return "6";
case 7:
return "7";
case 8:
return "8";
case 9:
return "9";
case 10:
return "A";
case 11:
return "B";
case 12:
return "C";
case 13:
return "D";
case 14:
return "E";
case 15:
return "F";
case 0: return "0"; case 1: return "1"; case 2: return "2"; case 3: return "3";
case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7";
case 8: return "8"; case 9: return "9"; case 10: return "A"; case 11: return "B";
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";
}
}
+258 -271
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -9,163 +8,167 @@ $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 = $isVoteAdmin || $session->userGrade >= 5;
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
$isVoteAdmin |= $session->userGrade >= 5;
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
$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);
$admin = $gameStor->getValues(['develcost', 'voteopen', 'vote_title', 'vote', 'votecomment']);
$vote_title = $admin['vote_title'] ?? '-';
$vote = $admin['vote'] ?: ['-'];
$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 charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style>
.little_bar {
float: left;
position: relative;
height: 17px;
line-height: 17px;
text-align: center;
}
</style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
<script type="text/javascript">
function captureKey(e) {
if (e.keyCode == 13 && e.srcElement.type == 'text') {
form1.btn.value = '댓글';
form1.btn.click();
return false;
}
}
</script>
<title><?=UniqueConst::$serverName?>: 설문조사</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
.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') {
form1.btn.value = '댓글';
form1.btn.click();
return false;
}
}
</script>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post>
<tr>
<td colspan=3 align=center class='bg2'>
<font size=5> (<?= $admin['develcost'] * 5 ?>금과 추첨으로 유니크템 증정!)</font>
</td>
</tr>
<?php
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center id=bg2><font size=5> (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<?php
if ($isVoteAdmin) {
echo "
if ($isVoteAdmin) {
echo "
<tr>
<td width=48 align=center><input type=submit name=btn value='알림'></td>
<td width=98 align=center><input type=submit name=btn value='수정'></td>
<td width=848 align=left><input type=text name=title style=width:848px;></td>
</tr>
";
}
}
$vote_title = Tag2Code($vote_title);
echo "
$vote_title = Tag2Code($vote_title);
echo "
<tr>
<td colspan=2 width=148 align=center class='bg1'> </td>
<td colspan=2 width=148 align=center id=bg1> </td>
<td width=848 align=left>&nbsp;{$vote_title}</td>
</tr>
";
$voteCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote>0 AND npc<2');
$allCount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
$query = "select no from general where vote>0 and npc<2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$voteCount = MYDB_num_rows($result);
$percentage = round($voteCount / $allCount * 100, 1);
$query = "select no from general where npc<2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$allCount = MYDB_num_rows($result);
$voteTypeCount = count($vote);
for ($i = 1; $i < $voteTypeCount; $i++) {
echo "
$percentage = round($voteCount / $allCount * 100, 1);
$voteTypeCount = count($vote);
for ($i=1; $i < $voteTypeCount; $i++) {
echo "
<tr>
<td width=48 align=center style=color:" . getNewColor($i) . "; bgcolor=" . getVoteColor($i) . ">{$i}.</td>
<td width=48 align=center style=color:".getNewColor($i)."; bgcolor=".getVoteColor($i).">{$i}.</td>
<td width=98 align=center>
";
if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
<input type=radio name=sel value={$i}>
";
} elseif ($admin['voteopen'] >= 1 || $isVoteAdmin) {
$vCount = $db->queryFirstField('SELECT count(no) FROM general WHERE vote=%i', $i);
} 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);
$per = @round($vCount / $voteCount * 100, 1);
echo "{$vCount} 표 ({$per}%)";
} else {
echo "추후공개";
}
$vote[$i] = Tag2Code($vote[$i]);
echo "
$per = @round($vCount / $voteCount * 100, 1);
echo "{$vCount} 표 ({$per}%)";
} else {
echo "추후공개";
}
$vote[$i] = Tag2Code($vote[$i]);
echo "
</td>
<td align=left>&nbsp;{$vote[$i]}</td>
</tr>
";
}
}
echo "
echo "
<tr>
";
if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
<td align=center>투표</td>
<td align=center><input type=submit name=btn value='투표'></td>
";
} else {
echo "
} else {
echo "
<td colspan=2 align=center>결산</td>
";
}
echo "
}
echo "
<td align=left>&nbsp;투표율 : {$voteCount} / {$allCount} ({$percentage} %)</td>
</tr>
";
if ($isVoteAdmin) {
echo "
if ($isVoteAdmin) {
echo "
<tr>
<td align=center><input type=submit name=btn value='리셋'></td>
<td align=center><input type=submit name=btn value='추가'></td>
<td align=left><input type=text name=str style=width:848px;></td>
</tr>
";
}
}
if ($admin['votecomment']) {
$comment = $admin['votecomment'];
$commentCount = count($comment);
} else {
$commentCount = 0;
}
echo "
if ($admin['votecomment']) {
$comment = $admin['votecomment'];
$commentCount = count($comment);
} else {
$commentCount = 0;
}
echo "
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=4 align=center class='bg1'> </td>
<td colspan=4 align=center id=bg1> </td>
</tr>
";
for ($i = 0; $i < $commentCount; $i++) {
$cmt = $comment[$i];
$cmt[2] = Tag2Code($cmt[2]);
$j = $i + 1;
echo "
for ($i=0; $i < $commentCount; $i++) {
$cmt = $comment[$i];
$cmt[2] = Tag2Code($cmt[2]);
$j = $i+1;
echo "
<tr>
<td width=28 align=center>{$j}.</td>
<td width=130 align=center>{$cmt[0]}</td>
@@ -173,205 +176,211 @@ $vote = $admin['vote'] ?: ['-'];
<td width=712 align=left>&nbsp;{$cmt[2]}</td>
</tr>
";
}
if ($me['no'] > 0) {
echo "
}
if ($me['no'] > 0) {
echo "
<tr>
<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 class='tb_layout bg0'>
<tr>
<td colspan=3 align=center class='bg2'>
<font size=5>
<?php
if ($isVoteAdmin) {
echo "
}
?>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=3 align=center id=bg2><font size=5>
<?php
if ($isVoteAdmin) {
echo "
<input type=submit name=btn value='숨김'>
<input type=submit name=btn value='전체통계만'>
<input type=submit name=btn value='전부'>";
}
echo "
}
echo "
</font></td></tr>";
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
echo "
if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
echo "
<tr>
<td width=130 align=center> </td>
<td width=128 align=center>{$voteCount} / {$allCount} ({$percentage} %)</td>
<td width=742>
";
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
$memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'));
$totalVote = [];
$nationVoteCount = [];
$nationVote = [];
$totalVote = [];
$nationVoteCount = [];
$nationVote = [];
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
$nation = $row['nation'];
$ownVote = $row['vote'];
$cnt = $row['cnt'];
foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) {
$nation = $row['nation'];
$ownVote = $row['vote'];
$cnt = $row['cnt'];
if (!isset($totalVote[$ownVote])) {
$totalVote[$ownVote] = 0;
}
if (!isset($totalVote[$ownVote])) {
$totalVote[$ownVote] = 0;
}
if (!isset($nationVoteCount[$nation])) {
$nationVoteCount[$nation] = 0;
$nationVote[$nation] = [];
}
if (!isset($nationVoteCount[$nation])) {
$nationVoteCount[$nation] = 0;
$nationVote[$nation] = [];
}
if (!isset($nationVote[$nation][$ownVote])) {
$nationVote[$nation][$ownVote] = 0;
}
if (!isset($nationVote[$nation][$ownVote])) {
$nationVote[$nation][$ownVote] = 0;
}
$totalVote[$ownVote] += $cnt;
$nationVoteCount[$nation] += $cnt;
$nationVote[$nation][$ownVote] += $cnt;
}
$totalVote[$ownVote] += $cnt;
$nationVoteCount[$nation] += $cnt;
$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;
}
$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;"; }
?>
<?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
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
?>
<?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 "
echo "
</td>
</tr>
";
}
}
if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=0 AND npc <2');
if ($memCount == 0) {
$memCount = 1;
}
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);
if ($memCount == 0) {
$memCount = 1;
}
if (!isset($nationVoteCount[0])) {
$nationVoteCount[0] = 0;
}
$percentage = round($nationVoteCount[0] / $memCount * 100, 1);
if (!isset($nationVoteCount[0])) {
$nationVoteCount[0] = 0;
}
$percentage = round($nationVoteCount[0] / $memCount * 100, 1);
echo "
echo "
<tr>
<td align=center bgcolor=black> </td>
<td align=center>{$nationVoteCount[0]} / {$memCount} ({$percentage} %)</td>
<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;"; }
?>
<?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
}
$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;"; }
?>
<?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 "
echo "
</td>
</tr>
";
foreach ($db->query('SELECT nation,color,name,gennum from nation order by gennum desc') as $i => $nation) {
$memCount = $db->queryFirstField('SELECT count(no) FROM general WHERE nation=%i AND npc<2', $nation['nation']);
$query = "select nation,color,name,gennum from nation order by gennum desc";
$nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nationcount = MYDB_num_rows($nationResult);
for ($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($nationResult);
$query = "select no from general where nation='{$nation['nation']}' and npc<2";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$memCount = MYDB_num_rows($result);
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
if ($memCount == 0) {
$percentage = 100;
} else {
$percentage = round($voteCount / $memCount * 100, 1);
}
$voteCount = $nationVoteCount[$nation['nation']] ?? 0;
if($memCount == 0){
$percentage = 100;
}
else{
$percentage = round($voteCount / $memCount * 100, 1);
}
echo "
echo "
<tr>
<td align=center style=color:" . newColor($nation['color']) . "; bgcolor={$nation['color']}>{$nation['name']}</td>
<td align=center style=color:".newColor($nation['color'])."; bgcolor={$nation['color']}>{$nation['name']}</td>
<td align=center>{$voteCount} / {$memCount} ({$percentage} %)</td>
<td align=center>
";
$totalPer = 0;
for ($k = 0; $k < $voteTypeCount; $k++) {
if ($memCount == 0) {
$per = 0;
continue;
}
$totalPer = 0;
for ($k=0; $k < $voteTypeCount; $k++) {
if($memCount == 0){
$per = 0;
continue;
}
$per = round(($nationVote[$nation['nation']][$k] ?? 0) / $memCount * 100, 1);
$per = round($nationVote[$nation['nation']][$k]??0 / $memCount * 100, 1);
if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer;
} else {
$totalPer += $per;
}
if($i == $voteTypeCount-1){
$per = 100-$totalPer;
}
else{
$totalPer += $per;
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
?>
<?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
}
// if($per < 5) { $vote['cnt'] = "&nbsp;"; }
?>
<?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 "
echo "
</td>
</tr>
";
}
}
?>
</form>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
}
}
?>
</form>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
<?php
@@ -382,31 +391,15 @@ function getVoteColor($type)
}
switch ($type) {
default:
case 0:
$color = "black";
break;
case 1:
$color = "red";
break;
case 2:
$color = "orange";
break;
case 3:
$color = "yellow";
break;
case 4:
$color = "green";
break;
case 5:
$color = "blue";
break;
case 6:
$color = "navy";
break;
case 7:
$color = "purple";
break;
default:
case 0: $color = "black"; break;
case 1: $color = "red"; break;
case 2: $color = "orange"; break;
case 3: $color = "yellow"; break;
case 4: $color = "green"; break;
case 5: $color = "blue"; break;
case 6: $color = "navy"; break;
case 7: $color = "purple"; break;
}
return $color;
@@ -419,15 +412,9 @@ function getNewColor($type)
}
switch ($type) {
case 2:
$color = "black";
break;
case 3:
$color = "black";
break;
default:
$color = "white";
break;
case 2: $color = "black"; break;
case 3: $color = "black"; break;
default:$color = "white"; break;
}
return $color;
-8
View File
@@ -1,8 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
APIHelper::launch(dirname(__FILE__));
+230 -233
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -14,10 +13,13 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("거래장", 2);
$me = $db->queryFirstRow('SELECT no,special,con,turntime from general where owner=%i', $userID);
$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);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -25,12 +27,17 @@ if ($con >= 2) {
exit();
}
$tradeCount = $db->queryFirstField('SELECT count(no) FROM auction WHERE no1=%i', $me['no']);
$bidCount = $db->queryFirstField('SELECT count(no) FROM auction where no2=%i', $me['no']);
$query = "select no from auction where no1='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$tradeCount = MYDB_num_rows($result);
$query = "select no from auction where no2='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$bidCount = MYDB_num_rows($result);
$btCount = $tradeCount + $bidCount;
if ($session->userGrade >= 5 || $btCount < 1) {
if ($session->userGrade >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
$btn = "submit";
} else {
$btn = "hidden";
@@ -45,78 +52,76 @@ if ($msg2 == "") {
?>
<!DOCTYPE html>
<html>
<head>
<title><?= UniqueConst::$serverName ?>: 거래장</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
<title><?=UniqueConst::$serverName?>: 거래장</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td align=center class='bg2'>
<font color=orange size=6><b> </b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')">
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php>
<tr>
<td colspan=11 align=center bgcolor=orange>
<font size=5> </font>
</td>
</tr>
<tr align=center class='bg1'>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>판매자</td>
<td width=118>물품</td>
<td width=88>수량</td>
<td width=88>시작판매가</td>
<td width=88>현재판매가</td>
<td width=88>즉시판매가</td>
<td width=48>단가</td>
<td width=98>구매 예정자</td>
<td width=148>거래종료</td>
</tr>
<?php
$chk = 0;
foreach ($db->query('SELECT * from auction where type=0 order by expire') as $auction) {
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr((string)$pv, 0, 4);
<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 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>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>판매자</td>
<td width=118>물품</td>
<td width=88>수량</td>
<td width=88>시작판매가</td>
<td width=88>현재판매가</td>
<td width=88>즉시판매가</td>
<td width=48>단가</td>
<td width=98>구매 예정자</td>
<td width=148>거래종료</td>
</tr>
<?php
$query = "select * from auction where type=0 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
echo "
$chk = 0;
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
$itemname = GetStuffName($auction['stuff']);
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr((string)$pv, 0, 4);
if ($auction['stuff'] != 0) {
$pv = '-';
}
echo "
<tr align=center>
<td>{$auction['no']}</td>
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
<td>{$auction['name1']}</td>
<td></td>
<td>{$itemname}</td>
<td>{$auction['amount']}</td>
<td> {$auction['cost']}</td>
<td>{$alert} {$auction['value']}{$alert2}</td>
@@ -126,88 +131,95 @@ if ($msg2 == "") {
<td>{$auction['expire']}</td>
</tr>
";
}
?>
<tr height=25>
<td align=center class='bg1'>등록결과</td>
<td colspan=10><?= ConvertLog($msg) ?></td>
</tr>
<tr>
<td align=center class='bg1'>입찰등록</td>
<td colspan=10>
 지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?= $btn ?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center class='bg1'>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>
 물품:
 판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
<input type=<?= $btn ?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
</td>
</tr>
<tr>
<td colspan=11>
<font color=cyan>Hint</font>) 거래자가 판매(물품 판매, 수령), 입찰자가 구매(물품 구입, 지불).<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 판매자 유리.<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 입찰자 유리.<br>
</td>
</tr>
</form>
</table>
<br>
<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 class='bg1'>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>구매자</td>
<td width=118>물품</td>
<td width=88>수량</td>
<td width=88>구매가</td>
<td width=88>현재구매</td>
<td width=88>즉시구매가</td>
<td width=48>단가</td>
<td width=98>판매 예정자</td>
<td width=148>거래종료</td>
</tr>
<?php
$chk = 0;
foreach ($db->query('SELECT * from auction where type=1 order by expire') as $auction) {
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr((string)$pv, 0, 4);
echo "
}
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td colspan=10><?=ConvertLog($msg)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td colspan=10>
 지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center id=bg1>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>
 물품: <select size=1 name=stuff style=color:white;background-color:black;>
<option style=color:white; value=0></option>
</select>
 판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
<input type=<?=$btn?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
</td>
</tr>
<tr>
<td colspan=11>
<font color=cyan>Hint</font>) 거래자가 판매(물품 판매, 수령), 입찰자 구매(물품 구입, 지불).<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 판매자 유리.<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 입찰자 유리.<br>
</td>
</tr>
</form>
</table>
<br>
<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>
<td width=68>거래번호</td>
<td width=48>선택</td>
<td width=98>구매자</td>
<td width=118>물품</td>
<td width=88>수량</td>
<td width=88>시작구매가</td>
<td width=88>현재구매가</td>
<td width=88>시구매가</td>
<td width=48></td>
<td width=98>판매 예정자</td>
<td width=148>거래종료</td>
</tr>
<?php
$query = "select * from auction where type=1 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
$chk = 0;
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
$itemname = GetStuffName($auction['stuff']);
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr((string)$pv, 0, 4);
if ($auction['stuff'] != 0) {
$pv = '-';
}
echo "
<tr align=center>
<td>{$auction['no']}</td>
<td><input type=radio name=sel value={$auction['no']}{$radio}></td>
<td>{$auction['name1']}</td>
<td></td>
<td>{$itemname}</td>
<td>{$auction['amount']}</td>
<td> {$auction['cost']}</td>
<td>{$alert} {$auction['value']}{$alert2}</td>
@@ -217,90 +229,75 @@ if ($msg2 == "") {
<td>{$auction['expire']}</td>
</tr>
";
}
?>
<tr height=25>
<td align=center class='bg1'>등록결과</td>
<td colspan=10><?= ConvertLog($msg2) ?></td>
</tr>
<tr>
<td align=center class='bg1'>입찰등록</td>
<td colspan=10>
 수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?= $btn ?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center class='bg1'>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>
 물품:
 구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
<input type=<?= $btn ?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
</td>
</tr>
<tr>
<td colspan=11>
<font color=cyan>Hint</font>) 거래자가 구매(물품 구매, 지불), 입찰자가 판매(물품 판매, 수령).<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 구매자 유리.<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 입찰자 유리.<br>
</td>
</tr>
</form>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td align=center class='bg2'>
<font size=5> </font>
</td>
</tr>
<tr>
<td>
<?= getAuctionLogRecent(20) ?>
</td>
</tr>
<tr>
<td align=center class='bg2'>
<font size=5> </font>
</td>
</tr>
<tr>
<td>
<font color=white size=2>
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
<font color=cyan>Hint</font>) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 니다.<br>
ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.<br>
<font color=cyan>Hint</font>) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)<br>
<font color=cyan>Hint</font>) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 니다.<br>
ㆍ마감임박때 입찰하는 경우 입찰후 1 후로 종료시간이 연장됩니다.<br>
ㆍ즉시구매가로 입찰하는 경우 입찰후 1 후로 종료시간이 결정됩니다.<br>
ㆍ악용 방지를 위해 50% ~ 200% 가격에서 거래시작이 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가 90% 이하로 가능합니다.<br>
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
ㆍ기본금쌀 1000 거래에 사용되지 못합니다.<br>
ㆍ유찰될 때는 거래 과실자에게 거래금의 1% 벌금으로 부과됩니다.<br>
<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.</font><br>
<font color=red> 최고가 거래 </font> 혹은 <font color=red> 최저가 거래 </font> 암거래 악용의 가능성이니 감시 부탁드립니다.<br>
ㆍ거래와 입찰은 취소가 불가능하니 주의하세요!<br>
<font color=cyan>Hint</font>) 단가는 /쌀로 쌀1을 거래하기 위한 금의 양입니다.<br>
<font color=cyan>Hint</font>) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.<br>
<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
ㆍ즐거운 거래!
</font>
</td>
</tr>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
}
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td colspan=10><?=ConvertLog($msg2)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td colspan=10>
 수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
<td align=center id=bg1>거래등록</td>
<td colspan=10>
 종료: <input type=text style=color:white;background-color:black; size=2 maxlength=2 name=term value=12>
 물품: <select size=1 name=stuff style=color:white;background-color:black;>
<option style=color:white; value=0></option>
</select>
 구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
<input type=<?=$btn?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
</td>
</tr>
<tr>
<td colspan=11>
<font color=cyan>Hint</font>) 거래자가 구매(물품 구매, 지불), 입찰자가 판매(물품 판매, 수령).<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 낮을수록 구매자 유리.<br>
<font color=cyan>Hint</font>) 단가가 1.00보다 높을수록 입찰자 유리.<br>
</td>
</tr>
</form>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td align=center id=bg2><font size=5> </font></td></tr>
<tr><td>
<?=getAuctionLogRecent(20)?>
</td></tr>
<tr><td align=center id=bg2><font size=5> </font></td></tr>
<tr><td>
<font color=white size=2>
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
<font color=cyan>Hint</font>) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 겁니다.<br>
ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.<br>
<font color=cyan>Hint</font>) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)<br>
<font color=cyan>Hint</font>) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 겁니다.<br>
ㆍ마감임박때 입찰하는 경우 입찰후 1 후로 종료시간이 연장됩니다.<br>
ㆍ즉시구매가로 입찰하는 경우 입찰후 1 후로 종료시간이 결정됩니다.<br>
ㆍ악용 방지를 위해 50% ~ 200% 가격에서 거래시작이 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.<br>
ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.<br>
ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다.<br>
ㆍ기본금쌀 1000 거래에 사용되지 못합니다.<br>
ㆍ유찰될 때는 거래 과실자에게 거래금의 1% 벌금으로 부과됩니다.<br>
<font color=magenta>10단위로 거래가 가능합니다. 1자리는 반올림 처리 니다.</font><br>
<font color=red> 최고가 거래 </font> 혹은 <font color=red> 최저가 거래 </font> 암거래 악용의 가능성이니 감시 부탁드립니다.<br>
ㆍ거래와 입찰 취소가 불가능하니 주의하세요!<br>
<font color=cyan>Hint</font>) 단가는 /쌀로 쌀1을 거래하기 위한 금의 양입니다.<br>
<font color=cyan>Hint</font>) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.<br>
<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
ㆍ즐거운 거래!
</font>
</td></tr>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+124 -158
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,52 +6,40 @@ include "func.php";
$v = new Validator($_POST + $_GET);
$v->rule('required', 'gen')
->rule('integer', 'gen');
->rule('integer', 'gen');
$btn = Util::getReq('btn');
$gen = Util::getReq('gen', 'int', 0);
$reqQueryType = Util::getReq('query_type', 'string', null);
$type = Util::getReq('type', 'int', 0);
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
$queryMap = [
'turntime' => ['최근턴', 0, function ($lhs, $rhs) {
return - ($lhs['turntime'] <=> $rhs['turntime']);
}],
'recent_war' => ['최근전투', 1, function ($lhs, $rhs) {
return - ($lhs['recent_war'] <=> $rhs['recent_war']);
}],
'name' => ['장수명', 0, function ($lhs, $rhs) {
if ($lhs['npc'] !== $rhs['npc']) {
return $lhs['npc'] <=> $rhs['npc'];
}
return $lhs['name'] <=> $rhs['name'];
}],
'warnum' => ['전투수', 2, function ($lhs, $rhs) {
return - ($lhs['warnum'] <=> $rhs['warnum']);
}]
];
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
$reqQueryType = Util::array_first_key($queryMap);
if ($type < 0 || $type > 3) {
$type = 0;
}
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("감찰부", 2);
//전투 추진을 위해 갱신
TurnExecutionHelper::executeAllCommand();
checkTurn();
$gameStor->resetCache();
$testGeneralNationID = $db->queryFirstField('SELECT nation FROM general WHERE no = %i', $gen);
$query = "select nation from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$general = MYDB_fetch_array($result);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,permission,penalty from general where owner=%i', $userID);
$nationID = $me['nation'];
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -61,16 +48,17 @@ if ($con >= 2) {
}
$permission = checkSecretPermission($me);
if ($permission < 0) {
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
} else if ($permission < 1) {
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
//잘못된 접근
if ($testGeneralNationID != $nationID) {
if ($general['nation'] != $me['nation']) {
$gen = 0;
}
@@ -78,140 +66,118 @@ if ($btn == '정렬하기') {
$gen = 0;
}
$sel = [];
$sel[$type] = "selected";
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID);
} else if ($reqArgType === 1) {
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
} else if ($reqArgType === 2) {
$generalBasicList = $db->query(
'SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id
WHERE rank_data.type = %s AND general.nation = %i',
$reqQueryType,
$reqQueryType,
$nationID
);
} else if ($reqArgType === 3) {
$generalBasicList = array_map(function ($arr) {
$arr['aux'] = Json::decode($arr['aux']);
return $arr;
}, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID));
} else {
throw new \sammo\MustNotBeReachedException();
}
usort($generalBasicList, $comp);
if (!$gen) {
$gen = $generalBasicList[0]['no'];
}
$showGeneral = General::createGeneralObjFromDB($gen);
?>
<!DOCTYPE html>
<html>
<head>
<title><?= UniqueConst::$serverName ?>: 감찰부</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
<title><?=UniqueConst::$serverName?>: 감찰부</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>
정렬순서 :
<select name='query_type' size=1>
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
<option <?= $queryType == $reqQueryType ? 'selected' : '' ?> value='<?= $queryType ?>'><?= $queryTypeText ?></option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php foreach ($generalBasicList as $general) : ?>
<option <?= $gen == $general['no'] ? 'selected' : '' ?> value='<?= $general['no'] ?>'><?= $general['officer_level'] > 4 ? "*{$general['name']}*" : $general['name'] ?> (<?= substr($general['turntime'], 14, 5) ?>)</option>
<?php endforeach; ?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td>
</tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center class='bg1'>
<font color=skyblue size=3> </font>
</td>
<td width=50% align=center class='bg1'>
<font color=orange size=3> </font>
</td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($showGeneral);
generalInfo2($showGeneral); ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
</td>
</tr>
<tr>
<td align=center class='bg1'>
<font color=orange size=3>전투 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getBattleDetailLogRecent($gen, 24)) ?>
</td>
<td valign=top>
<?= formatHistoryToHTML(getBattleResultRecent($gen, 24)) ?>
</td>
</tr>
<?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?>
<tr>
<td align=center class='bg1'>
<font color=orange size=3>개인 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>&nbsp;</font>
</td>
</tr>
<tr>
<td valign=top>
<?= formatHistoryToHTML(getGeneralActionLogRecent($gen, 24)) ?>
</td>
<td valign=top>
</td>
</tr>
<?php endif; ?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td>
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<option <?=$sel[0]??''?> value=0>최근턴</option>
<option <?=$sel[1]??''?> value=1>최근전투</option>
<option <?=$sel[2]??''?> value=2>장수명</option>
<option <?=$sel[3]??''?> value=3>전투수</option>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php
switch ($type) {
default:
case 0: $query = "select no,name,npc from general where nation='{$me['nation']}' order by turntime desc"; break;
case 1: $query = "select no,name,npc from general where nation='{$me['nation']}' order by recwar desc"; break;
case 2: $query = "select no,name,npc from general where nation='{$me['nation']}' order by npc,binary(name)"; break;
case 3: $query = "select no,name,npc from general where nation='{$me['nation']}' order by warnum desc"; break;
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($result);
$npc = 0;
for ($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
// 선택 없으면 맨 처음 장수
if ($gen == 0) {
$gen = $general['no'];
}
if($gen == $general['no']){
$npc = $general['npc'];
}
if ($gen == $general['no']) {
echo "
<option selected value={$general['no']}>{$general['name']}</option>";
} else {
echo "
<option value={$general['no']}>{$general['name']}</option>";
}
}
?>
</select>
<input type=submit name=btn value='조회하기'>
</form>
</td></tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td width=50% align=center id=bg1><font color=skyblue size=3> </font></td>
<td width=50% align=center id=bg1><font color=orange size=3> </font></td>
</tr>
<tr>
<td valign=top>
<?php generalInfo($gen); generalInfo2($gen); ?>
</td>
<td valign=top>
<?=getGeneralHistoryAll($gen)?>
</td>
</tr>
<tr>
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
</tr>
<tr>
<td valign=top>
<?=getBatLogRecent($gen, 24)?>
</td>
<td valign=top>
<?=getBatResRecent($gen, 24)?>
</td>
</tr>
<?php if($npc > 1 || $permission >= 2): ?>
<tr>
<td align=center id=bg1><font color=orange size=3>개인 기록</font></td>
<td align=center id=bg1><font color=orange size=3>&nbsp;</font></td>
</tr>
<tr>
<td valign=top>
<?=getGenLogRecent($gen, 24)?>
</td>
<td valign=top>
</td>
</tr>
<?php endif; ?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+343 -495
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -10,24 +9,20 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("베팅장", 1);
TurnExecutionHelper::executeAllCommand();
checkTurn();
$generalID = $session->generalID;
$query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
//NOTE: general_id만 빼기 귀찮음.
$myBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = %i', $generalID);
$myBet = array_splice($myBet, -16);
$globalBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = 0');
$globalBet = array_splice($globalBet, -16);
$me = $db->queryFirstRow('SELECT no,tournament,con,turntime from general where owner=%i', $userID);
$myBetTotal = array_sum($myBet);
$globalBetTotal = array_sum($globalBet);
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'develcost']);
$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']);
if ($con >= 2) {
@@ -36,42 +31,21 @@ if ($con >= 2) {
}
switch ($admin['tnmt_type']) {
default:
throw new \RuntimeException('Invalid tnmt_type');
case 0:
$tnmt_type = "<font color=cyan>전력전</font>";
$tp = "total";
$tp2 = "종합";
$tp3 = "total";
break;
case 1:
$tnmt_type = "<font color=cyan>통솔전</font>";
$tp = "leadership";
$tp2 = "통솔";
$tp3 = "leadership";
break;
case 2:
$tnmt_type = "<font color=cyan>일기토</font>";
$tp = "strength";
$tp2 = "무력";
$tp3 = "strength";
break;
case 3:
$tnmt_type = "<font color=cyan>설전</font>";
$tp = "intel";
$tp2 = "지력";
$tp3 = "intel";
break;
default: throw new \RuntimeException('Invalid tnmt_type');break;
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break;
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break;
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break;
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break;
}
$str1 = getTournament($admin['tournament']);
$str2 = getTournamentTime();
if ($str2) {
$str2 = ', ' . $str2;
if($str2){
$str2 = ', '.$str2;
}
$str3 = getTournamentTerm();
if ($str3) {
$str3 = ', ' . $str3;
if($str3){
$str3 = ', '.$str3;
}
?>
@@ -80,348 +54,311 @@ if ($str3) {
<?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 베팅장</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'betting']) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 베팅장</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<table align=center width=1120 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
</table>
<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 class='bg2'>
<font color=limegreen size=6>16 상황</font><br>
<font color=orange size=3>(전체 금액 : <?= $globalBetTotal ?> / 내 투자 금액 : <?= $myBetTotal ?>)</font>
</td>
</tr>
</table>
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
<tr align=center>
<td height=10 colspan=16></td>
</tr>
<tr align=center>
<?php
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
while (count($generalList) < 1) {
$generalList[] = [
'name' => '-',
'npc' => 0,
'win' => 0
];
}
foreach ($generalList as $i => $general) {
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
}
echo "<td colspan=16>{$general['name']}</td>";
}
<table align=center width=1120 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
</table>
<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 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
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$general = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'win'=>0
];
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
echo "<td colspan=16>{$general['name']}</td>";
}
echo "
echo "
</tr>
<tr align=center>";
$cent = [];
$line = [];
$gen = [];
for ($i = 0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
while (count($generalList) < 2) {
$generalList[] = [
'name' => '-',
'npc' => 0,
'win' => 0
];
}
foreach ($generalList as $i => $general) {
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i = 0; $i < 1; $i++) {
$cent[$i] = $cent[$i] . "" . "</font>";
$line[$i * 2] = $line[$i * 2] . "━━━━━━━━━━━━━━━━━━━━━━━━━━━" . "</font>";
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━━━━━━━━━━━━━━━┓" . "</font>";
echo "<td colspan=16>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
}
echo "
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$cent = [];
$line = [];
$gen = [];
for ($i=0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 2; $i++) {
$general = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'win'=>0
];
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i=0; $i < 1; $i++) {
$cent[$i] = $cent[$i].""."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
echo "<td colspan=16>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
}
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 2; $i++) {
echo "<td colspan=8>{$gen[$i]}</td>";
}
for ($i=0; $i < 2; $i++) {
echo "<td colspan=8>{$gen[$i]}</td>";
}
echo "
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
while (count($generalList) < 4) {
$generalList[] = [
'name' => '-',
'npc' => 0,
'win' => 0
];
}
foreach ($generalList as $i => $general) {
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i = 0; $i < 2; $i++) {
$cent[$i] = $cent[$i] . "" . "</font>";
$line[$i * 2] = $line[$i * 2] . "━━━━━━━━━━━━━" . "</font>";
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━┓" . "</font>";
echo "<td colspan=8>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
}
echo "
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 4; $i++) {
$general = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'win'=>0
];
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i=0; $i < 2; $i++) {
$cent[$i] = $cent[$i].""."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━"."</font>";
echo "<td colspan=8>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
}
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 4; $i++) {
echo "<td colspan=4>{$gen[$i]}</td>";
}
for ($i=0; $i < 4; $i++) {
echo "<td colspan=4>{$gen[$i]}</td>";
}
echo "
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
while (count($generalList) < 8) {
$generalList[] = [
'name' => '-',
'npc' => 0,
'win' => 0
];
}
foreach ($generalList as $i => $general) {
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i = 0; $i < 4; $i++) {
$cent[$i] = $cent[$i] . "" . "</font>";
$line[$i * 2] = $line[$i * 2] . "━━━━━━" . "</font>";
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━┓" . "</font>";
echo "<td colspan=4>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
}
echo "
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 8; $i++) {
$general = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'win'=>0
];
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i=0; $i < 4; $i++) {
$cent[$i] = $cent[$i].""."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━"."</font>";
echo "<td colspan=4>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
}
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 8; $i++) {
echo "<td colspan=2>{$gen[$i]}</td>";
}
for ($i=0; $i < 8; $i++) {
echo "<td colspan=2>{$gen[$i]}</td>";
}
echo "
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
while (count($generalList) < 16) {
$generalList[] = [
'name' => '-',
'npc' => 0,
'win' => 0
];
}
foreach ($generalList as $i => $general) {
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i = 0; $i < 8; $i++) {
$cent[$i] = $cent[$i] . "" . "</font>";
$line[$i * 2] = $line[$i * 2] . "━━" . "</font>";
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━┓" . "</font>";
echo "<td colspan=2>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
}
echo "
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 16; $i++) {
$general = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'win'=>0
];
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for ($i=0; $i < 8; $i++) {
$cent[$i] = $cent[$i].""."</font>";
$line[$i*2] = $line[$i*2]."┏━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━"."</font>";
echo "<td colspan=2>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>";
}
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 16; $i++) {
echo "<td width=70>{$gen[$i]}</td>";
}
for ($i=0; $i < 16; $i++) {
echo "<td width=70>{$gen[$i]}</td>";
}
$bet = [];
$gold = [];
$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$myBet = [];
$bet = [];
$gold = [];
for ($i = 0; $i < 16; $i++) {
if ($globalBet[$i] == 0) {
$bet[$i] = "";
} else {
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
}
}
for ($i=0; $i < 16; $i++) {
$myBet[$i] = $me["bet{$i}"];
}
for ($i = 0; $i < 16; $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 class='tb_layout bg0'>
<tr align=center>
<td height=10 colspan=16></td>
</tr>
<?php
echo "
for ($i=0; $i < 16; $i++) {
if($admin["bet{$i}"] == 0){
$bet[$i] = "";
}
else{
$bet[$i] = round($admin['bet'] / $admin["bet{$i}"], 2);
}
}
for ($i=0; $i < 16; $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 class='tb_layout bg0'>
<tr align=center><td height=10 colspan=16></td></tr>
<?php
echo "
<tr align=center>";
for ($i = 0; $i < 16; $i++) {
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
}
?>
</tr>
<tr align=center>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
</tr>
<tr align=center>
<?php
for ($i = 0; $i < 16; $i++) {
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
}
?>
</tr>
<tr align=center>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr align=center>
<?php
for ($i = 0; $i < 16; $i++) {
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
}
for ($i=0; $i < 16; $i++) {
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
}
?>
</tr>
<tr align=center>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td>
</tr>
<tr align=center>
<?php
for ($i=0; $i < 16; $i++) {
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
}
?>
</tr>
<tr align=center>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr align=center>
<?php
for ($i=0; $i < 16; $i++) {
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
}
echo "
echo "
</tr>
<tr align=center><td height=10 colspan=16></td></tr>";
if ($admin['tournament'] == 6) {
echo "
if ($admin['tournament'] == 6) {
echo "
<form method=post action=c_betting.php>
<tr align=center>";
for ($i = 0; $i < 16; $i++) {
echo "
for ($i=0; $i < 16; $i++) {
echo "
<td>
<select size=1 id='target_{$i}' style=color:white;background-color:black;>
<select size=1 name=gold{$i} style=color:white;background-color:black;>
<option style=color:white; value=10>금10</option>
<option style=color:white; value=20>금20</option>
<option style=color:white; value=50>금50</option>
@@ -431,165 +368,76 @@ if ($str3) {
<option style=color:white; value=1000>최대</option>
</select>
</td>";
}
}
echo "
echo "
</tr>
<tr align=center>";
for ($i = 0; $i < 16; $i++) {
echo "
<td><input type=button class='submitBtn' data-target='{$i}' value=베팅! style=width:100%;color:white;background-color:black;></td>";
}
for ($i=0; $i < 16; $i++) {
echo "
<td><input type=submit name=btn{$i} value=베팅! style=width:100%;color:white;background-color:black;></td>";
}
echo "</tr>";
}
echo "
</tr>
</form>";
}
?>
<tr align=center>
<td height=30 colspan=16>
<font color=skyblue size=4>배당률</font> × <font color=orange size=4>베팅금</font> = <font color=cyan size=4>적중시 환수금</font><br>
<font color=skyblue size=4>( 베팅후 500 이하일땐 베팅이 불가능합니다. )</font>
</td>
</tr>
<tr align=center>
<td height=10 colspan=16></td>
</tr>
</table>
<table align=center width=1120 class='tb_layout bg0'>
<tr align=center>
<td height=50 colspan=4 class='bg2'>
<font color=yellow size=6>토너먼트 랭킹</font>
</td>
</tr>
<tr align=center>
<td colspan=4 class='bg2'>
<font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font>
</td>
</tr>
<tr align=center>
<?php
?>
<tr align=center>
<td height=30 colspan=16>
<font color=skyblue size=4>배당률</font> × <font color=orange size=4>베팅금</font> = <font color=cyan size=4>적중시 환수금</font><br>
<font color=skyblue size=4>( 베팅후 500 이하일땐 베팅이 불가능합니다. )</font>
</td>
</tr>
<tr align=center><td height=10 colspan=16></td></tr>
</table>
<table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=50 colspan=4 id=bg2><font color=yellow size=6>토너먼트 랭킹</font></td></tr>
<tr align=center><td colspan=4 id=bg2><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr>
<tr align=center>
<?php
$tournamentType = [
'전 력 전' => [
'종합',
function (General $general) {
return $general->getVar('leadership') + $general->getVar('strength') + $general->getVar('intel');
},
'tt',
],
'통 솔 전' => [
'통솔',
function (General $general) {
return $general->getVar('leadership');
},
'tl',
],
'일 기 토' => [
'무력',
function (General $general) {
return $general->getVar('strength');
},
'ts',
],
'설 전' => [
'지력',
function (General $general) {
return $general->getVar('intel');
},
'ti',
],
];
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
$type2 = array("종합", "통솔", "무력", "지력");
$type3 = array("tt", "tl", "tp", "ti");
$type4 = array("total", "leader", "power", "intel");
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
$type2 = array("종합", "통솔", "무력", "지력");
$type3 = array("tt", "tl", "ts", "ti");
$type4 = array("total", "leadership", "strength", "intel");
for ($i=0; $i < 4; $i++) {
$grp = $i;
echo "
<td>
<table align=center width=280 class='tb_layout bg0'>
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4>{$type1[$i]}</font></td></tr>
<tr id=bg1><td align=center></td><td align=center>장수</td><td align=center>{$type2[$i]}</td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td><td align=center></td></tr>";
foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?>
<td>
<table align=center width=280 class='tb_layout bg0 f_tnum'>
<tr>
<td colspan=9 align=center style=color:white;background-color:black;>
<font size=4><?= $tournamentTypeText ?></font>
</td>
</tr>
<tr class='bg1'>
<td align=center></td>
<td align=center>장수</td>
<td align=center><?= $statTypeText ?></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
<td align=center></td>
</tr>
<?php
$prizeColumn = "{$rankColumn}p";
$gameColumn = "{$rankColumn}g";
$winColumn = "{$rankColumn}w";
$drawColumn = "{$rankColumn}d";
$loseColumn = "{$rankColumn}l";
$tournamentRankerList = General::createGeneralObjListFromDB(
$db->queryFirstColumn('SELECT general_id FROM rank_data WHERE `type`= %s ORDER BY value DESC LIMIT 40', $gameColumn),
[$prizeColumn, $gameColumn, $winColumn, $drawColumn, $loseColumn, 'leadership', 'strength', 'intel', 'no', 'npc', 'name'],
0
);
usort($tournamentRankerList, function (General $lhs, General $rhs) use ($gameColumn, $winColumn, $drawColumn, $loseColumn) {
$result = - ($lhs->getRankVar($gameColumn) <=> $rhs->getRankVar($gameColumn));
if ($result !== 0) return $result;
$result = - (
($lhs->getRankVar($winColumn) + $lhs->getRankVar($drawColumn) + $lhs->getRankVar($loseColumn))
<=>
($rhs->getRankVar($winColumn) + $rhs->getRankVar($drawColumn) + $rhs->getRankVar($loseColumn))
);
if ($result !== 0) return $result;
$result = - ($lhs->getRankVar($winColumn) <=> $rhs->getRankVar($winColumn));
if ($result !== 0) return $result;
$result = - ($lhs->getRankVar($drawColumn) <=> $rhs->getRankVar($drawColumn));
if ($result !== 0) return $result;
return $lhs->getRankVar($loseColumn) <=> $rhs->getRankVar($loseColumn);
});
$tournamentRankerList = array_splice($tournamentRankerList, 0, 30);
foreach ($tournamentRankerList as $rank => $ranker) {
printRow(
$rank,
$ranker->getNPCType(),
$ranker->getName(),
($statFunc)($ranker),
$ranker->getRankVar($winColumn) + $ranker->getRankVar($drawColumn) + $ranker->getRankVar($loseColumn),
$ranker->getRankVar($winColumn),
$ranker->getRankVar($drawColumn),
$ranker->getRankVar($loseColumn),
$ranker->getRankVar($gameColumn),
$ranker->getRankVar($prizeColumn),
0
);
}
?>
</table>
</td>
<?php endforeach; ?>
</tr>
<tr>
<td colspan=16>
ㆍ토너먼트의 16 대진표가 완성되면, 베팅 기간이 주어집니다.<br>
ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 있습니다.<br>
ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 1000 베팅 가능합니다.<br>
ㆍ소지금 500 이하일땐 베팅이 불가능합니다.
ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!<br>
</td>
</tr>
</table>
<table align=center width=1120 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
$query = "select npc,name,leader,power,intel,leader+power+intel as total,{$type3[$i]}p as prize,{$type3[$i]}w+{$type3[$i]}d+{$type3[$i]}l as game,{$type3[$i]}w as win,{$type3[$i]}d as draw,{$type3[$i]}l as lose,{$type3[$i]}g as gl from general order by gl desc, game desc, win desc, draw desc, lose, no limit 0,30";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 30; $k++) {
$general = MYDB_fetch_array($result);
printRow($k, $general['npc'], $general['name'], $general[$type4[$i]], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gl'], $general['prize'], 0);
}
echo "
</table>
</td>";
}
?>
</tr>
<tr>
<td colspan=16>
ㆍ토너먼트의 16 대진표가 완성되면, 베팅 기간이 주어집니다.<br>
ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 있습니다.<br>
ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 1000 베팅 가능합니다.<br>
ㆍ소지금 500 이하일땐 베팅이 불가능합니다.
ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!<br>
</td>
</tr>
</table>
<table align=center width=1120 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+181 -67
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -7,79 +6,194 @@ include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$generalObj = General::createGeneralObjFromDB($session->generalID);
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("사령부", 1);
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
if($me['level'] >= 5) { $btn = "submit"; $btn2 = "button"; }
else { $btn = "hidden"; $btn2 = "hidden"; }
$date = date('Y-m-d H:i:s');
// 명령 목록
$admin = $gameStor->getValues(['year','month','turnterm']);
$query = "
select nation,level,
l12turn0,l12turn1,l12turn2,l12turn3,l12turn4,l12turn5,l12turn6,l12turn7,l12turn8,l12turn9,l12turn10,l12turn11,
l11turn0,l11turn1,l11turn2,l11turn3,l11turn4,l11turn5,l11turn6,l11turn7,l11turn8,l11turn9,l11turn10,l11turn11,
l10turn0,l10turn1,l10turn2,l10turn3,l10turn4,l10turn5,l10turn6,l10turn7,l10turn8,l10turn9,l10turn10,l10turn11,
l9turn0, l9turn1, l9turn2, l9turn3, l9turn4, l9turn5, l9turn6, l9turn7, l9turn8, l9turn9, l9turn10, l9turn11,
l8turn0, l8turn1, l8turn2, l8turn3, l8turn4, l8turn5, l8turn6, l8turn7, l8turn8, l8turn9, l8turn10, l8turn11,
l7turn0, l7turn1, l7turn2, l7turn3, l7turn4, l7turn5, l7turn6, l7turn7, l7turn8, l7turn9, l7turn10, l7turn11,
l6turn0, l6turn1, l6turn2, l6turn3, l6turn4, l6turn5, l6turn6, l6turn7, l6turn8, l6turn9, l6turn10, l6turn11,
l5turn0, l5turn1, l5turn2, l5turn3, l5turn4, l5turn5, l5turn6, l5turn7, l5turn8, l5turn9, l5turn10, l5turn11
from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$lv = getNationChiefLevel($nation['level']);
$turn = [];
for($i=12; $i >= $lv; $i--) {
$turn[$i] = getCoreTurn($nation, $i);
$query = "select name,turntime,npc from general where level={$i} and nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gen[$i] = MYDB_fetch_array($result)??[
'npc'=>0,
'name'=>'',
'turntime'=>''
];
}
for($i= $lv - 1; $i>=5; $i--){
$gen[$i] = [
'npc'=>0,
'name'=>'',
'turntime'=>''
];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 사령부</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/chiefCenter.css') ?>
<script type="text/javascript">
var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>;
</script>
<?= WebUtil::printDist('ts', ['common', 'chiefCenter']) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 사령부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<script type="text/javascript">
function turn(type) {
if(type == 0) location.replace('turn_push_core.php');
else if(type == 1) location.replace('turn_pop_core.php');
}
</script>
</head>
<body>
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
<div class='tb_layout bg0'> <button type='button' id='reloadTable'>갱신</button><br>
<?= backButton() ?></div>
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
<div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
<div class='chiefTurnIdxPanel'>
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
</div <?php foreach ([12, 10, 8, 6] as $chiefIdx) : ?>>
<div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
<div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
<div class='chiefTurnBox turn<?= $turnIdx ?>'>
<div class='chiefTurnTime'>&nbsp;</div>
<div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
</div <?php endforeach; ?>>
</div <?php endforeach; ?>>
<div class='chiefTurnIdxPanel tail'>
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
</div>
</div>
<div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'>
<div style='width:400px;text-align:right;'><?= chiefTurnTable()
?></div>
<div style='width:400px;display: flex;justify-content: center;flex-direction: column;'>
<div><input type='button' id='turnPush' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='미루기▼'><input type='button' id='turnPull' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='▲당기기'></div>
<div><?= chiefCommandTable($generalObj)
?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='실 행'></div>
</div>
</div>
<div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
<div class='chiefTurnIdxPanel'>
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
</div <?php foreach ([11, 9, 7, 5] as $chiefIdx) : ?>>
<div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
<div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
<div class='chiefTurnBox turn<?= $turnIdx ?>'>
<div class='chiefTurnTime'>&nbsp;</div>
<div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
</div <?php endforeach; ?>>
</div <?php endforeach; ?>>
<div class='chiefTurnIdxPanel tail'>
<div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
</div>
</div>
<div><?= backButton()
?><?= banner()
?></div>
</div>
<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 class='tb_layout bg0'>
<tr><td colspan=10 align=center bgcolor=skyblue>수뇌부 일정</td></tr>
<tr><td colspan=10 align=center>
<?php
$year = $admin['year'];
$month = $admin['month'];
$date = substr(date('Y-m-d H:i:s'), 14);
$totaldate = [];
$turntime = [];
$turndate = [];
for($i=12; $i >= $lv; $i--) {
$totaldate[$i] = $gen[$i]['turntime'];
$turntime[$i] = substr($gen[$i]['turntime'], 14);
}
//FIXME: 각 칸을 div로 놓으면 네개씩 출력하는 삽질이 필요없다.
for($k=0; $k < 2; $k++) {
$l4 = 12 - $k; $l3 = 10 - $k; $l2 = 8 - $k; $l1 = 6 - $k;
if ($gen[$l4]['npc'] >= 2) { $gen[$l4]['name'] = "<font color=cyan>".($gen[$l4]['name']??'')."</font>"; }
elseif($gen[$l4]['npc'] == 1) { $gen[$l4]['name'] = "<font color=skyblue>".($gen[$l4]['name']??'')."</font>"; }
if ($gen[$l3]['npc'] >= 2) { $gen[$l3]['name'] = "<font color=cyan>".($gen[$l3]['name']??'')."</font>"; }
elseif($gen[$l3]['npc'] == 1) { $gen[$l3]['name'] = "<font color=skyblue>".($gen[$l3]['name']??'')."</font>"; }
if ($gen[$l2]['npc'] >= 2) { $gen[$l2]['name'] = "<font color=cyan>".($gen[$l2]['name']??'')."</font>"; }
elseif($gen[$l2]['npc'] == 1) { $gen[$l2]['name'] = "<font color=skyblue>".($gen[$l2]['name']??'')."</font>"; }
if ($gen[$l1]['npc'] >= 2) { $gen[$l1]['name'] = "<font color=cyan>".($gen[$l1]['name']??'')."</font>"; }
elseif($gen[$l1]['npc'] == 1) { $gen[$l1]['name'] = "<font color=skyblue>".($gen[$l1]['name']??'')."</font>"; }
echo "
<tr>
<td align=center id=bg1>.</td>
<td colspan=2 align=center id=bg1><b>".getLevel($l4, $nation['level'])." : ".($gen[$l4]['name']??'')."</b></td>
<td colspan=2 align=center id=bg1><b>".getLevel($l3, $nation['level'])." : ".($gen[$l3]['name']??'')."</b></td>
<td colspan=2 align=center id=bg1><b>".getLevel($l2, $nation['level'])." : ".($gen[$l2]['name']??'')."</b></td>
<td colspan=2 align=center id=bg1><b>".getLevel($l1, $nation['level'])." : ".($gen[$l1]['name']??'')."</b></td>
<td align=center id=bg1>.</td>
</tr>
";
for($i=0; $i < 12; $i++) {
$turndate[$l4] = substr($totaldate[$l4]??'', 11, 5);
$turndate[$l3] = substr($totaldate[$l3]??'', 11, 5);
$turndate[$l2] = substr($totaldate[$l2]??'', 11, 5);
$turndate[$l1] = substr($totaldate[$l1]??'', 11, 5);
$j = $i + 1;
$td4 = $turndate[$l4]??"-";
$td3 = $turndate[$l3]??"-";
$td2 = $turndate[$l2]??"-";
$td1 = $turndate[$l1]??"-";
$tn4 = $turn[$l4][$i]??"-";
$tn3 = $turn[$l3][$i]??"-";
$tn2 = $turn[$l2][$i]??"-";
$tn1 = $turn[$l1][$i]??"-";
echo "
<tr>
<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']); }
if($totaldate[$l3]??'') { $totaldate[$l3] = addTurn($totaldate[$l3], $admin['turnterm']); }
if($totaldate[$l2]??'') { $totaldate[$l2] = addTurn($totaldate[$l2], $admin['turnterm']); }
if($totaldate[$l1]??'') { $totaldate[$l1] = addTurn($totaldate[$l1], $admin['turnterm']); }
}
if($k == 0) {
echo "<form action=processing.php method=post><tr><td colspan=5 align=right>";
echo CoreTurnTable();
echo "</td><td colspan=5>
<input type={$btn2} style=background-color:".GameConst::$basecolor2.";color:white;width:58px;font-size:13px; value='미루기▼' onclick='turn(0)'>
<input type={$btn2} style=background-color:".GameConst::$basecolor2.";color:white;width:58px;font-size:13px; value='▲당기기' onclick='turn(1)'>
<br>";
CoreCommandTable();
echo "<input type={$btn} style=background-color:".GameConst::$basecolor2.";color:white;width:55px;font-size:13px; value='실 행'></td></tr></form>";
}
}
?>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+397 -459
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -13,15 +12,15 @@ $userID = Session::getUserID();
$userGrade = Session::getUserGrade();
$db = DB::db();
$connect=$db->get();
increaseRefresh("현재도시", 1);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']) ?? [
'nation' => 0,
'level' => 0,
'spy' => ''
];
$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);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
$templates = new \League\Plates\Engine('templates');
@@ -30,126 +29,137 @@ $templates = new \League\Plates\Engine('templates');
<html>
<head>
<title><?= UniqueConst::$serverName ?>: 도시정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style>
#general_list tr td {
text-align: center;
}
<title><?=UniqueConst::$serverName?>: 도시정보</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/select2/select2.full.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/currentCity.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2.min.css')?>
<?=WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<style>
#general_list tr td{
text-align:center;
}
#general_list tr td:last-child {
text-align: left;
padding-left: 1em;
}
#general_list tr td:last-child{
text-align:left;
padding-left:1em;
}
.general_turn_text {
font-size: x-small;
}
</style>
<?= WebUtil::printDist('ts', ['common', 'currentCity']) ?>
.general_turn_text{
font-size:x-small;
}
</style>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=998>
<form name=cityselect method=get>
<div style='text-align:center;'>도시선택 :
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
<?php
if (!$citylist) {
$citylist = $me['city'];
}
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td width=998>
<form name=cityselect method=get>
<div style='text-align:center;'>도시선택 :
<select id="citySelector" name=citylist size=1 style='display:inline-block;min-width:400px;'>
<?php
if(!$citylist){
$citylist = $me['city'];
}
// 재야일때는 현재 도시만
$valid = 0;
if ($me['officer_level'] == 0) {
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
echo "
// 재야일때는 현재 도시만
$valid = 0;
if($me['level'] == 0) {
$query = "select city,name,nation from city where city='{$me['city']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($cityresult);
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>";
} else {
// 아국 도시들 선택
foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) {
echo "
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>";
} else {
// 아국 도시들 선택
$query = "select city,name,nation from city where nation='{$me['nation']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($cityresult);
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($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>";
}
// 아국 장수가 있는 타국 도시들 선택
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) {
echo "
// 아국 장수가 있는 타국 도시들 선택
$query = "select distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation='{$me['nation']}' and B.nation!='{$me['nation']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($cityresult);
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($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 ($myNation['level'] > 0) {
// 첩보도시도 목록에 추가
if($myNation['level'] > 0) {
// 첩보도시도 목록에 추가
$rawSpy = $myNation['spy'];
$rawSpy = $myNation['spy'];
if ($rawSpy == '') {
$spyCities = [];
} else {
$spyCities = array_keys(Json::decode($rawSpy));
}
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));
}
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>";
}
}
}
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>";
}
}
echo "
}
echo "
</select></div>
<p align=center>명령 화면에서 도시를 클릭하셔도 됩니다.</p>
</form>
@@ -158,379 +168,307 @@ $templates = new \League\Plates\Engine('templates');
</table>
<br>";
unset($city);
unset($city);
// 첩보된 도시까지만 허용
$showDetailedInfo = false;
if ($valid) {
$showDetailedInfo = true;
}
if (!key_exists($citylist, CityConst::all())) {
$citylist = $me['city'];
$showDetailedInfo = true;
$valid = 1;
}
if ($userGrade >= 5) {
$valid = true;
$showDetailedInfo = true;
}
if (!$valid) {
$ownCities = Util::convertArrayToSetLike($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i AND nation != 0', $me['nation']));
foreach (array_keys(CityConst::byID($citylist)->path) as $pathID) {
if (key_exists($pathID, $ownCities)) {
$showDetailedInfo = true;
break;
}
}
}
// 첩보된 도시까지만 허용
if($valid == 0 && $userGrade < 5) {
$citylist = $me['city'];
}
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
$cityNation = getNationStaticInfo($city['nation']);
$city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist);
$cityNation = getNationStaticInfo($city['nation']);
//태수, 군사, 종사
$officer = [
4 => ['name' => '-', 'npc' => 0],
3 => ['name' => '-', 'npc' => 0],
2 => ['name' => '-', 'npc' => 0]
];
//태수, 군사, 종사
$gen1 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen1']);
$gen2 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen2']);
$gen3 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen3']);
foreach ($db->query('SELECT `name`, npc, `officer_level` FROM general WHERE `officer_city` = %i', $city['city']) as $officerInfo) {
$officer[$officerInfo['officer_level']] = $officerInfo;
}
if($city['trade'] == 0) {
$city['trade'] = "- ";
}
if ($city['trade'] === null) {
$city['trade'] = "- ";
}
$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);
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
if ($showDetailedInfo) {
$generals = $db->query(
'SELECT %l from general where city=%i order by turntime',
Util::formatListOfBackticks($dbColumns),
$city['city']
);
} else {
$generals = [];
}
$nationname = [];
$nationlevel = [];
foreach(getAllNationStaticInfo() as $nation){
$nationname[$nation['nation']] = $nation['name'];
$nationlevel[$nation['nation']] = $nation['level'];
}
if ($valid) {
$city['trustText'] = round($city['trust'], 1);
$city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2);
} else {
$city['agri'] = '?';
$city['comm'] = '?';
$city['pop'] = '?';
$city['secu'] = '?';
$city['trustText'] = '?';
$city['popRateText'] = '?';
if ($city['nation'] != 0) {
$city['def'] = '?';
$city['wall'] = '?';
}
}
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
$generalsFormat = [];
$generalTurnList = [];
for($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
if ($generals) {
foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]) {
if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = [];
}
$generalTurnList[$generalID][$turnIdx] = $brief;
}
}
$nationInfo = getNationStaticInfo($general['nation']);
if($general['nation'] != 0 && $general['nation'] == $myNation['nation']){
$ourGeneral = true;
}
else{
$ourGeneral = false;
}
if($userGrade == 6){
$ourGeneral = true;
}
$isNPC = $general['npc']>1;
$wounded = $general['injury'];
$name = $general['name'];
$nameText = formatName($name, $general['npc']);
$leadership = $general['leader'];
$power = $general['power'];
$intel = $general['intel'];
$leadershipText = formatWounded($leadership, $general['injury']);
$powerText = formatWounded($power, $general['injury']);
$intelText = formatWounded($intel, $general['injury']);
$level = $general['level'];
$levelText = getLevel($general['level']);
if($general['level'] == 12) {
$leadershipBonus = $nationInfo['level'] * 2;
} elseif($general['level'] >= 5) {
$leadershipBonus = $nationInfo['level'];
} else {
$leadershipBonus = 0;
}
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
if($ourGeneral){
$defenceMode = $general['mode'];
$defenceModeText = formatDefenceMode($defenceMode);
$crewType = $general['crewtype'];
$crewTypeText = GameUnitConst::byId($crewType)->name;
$crew = $general['crew'];
$train = $general['train'];
$atmos = $general['atmos'];
}
else{
$defenceMode = 0;
$defenceModeText = '';
$crewType = 0;
$crewTypeText = '';
$crew = $general['crew'];
$train = -1;
$atmos = -1;
}
$nation = $general['nation'];
$nationName = $nationInfo['name'];
if($ourGeneral && !$isNPC){
$turnText = [];
foreach(getTurn($general, 1) as $turnRawIdx=>$turn){
$turnIdx = $turnRawIdx+1;
$turnText[] = "{$turnIdx} : $turn";
}
$turnText = join('<br>', $turnText);
}
else{
$turnText = '';
}
$generalsFormat[] = [
'ourGeneral'=>$ourGeneral,
'iconPath'=>GetImageURL($general['imgsvr']).'/'.$general['picture'],
'isNPC'=>$isNPC,
'wounded'=>$wounded,
'name'=>$name,
'nameText'=>$nameText,
'leadership'=>$leadership,
'leadershipText'=>$leadershipText,
'leadershipBonus'=>$leadershipBonus,
'leadershipBonusText'=>$leadershipBonusText,
'level'=>$level,
'levelText'=>$levelText,
'power'=>$power,
'powerText'=>$powerText,
'intel'=>$intel,
'intelText'=>$intelText,
'defenceMode'=>$defenceMode,
'defenceModeText'=>$defenceModeText,
'crewType'=>$crewType,
'crewTypeText'=>$crewTypeText,
'crew'=>$crew,
'train'=>$train,
'atmos'=>$atmos,
'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;
$nationname = [];
$nationlevel = [];
foreach (getAllNationStaticInfo() as $nation) {
$nationname[$nation['nation']] = $nation['name'];
$nationlevel[$nation['nation']] = $nation['level'];
}
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;
}
//도시명 오 적군 0/0(0) 병장(총) 0/0(4) 90병장 0/0 60병장 0/0 수비○ 0/0
$generalsFormat = [];
$crewTotal += $general['crew'];
$genTotal += 1;
if($general['crew'] == 0){
continue;
}
$armedGenTotal += 1;
foreach ($generals as $general) {
$nationInfo = getNationStaticInfo($general['nation']);
if($general['train'] >= 90 && $general['atmos'] >= 90){
$crew90 += $general['crew'];
$gen90 += 1;
}
if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) {
$ourGeneral = true;
} else {
$ourGeneral = false;
}
$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 ($userGrade == 6) {
$ourGeneral = true;
}
if($general['train'] >= 60 && $general['atmos'] >= 60){
$crew60 += $general['crew'];
$gen60 += 1;
$isNPC = $general['npc'] > 1;
$wounded = $general['injury'];
if($general['defenceMode'] == 1 && !$chkDef){
$crewDef += $general['crew'];
$genDef += 1;
$chkDef = true;
}
}
}
$name = $general['name'];
$nameText = formatName($name, $general['npc']);
?>
$leadership = $general['leadership'];
$strength = $general['strength'];
$intel = $general['intel'];
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
</table>
$leadershipText = formatWounded($leadership, $general['injury']);
$strengthText = formatWounded($strength, $general['injury']);
$intelText = formatWounded($intel, $general['injury']);
<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>
$officerLevel = $general['officer_level'];
$officerLevelText = getOfficerLevelText($officerLevel);
<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>
$leadershipBonus = calcLeadershipBonus($officerLevel, $nationInfo['level']);
$leadershipBonusText = formatLeadershipBonus($leadershipBonus);
if ($ourGeneral) {
$defenceTrain = $general['defence_train'];
$defenceTrainText = formatDefenceTrain($defenceTrain);
$crewType = $general['crewtype'];
$crewTypeText = GameUnitConst::byId($crewType)->name;
$crew = $general['crew'];
$train = $general['train'];
$atmos = $general['atmos'];
} else {
$defenceTrain = 0;
$defenceTrainText = '';
$crewType = 0;
$crewTypeText = '';
$crew = $general['crew'];
$train = -1;
$atmos = -1;
if (!$valid) {
$crew = -1;
}
}
$nation = $general['nation'];
$nationName = $nationInfo['name'];
if ($ourGeneral && !$isNPC) {
$turnText = [];
$generalObj = new General($general, null, null, null, null, null, false);
foreach ($generalTurnList[$generalObj->getID()] as $turnRawIdx => $turn) {
$turnIdx = $turnRawIdx + 1;
$turnText[] = "{$turnIdx} : $turn";
}
$turnText = join('<br>', $turnText);
} else {
$turnText = '';
}
$generalsFormat[] = [
'ourGeneral' => $ourGeneral,
'iconPath' => GetImageURL($general['imgsvr']) . '/' . $general['picture'],
'isNPC' => $isNPC,
'wounded' => $wounded,
'name' => $name,
'nameText' => $nameText,
'leadership' => $leadership,
'leadershipText' => $leadershipText,
'leadershipBonus' => $leadershipBonus,
'leadershipBonusText' => $leadershipBonusText,
'officerLevel' => $officerLevel,
'officerLevelText' => $officerLevelText,
'strength' => $strength,
'strengthText' => $strengthText,
'intel' => $intel,
'intelText' => $intelText,
'defenceTrain' => $defenceTrain,
'defenceTrainText' => $defenceTrainText,
'crewType' => $crewType,
'crewTypeText' => $crewTypeText,
'crew' => $crew,
'train' => $train,
'atmos' => $atmos,
'nation' => $nation,
'nationName' => $nationName,
'turnText' => $turnText
];
}
$generalsName = array_map(function ($gen) {
return getColoredName($gen['name'], $gen['npc']);
}, $generals);
$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'] || !$myNation['nation']) {
continue;
}
if ($general['nation'] != $myNation['nation']) {
$enemyCnt += 1;
if ($general['crew'] >= 0) {
$enemyCrew += $general['crew'];
}
if ($general['crew'] > 0) {
$enemyArmedCnt += 1;
}
continue;
}
$crewTotal += $general['crew'];
$genTotal += 1;
if ($general['crew'] == 0) {
continue;
}
$armedGenTotal += 1;
$minTrain = min($general['train'], $general['atmos']);
if ($minTrain >= 90) {
$crew90 += $general['crew'];
$gen90 += 1;
}
$chkDef = false;
if ($minTrain >= 80) {
$crew80 += $general['crew'];
$gen80 += 1;
}
if ($minTrain >= 60) {
$crew60 += $general['crew'];
$gen60 += 1;
}
if ($minTrain >= $general['defenceTrain']) {
$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['pop_max'] ?></td>
<td align=center width=48 class=bg1>농업</td>
<td align=center width=108><?= $city['agri'] ?>/<?= $city['agri_max'] ?></td>
<td align=center width=48 class=bg1>상업</td>
<td align=center width=108><?= $city['comm'] ?>/<?= $city['comm_max'] ?></td>
<td align=center width=48 class=bg1>치안</td>
<td align=center width=108><?= $city['secu'] ?>/<?= $city['secu_max'] ?></td>
<td align=center width=48 class=bg1>수비</td>
<td align=center width=108><?= $city['def'] ?>/<?= $city['def_max'] ?></td>
<td align=center width=48 class=bg1>성벽</td>
<td align=center width=108><?= $city['wall'] ?>/<?= $city['wall_max'] ?></td>
</tr>
<tr>
<td align=center class=bg1>민심</td>
<td align=center><?= $city['trustText'] ?></td>
<td align=center class=bg1>시세</td>
<td align=center><?= $city['trade'] ?>%</td>
<td align=center class=bg1>인구</td>
<td align=center><?= $city['popRateText'] ?>%</td>
<td align=center class=bg1>태수</td>
<td align=center><?= $officer[4]['name'] ?></td>
<td align=center class=bg1>군사</td>
<td align=center><?= $officer[3]['name'] ?></td>
<td align=center class=bg1>종사</td>
<td align=center><?= $officer[2]['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><?= $showDetailedInfo ? join(', ', $generalsName) : '<span style="color:gray">알 수 없음</span>' ?></td>
</tr>
</table>
<br>
<?php if ($showDetailedInfo) : ?>
<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>
<?php endif; ?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</body>
</html>
</html>
+260 -213
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -10,15 +9,13 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("내무부", 1);
$me = $db->queryFirstRow('SELECT no, nation, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$me = $db->queryFirstRow('SELECT no, nation, level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
$nationID = $me['nation'];
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nation = $db->queryFirstRow('SELECT msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -27,15 +24,16 @@ if ($con >= 2) {
}
$permission = checkSecretPermission($me);
if ($permission < 0) {
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
} else if ($permission < 1) {
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
if ($me['officer_level'] >= 5) {
if ($me['level'] >= 5) {
$btn = "submit";
$read = "";
} else {
@@ -43,227 +41,276 @@ if ($me['officer_level'] >= 5) {
$read = "readonly";
}
$nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
?>
<!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::printStaticValues([
'editable' => ($me['officer_level'] >= 5 || $permission == 4),
'nationMsg' => $nationStor->notice ?? '',
'scoutMsg' => $nationStor->scout_msg ?? '',
]) ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('vue', 'v_dipcenter', true) ?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 내무부</title>
<script>
var editable = <?=(($me['level']>=5||$permission==4)?'true':'false')?>;
var nationMsg = <?=Json::encode($nation['msg']??'')?>;
var scoutmsg = <?=Json::encode($nation['scoutmsg']??'')?>;
</script>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/summernote-bs4.min.js')?>
<?=WebUtil::printJS('../e_lib/summernote/lang/summernote-ko-KR.js')?>
<?=WebUtil::printJS('../e_lib/summernote/plugin/image-sammo/summernote-image-flip.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/dipcenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/dipcenter.css')?>
<link href="https://fonts.googleapis.com/css?family=Nanum+Gothic|Nanum+Myeongjo|Nanum+Pen+Script" rel="stylesheet">
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=9 align=center bgcolor=blue> </td>
</tr>
<tr>
<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>
<td width=80 align=center class=bg1>상태</td>
<td width=60 align=center class=bg1>기간</td>
<td width=100 align=center class=bg1> </td>
</tr>
<?php
$admin = $gameStor->getValues(['year', 'month']);
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue> </td></tr>
<tr>
<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>
<td width=80 align=center class=bg1>상태</td>
<td width=60 align=center class=bg1>기간</td>
<td width=100 align=center class=bg1> </td>
</tr>
<?php
$admin = $gameStor->getValues(['year','month']);
$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
$query = "select nation,name,color,power,gennum from nation order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nationcount = MYDB_num_rows($result);
for ($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($result);
$nationsList = getAllNationStaticInfo();
uasort($nationsList, function (array $lhs, array $rhs) {
return - ($lhs['power'] <=> $rhs['power']);
});
// 아국표시
if ($nation['nation'] == $me['nation']) {
//속령수
$query = "select city from city where nation='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($result2);
echo "
<tr>
<td align=center style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</td>
<td align=center>{$nation['power']}</td>
<td align=center>{$nation['gennum']}</td>
<td align=center>$citycount</td>
<td align=center>-</td>
<td align=center>-</td>
<td align=center>-</td>
</tr>";
foreach ($nationsList as $staticNation) :
//속령수
$staticNationID = $staticNation['nation'];
$cityCnt = $cityCntList[$staticNation['nation']] ?? 0;
$dipStateText = '-';
$dipTermText = '-';
$dipEndDateText = '-';
if ($staticNationID !== $nationID) {
$diplomacyState = $dipStateList[$staticNationID];
$dipStateText = [
0 => "<font color=red>교 전</font>",
1 => "<font color=magenta>선포중</font>",
2 => "통 상",
7 => "<font color=green>불가침</font>",
][$diplomacyState['state']];
if ($diplomacyState['term']) {
$dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1;
$dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12);
$dipEndMonth = $dipEndMonth % 12 + 1;
$dipTermText = $diplomacyState['term'] . '개월';
$dipEndDateText = "{$dipEndYear}{$dipEndMonth}";
}
}
?>
<tr>
<td class='center' style='color:<?= newColor($staticNation['color']) ?>;background-color:<?= $staticNation['color'] ?>'><?= $staticNation['name'] ?></td>
<td class='center'><?= $staticNation['power'] ?></td>
<td class='center'><?= $staticNation['gennum'] ?></td>
<td class='center'><?= $cityCnt ?></td>
<td class='center'><?= $dipStateText ?></td>
<td class='center'><?= $dipTermText ?></td>
<td class='center'><?= $dipEndDateText ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php
// 수입 연산
$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$warIncome = getWarGoldIncome($nation['type'], $cityList);
$totalGoldIncome = $goldIncome + $warIncome;
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$totalRiceIncome = $riceIncome + $wallIncome;
$outcome = getOutcome($nation['bill'], $dedicationList);
$budgetgold = $nation['gold'] + $totalGoldIncome - $outcome;
$budgetrice = $nation['rice'] + $totalRiceIncome - $outcome;
$budgetgolddiff = $totalGoldIncome - $outcome;
$budgetricediff = $totalRiceIncome - $outcome;
if ($budgetgolddiff > 0) {
$budgetgolddiff = '+' . number_format($budgetgolddiff);
} else {
$budgetgolddiff = number_format($budgetgolddiff);
}
if ($budgetricediff > 0) {
$budgetricediff = '+' . number_format($budgetricediff);
} else {
$budgetricediff = number_format($budgetricediff);
continue;
}
?>
<div class='tb_layout bg0' style='margin:auto;width: 1000px;' id="editorForm">
$query = "select state,term from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dip = MYDB_fetch_array($result2);
</div>
<table class="tb_layout bg0" style="margin:auto;">
<form name=form1 method=post action=c_dipcenter.php>
//속령수
$query = "select city from city where nation='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($result2);
switch ($dip['state']) {
case 0: $state = "<font color=red>교 전</font>"; break;
case 1: $state = "<font color=magenta>선포중</font>"; break;
case 2: $state = "통 상"; break;
case 3: $state = "<font color=cyan>통합수락중</font>"; break;
case 4: $state = "<font color=cyan>통합제의중</font>"; break;
case 5: $state = "<font color=cyan>합병수락중</font>"; break;
case 6: $state = "<font color=cyan>합병제의중</font>"; break;
case 7: $state = "<font color=green>불가침</font>"; break;
}
<tr>
<td colspan=2 align=center bgcolor=green> &amp; </td>
</tr>
<tr>
<td colspan=2>
<table width=998 class='tb_layout bg0'>
<tr>
<td colspan=2 align=center class=bg1>자금 예산</td>
<td colspan=2 align=center class=bg1>병량 예산</td>
</tr>
<tr>
<td width=248 align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td width=248 align=center><?= number_format($nation['gold']) ?></td>
<td width=248 align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td width=248 align=center><?= number_format($nation['rice']) ?></td>
</tr>
<tr>
<td align=right class=bg1>단기수입&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($warIncome) ?></td>
<td align=right class=bg1>둔전수입&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($wallIncome) ?></td>
</tr>
<tr>
<td align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($goldIncome) ?></td>
<td align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($riceIncome) ?></td>
</tr>
<tr>
<td align=right class=bg1>수입 / 지출&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($totalGoldIncome) ?> / -<?= number_format($outcome) ?></td>
<td align=right class=bg1>수입 / 지출&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?= number_format($totalRiceIncome) ?> / -<?= number_format($outcome) ?></td>
</tr>
<tr>
<td align=right class=bg1>국고 예산&nbsp;&nbsp;&nbsp;</td>
<td align=center><?= number_format($budgetgold) ?> (<?= $budgetgolddiff ?>)</td>
<td align=right class=bg1>병량 예산&nbsp;&nbsp;&nbsp;</td>
<td align=center><?= number_format($budgetrice) ?> (<?= $budgetricediff ?>)</td>
</tr>
<tr>
<td align=right class=bg1>세율 (5 ~ 30%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?= $read ?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['rate'] ?>>% <input type=<?= $btn ?> name=btn value=세율></td>
<td align=right class=bg1>봉급 지급률 (20 ~ 200%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?= $read ?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['bill'] ?>>% <input type=<?= $btn ?> name=btn value=지급률></td>
</tr>
<tr>
<td align=right class=bg1>기밀 권한 (1 ~ 99)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?= $read ?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['secretlimit'] ?>>년 <input type=<?= $btn ?> name=btn value=기밀권한></td>
<td align=right class=bg1>전쟁 허용/금지 변경 가능</td>
<td align=center><?= $nationStor->getValue('available_war_setting_cnt') ?>회(월 +<?= GameConst::$incAvailableWarSettingCnt ?>회, 최대<?= GameConst::$maxAvailableWarSettingCnt ?>회)</td>
</tr>
<tr>
<td colspan=4 align=center>
<?php
if ($nation['scout'] == 0) {
echo "
$term = $admin['year'] * 12 + $admin['month'] + $dip['term'];
$year = intdiv($term, 12);
$month = $term % 12;
if ($month == 0) {
$month = 12;
$year--;
}
$date = date('Y-m-d H:i:s');
echo "
<tr>
<td align=center style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</td>
<td align=center>{$nation['power']}</td>
<td align=center>{$nation['gennum']}</td>
<td align=center>$citycount</td>
<td align=center>$state</td>";
if ($dip['term'] != 0) {
echo"
<td align=center>{$dip['term']} 개월</td>
<td align=center>{$year} {$month}</td>";
} else {
echo"
<td align=center>-</td>
<td align=center>-</td>";
}
echo "</tr>";
}
echo "
</table>
";
$query = "select nation,name,color,type,gold,rice,bill,rate,scout,war,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$admin = $gameStor->getValues(['gold_rate','rice_rate']);
// 금 수지
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
$goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']);
$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome;
$goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']);
$riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']);
$riceincome = $riceincomeList[0] + $riceincomeList[1];
$riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']);
$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome;
$budgetrice = $nation['rice'] + $riceincome - $riceoutcome;
$budgetgolddiff = $goldincome - $goldoutcome + $deadIncome;
$budgetricediff = $riceincome - $riceoutcome;
if ($budgetgolddiff > 0) {
$budgetgolddiff = "+{$budgetgolddiff}";
} else {
$budgetgolddiff = "$budgetgolddiff";
}
if ($budgetricediff > 0) {
$budgetricediff = "+{$budgetricediff}";
} else {
$budgetricediff = "$budgetricediff";
}
?>
<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'><div id='noticeForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
국가 방침
</div>
<div>
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
<div class='edit_form viewer'></div>
</div></td></tr>
<tr><td colspan='2'><div id='scoutMsgForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
임관 권유
</div>
<div>
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
<input type='hidden' class='input_form' name='scoutmsg' data-global='scoutmsg'>
<div style="width:870px;margin-left:auto;">
<div class='edit_form viewer'></div>
</div>
</div>
</div></td></tr>
<tr><td colspan=2 align=center bgcolor=green> &amp; </td></tr>
<tr>
<td colspan=2>
<table width=998 class='tb_layout bg0'>
<tr>
<td colspan=2 align=center class=bg1>자금 예산</td>
<td colspan=2 align=center class=bg1>병량 예산</td>
</tr>
<tr>
<td width=248 align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td width=248 align=center><?=$nation['gold']?></td>
<td width=248 align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td width=248 align=center><?=$nation['rice']?></td>
</tr>
<tr>
<td align=right class=bg1>단기수입&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$deadIncome?></td>
<td align=right class=bg1>둔전수입&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$riceincomeList[1]?></td>
</tr>
<tr>
<td align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$goldincomeList[0]?></td>
<td align=right class=bg1> &nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$riceincomeList[0]?></td>
</tr>
<tr>
<td align=right class=bg1>수입 / 지출&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$goldincome?> / -<?=$goldoutcome?></td>
<td align=right class=bg1>수입 / 지출&nbsp;&nbsp;&nbsp;</td>
<td align=center>+<?=$riceincome?> / -<?=$riceoutcome?></td>
</tr>
<tr>
<td align=right class=bg1>국고 예산&nbsp;&nbsp;&nbsp;</td>
<td align=center><?=$budgetgold?> (<?=$budgetgolddiff?>)</td>
<td align=right class=bg1>병량 예산&nbsp;&nbsp;&nbsp;</td>
<td align=center><?=$budgetrice?> (<?=$budgetricediff?>)</td>
</tr>
<tr>
<td align=right class=bg1>세율 (5 ~ 30%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
<td align=right class=bg1>봉급 지급률 (20 ~ 200%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급률></td>
</tr>
<tr>
<td align=right class=bg1>기밀 권한 (1 ~ 99)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
<td align=right class=bg1>임관&amp;전쟁 변경 가능</td>
<td align=center>무제한</td>
</tr>
<tr>
<td colspan=4 align=center>
<?php
if ($nation['scout'] == 0) {
echo "
<input type=$btn name=btn value='임관 금지'>";
} else {
echo "
} else {
echo "
<input type=$btn name=btn value='임관 허가'>";
}
}
if ($nation['war'] == 0) {
echo "
if ($nation['war'] == 0) {
echo "
<input type=$btn name=btn value='전쟁 금지'>";
} else {
echo "
} else {
echo "
<input type=$btn name=btn value='전쟁 허가'>";
}
?>
</td>
</tr>
</table>
<tr>
<td colspan=2>기밀 권한이란, 암행부를 열람할 있는 일반 장수의 최소 사관 년수를 의미합니다.</td>
</tr>
<tr>
<td colspan=2 height=10></td>
</tr>
</form>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
}
?>
</td>
</tr>
</table>
<tr><td colspan=2>기밀 권한이란, 암행부를 열람할 있는 일반 장수의 최소 사관 년수를 의미합니다.</td></tr>
<tr><td colspan=2 height=10></td></tr>
</form>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+188 -186
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -10,227 +9,230 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("중원정보", 1);
$mapTheme = $gameStor->map_theme ?? 'che';
$mapTheme = $gameStor->map_theme??'che';
$me = $db->queryFirstRow('SELECT no,nation FROM general WHERE owner=%i', $userID);
$myNationID = $me['nation'];
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$nations = array_filter(getAllNationStaticInfo(), function (array $nation) {
return $nation['level'];
});
uasort($nations, function (array $lhs, array $rhs) {
return - ($lhs['power'] <=> $rhs['power']);
});
$nationCnt = count($nations);
$query = "select nation,color,name,power,gennum from nation where level>0 order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationcount = MYDB_num_rows($result);
$nationnum = [];
$nationname = [];
foreach ($db->queryAllLists('SELECT nation, count(city) FROM city WHERE nation != 0 GROUP BY nation') as [$nationID, $cityCnt]) {
$nations[$nationID]['city_cnt'] = $cityCnt;
$nationStr = "";
$powerStr = "";
$genStr = "";
$cityStr = "";
for($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($result);
$query = "select city from city where nation='{$nation['nation']}'";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
$nationnum[] = $nation['nation'];
$nationname[$nation['nation']] = $nation['name'];
$nationStr .= "<font color=cyan>◆</font> <font style=color:".newColor($nation['color']).";background-color:{$nation['color']};>{$nation['name']}</font><br>";
$powerStr .= "{$nation['power']}<br>";
$genStr .= "{$nation['gennum']}<br>";
$cityStr .= "$citycount<br>";
}
$realConflict = [];
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
$cityID,
$cityName,
$cityID,
$cityName,
$rawConflict
]) {
$rawConflict = Json::decode($rawConflict);
if (count($rawConflict) < 2) {
])
{
$conflict = Json::decode($rawConflict);
if (count($conflict)<2) {
continue;
}
$sum = array_sum($rawConflict);
$sum = array_sum($conflict);
$conflict = [];
foreach ($rawConflict as $nationID => $killnum) {
$conflict[$nationID] = [
'killnum' => $killnum,
'percent' => round(100 * $killnum / $sum, 1),
'name' => $nations[$nationID]['name'],
'color' => $nations[$nationID]['color']
];
foreach ($conflict as $nationID=>$killnum) {
$conflict[$nationID] = ['killnum'=>$killnum];
$conflict[$nationID]['percent'] = round(100*$killnum / $sum, 1);
$conflict[$nationID]['name'] = $nationname[$nationID];
$conflict[$nationID]['color'] = getNationStaticInfo($nationID)['color'];
}
$realConflict[] = [$cityID, $cityName, $conflict];
};
$diplomacyList = [];
foreach ($db->queryAllLists('SELECT me, you, state FROM diplomacy') as [$me, $you, $state]) {
if (!key_exists($me, $diplomacyList)) {
$diplomacyList[$me] = [];
}
$diplomacyList[$me][$you] = $state;
}
$cellWidth = intdiv(888, max(1, $nationCnt));
$defaultStateChar = '?';
$sameNationStateChar = '';
$infomativeStateCharMap = [
0 => '<span style="color:red;">★</span>',
1 => '<span style="color:magenta;">▲</span>',
2 => 'ㆍ',
7 => '<span style="color:green;">@</span>'
];
$neutralStateCharMap = [
0 => '<span style="color:red;">★</span>',
1 => '<span style="color:magenta;">▲</span>'
];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 중원 정보</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script>
window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>';
$(function() {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 중원 정보</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../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,
useCachedMap: true
});
reloadWorldMap({
neutralView:true,
showMe:true,
useCachedMap:true
});
});
</script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
});
</script>
</head>
<body>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td> <br><?= backButton() ?></td>
</tr>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td colspan=<?= $nationCnt + 1 ?> align=center bgcolor=blue>외 교 현 황</td>
</tr>
<tr>
<td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;>&nbsp;</td>
<?php foreach ($nations as $nation) : ?>
<td align=center width=<?= $cellWidth ?> style='background-color:<?= $nation['color'] ?>;color:<?= newColor($nation['color']) ?>'><?= $nation['name'] ?></td>
<?php endforeach; ?>
</tr>
<?php foreach ($nations as $me => $meNation) : ?>
<tr style='text-align:center;'>
<td align=center style='background-color:<?= $meNation['color'] ?>;color:<?= newColor($meNation['color']) ?>'><?= $meNation['name'] ?></td>
<?php foreach (array_keys($nations) as $you) : ?>
<td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php
if ($me == $you) {
echo $sameNationStateChar;
} else if ($me == $myNationID || $you == $myNationID || $session->userGrade >= 5) {
echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
} else {
echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
}
?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<tr>
<td colspan=<?= $nationCnt + 1 ?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font>
</td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=backButton()?></td></tr>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
<?php
echo "
<tr>
<td align=center width=130 style=background-color:".GameConst::$basecolor2.";>&nbsp;</td>";
<?php if ($realConflict) : ?>
if($nationcount != 0) {
$width = intdiv(888, $nationcount);
}
<br>
<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)) : ?>
for($i=0; $i < $nationcount; $i++) {
echo "
<td align=center width={$width} style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
}
echo "
</tr>";
$state = [];
for($i=0; $i < $nationcount; $i++) {
$query = "select you,state from diplomacy where me='$nationnum[$i]'";
$dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationcount2 = MYDB_num_rows($dipresult);
for($k=0; $k < $nationcount2; $k++) {
$dip = MYDB_fetch_array($dipresult);
$state[$dip['you']] = $dip['state'];
}
echo "
<tr>
<td align=center style=background-color:".getNationStaticInfo($nationnum[$i])['color'].";color:".newColor(getNationStaticInfo($nationnum[$i])['color']).";>{$nationname[$nationnum[$i]]}</td>";
for($k=0; $k < $nationcount; $k++) {
if($i == $k) {
$str = "";
} else {
switch($state[$nationnum[$k]]) {
case 0: $str = "<font color=red>★</font>"; break;
case 1: $str = "<font color=magenta>▲</font>"; break;
case 2:
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = ""; }
else { $str = "?"; }
// $str = "ㆍ";
break;
case 3: $str = "<font color=cyan>○</font>"; break;
case 4: $str = "<font color=cyan>○</font>"; break;
case 5: $str = "<font color=cyan>◎</font>"; break;
case 6: $str = "<font color=cyan>◎</font>"; break;
case 7:
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $session->userGrade >= 5) { $str = "<font color=green>@</font>"; }
else { $str = "?"; }
// $str = "<font color=limegreen>@</font>";
break;
}
}
if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation']) { $backcolor = "style=background-color:".GameConst::$basecolor3.";"; }
else { $backcolor = ""; }
echo "
<td align=center $backcolor>$str</td>";
}
echo "
</tr>
";
}
?>
<tr><td colspan=<?=$nationcount+1?> align=center>불가침 : <font color=limegreen>@</font>, <!--통합 : <font color=cyan>○</font>, -->합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
</table>
<?php if ($realConflict) : ?>
<br>
<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 style='width:948px;position:relative;'>
<table class='tb_layout bg0' style='width:100%;'>
<?php foreach($conflict as $item): ?>
<tr>
<td align=center width=48><?= $cityName ?></td>
<td style='width:948px;position:relative;'>
<table class='tb_layout bg0' style='width:100%;'>
<?php foreach ($conflict as $item) : ?>
<tr>
<td width=130 align=right style='color:<?= newColor($item['color']) ?>;background-color:<?= $item['color'] ?>;'><?= $item['name'] ?>&nbsp;</td>
<td width=48 align=right><?= (float)$item['percent'] ?> %&nbsp;</td>
<td width=*>
<div style='display:inline-block;width:<?= $item['percent'] ?>%;background-color:<?= $item['color'] ?>;'>&nbsp;</div>
</td>
</tr>
<?php endforeach; ?>
</table>
</td>
<td
width=130
align=right
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
><?=$item['name']?>&nbsp;</td>
<td width=48 align=right><?=(float)$item['percent']?> %&nbsp;</td>
<td width=*><div
style='display:inline-block;width:<?=$item['percent']?>%;background-color:<?=$item['color']?>;'
>&nbsp;</div></td>
</tr>
<?php endforeach; ?>
<tr>
<td colspan=2 height=5 class='bg1'></td>
</tr>
</table>
</table>
</td>
</tr>
<?php endforeach; ?>
<tr><td colspan=2 height=5 id=bg1></td></tr>
</table>
<?php endif; ?>
<?php endif; ?>
<br>
<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($mapTheme) ?>
</td>
<td id='nation_list_frame'>
<table id='nation_list'>
<thead>
<tr>
<th width=130>국명</th>
<th width=70>국력</th>
<th width=45>장수</th>
<th width=45>속령</th>
</tr>
</thead>
<tbody>
<?php foreach ($nations as $nation) : ?>
<tr>
<td><span style='color:<?= newColor($nation['color']) ?>;background-color:<?= $nation['color'] ?>'><?= $nation['name'] ?></td>
<td style='text-align:right'><?= number_format($nation['power']) ?></td>
<td style='text-align:right'><?= number_format($nation['gennum']) ?></td>
<td style='text-align:right'><?= number_format($nation['city_cnt']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot></tfoot>
</table>
</td>
</tr>
</table>
<br>
<br>
<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($mapTheme)?>
</td>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$nationStr?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$powerStr?></td>
<td width=43 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>장수</div><?=$genStr?></td>
<td width=40 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>속령</div><?=$cityStr?></td>
</tr>
</table>
<br>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>
+187 -217
View File
@@ -1,5 +1,4 @@
<?php
namespace sammo;
include "lib.php";
@@ -16,12 +15,17 @@ $userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
increaseRefresh("암행부", 1);
$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,permission,penalty from general where owner=%i', $userID);
$query = "select no,nation,level,con,turntime,belong,permission,penalty from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$nationLevel = $db->queryFirstField('SELECT level FROM nation WHERE nation=%i', $me['nation']);
$query = "select level from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -30,10 +34,11 @@ if ($con >= 2) {
}
$permission = checkSecretPermission($me);
if ($permission < 0) {
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
} else if ($permission < 1) {
}
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die();
}
@@ -42,241 +47,206 @@ $sel = [];
$sel[$type] = "selected";
$templates = new \League\Plates\Engine('templates');
?>
<!DOCTYPE html>
<html>
<?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<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') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
<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('../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 class='tb_layout bg0'>
<tr>
<td> <br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=get>정렬순서 :
<select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>자금</option>
<option <?= $sel[2] ?? '' ?> value=2>군량</option>
<option <?= $sel[3] ?? '' ?> value=3>도시</option>
<option <?= $sel[4] ?? '' ?> value=4>병종</option>
<option <?= $sel[5] ?? '' ?> value=5>병사</option>
<option <?= $sel[6] ?? '' ?> value=6>삭제턴</option>
<option <?= $sel[7] ?? '' ?> value=7>턴</option>
<option <?= $sel[8] ?? '' ?> value=8>부대</option>
</select>
<input type=submit value='정렬하기'>
</form>
</td>
</tr>
</table>
<?php
$troopName = [];
foreach ($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]) {
$troopName[$troopID] = $tName;
<table align=center width=1000 class='tb_layout bg0'>
<tr><td> <br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=get>정렬순서 :
<select name=type size=1>
<option <?=$sel[1]??''?> value=1>자금</option>
<option <?=$sel[2]??''?> value=2>군량</option>
<option <?=$sel[3]??''?> value=3>도시</option>
<option <?=$sel[4]??''?> value=4>병종</option>
<option <?=$sel[5]??''?> value=5>병사</option>
<option <?=$sel[6]??''?> value=6>삭제턴</option>
<option <?=$sel[7]??''?> value=7>턴</option>
<option <?=$sel[8]??''?> value=8>부대</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<?php
$troopName = [];
foreach($db->queryAllLists('SELECT troop, name FROM troop WHERE nation=%i', $me['nation']) as [$troopID, $tName]){
$troopName[$troopID] = $tName;
}
$orderSQL = '';
switch ($type) {
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;
}
$generals = $db->query('SELECT npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general WHERE nation = %i %l', $me['nation'], $orderSQL);
$genCntEff = 0;
foreach ($generals as &$general) {
$general['cityText'] = CityConst::byID($general['city'])->name;
$general['troopText'] = $troopName[$general['troop']]??'-';
if($general['npc'] != 5){
$genCntEff += 1;
}
$orderSQL = '';
switch ($type) {
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;
if ($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif ($general['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
}
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$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>{$lbonusText}";
$power = "<font color=red>{$power}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leader = "{$general['leader']}{$lbonusText}";
$power = "{$general['power']}";
$intel = "{$general['intel']}";
}
$generals = $db->query(
'SELECT npc,defence_train,no,officer_level,troop,city,injury,leadership,strength,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,nation from general WHERE nation = %i %l',
$me['nation'],
$orderSQL
);
$general['leaderText'] = $leader;
$general['powerText'] = $power;
$general['intelText'] = $intel;
$generalTurnList = [];
$general['expLevelText'] = getExpLevel($general['experience']);
foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief]) {
if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = [];
if ($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'];
}
//TODO: npc 코드를 일원화
$general['nameText'] = $name;
switch ($general['mode']) {
case 0: $mode = "×"; break;
case 1: $mode = ""; break;
case 2: $mode = ""; break;
}
$general['modeText'] = $mode;
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name??'-';
if ($general['npc'] < 2) {
$turntext = [];
$turn = getTurn($general, 1, 0);
for ($i=0; $i < 5; $i++) {
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 41);
$k = $i+1;
$turntext[] = "&nbsp;$k : $turn[$i]";
}
$generalTurnList[$generalID][$turnIdx] = $brief;
$general['turntext'] = join("<br>\n", $turntext);
}
}
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;
}
$genCntEff = 0;
foreach ($generals as &$general) {
$general['cityText'] = CityConst::byID($general['city'])->name;
$general['troopText'] = $troopName[$general['troop']] ?? '-';
if ($general['npc'] != 5) {
$genCntEff += 1;
}
$lbonus = calcLeadershipBonus($general['officer_level'], $nationLevel);
if ($lbonus > 0) {
$lbonusText = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonusText = "";
}
$general['lbonus'] = $lbonus;
$general['lbonusText'] = $lbonusText;
if ($general['injury'] > 0) {
$leadership = intdiv($general['leadership'] * (100 - $general['injury']), 100);
$strength = intdiv($general['strength'] * (100 - $general['injury']), 100);
$intel = intdiv($general['intel'] * (100 - $general['injury']), 100);
$leadership = "<font color=red>{$leadership}</font>{$lbonusText}";
$strength = "<font color=red>{$strength}</font>";
$intel = "<font color=red>{$intel}</font>";
} else {
$leadership = "{$general['leadership']}{$lbonusText}";
$strength = "{$general['strength']}";
$intel = "{$general['intel']}";
}
$general['leadershipText'] = $leadership;
$general['strengthText'] = $strength;
$general['intelText'] = $intel;
$general['expLevelText'] = getExpLevel($general['experience']);
$general['nameText'] = getColoredName($general['name'], $general['npc']);
$general['modeText'] = formatDefenceTrain($general['defence_train']);
$general['crewtypeText'] = GameUnitConst::byId($general['crewtype'])->name ?? '-';
if ($general['npc'] < 2) {
$turntext = [];
foreach ($generalTurnList[$general['no']] as $turnRawIdx => $turn) {
$turn = StringUtil::subStringForWidth($turn, 0, 41);
$turnIdx = $turnRawIdx + 1;
$turntext[] = "&nbsp;$turnIdx : $turn";
}
$general['turntext'] = join("<br>\n", $turntext);
}
if($general['train'] >= 80 && $general['atmos'] >= 80){
$crew80 += $general['crew'];
$gen80 += 1;
}
unset($general);
$genCnt = countPureGeneralFromRawList($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) {
if ($general['npc'] == 5) {
continue;
}
$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;
}
if($general['train'] >= 60 && $general['atmos'] >= 60){
$crew60 += $general['crew'];
$gen60 += 1;
}
?>
}
?>
<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 / $genCntEff, 2) ?></td>
<td class='bg1'>평균 </td>
<td><?= number_format($totalRice / $genCntEff, 2) ?></td>
</tr>
<tr>
<td class='bg1'>전체 병력/장수</td>
<td><?= number_format($crewTotal) ?>/<?= number_format($genCntEff) ?></td>
<td class='bg1'>훈사 90 병력/장수</td>
<td><?= number_format($crew90) ?>/<?= number_format($gen90) ?></td>
<td class='bg1'>훈사 80 병력/장수</td>
<td><?= number_format($crew80) ?>/<?= number_format($gen80) ?></td>
<td class='bg1'>훈사 60 병력/장수</td>
<td><?= number_format($crew60) ?>/<?= number_format($gen60) ?></td>
</tr>
</tbody>
</table>
<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/$genCntEff, 2)?></td>
<td class='bg1'>평균 </td><td><?=number_format($totalRice/$genCntEff, 2)?></td>
</tr>
<tr>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td>
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td>
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td>
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td>
</tr>
</tbody>
</table>
<?= $templates->render('generalList', ['generals' => $generals]) ?>
<?=$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>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</body>
</html>
</html>

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